diff --git a/.gitignore b/.gitignore index 3780f27..5118351 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ /.vscode /.idea +# Plugins +/site/plugins/ + # System files Icon .DS_Store diff --git a/README.md b/README.md deleted file mode 100644 index 7f0cb69..0000000 --- a/README.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -**Kirby: the CMS that adapts to any project, loved by developers and editors alike.** -The Plainkit is a minimal Kirby setup with the basics you need to start a project from scratch. It is the ideal choice if you are already familiar with Kirby and want to start step-by-step. - -You can learn more about Kirby at [getkirby.com](https://getkirby.com). - -### Try Kirby for free -You can try Kirby and the Plainkit on your local machine or on a test server as long as you need to make sure it is the right tool for your next project. … and when you’re convinced, [buy your license](https://getkirby.com/buy). - -### Get going -Read our guide on [how to get started with Kirby](https://getkirby.com/docs/guide/quickstart). - -You can [download the latest version](https://github.com/getkirby/plainkit/archive/main.zip) of the Plainkit. -If you are familiar with Git, you can clone Kirby's Plainkit repository from Github. - - git clone https://github.com/getkirby/plainkit.git - -## What's Kirby? -- **[getkirby.com](https://getkirby.com)** – Get to know the CMS. -- **[Try it](https://getkirby.com/try)** – Take a test ride with our online demo. Or download one of our kits to get started. -- **[Documentation](https://getkirby.com/docs/guide)** – Read the official guide, reference and cookbook recipes. -- **[Issues](https://github.com/getkirby/kirby/issues)** – Report bugs and other problems. -- **[Feedback](https://feedback.getkirby.com)** – You have an idea for Kirby? Share it. -- **[Forum](https://forum.getkirby.com)** – Whenever you get stuck, don't hesitate to reach out for questions and support. -- **[Discord](https://chat.getkirby.com)** – Hang out and meet the community. -- **[Twitter](https://twitter.com/getkirby)** – Spread the word. -- **[Instagram](https://www.instagram.com/getkirby/)** – Share your creations: #madewithkirby. - ---- - -© 2009-2020 Bastian Allgeier (Bastian Allgeier GmbH) -[getkirby.com](https://getkirby.com) · [License agreement](https://getkirby.com/license) diff --git a/composer.json b/composer.json index 3d821fa..476f119 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,22 @@ { - "name": "getkirby/plainkit", - "description": "Kirby Plainkit", + "name": "paulnicoue/xiaowang", + "description": "Xiao Wang", "type": "project", - "keywords": ["kirby", "cms", "starterkit"], - "homepage": "https://getkirby.com", + "homepage": "https://xiaowang.fr", "authors": [ { - "name": "Bastian Allgeier", - "email": "bastian@getkirby.com", - "homepage": "https://getkirby.com" + "name": "Paul Nicoué", + "email": "contact@paulnicoue.com", + "homepage": "https://paulnicoue.com" } ], - "support": { - "email": "support@getkirby.com", - "issues": "https://github.com/getkirby/starterkit/issues", - "forum": "https://forum.getkirby.com", - "source": "https://github.com/getkirby/starterkit" - }, "require": { "php": ">=7.3.0 <8.1.0", "getkirby/cms": "^3.5", - "amteich/kirby-twig": "^4.1" + "amteich/kirby-twig": "^4.1", + "sylvainjule/matomo": "^1.0", + "diesdasdigital/kirby-meta-knight": "^1.2", + "kirbyzone/sitemapper": "^1.2" }, "scripts": { "start": [ diff --git a/composer.lock b/composer.lock index 3078c2b..d54e063 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": "114f3df5841d7c1e6c499a6bbcc2e380", + "content-hash": "2b5816560ec69490f1f1ef0c8ae052f5", "packages": [ { "name": "amteich/kirby-twig", @@ -101,22 +101,64 @@ "time": "2021-04-20T12:18:18+00:00" }, { - "name": "filp/whoops", - "version": "2.12.1", + "name": "diesdasdigital/kirby-meta-knight", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd" + "url": "https://github.com/diesdasdigital/kirby-meta-knight.git", + "reference": "9c3da53a3abee5ffdd95c1363d679e9395794715" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd", + "url": "https://api.github.com/repos/diesdasdigital/kirby-meta-knight/zipball/9c3da53a3abee5ffdd95c1363d679e9395794715", + "reference": "9c3da53a3abee5ffdd95c1363d679e9395794715", + "shasum": "" + }, + "require": { + "getkirby/composer-installer": "^1.1" + }, + "type": "kirby-plugin", + "autoload": { + "psr-4": { + "diesdasdigital\\kirby-meta-knight\\": "src/models/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jonathan Muth", + "email": "jonathan@diesdas.digital", + "homepage": "https://diesdas.digital", + "role": "Developer" + } + ], + "description": "Meta Knight – SEO for Kirby", + "support": { + "issues": "https://github.com/diesdasdigital/kirby-meta-knight/issues", + "source": "https://github.com/diesdasdigital/kirby-meta-knight/tree/1.2.2" + }, + "time": "2021-11-16T12:41:33+00:00" + }, + { + "name": "filp/whoops", + "version": "2.14.4", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "f056f1fe935d9ed86e698905a957334029899895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895", + "reference": "f056f1fe935d9ed86e698905a957334029899895", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", @@ -161,7 +203,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.12.1" + "source": "https://github.com/filp/whoops/tree/2.14.4" }, "funding": [ { @@ -169,33 +211,34 @@ "type": "github" } ], - "time": "2021-04-25T12:00:00+00:00" + "time": "2021-10-03T12:00:00+00:00" }, { "name": "getkirby/cms", - "version": "3.5.7.1", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "c77ccb82944b5fa0e3a453b4e203bd697e96330d" + "reference": "9ea05e38dbeb471657e3066651568fc29763ef06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/c77ccb82944b5fa0e3a453b4e203bd697e96330d", - "reference": "c77ccb82944b5fa0e3a453b4e203bd697e96330d", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/9ea05e38dbeb471657e3066651568fc29763ef06", + "reference": "9ea05e38dbeb471657e3066651568fc29763ef06", "shasum": "" }, "require": { "claviska/simpleimage": "3.6.3", "ext-ctype": "*", "ext-mbstring": "*", - "filp/whoops": "2.12.1", - "getkirby/composer-installer": "^1.2.0", - "laminas/laminas-escaper": "2.7.0", + "filp/whoops": "2.14.4", + "getkirby/composer-installer": "^1.2.1", + "laminas/laminas-escaper": "2.9.0", "michelf/php-smartypants": "1.8.1", "mustangostang/spyc": "0.6.3", - "php": ">=7.3.0 <8.1.0", - "phpmailer/phpmailer": "6.5.0", + "php": ">=7.4.0 <8.1.0", + "phpmailer/phpmailer": "6.5.1", + "psr/log": "1.1.4", "true/punycode": "2.1.1" }, "type": "kirby-cms", @@ -241,7 +284,7 @@ "type": "custom" } ], - "time": "2021-07-07T09:21:03+00:00" + "time": "2021-11-16T13:49:22+00:00" }, { "name": "getkirby/composer-installer", @@ -291,28 +334,64 @@ "time": "2020-12-28T12:54:39+00:00" }, { - "name": "laminas/laminas-escaper", - "version": "2.7.0", + "name": "kirbyzone/sitemapper", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "5e04bc5ae5990b17159d79d331055e2c645e5cc5" + "url": "https://github.com/kirbyzone/sitemapper.git", + "reference": "f94551265d222bae844ad29d0a6a5b5f3737aa48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/5e04bc5ae5990b17159d79d331055e2c645e5cc5", - "reference": "5e04bc5ae5990b17159d79d331055e2c645e5cc5", + "url": "https://api.github.com/repos/kirbyzone/sitemapper/zipball/f94551265d222bae844ad29d0a6a5b5f3737aa48", + "reference": "f94551265d222bae844ad29d0a6a5b5f3737aa48", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" + "getkirby/composer-installer": "^1.1" }, - "replace": { - "zendframework/zend-escaper": "^2.6.1" + "type": "kirby-plugin", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kirbyzone", + "email": "support@kirby.zone", + "homepage": "https://kirby.zone" + } + ], + "description": "Kirbyzone's Automatic Sitemap Generator Plugin for Kirby", + "homepage": "https://github.com/kirbyzone/sitemapper", + "support": { + "issues": "https://github.com/kirbyzone/sitemapper/issues", + "source": "https://github.com/kirbyzone/sitemapper" + }, + "time": "2021-08-16T07:29:36+00:00" + }, + { + "name": "laminas/laminas-escaper", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-escaper.git", + "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f", + "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f", + "shasum": "" + }, + "require": { + "php": "^7.3 || ~8.0.0 || ~8.1.0" + }, + "conflict": { + "zendframework/zend-escaper": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.3.0", "phpunit/phpunit": "^9.3", "psalm/plugin-phpunit": "^0.12.2", "vimeo/psalm": "^3.16" @@ -351,69 +430,7 @@ "type": "community_bridge" } ], - "time": "2020-11-17T21:26:43+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", - "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-03T17:53:30+00:00" + "time": "2021-09-02T17:10:53+00:00" }, { "name": "league/color-extractor", @@ -579,16 +596,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", + "version": "v6.5.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355", + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355", "shasum": "" }, "require": { @@ -600,10 +617,12 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.6.0", + "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", @@ -643,7 +662,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1" }, "funding": [ { @@ -651,7 +670,7 @@ "type": "github" } ], - "time": "2021-06-16T14:33:43+00:00" + "time": "2021-08-18T09:14:16+00:00" }, { "name": "psr/log", @@ -703,6 +722,44 @@ }, "time": "2021-05-03T11:20:27+00:00" }, + { + "name": "sylvainjule/matomo", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sylvainjule/kirby-matomo.git", + "reference": "11d754eb15f7c37cf0877095e50b407f66715096" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sylvainjule/kirby-matomo/zipball/11d754eb15f7c37cf0877095e50b407f66715096", + "reference": "11d754eb15f7c37cf0877095e50b407f66715096", + "shasum": "" + }, + "require": { + "getkirby/composer-installer": "^1.1" + }, + "type": "kirby-plugin", + "extra": { + "installer-name": "matomo" + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sylvain Julé", + "email": "contact@sylvain-jule.fr" + } + ], + "description": "Matomo helpers and panel sections for Kirby", + "support": { + "issues": "https://github.com/sylvainjule/kirby-matomo/issues", + "source": "https://github.com/sylvainjule/kirby-matomo/tree/1.0.6" + }, + "time": "2020-12-23T19:00:39+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.23.0", diff --git a/content/1_galerie-1/.lock b/content/1_galerie-1/.lock new file mode 100644 index 0000000..0767c4c --- /dev/null +++ b/content/1_galerie-1/.lock @@ -0,0 +1,4 @@ +/galerie-1: + lock: + user: 7C7A1Zba + time: 1637246291 diff --git a/content/1_galerie-1/gallery-image-exemple-01.png b/content/1_galerie-1/gallery-image-exemple-01.png new file mode 100644 index 0000000..4cb6798 Binary files /dev/null and b/content/1_galerie-1/gallery-image-exemple-01.png differ diff --git a/content/1_galerie-1/gallery-image-exemple-01.png.txt b/content/1_galerie-1/gallery-image-exemple-01.png.txt new file mode 100644 index 0000000..f7bc9dc --- /dev/null +++ b/content/1_galerie-1/gallery-image-exemple-01.png.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: image + +---- + +Template: artwork + +---- + +Sort: 1 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-image-exemple-02.png b/content/1_galerie-1/gallery-image-exemple-02.png new file mode 100644 index 0000000..a6e92a4 Binary files /dev/null and b/content/1_galerie-1/gallery-image-exemple-02.png differ diff --git a/content/1_galerie-1/gallery-image-exemple-02.png.txt b/content/1_galerie-1/gallery-image-exemple-02.png.txt new file mode 100644 index 0000000..c4cc510 --- /dev/null +++ b/content/1_galerie-1/gallery-image-exemple-02.png.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: image + +---- + +Template: artwork + +---- + +Sort: 2 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-image-exemple-03.png b/content/1_galerie-1/gallery-image-exemple-03.png new file mode 100644 index 0000000..4cb6798 Binary files /dev/null and b/content/1_galerie-1/gallery-image-exemple-03.png differ diff --git a/content/1_galerie-1/gallery-image-exemple-03.png.txt b/content/1_galerie-1/gallery-image-exemple-03.png.txt new file mode 100644 index 0000000..6e33e05 --- /dev/null +++ b/content/1_galerie-1/gallery-image-exemple-03.png.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: image + +---- + +Template: artwork + +---- + +Sort: 4 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-image-exemple-04.png b/content/1_galerie-1/gallery-image-exemple-04.png new file mode 100644 index 0000000..a6e92a4 Binary files /dev/null and b/content/1_galerie-1/gallery-image-exemple-04.png differ diff --git a/content/1_galerie-1/gallery-image-exemple-04.png.txt b/content/1_galerie-1/gallery-image-exemple-04.png.txt new file mode 100644 index 0000000..77b6f14 --- /dev/null +++ b/content/1_galerie-1/gallery-image-exemple-04.png.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: image + +---- + +Template: artwork + +---- + +Sort: 5 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-image-exemple-05.png b/content/1_galerie-1/gallery-image-exemple-05.png new file mode 100644 index 0000000..4cb6798 Binary files /dev/null and b/content/1_galerie-1/gallery-image-exemple-05.png differ diff --git a/content/1_galerie-1/gallery-image-exemple-05.png.txt b/content/1_galerie-1/gallery-image-exemple-05.png.txt new file mode 100644 index 0000000..90f2b16 --- /dev/null +++ b/content/1_galerie-1/gallery-image-exemple-05.png.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: image + +---- + +Template: artwork + +---- + +Sort: 6 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-video-exemple-01.mp4 b/content/1_galerie-1/gallery-video-exemple-01.mp4 new file mode 100644 index 0000000..24b738c Binary files /dev/null and b/content/1_galerie-1/gallery-video-exemple-01.mp4 differ diff --git a/content/1_galerie-1/gallery-video-exemple-01.mp4.txt b/content/1_galerie-1/gallery-video-exemple-01.mp4.txt new file mode 100644 index 0000000..1851e3d --- /dev/null +++ b/content/1_galerie-1/gallery-video-exemple-01.mp4.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: video + +---- + +Template: artwork + +---- + +Sort: 3 \ No newline at end of file diff --git a/content/1_galerie-1/gallery-video-exemple-02.mp4 b/content/1_galerie-1/gallery-video-exemple-02.mp4 new file mode 100644 index 0000000..24b738c Binary files /dev/null and b/content/1_galerie-1/gallery-video-exemple-02.mp4 differ diff --git a/content/1_galerie-1/gallery-video-exemple-02.mp4.txt b/content/1_galerie-1/gallery-video-exemple-02.mp4.txt new file mode 100644 index 0000000..1c16c12 --- /dev/null +++ b/content/1_galerie-1/gallery-video-exemple-02.mp4.txt @@ -0,0 +1,17 @@ +Alt-text: + +---- + +Caption: + +---- + +File-type: video + +---- + +Template: artwork + +---- + +Sort: 7 \ No newline at end of file diff --git a/content/1_galerie-1/gallery.txt b/content/1_galerie-1/gallery.txt new file mode 100644 index 0000000..d0746e4 --- /dev/null +++ b/content/1_galerie-1/gallery.txt @@ -0,0 +1,45 @@ +Title: Galerie 1 + +---- + +Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Eget nulla facilisi etiam dignissim. Felis donec et odio pellentesque. Et malesuada fames ac turpis egestas. Vulputate sapien nec sagittis aliquam malesuada bibendum arcu vitae elementum. Lorem donec massa sapien faucibus et molestie ac feugiat. Mauris augue neque gravida in fermentum et sollicitudin. At urna condimentum mattis pellentesque. Dignissim convallis aenean et tortor at. Sit amet massa vitae tortor condimentum lacinia. Sollicitudin tempor id eu nisl nunc mi ipsum. Nibh nisl condimentum id venenatis. Scelerisque in dictum non consectetur a erat nam at. Felis imperdiet proin fermentum leo vel orci porta non. + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: article + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/_drafts/galerie-2/gallery.txt b/content/_drafts/galerie-2/gallery.txt new file mode 100644 index 0000000..734d652 --- /dev/null +++ b/content/_drafts/galerie-2/gallery.txt @@ -0,0 +1,45 @@ +Title: Galerie 2 + +---- + +Text: + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: article + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/_drafts/galerie-3/gallery.txt b/content/_drafts/galerie-3/gallery.txt new file mode 100644 index 0000000..9f0cced --- /dev/null +++ b/content/_drafts/galerie-3/gallery.txt @@ -0,0 +1,45 @@ +Title: Galerie 3 + +---- + +Text: + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: article + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/_drafts/galerie-4/gallery.txt b/content/_drafts/galerie-4/gallery.txt new file mode 100644 index 0000000..03ec884 --- /dev/null +++ b/content/_drafts/galerie-4/gallery.txt @@ -0,0 +1,45 @@ +Title: Galerie 4 + +---- + +Text: + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: article + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/_drafts/galerie-5/gallery.txt b/content/_drafts/galerie-5/gallery.txt new file mode 100644 index 0000000..8f9d229 --- /dev/null +++ b/content/_drafts/galerie-5/gallery.txt @@ -0,0 +1,45 @@ +Title: Galerie 5 + +---- + +Text: + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: article + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/accueil/.lock b/content/accueil/.lock new file mode 100644 index 0000000..9371821 --- /dev/null +++ b/content/accueil/.lock @@ -0,0 +1,3 @@ +/accueil: + unlock: + - YWFgwsvN diff --git a/content/accueil/background-image-exemple-3000x1333px.png b/content/accueil/background-image-exemple-3000x1333px.png new file mode 100644 index 0000000..4cb6798 Binary files /dev/null and b/content/accueil/background-image-exemple-3000x1333px.png differ diff --git a/content/accueil/background-image-exemple-3000x1333px.png.txt b/content/accueil/background-image-exemple-3000x1333px.png.txt new file mode 100644 index 0000000..f3eb8f8 --- /dev/null +++ b/content/accueil/background-image-exemple-3000x1333px.png.txt @@ -0,0 +1,5 @@ +Alternative-text: Exemple de texte alternatif + +---- + +Template: image \ No newline at end of file diff --git a/content/accueil/home.txt b/content/accueil/home.txt new file mode 100644 index 0000000..48cc8e2 --- /dev/null +++ b/content/accueil/home.txt @@ -0,0 +1,41 @@ +Title: Accueil + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: website + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default \ No newline at end of file diff --git a/content/biographie/biography.txt b/content/biographie/biography.txt new file mode 100644 index 0000000..13b1ae4 --- /dev/null +++ b/content/biographie/biography.txt @@ -0,0 +1,49 @@ +Title: Biographie + +---- + +Text: + +Interdum posuere lorem ipsum dolor sit. Volutpat lacus laoreet non curabitur gravida. Facilisis magna etiam tempor orci eu lobortis. Eu augue ut lectus arcu bibendum at. Mi eget mauris pharetra et ultrices neque. Mi ipsum faucibus vitae aliquet nec. Vitae justo eget magna fermentum iaculis eu non diam. Sed felis eget velit aliquet sagittis id consectetur purus ut. Platea dictumst quisque sagittis purus sit amet volutpat. Senectus et netus et malesuada fames ac. Id semper risus in hendrerit gravida rutrum quisque. A scelerisque purus semper eget duis at tellus at urna. Lectus nulla at volutpat diam ut. Consectetur a erat nam at lectus urna. Dui accumsan sit amet nulla. Imperdiet proin fermentum leo vel orci. Vestibulum lectus mauris ultrices eros. Diam quis enim lobortis scelerisque fermentum dui faucibus in. Semper auctor neque vitae tempus quam pellentesque nec nam. Elit duis tristique sollicitudin nibh sit amet commodo. + +Velit sed ullamcorper morbi tincidunt ornare massa eget egestas. Egestas fringilla phasellus faucibus scelerisque eleifend donec pretium. Dictum varius duis at consectetur lorem donec massa sapien faucibus. Porta nibh venenatis cras sed felis eget velit aliquet sagittis. Sed id semper risus in. Aliquet porttitor lacus luctus accumsan tortor. Quam adipiscing vitae proin sagittis nisl. A iaculis at erat pellentesque adipiscing. Adipiscing bibendum est ultricies integer quis auctor elit sed vulputate. Pretium nibh ipsum consequat nisl vel pretium lectus quam id. Tellus id interdum velit laoreet id donec ultrices. Fringilla ut morbi tincidunt augue interdum velit euismod in pellentesque. Nunc sed blandit libero volutpat sed cras. Odio eu feugiat pretium nibh ipsum consequat nisl vel. + +---- + +Meta-description: + +---- + +Meta-image: + +---- + +Og-image: + +---- + +Og-type: website + +---- + +Twitter-image: + +---- + +Robots-noindex: default + +---- + +Robots-nofollow: default + +---- + +Robots-noarchive: default + +---- + +Robots-noimageindex: default + +---- + +Robots-nosnippet: default diff --git a/content/error/error.txt b/content/error/error.txt index b588b2a..3da00a6 100644 --- a/content/error/error.txt +++ b/content/error/error.txt @@ -1 +1,21 @@ -Title: Error \ No newline at end of file +Title: Erreur + +---- + +Robots-noindex: enabled + +---- + +Robots-nofollow: enabled + +---- + +Robots-noarchive: enabled + +---- + +Robots-noimageindex: enabled + +---- + +Robots-nosnippet: enabled diff --git a/content/firefox-logo-0.png b/content/firefox-logo-0.png new file mode 100644 index 0000000..360e4ac Binary files /dev/null and b/content/firefox-logo-0.png differ diff --git a/content/firefox-logo-0.png.txt b/content/firefox-logo-0.png.txt new file mode 100644 index 0000000..debe2d6 --- /dev/null +++ b/content/firefox-logo-0.png.txt @@ -0,0 +1 @@ +File-type: image \ No newline at end of file diff --git a/content/home/home.txt b/content/home/home.txt deleted file mode 100644 index 02896ec..0000000 --- a/content/home/home.txt +++ /dev/null @@ -1 +0,0 @@ -Title: Home \ No newline at end of file diff --git a/content/site.txt b/content/site.txt index b1f98d7..259e103 100644 --- a/content/site.txt +++ b/content/site.txt @@ -1 +1,37 @@ -Title: Site Title \ No newline at end of file +Title: Xiao Wang + +---- + +Favicon: + +---- + +Email: exemple@gmail.com + +---- + +Instagram: https://www.instagram.com/exemple/ + +---- + +Meta-description: + +---- + +Robots-noindex: disabled + +---- + +Robots-nofollow: disabled + +---- + +Robots-noarchive: disabled + +---- + +Robots-noimageindex: disabled + +---- + +Robots-nosnippet: disabled \ No newline at end of file diff --git a/kirby/bootstrap.php b/kirby/bootstrap.php index 16266e4..300cf4f 100644 --- a/kirby/bootstrap.php +++ b/kirby/bootstrap.php @@ -5,7 +5,7 @@ * stop at older or too recent versions */ if ( - version_compare(PHP_VERSION, '7.3.0', '>=') === false || + version_compare(PHP_VERSION, '7.4.0', '>=') === false || version_compare(PHP_VERSION, '8.1.0', '<') === false ) { die(include __DIR__ . '/views/php.php'); diff --git a/kirby/cacert.pem b/kirby/cacert.pem index fdb454d..0bf312f 100644 --- a/kirby/cacert.pem +++ b/kirby/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Mon Jul 5 21:35:54 2021 GMT +## Certificate data from Mozilla as of: Tue Oct 26 03:12:05 2021 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.28. -## SHA256: c8f6733d1ff4e6a4769c182971a1234f95ae079247a9c439a13423fe8ba5c24f +## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f ## @@ -381,26 +381,6 @@ mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K -----END CERTIFICATE----- -DST Root CA X3 -============== ------BEGIN CERTIFICATE----- -MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK -ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X -DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 -cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT -rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 -UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy -xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d -utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ -MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug -dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE -GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw -RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS -fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ ------END CERTIFICATE----- - SwissSign Gold CA - G2 ====================== -----BEGIN CERTIFICATE----- @@ -3172,3 +3152,81 @@ WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb -----END CERTIFICATE----- + +TunTrust Root CA +================ +-----BEGIN CERTIFICATE----- +MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG +A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj +dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw +NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD +ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz +2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b +bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7 +NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd +gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW +VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f +Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ +juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas +DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS +VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI +04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0 +90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl +0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd +Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY +YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp +adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x +xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP +jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM +MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z +ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r +AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o= +-----END CERTIFICATE----- + +HARICA TLS RSA Root CA 2021 +=========================== +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG +EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz +OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl +bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB +IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN +JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu +a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y +Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K +5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv +dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR +0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH +GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm +haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ +CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G +A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU +EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq +QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD +QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR +j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5 +vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0 +qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6 +Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/ +PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn +kf3/W9b3raYvAwtt41dU63ZTGI0RmLo= +-----END CERTIFICATE----- + +HARICA TLS ECC Root CA 2021 +=========================== +-----BEGIN CERTIFICATE----- +MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH +UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD +QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX +DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj +IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv +b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l +AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b +ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW +0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi +rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw +CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps +-----END CERTIFICATE----- diff --git a/kirby/composer.json b/kirby/composer.json index fe84d66..64d13b8 100644 --- a/kirby/composer.json +++ b/kirby/composer.json @@ -8,7 +8,7 @@ "core" ], "homepage": "https://getkirby.com", - "version": "3.5.7.1", + "version": "3.6.0", "license": "proprietary", "authors": [ { @@ -18,16 +18,17 @@ } ], "require": { - "php": ">=7.3.0 <8.1.0", + "php": ">=7.4.0 <8.1.0", "ext-ctype": "*", "ext-mbstring": "*", "claviska/simpleimage": "3.6.3", - "filp/whoops": "2.12.1", - "getkirby/composer-installer": "^1.2.0", - "laminas/laminas-escaper": "2.7.0", + "filp/whoops": "2.14.4", + "getkirby/composer-installer": "^1.2.1", + "laminas/laminas-escaper": "2.9.0", "michelf/php-smartypants": "1.8.1", "mustangostang/spyc": "0.6.3", - "phpmailer/phpmailer": "6.5.0", + "phpmailer/phpmailer": "6.5.1", + "psr/log": "1.1.4", "true/punycode": "2.1.1" }, "config": { @@ -73,5 +74,6 @@ "issues": "https://github.com/getkirby/kirby/issues", "forum": "https://forum.getkirby.com", "source": "https://github.com/getkirby/kirby" - } + }, + "_comment": "TODO: psr/log is not used by Kirby; drop pinned version when Kirby no longer supports PHP 7" } diff --git a/kirby/composer.lock b/kirby/composer.lock index 7e1c911..662c387 100644 --- a/kirby/composer.lock +++ b/kirby/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": "c087786719948c60e5d74492f70440a5", + "content-hash": "8712d96f826f859411fec3cce4f16e63", "packages": [ { "name": "claviska/simpleimage", @@ -57,21 +57,21 @@ }, { "name": "filp/whoops", - "version": "2.12.1", + "version": "2.14.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd" + "reference": "f056f1fe935d9ed86e698905a957334029899895" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd", - "reference": "c13c0be93cff50f88bbd70827d993026821914dd", + "url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895", + "reference": "f056f1fe935d9ed86e698905a957334029899895", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", @@ -116,7 +116,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.12.1" + "source": "https://github.com/filp/whoops/tree/2.14.4" }, "funding": [ { @@ -124,7 +124,7 @@ "type": "github" } ], - "time": "2021-04-25T12:00:00+00:00" + "time": "2021-10-03T12:00:00+00:00" }, { "name": "getkirby/composer-installer", @@ -175,27 +175,26 @@ }, { "name": "laminas/laminas-escaper", - "version": "2.7.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "5e04bc5ae5990b17159d79d331055e2c645e5cc5" + "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/5e04bc5ae5990b17159d79d331055e2c645e5cc5", - "reference": "5e04bc5ae5990b17159d79d331055e2c645e5cc5", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f", + "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, - "replace": { - "zendframework/zend-escaper": "^2.6.1" + "conflict": { + "zendframework/zend-escaper": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.3.0", "phpunit/phpunit": "^9.3", "psalm/plugin-phpunit": "^0.12.2", "vimeo/psalm": "^3.16" @@ -234,69 +233,7 @@ "type": "community_bridge" } ], - "time": "2020-11-17T21:26:43+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/13af2502d9bb6f7d33be2de4b51fb68c6cdb476e", - "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-06-24T12:49:22+00:00" + "time": "2021-09-02T17:10:53+00:00" }, { "name": "league/color-extractor", @@ -462,16 +399,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", + "version": "v6.5.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355", + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355", "shasum": "" }, "require": { @@ -483,10 +420,12 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.6.0", + "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", @@ -526,7 +465,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1" }, "funding": [ { @@ -534,7 +473,7 @@ "type": "github" } ], - "time": "2021-06-16T14:33:43+00:00" + "time": "2021-08-18T09:14:16+00:00" }, { "name": "psr/log", @@ -588,16 +527,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { @@ -648,7 +587,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" }, "funding": [ { @@ -664,7 +603,7 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "true/punycode", @@ -724,7 +663,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.3.0 <8.1.0", + "php": ">=7.4.0 <8.1.0", "ext-ctype": "*", "ext-mbstring": "*" }, diff --git a/kirby/config/aliases.php b/kirby/config/aliases.php index 8c7016f..7366e6c 100644 --- a/kirby/config/aliases.php +++ b/kirby/config/aliases.php @@ -1,14 +1,12 @@ 'Kirby\Cms\Asset', 'collection' => 'Kirby\Cms\Collection', - 'dir' => 'Kirby\Cms\Dir', 'field' => 'Kirby\Cms\Field', 'file' => 'Kirby\Cms\File', 'files' => 'Kirby\Cms\Files', + 'find' => 'Kirby\Cms\Find', 'html' => 'Kirby\Cms\Html', 'kirby' => 'Kirby\Cms\App', 'page' => 'Kirby\Cms\Page', @@ -17,6 +15,7 @@ return [ 'r' => 'Kirby\Cms\R', 'response' => 'Kirby\Cms\Response', 's' => 'Kirby\Cms\S', + 'sane' => 'Kirby\Sane\Sane', 'site' => 'Kirby\Cms\Site', 'structure' => 'Kirby\Cms\Structure', 'url' => 'Kirby\Cms\Url', @@ -29,6 +28,12 @@ return [ 'json' => 'Kirby\Data\Json', 'yaml' => 'Kirby\Data\Yaml', + // file classes + 'asset' => 'Kirby\Filesystem\Asset', + 'dir' => 'Kirby\Filesystem\Dir', + 'f' => 'Kirby\Filesystem\F', + 'mime' => 'Kirby\Filesystem\Mime', + // data classes 'database' => 'Kirby\Database\Database', 'db' => 'Kirby\Database\Db', @@ -45,18 +50,31 @@ return [ // image classes 'dimensions' => 'Kirby\Image\Dimensions', + // panel classes + 'panel' => 'Kirby\Panel\Panel', + // toolkit classes 'a' => 'Kirby\Toolkit\A', 'c' => 'Kirby\Toolkit\Config', 'config' => 'Kirby\Toolkit\Config', 'escape' => 'Kirby\Toolkit\Escape', - 'f' => 'Kirby\Toolkit\F', 'i18n' => 'Kirby\Toolkit\I18n', - 'mime' => 'Kirby\Toolkit\Mime', 'obj' => 'Kirby\Toolkit\Obj', 'str' => 'Kirby\Toolkit\Str', 'tpl' => 'Kirby\Toolkit\Tpl', 'v' => 'Kirby\Toolkit\V', - 'xml' => 'Kirby\Toolkit\Xml' + 'xml' => 'Kirby\Toolkit\Xml', + + // TODO: remove in 4.0.0 + 'kirby\cms\asset' => 'Kirby\Filesystem\Asset', + 'kirby\cms\dir' => 'Kirby\Filesystem\Dir', + 'kirby\cms\filename' => 'Kirby\Filesystem\Filename', + 'kirby\cms\filefoundation' => 'Kirby\Filesystem\IsFile', + 'kirby\cms\form' => 'Kirby\Form\Form', + 'kirby\cms\kirbytag' => 'Kirby\Text\KirbyTag', + 'kirby\cms\kirbytags' => 'Kirby\Text\KirbyTags', + 'kirby\toolkit\dir' => 'Kirby\Filesystem\Dir', + 'kirby\toolkit\f' => 'Kirby\Filesystem\F', + 'kirby\toolkit\file' => 'Kirby\Filesystem\File', + 'kirby\toolkit\mime' => 'Kirby\Filesystem\Mime', ]; -// @codeCoverageIgnoreEnd diff --git a/kirby/config/api/authentication.php b/kirby/config/api/authentication.php index 8dd5f33..b089940 100644 --- a/kirby/config/api/authentication.php +++ b/kirby/config/api/authentication.php @@ -7,7 +7,10 @@ return function () { $allowImpersonation = $this->kirby()->option('api.allowImpersonation') ?? false; // csrf token check - if ($auth->type($allowImpersonation) === 'session' && $auth->csrf() === false) { + if ( + $auth->type($allowImpersonation) === 'session' && + $auth->csrf() === false + ) { throw new PermissionException('Unauthenticated'); } diff --git a/kirby/config/api/models/File.php b/kirby/config/api/models/File.php index 7315170..f761d47 100644 --- a/kirby/config/api/models/File.php +++ b/kirby/config/api/models/File.php @@ -1,7 +1,7 @@ dimensions()->toArray(); }, 'dragText' => function (File $file) { - return $file->dragText(); + return $file->panel()->dragText(); }, 'exists' => function (File $file) { return $file->exists(); @@ -33,7 +33,7 @@ return [ return $file->id(); }, 'link' => function (File $file) { - return $file->panelUrl(true); + return $file->panel()->url(true); }, 'mime' => function (File $file) { return $file->mime(); @@ -48,7 +48,7 @@ return [ return $file->next(); }, 'nextWithTemplate' => function (File $file) { - $files = $file->templateSiblings()->sort('sort', 'asc', 'filename', 'asc'); + $files = $file->templateSiblings()->sorted(); $index = $files->indexOf($file); return $files->nth($index + 1); @@ -57,22 +57,26 @@ return [ return $file->niceSize(); }, 'options' => function (File $file) { - return $file->panelOptions(); + return $file->panel()->options(); }, 'panelIcon' => function (File $file) { - return $file->panelIcon(); + // TODO: remove in 3.7.0 + // @codeCoverageIgnoreStart + deprecated('The API field file.panelIcon has been deprecated and will be removed in 3.7.0. Use file.panelImage instead'); + return $file->panel()->image(); + // @codeCoverageIgnoreEnd }, 'panelImage' => function (File $file) { - return $file->panelImage(); + return $file->panel()->image(); }, 'panelUrl' => function (File $file) { - return $file->panelUrl(true); + return $file->panel()->url(true); }, 'prev' => function (File $file) { return $file->prev(); }, 'prevWithTemplate' => function (File $file) { - $files = $file->templateSiblings()->sort('sort', 'asc', 'filename', 'asc'); + $files = $file->templateSiblings()->sorted(); $index = $files->indexOf($file); return $files->nth($index - 1); @@ -106,7 +110,7 @@ return [ return $file->type(); }, 'url' => function (File $file) { - return $file->url(true); + return $file->url(); }, ], 'type' => 'Kirby\Cms\File', diff --git a/kirby/config/api/models/FileVersion.php b/kirby/config/api/models/FileVersion.php index 3d518b3..fab8c9e 100644 --- a/kirby/config/api/models/FileVersion.php +++ b/kirby/config/api/models/FileVersion.php @@ -41,7 +41,7 @@ return [ return $file->type(); }, 'url' => function (FileVersion $file) { - return $file->url(true); + return $file->url(); }, ], 'type' => 'Kirby\Cms\FileVersion', diff --git a/kirby/config/api/models/Page.php b/kirby/config/api/models/Page.php index 72084be..04ef631 100644 --- a/kirby/config/api/models/Page.php +++ b/kirby/config/api/models/Page.php @@ -1,7 +1,7 @@ errors(); }, 'files' => function (Page $page) { - return $page->files()->sort('sort', 'asc', 'filename', 'asc'); + return $page->files()->sorted(); }, 'hasChildren' => function (Page $page) { return $page->hasChildren(); @@ -44,6 +44,12 @@ return [ 'isSortable' => function (Page $page) { return $page->isSortable(); }, + /** + * @deprecated 3.6.0 + * @todo Throw deprecated warning in 3.7.0 + * @todo Remove in 3.8.0 + * @codeCoverageIgnore + */ 'next' => function (Page $page) { return $page ->nextAll() @@ -56,13 +62,18 @@ return [ return $page->num(); }, 'options' => function (Page $page) { - return $page->panelOptions(['preview']); + return $page->panel()->options(['preview']); }, + /** + * @todo Remove in 3.7.0 + * @codeCoverageIgnore + */ 'panelIcon' => function (Page $page) { - return $page->panelIcon(); + deprecated('The API field page.panelIcon has been deprecated and will be removed in 3.7.0. Use page.panelImage instead'); + return $page->panel()->image(); }, 'panelImage' => function (Page $page) { - return $page->panelImage(); + return $page->panel()->image(); }, 'parent' => function (Page $page) { return $page->parent(); @@ -70,6 +81,12 @@ return [ 'parents' => function (Page $page) { return $page->parents()->flip(); }, + /** + * @deprecated 3.6.0 + * @todo Throw deprecated warning in 3.7.0 + * @todo Remove in 3.8.0 + * @codeCoverageIgnore + */ 'prev' => function (Page $page) { return $page ->prevAll() diff --git a/kirby/config/api/models/Site.php b/kirby/config/api/models/Site.php index ef31a07..e49a012 100644 --- a/kirby/config/api/models/Site.php +++ b/kirby/config/api/models/Site.php @@ -1,7 +1,7 @@ drafts(); }, 'files' => function (Site $site) { - return $site->files()->sort('sort', 'asc', 'filename', 'asc'); + return $site->files()->sorted(); }, 'options' => function (Site $site) { return $site->permissions()->toArray(); diff --git a/kirby/config/api/models/System.php b/kirby/config/api/models/System.php index a162ce4..bfaa796 100644 --- a/kirby/config/api/models/System.php +++ b/kirby/config/api/models/System.php @@ -52,12 +52,8 @@ return [ 'requirements' => function (System $system) { return $system->toArray(); }, - 'site' => function () { - try { - return $this->site()->blueprint()->title(); - } catch (Throwable $e) { - return $this->site()->title()->value(); - } + 'site' => function (System $system) { + return $system->title(); }, 'slugs' => function () { return Str::$language; @@ -87,7 +83,7 @@ return [ 'version' => function () { $user = $this->user(); - if ($user && $user->role()->permissions()->for('access', 'settings') === true) { + if ($user && $user->role()->permissions()->for('access', 'system') === true) { return $this->kirby()->version(); } else { return null; diff --git a/kirby/config/api/models/User.php b/kirby/config/api/models/User.php index f76ae53..1d99444 100644 --- a/kirby/config/api/models/User.php +++ b/kirby/config/api/models/User.php @@ -1,7 +1,7 @@ email(); }, 'files' => function (User $user) { - return $user->files()->sort('sort', 'asc', 'filename', 'asc'); + return $user->files()->sorted(); }, 'id' => function (User $user) { return $user->id(); @@ -39,7 +39,10 @@ return [ return $user->next(); }, 'options' => function (User $user) { - return $user->panelOptions(); + return $user->panel()->options(); + }, + 'panelImage' => function (User $user) { + return $user->panel()->image(); }, 'permissions' => function (User $user) { return $user->role()->permissions()->toArray(); diff --git a/kirby/config/api/routes/files.php b/kirby/config/api/routes/files.php index e183716..77aea9c 100644 --- a/kirby/config/api/routes/files.php +++ b/kirby/config/api/routes/files.php @@ -1,12 +1,15 @@ '(:all)/files/(:any)/sections/(:any)', + 'pattern' => $pattern . '/files/(:any)/sections/(:any)', 'method' => 'GET', 'action' => function (string $path, string $filename, string $sectionName) { if ($section = $this->file($path, $filename)->blueprint()->section($sectionName)) { @@ -15,7 +18,7 @@ return [ } ], [ - 'pattern' => '(:all)/files/(:any)/fields/(:any)/(:all?)', + 'pattern' => $pattern . '/files/(:any)/fields/(:any)/(:all?)', 'method' => 'ALL', 'action' => function (string $parent, string $filename, string $fieldName, string $path = null) { if ($file = $this->file($parent, $filename)) { @@ -24,27 +27,33 @@ return [ } ], [ - 'pattern' => '(:all)/files', + 'pattern' => $pattern . '/files', 'method' => 'GET', 'action' => function (string $path) { - return $this->parent($path)->files()->sort('sort', 'asc', 'filename', 'asc'); + return $this->parent($path)->files()->sorted(); } ], [ - 'pattern' => '(:all)/files', + 'pattern' => $pattern . '/files', 'method' => 'POST', 'action' => function (string $path) { + // move_uploaded_file() not working with unit test + // @codeCoverageIgnoreStart return $this->upload(function ($source, $filename) use ($path) { return $this->parent($path)->createFile([ + 'content' => [ + 'sort' => $this->requestBody('sort') + ], 'source' => $source, 'template' => $this->requestBody('template'), 'filename' => $filename ]); }); + // @codeCoverageIgnoreEnd } ], [ - 'pattern' => '(:all)/files/search', + 'pattern' => $pattern . '/files/search', 'method' => 'GET|POST', 'action' => function (string $path) { $files = $this->parent($path)->files(); @@ -57,7 +66,7 @@ return [ } ], [ - 'pattern' => '(:all)/files/sort', + 'pattern' => $pattern . '/files/sort', 'method' => 'PATCH', 'action' => function (string $path) { return $this->parent($path)->files()->changeSort( @@ -67,21 +76,21 @@ return [ } ], [ - 'pattern' => '(:all)/files/(:any)', + 'pattern' => $pattern . '/files/(:any)', 'method' => 'GET', 'action' => function (string $path, string $filename) { return $this->file($path, $filename); } ], [ - 'pattern' => '(:all)/files/(:any)', + 'pattern' => $pattern . '/files/(:any)', 'method' => 'PATCH', 'action' => function (string $path, string $filename) { return $this->file($path, $filename)->update($this->requestBody(), $this->language(), true); } ], [ - 'pattern' => '(:all)/files/(:any)', + 'pattern' => $pattern . '/files/(:any)', 'method' => 'POST', 'action' => function (string $path, string $filename) { return $this->upload(function ($source) use ($path, $filename) { @@ -90,14 +99,14 @@ return [ } ], [ - 'pattern' => '(:all)/files/(:any)', + 'pattern' => $pattern . '/files/(:any)', 'method' => 'DELETE', 'action' => function (string $path, string $filename) { return $this->file($path, $filename)->delete(); } ], [ - 'pattern' => '(:all)/files/(:any)/name', + 'pattern' => $pattern . '/files/(:any)/name', 'method' => 'PATCH', 'action' => function (string $path, string $filename) { return $this->file($path, $filename)->changeName($this->requestBody('name')); diff --git a/kirby/config/api/routes/lock.php b/kirby/config/api/routes/lock.php index 302a945..bbe9bad 100644 --- a/kirby/config/api/routes/lock.php +++ b/kirby/config/api/routes/lock.php @@ -1,6 +1,5 @@ '(:all)/lock', 'method' => 'GET', + /** + * @deprecated 3.6.0 + * @todo Remove in 3.7.0 + */ 'action' => function (string $path) { + deprecated('The `GET (:all)/lock` API endpoint has been deprecated and will be removed in 3.7.0'); + if ($lock = $this->parent($path)->lock()) { return [ 'supported' => true, @@ -30,11 +35,6 @@ return [ if ($lock = $this->parent($path)->lock()) { return $lock->create(); } - - throw new Exception([ - 'key' => 'lock.notImplemented', - 'httpCode' => 501 - ]); } ], [ @@ -44,17 +44,19 @@ return [ if ($lock = $this->parent($path)->lock()) { return $lock->remove(); } - - throw new Exception([ - 'key' => 'lock.notImplemented', - 'httpCode' => 501 - ]); } ], [ 'pattern' => '(:all)/unlock', 'method' => 'GET', + /** + * @deprecated 3.6.0 + * @todo Remove in 3.7.0 + */ 'action' => function (string $path) { + deprecated('The `GET (:all)/unlock` API endpoint has been deprecated and will be removed in 3.7.0'); + + if ($lock = $this->parent($path)->lock()) { return [ 'supported' => true, @@ -75,11 +77,6 @@ return [ if ($lock = $this->parent($path)->lock()) { return $lock->unlock(); } - - throw new Exception([ - 'key' => 'lock.notImplemented', - 'httpCode' => 501 - ]); } ], [ @@ -89,11 +86,6 @@ return [ if ($lock = $this->parent($path)->lock()) { return $lock->resolve(); } - - throw new Exception([ - 'key' => 'lock.notImplemented', - 'httpCode' => 501 - ]); } ], ]; diff --git a/kirby/config/api/routes/pages.php b/kirby/config/api/routes/pages.php index 04cc8a2..247f970 100644 --- a/kirby/config/api/routes/pages.php +++ b/kirby/config/api/routes/pages.php @@ -38,12 +38,17 @@ return [ 'pages/(:any)/blueprints', /** * @deprecated - * @todo remove in 3.6.0 + * @todo remove in 3.7.0 */ 'pages/(:any)/children/blueprints', ], 'method' => 'GET', 'action' => function (string $id) { + // @codeCoverageIgnoreStart + if ($this->route->pattern() === 'pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)/children/blueprints') { + deprecated('`GET pages/(:any)/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET pages/(:any)/blueprints` instead'); + } + // @codeCoverageIgnoreEnd return $this->page($id)->blueprints($this->requestQuery('section')); } ], diff --git a/kirby/config/api/routes/site.php b/kirby/config/api/routes/site.php index 68c706f..59e8cab 100644 --- a/kirby/config/api/routes/site.php +++ b/kirby/config/api/routes/site.php @@ -51,12 +51,17 @@ return [ 'site/blueprints', /** * @deprecated - * @todo remove in 3.6.0 + * @todo remove in 3.7.0 */ 'site/children/blueprints', ], 'method' => 'GET', 'action' => function () { + // @codeCoverageIgnoreStart + if ($this->route->pattern() === 'site/children/blueprints') { + deprecated('`GET site/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET site/blueprints` instead.'); + } + // @codeCoverageIgnoreEnd return $this->site()->blueprints($this->requestQuery('section')); } ], diff --git a/kirby/config/api/routes/users.php b/kirby/config/api/routes/users.php index 88068a4..abd09c5 100644 --- a/kirby/config/api/routes/users.php +++ b/kirby/config/api/routes/users.php @@ -1,12 +1,11 @@ 'users', 'method' => 'GET', @@ -33,35 +32,51 @@ return [ } ], [ - 'pattern' => 'users/(:any)', + 'pattern' => [ + '(account)', + 'users/(:any)', + ], 'method' => 'GET', 'action' => function (string $id) { return $this->user($id); } ], [ - 'pattern' => 'users/(:any)', + 'pattern' => [ + '(account)', + 'users/(:any)', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->update($this->requestBody(), $this->language(), true); } ], [ - 'pattern' => 'users/(:any)', + 'pattern' => [ + '(account)', + 'users/(:any)', + ], 'method' => 'DELETE', 'action' => function (string $id) { return $this->user($id)->delete(); } ], [ - 'pattern' => 'users/(:any)/avatar', + 'pattern' => [ + '(account)/avatar', + 'users/(:any)/avatar', + ], 'method' => 'GET', 'action' => function (string $id) { return $this->user($id)->avatar(); } ], + // @codeCoverageIgnoreStart [ - 'pattern' => 'users/(:any)/avatar', + 'pattern' => [ + '(account)/avatar', + 'users/(:any)/avatar', + ], 'method' => 'POST', 'action' => function (string $id) { if ($avatar = $this->user($id)->avatar()) { @@ -77,79 +92,101 @@ return [ }, $single = true); } ], + // @codeCoverageIgnoreEnd [ - 'pattern' => 'users/(:any)/avatar', + 'pattern' => [ + '(account)/avatar', + 'users/(:any)/avatar', + ], 'method' => 'DELETE', 'action' => function (string $id) { return $this->user($id)->avatar()->delete(); } ], [ - 'pattern' => 'users/(:any)/blueprint', + 'pattern' => [ + '(account)/blueprint', + 'users/(:any)/blueprint', + ], 'method' => 'GET', 'action' => function (string $id) { return $this->user($id)->blueprint(); } ], [ - 'pattern' => 'users/(:any)/blueprints', + 'pattern' => [ + '(account)/blueprints', + 'users/(:any)/blueprints', + ], 'method' => 'GET', 'action' => function (string $id) { return $this->user($id)->blueprints($this->requestQuery('section')); } ], [ - 'pattern' => 'users/(:any)/email', + 'pattern' => [ + '(account)/email', + 'users/(:any)/email', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->changeEmail($this->requestBody('email')); } ], [ - 'pattern' => 'users/(:any)/fields/(:any)/(:all?)', - 'method' => 'ALL', - 'action' => function (string $id, string $fieldName, string $path = null) { - if ($user = $this->user($id)) { - return $this->fieldApi($user, $fieldName, $path); - } - } - ], - [ - 'pattern' => 'users/(:any)/language', + 'pattern' => [ + '(account)/language', + 'users/(:any)/language', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->changeLanguage($this->requestBody('language')); } ], [ - 'pattern' => 'users/(:any)/name', + 'pattern' => [ + '(account)/name', + 'users/(:any)/name', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->changeName($this->requestBody('name')); } ], [ - 'pattern' => 'users/(:any)/password', + 'pattern' => [ + '(account)/password', + 'users/(:any)/password', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->changePassword($this->requestBody('password')); } ], [ - 'pattern' => 'users/(:any)/role', + 'pattern' => [ + '(account)/role', + 'users/(:any)/role', + ], 'method' => 'PATCH', 'action' => function (string $id) { return $this->user($id)->changeRole($this->requestBody('role')); } ], [ - 'pattern' => 'users/(:any)/roles', + 'pattern' => [ + '(account)/roles', + 'users/(:any)/roles', + ], 'action' => function (string $id) { return $this->user($id)->roles(); } ], [ - 'pattern' => 'users/(:any)/sections/(:any)', + 'pattern' => [ + '(account)/sections/(:any)', + 'users/(:any)/sections/(:any)', + ], 'method' => 'GET', 'action' => function (string $id, string $sectionName) { if ($section = $this->user($id)->blueprint()->section($sectionName)) { @@ -157,4 +194,14 @@ return [ } } ], + [ + 'pattern' => [ + '(account)/fields/(:any)/(:all?)', + 'users/(:any)/fields/(:any)/(:all?)', + ], + 'method' => 'ALL', + 'action' => function (string $id, string $fieldName, string $path = null) { + return $this->fieldApi($this->user($id), $fieldName, $path); + } + ], ]; diff --git a/kirby/config/areas/account.php b/kirby/config/areas/account.php new file mode 100644 index 0000000..b2f629f --- /dev/null +++ b/kirby/config/areas/account.php @@ -0,0 +1,12 @@ + 'account', + 'label' => t('view.account'), + 'search' => 'users', + 'dialogs' => require __DIR__ . '/account/dialogs.php', + 'dropdowns' => require __DIR__ . '/account/dropdowns.php', + 'views' => require __DIR__ . '/account/views.php' + ]; +}; diff --git a/kirby/config/areas/account/dialogs.php b/kirby/config/areas/account/dialogs.php new file mode 100644 index 0000000..15bf7b7 --- /dev/null +++ b/kirby/config/areas/account/dialogs.php @@ -0,0 +1,70 @@ + [ + 'pattern' => '(account)/changeEmail', + 'load' => $dialogs['user.changeEmail']['load'], + 'submit' => $dialogs['user.changeEmail']['submit'], + ], + + // change language + 'account.changeLanguage' => [ + 'pattern' => '(account)/changeLanguage', + 'load' => $dialogs['user.changeLanguage']['load'], + 'submit' => $dialogs['user.changeLanguage']['submit'], + ], + + // change name + 'account.changeName' => [ + 'pattern' => '(account)/changeName', + 'load' => $dialogs['user.changeName']['load'], + 'submit' => $dialogs['user.changeName']['submit'], + ], + + // change password + 'account.changePassword' => [ + 'pattern' => '(account)/changePassword', + 'load' => $dialogs['user.changePassword']['load'], + 'submit' => $dialogs['user.changePassword']['submit'], + ], + + // change role + 'account.changeRole' => [ + 'pattern' => '(account)/changeRole', + 'load' => $dialogs['user.changeRole']['load'], + 'submit' => $dialogs['user.changeRole']['submit'], + ], + + // delete + 'account.delete' => [ + 'pattern' => '(account)/delete', + 'load' => $dialogs['user.delete']['load'], + 'submit' => $dialogs['user.delete']['submit'], + ], + + // change file name + 'account.file.changeName' => [ + 'pattern' => '(account)/files/(:any)/changeName', + 'load' => $dialogs['user.file.changeName']['load'], + 'submit' => $dialogs['user.file.changeName']['submit'], + ], + + // change file sort + 'account.file.changeSort' => [ + 'pattern' => '(account)/files/(:any)/changeSort', + 'load' => $dialogs['user.file.changeSort']['load'], + 'submit' => $dialogs['user.file.changeSort']['submit'], + ], + + // delete + 'account.file.delete' => [ + 'pattern' => '(account)/files/(:any)/delete', + 'load' => $dialogs['user.file.delete']['load'], + 'submit' => $dialogs['user.file.delete']['submit'], + ], + +]; diff --git a/kirby/config/areas/account/dropdowns.php b/kirby/config/areas/account/dropdowns.php new file mode 100644 index 0000000..9cf2bd2 --- /dev/null +++ b/kirby/config/areas/account/dropdowns.php @@ -0,0 +1,14 @@ + [ + 'pattern' => '(account)', + 'options' => $dropdowns['user']['options'] + ], + 'account.file' => [ + 'pattern' => '(account)/files/(:any)', + 'options' => $dropdowns['user.file']['options'] + ], +]; diff --git a/kirby/config/areas/account/views.php b/kirby/config/areas/account/views.php new file mode 100644 index 0000000..97d4558 --- /dev/null +++ b/kirby/config/areas/account/views.php @@ -0,0 +1,40 @@ + [ + 'pattern' => 'account', + 'action' => function () { + return [ + 'component' => 'k-account-view', + 'props' => kirby()->user()->panel()->props(), + ]; + }, + ], + 'account.file' => [ + 'pattern' => 'account/files/(:any)', + 'action' => function (string $filename) { + return Find::file('account', $filename)->panel()->view(); + } + ], + 'account.logout' => [ + 'pattern' => 'logout', + 'auth' => false, + 'action' => function () { + if ($user = kirby()->user()) { + $user->logout(); + } + Panel::go('login'); + }, + ], + 'account.password' => [ + 'pattern' => 'reset-password', + 'action' => function () { + return [ + 'component' => 'k-reset-password-view', + ]; + } + ] +]; diff --git a/kirby/config/areas/files/dialogs.php b/kirby/config/areas/files/dialogs.php new file mode 100644 index 0000000..4c51ef0 --- /dev/null +++ b/kirby/config/areas/files/dialogs.php @@ -0,0 +1,131 @@ + [ + 'load' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'name' => [ + 'label' => t('name'), + 'type' => 'slug', + 'required' => true, + 'icon' => 'title', + 'allow' => '@._-', + 'after' => '.' . $file->extension(), + 'preselect' => true + ] + ], + 'submitButton' => t('rename'), + 'value' => [ + 'name' => $file->name(), + ] + ] + ]; + }, + 'submit' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + $renamed = $file->changeName(get('name')); + $oldUrl = $file->panel()->url(true); + $newUrl = $renamed->panel()->url(true); + $response = [ + 'event' => 'file.changeName', + 'dispatch' => [ + 'content/move' => [ + $oldUrl, + $newUrl + ] + ], + ]; + + // check for a necessary redirect after the filename has changed + if (Panel::referrer() === $oldUrl && $oldUrl !== $newUrl) { + $response['redirect'] = $newUrl; + } + + return $response; + } + ], + + 'changeSort' => [ + 'load' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'position' => Field::filePosition($file) + ], + 'submitButton' => t('change'), + 'value' => [ + 'position' => $file->sort()->isEmpty() ? $file->siblings(false)->count() + 1 : $file->sort()->toInt(), + ] + ] + ]; + }, + 'submit' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + $files = $file->siblings()->sorted(); + $ids = $files->keys(); + $newIndex = (int)(get('position')) - 1; + $oldIndex = $files->indexOf($file); + + array_splice($ids, $oldIndex, 1); + array_splice($ids, $newIndex, 0, $file->id()); + + $files->changeSort($ids); + + return [ + 'event' => 'file.sort', + ]; + } + ], + + 'delete' => [ + 'load' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + return [ + 'component' => 'k-remove-dialog', + 'props' => [ + 'text' => tt('file.delete.confirm', [ + 'filename' => Escape::html($file->filename()) + ]), + ] + ]; + }, + 'submit' => function (string $path, string $filename) { + $file = Find::file($path, $filename); + $redirect = false; + $referrer = Panel::referrer(); + $url = $file->panel()->url(true); + + $file->delete(); + + // redirect to the parent model URL + // if the dialog has been opened in the file view + if ($referrer === $url) { + $redirect = $file->parent()->panel()->url(true); + } + + return [ + 'event' => 'file.delete', + 'dispatch' => ['content/remove' => [$url]], + 'redirect' => $redirect + ]; + } + ], +]; diff --git a/kirby/config/areas/files/dropdowns.php b/kirby/config/areas/files/dropdowns.php new file mode 100644 index 0000000..d038294 --- /dev/null +++ b/kirby/config/areas/files/dropdowns.php @@ -0,0 +1,9 @@ + function (string $parent, string $filename) { + return Find::file($parent, $filename)->panel()->dropdown(); + } +]; diff --git a/kirby/config/areas/installation.php b/kirby/config/areas/installation.php new file mode 100644 index 0000000..e97b403 --- /dev/null +++ b/kirby/config/areas/installation.php @@ -0,0 +1,41 @@ + 'settings', + 'label' => t('view.installation'), + 'views' => [ + 'installation' => [ + 'pattern' => 'installation', + 'auth' => false, + 'action' => function () use ($kirby) { + $system = $kirby->system(); + return [ + 'component' => 'k-installation-view', + 'props' => [ + 'isInstallable' => $system->isInstallable(), + 'isInstalled' => $system->isInstalled(), + 'isOk' => $system->isOk(), + 'requirements' => $system->status(), + 'translations' => $kirby->translations()->values(function ($translation) { + return [ + 'text' => $translation->name(), + 'value' => $translation->code(), + ]; + }), + ] + ]; + } + ], + 'installation.fallback' => [ + 'pattern' => '(:all)', + 'auth' => false, + 'action' => function () { + Panel::go('installation'); + } + ] + ] + ]; +}; diff --git a/kirby/config/areas/languages.php b/kirby/config/areas/languages.php new file mode 100644 index 0000000..ce0be15 --- /dev/null +++ b/kirby/config/areas/languages.php @@ -0,0 +1,11 @@ + 'globe', + 'label' => t('view.languages'), + 'menu' => true, + 'dialogs' => require __DIR__ . '/languages/dialogs.php', + 'views' => require __DIR__ . '/languages/views.php' + ]; +}; diff --git a/kirby/config/areas/languages/dialogs.php b/kirby/config/areas/languages/dialogs.php new file mode 100644 index 0000000..d4bd5ed --- /dev/null +++ b/kirby/config/areas/languages/dialogs.php @@ -0,0 +1,149 @@ + [ + 'label' => t('language.name'), + 'type' => 'text', + 'required' => true, + 'icon' => 'title' + ], + 'code' => [ + 'label' => t('language.code'), + 'type' => 'text', + 'required' => true, + 'counter' => false, + 'icon' => 'globe', + 'width' => '1/2' + ], + 'direction' => [ + 'label' => t('language.direction'), + 'type' => 'select', + 'required' => true, + 'empty' => false, + 'options' => [ + ['value' => 'ltr', 'text' => t('language.direction.ltr')], + ['value' => 'rtl', 'text' => t('language.direction.rtl')] + ], + 'width' => '1/2' + ], + 'locale' => [ + 'label' => t('language.locale'), + 'type' => 'text', + ], +]; + +return [ + + // create language + 'language.create' => [ + 'pattern' => 'languages/create', + 'load' => function () use ($languageDialogFields) { + return [ + 'component' => 'k-language-dialog', + 'props' => [ + 'fields' => $languageDialogFields, + 'submitButton' => t('language.create'), + 'value' => [ + 'code' => '', + 'direction' => 'ltr', + 'locale' => '', + 'name' => '', + ] + ] + ]; + }, + 'submit' => function () { + kirby()->languages()->create([ + 'code' => get('code'), + 'direction' => get('direction'), + 'locale' => get('locale'), + 'name' => get('name'), + ]); + return [ + 'event' => 'language.create' + ]; + } + ], + + // delete language + 'language.delete' => [ + 'pattern' => 'languages/(:any)/delete', + 'load' => function (string $id) { + $language = Find::language($id); + return [ + 'component' => 'k-remove-dialog', + 'props' => [ + 'text' => tt('language.delete.confirm', [ + 'name' => Escape::html($language->name()) + ]) + ] + ]; + }, + 'submit' => function (string $id) { + Find::language($id)->delete(); + return [ + 'event' => 'language.delete', + ]; + } + ], + + // update language + 'language.update' => [ + 'pattern' => 'languages/(:any)/update', + 'load' => function (string $id) use ($languageDialogFields) { + $language = Find::language($id); + $fields = $languageDialogFields; + $locale = $language->locale(); + + // use the first locale key if there's only one + if (count($locale) === 1) { + $locale = A::first($locale); + } + + // the code of an existing language cannot be changed + $fields['code']['disabled'] = true; + + // if the locale settings is more complex than just a + // single string, the text field won't do it anymore. + // Changes can only be made in the language file and + // we display a warning box instead. + if (is_array($locale) === true) { + $fields['locale'] = [ + 'label' => $fields['locale']['label'], + 'type' => 'info', + 'text' => t('language.locale.warning') + ]; + } + + return [ + 'component' => 'k-language-dialog', + 'props' => [ + 'fields' => $fields, + 'submitButton' => t('save'), + 'value' => [ + 'code' => $language->code(), + 'direction' => $language->direction(), + 'locale' => $locale, + 'name' => $language->name(), + 'rules' => $language->rules(), + ] + ] + ]; + }, + 'submit' => function (string $id) { + $language = Find::language($id)->update([ + 'direction' => get('direction'), + 'locale' => get('locale'), + 'name' => get('name'), + ]); + return [ + 'event' => 'language.update' + ]; + } + ], +]; diff --git a/kirby/config/areas/languages/views.php b/kirby/config/areas/languages/views.php new file mode 100644 index 0000000..800d16a --- /dev/null +++ b/kirby/config/areas/languages/views.php @@ -0,0 +1,26 @@ + [ + 'pattern' => 'languages', + 'action' => function () { + $kirby = kirby(); + + return [ + 'component' => 'k-languages-view', + 'props' => [ + 'languages' => $kirby->languages()->values(function ($language) { + return [ + 'default' => $language->isDefault(), + 'id' => $language->code(), + 'info' => Escape::html($language->code()), + 'text' => Escape::html($language->name()), + ]; + }) + ] + ]; + } + ], +]; diff --git a/kirby/config/areas/login.php b/kirby/config/areas/login.php new file mode 100644 index 0000000..d323fda --- /dev/null +++ b/kirby/config/areas/login.php @@ -0,0 +1,43 @@ + 'user', + 'label' => t('login'), + 'views' => [ + 'login' => [ + 'pattern' => 'login', + 'auth' => false, + 'action' => function () use ($kirby) { + $system = $kirby->system(); + $status = $kirby->auth()->status(); + return [ + 'component' => 'k-login-view', + 'props' => [ + 'methods' => array_keys($system->loginMethods()), + 'pending' => [ + 'email' => $status->email(), + 'challenge' => $status->challenge() + ] + ], + ]; + } + ], + 'login.fallback' => [ + 'pattern' => '(:all)', + 'auth' => false, + 'action' => function ($path) use ($kirby) { + /** + * Store the current path in the session + * Once the user is logged in, the path will + * be used to redirect to that view again + */ + $kirby->session()->set('panel.path', $path); + Panel::go('login'); + } + ] + ] + ]; +}; diff --git a/kirby/config/areas/site.php b/kirby/config/areas/site.php new file mode 100644 index 0000000..0e04445 --- /dev/null +++ b/kirby/config/areas/site.php @@ -0,0 +1,17 @@ + function () use ($kirby) { + return $kirby->site()->title()->or(t('view.site'))->toString(); + }, + 'icon' => 'home', + 'label' => $kirby->site()->blueprint()->title() ?? t('view.site'), + 'menu' => true, + 'dialogs' => require __DIR__ . '/site/dialogs.php', + 'dropdowns' => require __DIR__ . '/site/dropdowns.php', + 'searches' => require __DIR__ . '/site/searches.php', + 'views' => require __DIR__ . '/site/views.php', + ]; +}; diff --git a/kirby/config/areas/site/dialogs.php b/kirby/config/areas/site/dialogs.php new file mode 100644 index 0000000..042aee8 --- /dev/null +++ b/kirby/config/areas/site/dialogs.php @@ -0,0 +1,547 @@ + [ + 'pattern' => 'pages/(:any)/changeSort', + 'load' => function (string $id) { + $page = Find::page($id); + $position = null; + + if ($page->blueprint()->num() !== 'default') { + throw new PermissionException([ + 'key' => 'page.sort.permission', + 'data' => [ + 'slug' => $page->slug() + ] + ]); + } + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'position' => Field::pagePosition($page), + ], + 'submitButton' => t('change'), + 'value' => [ + 'position' => $page->panel()->position() + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::page($id)->changeStatus('listed', get('position')); + return [ + 'event' => 'page.sort', + ]; + } + ], + + // change page status + 'page.changeStatus' => [ + 'pattern' => 'pages/(:any)/changeStatus', + 'load' => function (string $id) { + $page = Find::page($id); + $blueprint = $page->blueprint(); + $status = $page->status(); + $states = []; + $position = null; + + foreach ($blueprint->status() as $key => $state) { + $states[] = [ + 'value' => $key, + 'text' => $state['label'], + 'info' => $state['text'], + ]; + } + + if ($status === 'draft') { + $errors = $page->errors(); + + // switch to the error dialog if there are + // errors and the draft cannot be published + if (count($errors) > 0) { + return [ + 'component' => 'k-error-dialog', + 'props' => [ + 'message' => t('error.page.changeStatus.incomplete'), + 'details' => $errors, + ] + ]; + } + } + + $fields = [ + 'status' => [ + 'label' => t('page.changeStatus.select'), + 'type' => 'radio', + 'required' => true, + 'options' => $states + ] + ]; + + if ($blueprint->num() === 'default') { + $fields['position'] = Field::pagePosition($page, [ + 'when' => [ + 'status' => 'listed' + ] + ]); + + $position = $page->panel()->position(); + } + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => $fields, + 'submitButton' => t('change'), + 'value' => [ + 'status' => $status, + 'position' => $position + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::page($id)->changeStatus(get('status'), get('position')); + return [ + 'event' => 'page.changeStatus', + ]; + } + ], + + // change template + 'page.changeTemplate' => [ + 'pattern' => 'pages/(:any)/changeTemplate', + 'load' => function (string $id) { + $page = Find::page($id); + $blueprints = $page->blueprints(); + + if (count($blueprints) <= 1) { + throw new Exception([ + 'key' => 'page.changeTemplate.invalid', + 'data' => [ + 'slug' => $id + ] + ]); + } + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'template' => Field::template($blueprints, [ + 'required' => true + ]) + ], + 'submitButton' => t('change'), + 'value' => [ + 'template' => $page->intendedTemplate()->name() + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::page($id)->changeTemplate(get('template')); + return [ + 'event' => 'page.changeTemplate', + ]; + } + ], + + // change title + 'page.changeTitle' => [ + 'pattern' => 'pages/(:any)/changeTitle', + 'load' => function (string $id) { + $page = Find::page($id); + $permissions = $page->permissions(); + $select = get('select', 'title'); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'title' => Field::title([ + 'required' => true, + 'preselect' => $select === 'title', + 'disabled' => $permissions->can('changeTitle') === false + ]), + 'slug' => Field::slug([ + 'required' => true, + 'preselect' => $select === 'slug', + 'path' => $page->parent() ? '/' . $page->parent()->id() . '/' : '/', + 'disabled' => $permissions->can('changeSlug') === false, + 'wizard' => [ + 'text' => t('page.changeSlug.fromTitle'), + 'field' => 'title' + ] + ]) + ], + 'autofocus' => false, + 'submitButton' => t('change'), + 'value' => [ + 'title' => $page->title()->value(), + 'slug' => $page->slug(), + ] + ] + ]; + }, + 'submit' => function (string $id) { + $page = Find::page($id); + $title = trim(get('title')); + $slug = trim(get('slug')); + + // basic input validation before we move on + if (Str::length($title) === 0) { + throw new InvalidArgumentException(['key' => 'page.changeTitle.empty']); + } + + if (Str::length($slug) === 0) { + throw new InvalidArgumentException(['key' => 'page.slug.invalid']); + } + + // nothing changed + if ($page->title()->value() === $title && $page->slug() === $slug) { + return true; + } + + // prepare the response + $response = [ + 'event' => [] + ]; + + // the page title changed + if ($page->title()->value() !== $title) { + $page->changeTitle($title); + $response['event'][] = 'page.changeTitle'; + } + + // the slug changed + if ($page->slug() !== $slug) { + $newPage = $page->changeSlug($slug); + $response['event'][] = 'page.changeSlug'; + $response['dispatch'] = [ + 'content/move' => [ + $oldUrl = $page->panel()->url(true), + $newUrl = $newPage->panel()->url(true) + ] + ]; + + // check for a necessary redirect after the slug has changed + if (Panel::referrer() === $oldUrl && $oldUrl !== $newUrl) { + $response['redirect'] = $newUrl; + } + } + + return $response; + } + ], + + // create a new page + 'page.create' => [ + 'pattern' => 'pages/create', + 'load' => function () { + // the parent model for the new page + $parent = get('parent', 'site'); + + // the view on which the add button is located + // this is important to find the right section + // and provide the correct templates for the new page + $view = get('view', $parent); + + // templates will be fetched depending on the + // section settings in the blueprint + $section = get('section'); + + // this is the parent model + $model = Find::parent($parent); + + // this is the view model + // i.e. site if the add button is on + // the dashboard + $view = Find::parent($view); + + // available blueprints/templates for the new page + // are always loaded depending on the matching section + // in the view model blueprint + $blueprints = $view->blueprints($section); + + // the pre-selected template + $template = $blueprints[0]['name'] ?? $blueprints[0]['value'] ?? null; + + $fields = [ + 'parent' => Field::hidden(), + 'title' => Field::title([ + 'required' => true, + 'preselect' => true + ]), + 'slug' => Field::slug([ + 'required' => true, + 'sync' => 'title', + 'path' => empty($model->id()) === false ? '/' . $model->id() . '/' : '/' + ]), + 'template' => Field::hidden() + ]; + + // only show template field if > 1 templates available + // or when in debug mode + if (count($blueprints) > 1 || option('debug') === true) { + $fields['template'] = Field::template($blueprints, [ + 'required' => true + ]); + } + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => $fields, + 'submitButton' => t('page.draft.create'), + 'value' => [ + 'parent' => $parent, + 'slug' => '', + 'template' => $template, + 'title' => '', + ] + ] + ]; + }, + 'submit' => function () { + $title = trim(get('title')); + + if (Str::length($title) === 0) { + throw new InvalidArgumentException([ + 'key' => 'page.changeTitle.empty' + ]); + } + + $page = Find::parent(get('parent', 'site'))->createChild([ + 'content' => ['title' => $title], + 'slug' => get('slug'), + 'template' => get('template'), + ]); + + return [ + 'event' => 'page.create', + 'redirect' => $page->panel()->url(true) + ]; + } + ], + + // delete page + 'page.delete' => [ + 'pattern' => 'pages/(:any)/delete', + 'load' => function (string $id) { + $page = Find::page($id); + $text = tt('page.delete.confirm', [ + 'title' => Escape::html($page->title()->value()) + ]); + + if ($page->childrenAndDrafts()->count() > 0) { + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'info' => [ + 'type' => 'info', + 'theme' => 'negative', + 'text' => t('page.delete.confirm.subpages') + ], + 'check' => [ + 'label' => t('page.delete.confirm.title'), + 'type' => 'text', + 'counter' => false + ] + ], + 'size' => 'medium', + 'submitButton' => t('delete'), + 'text' => $text, + 'theme' => 'negative', + ] + ]; + } + + return [ + 'component' => 'k-remove-dialog', + 'props' => [ + 'text' => $text + ] + ]; + }, + 'submit' => function (string $id) { + $page = Find::page($id); + $redirect = false; + $referrer = Panel::referrer(); + $url = $page->panel()->url(true); + + if ($page->childrenAndDrafts()->count() > 0 && get('check') !== $page->title()->value()) { + throw new InvalidArgumentException(['key' => 'page.delete.confirm']); + } + + $page->delete(true); + + // redirect to the parent model URL + // if the dialog has been opened in the page view + if ($referrer === $url) { + $redirect = $page->parentModel()->panel()->url(true); + } + + return [ + 'event' => 'page.delete', + 'dispatch' => ['content/remove' => [$url]], + 'redirect' => $redirect + ]; + } + ], + + // duplicate page + 'page.duplicate' => [ + 'pattern' => 'pages/(:any)/duplicate', + 'load' => function (string $id) { + $page = Find::page($id); + $hasChildren = $page->hasChildren(); + $hasFiles = $page->hasFiles(); + $toggleWidth = '1/' . count(array_filter([$hasChildren, $hasFiles])); + + $fields = [ + 'title' => Field::title([ + 'required' => true + ]), + 'slug' => Field::slug([ + 'required' => true, + 'path' => $page->parent() ? '/' . $page->parent()->id() . '/' : '/', + 'wizard' => [ + 'text' => t('page.changeSlug.fromTitle'), + 'field' => 'title' + ] + ]) + ]; + + if ($hasFiles === true) { + $fields['files'] = [ + 'label' => t('page.duplicate.files'), + 'type' => 'toggle', + 'required' => true, + 'width' => $toggleWidth + ]; + } + + if ($hasChildren === true) { + $fields['children'] = [ + 'label' => t('page.duplicate.pages'), + 'type' => 'toggle', + 'required' => true, + 'width' => $toggleWidth + ]; + } + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => $fields, + 'submitButton' => t('duplicate'), + 'value' => [ + 'children' => false, + 'files' => false, + 'slug' => $page->slug() . '-' . Str::slug(t('page.duplicate.appendix')), + 'title' => $page->title() . ' ' . t('page.duplicate.appendix') + ] + ] + ]; + }, + 'submit' => function (string $id) { + $newPage = Find::page($id)->duplicate(get('slug'), [ + 'children' => (bool)get('children'), + 'files' => (bool)get('files'), + 'title' => (string)get('title'), + ]); + + return [ + 'event' => 'page.duplicate', + 'redirect' => $newPage->panel()->url(true) + ]; + } + ], + + // change filename + 'page.file.changeName' => [ + 'pattern' => '(pages/.*?)/files/(:any)/changeName', + 'load' => $files['changeName']['load'], + 'submit' => $files['changeName']['submit'], + ], + + // change sort + 'page.file.changeSort' => [ + 'pattern' => '(pages/.*?)/files/(:any)/changeSort', + 'load' => $files['changeSort']['load'], + 'submit' => $files['changeSort']['submit'], + ], + + // delete + 'page.file.delete' => [ + 'pattern' => '(pages/.*?)/files/(:any)/delete', + 'load' => $files['delete']['load'], + 'submit' => $files['delete']['submit'], + ], + + // change site title + 'site.changeTitle' => [ + 'pattern' => 'site/changeTitle', + 'load' => function () { + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'title' => Field::title([ + 'required' => true, + 'preselect' => true + ]) + ], + 'submitButton' => t('rename'), + 'value' => [ + 'title' => site()->title()->value() + ] + ] + ]; + }, + 'submit' => function () { + site()->changeTitle(get('title')); + return [ + 'event' => 'site.changeTitle', + ]; + } + ], + + // change filename + 'site.file.changeName' => [ + 'pattern' => '(site)/files/(:any)/changeName', + 'load' => $files['changeName']['load'], + 'submit' => $files['changeName']['submit'], + ], + + // change sort + 'site.file.changeSort' => [ + 'pattern' => '(site)/files/(:any)/changeSort', + 'load' => $files['changeSort']['load'], + 'submit' => $files['changeSort']['submit'], + ], + + // delete + 'site.file.delete' => [ + 'pattern' => '(site)/files/(:any)/delete', + 'load' => $files['delete']['load'], + 'submit' => $files['delete']['submit'], + ], + +]; diff --git a/kirby/config/areas/site/dropdowns.php b/kirby/config/areas/site/dropdowns.php new file mode 100644 index 0000000..464a509 --- /dev/null +++ b/kirby/config/areas/site/dropdowns.php @@ -0,0 +1,28 @@ + [ + 'pattern' => 'changes', + 'options' => function () { + return Dropdown::changes(); + } + ], + 'page' => [ + 'pattern' => 'pages/(:any)', + 'options' => function (string $path) { + return Find::page($path)->panel()->dropdown(); + } + ], + 'page.file' => [ + 'pattern' => '(pages/.*?)/files/(:any)', + 'options' => $files['file'] + ], + 'site.file' => [ + 'pattern' => '(site)/files/(:any)', + 'options' => $files['file'] + ] +]; diff --git a/kirby/config/areas/site/searches.php b/kirby/config/areas/site/searches.php new file mode 100644 index 0000000..14b5479 --- /dev/null +++ b/kirby/config/areas/site/searches.php @@ -0,0 +1,55 @@ + [ + 'label' => t('pages'), + 'icon' => 'page', + 'query' => function (string $query = null) { + $pages = site() + ->index(true) + ->search($query) + ->filter('isReadable', true) + ->limit(10); + + $results = []; + + foreach ($pages as $page) { + $results[] = [ + 'image' => $page->panel()->image(), + 'text' => Escape::html($page->title()->value()), + 'link' => $page->panel()->url(true), + 'info' => Escape::html($page->id()) + ]; + } + + return $results; + } + ], + 'files' => [ + 'label' => t('files'), + 'icon' => 'image', + 'query' => function (string $query = null) { + $files = site() + ->index(true) + ->filter('isReadable', true) + ->files() + ->search($query) + ->limit(10); + + $results = []; + + foreach ($files as $file) { + $results[] = [ + 'image' => $file->panel()->image(), + 'text' => Escape::html($file->filename()), + 'link' => $file->panel()->url(true), + 'info' => Escape::html($file->id()) + ]; + } + + return $results; + } + ] +]; diff --git a/kirby/config/areas/site/views.php b/kirby/config/areas/site/views.php new file mode 100644 index 0000000..a2e8ccd --- /dev/null +++ b/kirby/config/areas/site/views.php @@ -0,0 +1,30 @@ + [ + 'pattern' => 'pages/(:any)', + 'action' => function (string $path) { + return Find::page($path)->panel()->view(); + } + ], + 'page.file' => [ + 'pattern' => 'pages/(:any)/files/(:any)', + 'action' => function (string $id, string $filename) { + return Find::file('pages/' . $id, $filename)->panel()->view(); + } + ], + 'site' => [ + 'pattern' => 'site', + 'action' => function () { + return site()->panel()->view(); + } + ], + 'site.file' => [ + 'pattern' => 'site/files/(:any)', + 'action' => function (string $filename) { + return Find::file('site', $filename)->panel()->view(); + } + ], +]; diff --git a/kirby/config/areas/system.php b/kirby/config/areas/system.php new file mode 100644 index 0000000..da7bccd --- /dev/null +++ b/kirby/config/areas/system.php @@ -0,0 +1,11 @@ + 'settings', + 'label' => t('view.system'), + 'menu' => true, + 'dialogs' => require __DIR__ . '/system/dialogs.php', + 'views' => require __DIR__ . '/system/views.php' + ]; +}; diff --git a/kirby/config/areas/system/dialogs.php b/kirby/config/areas/system/dialogs.php new file mode 100644 index 0000000..5566078 --- /dev/null +++ b/kirby/config/areas/system/dialogs.php @@ -0,0 +1,43 @@ + [ + 'load' => function () { + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'license' => [ + 'label' => t('license.register.label'), + 'type' => 'text', + 'required' => true, + 'counter' => false, + 'placeholder' => 'K3-', + 'help' => t('license.register.help') + ], + 'email' => Field::email([ + 'required' => true + ]) + ], + 'submitButton' => t('license.register'), + 'value' => [ + 'license' => null, + 'email' => null + ] + ] + ]; + }, + 'submit' => function () { + // @codeCoverageIgnoreStart + kirby()->system()->register(get('license'), get('email')); + return [ + 'event' => 'system.register', + 'message' => t('license.register.success') + ]; + // @codeCoverageIgnoreEnd + } + ], +]; diff --git a/kirby/config/areas/system/views.php b/kirby/config/areas/system/views.php new file mode 100644 index 0000000..4e9a4b2 --- /dev/null +++ b/kirby/config/areas/system/views.php @@ -0,0 +1,46 @@ + [ + 'pattern' => 'system', + 'action' => function () { + $kirby = kirby(); + $system = $kirby->system(); + $license = $system->license(); + + // @codeCoverageIgnoreStart + if ($license === true) { + // valid license, but user is not admin + $license = 'Kirby 3'; + } elseif ($license === false) { + // no valid license + $license = null; + } + // @codeCoverageIgnoreEnd + + $plugins = $system->plugins()->values(function ($plugin) { + return [ + 'author' => $plugin->authorsNames(), + 'license' => $plugin->license(), + 'link' => $plugin->link(), + 'name' => $plugin->name(), + 'version' => $plugin->version(), + ]; + }); + + return [ + 'component' => 'k-system-view', + 'props' => [ + 'debug' => $kirby->option('debug', false), + 'license' => $license, + 'plugins' => $plugins, + 'php' => phpversion(), + 'server' => $system->serverSoftware(), + 'ssl' => Server::https(), + 'version' => $kirby->version(), + ] + ]; + } + ], +]; diff --git a/kirby/config/areas/users.php b/kirby/config/areas/users.php new file mode 100644 index 0000000..fd61535 --- /dev/null +++ b/kirby/config/areas/users.php @@ -0,0 +1,14 @@ + 'users', + 'label' => t('view.users'), + 'search' => 'users', + 'menu' => true, + 'dialogs' => require __DIR__ . '/users/dialogs.php', + 'dropdowns' => require __DIR__ . '/users/dropdowns.php', + 'searches' => require __DIR__ . '/users/searches.php', + 'views' => require __DIR__ . '/users/views.php' + ]; +}; diff --git a/kirby/config/areas/users/dialogs.php b/kirby/config/areas/users/dialogs.php new file mode 100644 index 0000000..9192981 --- /dev/null +++ b/kirby/config/areas/users/dialogs.php @@ -0,0 +1,295 @@ + [ + 'pattern' => 'users/create', + 'load' => function () { + $kirby = kirby(); + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'name' => Field::username(), + 'email' => Field::email([ + 'link' => false, + 'required' => true + ]), + 'password' => Field::password(), + 'language' => Field::translation([ + 'required' => true + ]), + 'role' => Field::role([ + 'required' => true + ]) + ], + 'submitButton' => t('create'), + 'value' => [ + 'name' => '', + 'email' => '', + 'password' => '', + 'language' => $kirby->panelLanguage(), + 'role' => $kirby->user()->role()->name() + ] + ] + ]; + }, + 'submit' => function () { + kirby()->users()->create([ + 'name' => get('name'), + 'email' => get('email'), + 'password' => get('password'), + 'language' => get('language'), + 'role' => get('role') + ]); + return [ + 'event' => 'user.create' + ]; + } + ], + + // change email + 'user.changeEmail' => [ + 'pattern' => 'users/(:any)/changeEmail', + 'load' => function (string $id) { + $user = Find::user($id); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'email' => [ + 'label' => t('email'), + 'required' => true, + 'type' => 'email', + 'preselect' => true + ] + ], + 'submitButton' => t('change'), + 'value' => [ + 'email' => $user->email() + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::user($id)->changeEmail(get('email')); + return [ + 'event' => 'user.changeEmail' + ]; + } + ], + + // change language + 'user.changeLanguage' => [ + 'pattern' => 'users/(:any)/changeLanguage', + 'load' => function (string $id) { + $user = Find::user($id); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'translation' => Field::translation(['required' => true]) + ], + 'submitButton' => t('change'), + 'value' => [ + 'translation' => $user->language() + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::user($id)->changeLanguage(get('translation')); + + return [ + 'event' => 'user.changeLanguage', + 'reload' => [ + 'globals' => '$translation' + ] + ]; + } + ], + + // change name + 'user.changeName' => [ + 'pattern' => 'users/(:any)/changeName', + 'load' => function (string $id) { + $user = Find::user($id); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'name' => Field::username([ + 'preselect' => true + ]) + ], + 'submitButton' => t('rename'), + 'value' => [ + 'name' => $user->name()->value() + ] + ] + ]; + }, + 'submit' => function (string $id) { + Find::user($id)->changeName(get('name')); + + return [ + 'event' => 'user.changeName' + ]; + } + ], + + // change password + 'user.changePassword' => [ + 'pattern' => 'users/(:any)/changePassword', + 'load' => function (string $id) { + $user = Find::user($id); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'password' => Field::password([ + 'label' => t('user.changePassword.new'), + ]), + 'passwordConfirmation' => Field::password([ + 'label' => t('user.changePassword.new.confirm'), + ]) + ], + 'submitButton' => t('change'), + ] + ]; + }, + 'submit' => function (string $id) { + $user = Find::user($id); + $password = get('password'); + $passwordConfirmation = get('passwordConfirmation'); + + // validate the password + UserRules::validPassword($user, $password ?? ''); + + // compare passwords + if ($password !== $passwordConfirmation) { + throw new InvalidArgumentException([ + 'key' => 'user.password.notSame' + ]); + } + + // change password if everything's fine + $user->changePassword($password); + + return [ + 'event' => 'user.changePassword' + ]; + } + ], + + // change role + 'user.changeRole' => [ + 'pattern' => 'users/(:any)/changeRole', + 'load' => function (string $id) { + $user = Find::user($id); + + return [ + 'component' => 'k-form-dialog', + 'props' => [ + 'fields' => [ + 'role' => Field::role([ + 'label' => t('user.changeRole.select'), + 'required' => true, + ]) + ], + 'submitButton' => t('user.changeRole'), + 'value' => [ + 'role' => $user->role()->name() + ] + ] + ]; + }, + 'submit' => function (string $id) { + $user = Find::user($id)->changeRole(get('role')); + + return [ + 'event' => 'user.changeRole', + 'user' => $user->toArray() + ]; + } + ], + + // delete + 'user.delete' => [ + 'pattern' => 'users/(:any)/delete', + 'load' => function (string $id) { + $user = Find::user($id); + $i18nPrefix = $user->isLoggedIn() ? 'account' : 'user'; + + return [ + 'component' => 'k-remove-dialog', + 'props' => [ + 'text' => tt($i18nPrefix . '.delete.confirm', [ + 'email' => Escape::html($user->email()) + ]) + ] + ]; + }, + 'submit' => function (string $id) { + $user = Find::user($id); + $redirect = false; + $referrer = Panel::referrer(); + $url = $user->panel()->url(true); + + $user->delete(); + + // redirect to the users view + // if the dialog has been opened in the user view + if ($referrer === $url) { + $redirect = '/users'; + } + + // logout the user if they deleted themselves + if ($user->isLoggedIn()) { + $redirect = '/logout'; + } + + return [ + 'event' => 'user.delete', + 'dispatch' => ['content/remove' => [$url]], + 'redirect' => $redirect + ]; + } + ], + + // change file name + 'user.file.changeName' => [ + 'pattern' => '(users/.*?)/files/(:any)/changeName', + 'load' => $files['changeName']['load'], + 'submit' => $files['changeName']['submit'], + ], + + // change file sort + 'user.file.changeSort' => [ + 'pattern' => '(users/.*?)/files/(:any)/changeSort', + 'load' => $files['changeSort']['load'], + 'submit' => $files['changeSort']['submit'], + ], + + // delete file + 'user.file.delete' => [ + 'pattern' => '(users/.*?)/files/(:any)/delete', + 'load' => $files['delete']['load'], + 'submit' => $files['delete']['submit'], + ] + +]; diff --git a/kirby/config/areas/users/dropdowns.php b/kirby/config/areas/users/dropdowns.php new file mode 100644 index 0000000..2b3f15f --- /dev/null +++ b/kirby/config/areas/users/dropdowns.php @@ -0,0 +1,18 @@ + [ + 'pattern' => 'users/(:any)', + 'options' => function (string $id) { + return Find::user($id)->panel()->dropdown(); + } + ], + 'user.file' => [ + 'pattern' => '(users/.*?)/files/(:any)', + 'options' => $files['file'] + ] +]; diff --git a/kirby/config/areas/users/searches.php b/kirby/config/areas/users/searches.php new file mode 100644 index 0000000..879db7f --- /dev/null +++ b/kirby/config/areas/users/searches.php @@ -0,0 +1,25 @@ + [ + 'label' => t('users'), + 'icon' => 'users', + 'query' => function (string $query = null) { + $users = kirby()->users()->search($query)->limit(10); + $results = []; + + foreach ($users as $user) { + $results[] = [ + 'image' => $user->panel()->image(), + 'text' => Escape::html($user->username()), + 'link' => $user->panel()->url(true), + 'info' => Escape::html($user->role()->title()) + ]; + } + + return $results; + } + ] +]; diff --git a/kirby/config/areas/users/views.php b/kirby/config/areas/users/views.php new file mode 100644 index 0000000..11668ab --- /dev/null +++ b/kirby/config/areas/users/views.php @@ -0,0 +1,69 @@ + [ + 'pattern' => 'users', + 'action' => function () { + $kirby = kirby(); + $role = get('role'); + $roles = $kirby->roles()->toArray(function ($role) { + return [ + 'id' => $role->id(), + 'title' => $role->title(), + ]; + }); + + return [ + 'component' => 'k-users-view', + 'props' => [ + 'role' => function () use ($kirby, $roles, $role) { + if ($role) { + return $roles[$role] ?? null; + } + }, + 'roles' => array_values($roles), + 'users' => function () use ($kirby, $role) { + $users = $kirby->users(); + + if (empty($role) === false) { + $users = $users->role($role); + } + + $users = $users->paginate([ + 'limit' => 20, + 'page' => get('page') + ]); + + return [ + 'data' => $users->values(function ($user) { + return [ + 'id' => $user->id(), + 'image' => $user->panel()->image(), + 'info' => Escape::html($user->role()->title()), + 'link' => $user->panel()->url(true), + 'text' => Escape::html($user->username()) + ]; + }), + 'pagination' => $users->pagination()->toArray() + ]; + }, + ] + ]; + } + ], + 'user' => [ + 'pattern' => 'users/(:any)', + 'action' => function (string $id) { + return Find::user($id)->panel()->view(); + } + ], + 'user.file' => [ + 'pattern' => 'users/(:any)/files/(:any)', + 'action' => function (string $id, string $filename) { + return Find::file('users/' . $id, $filename)->panel()->view(); + } + ], +]; diff --git a/kirby/config/blocks/image/image.php b/kirby/config/blocks/image/image.php index 9d250b0..17221c3 100644 --- a/kirby/config/blocks/image/image.php +++ b/kirby/config/blocks/image/image.php @@ -9,7 +9,7 @@ $ratio = $block->ratio()->or('auto'); $src = null; if ($block->location() == 'web') { - $src = $block->src(); + $src = $block->src()->esc(); } elseif ($image = $block->image()->toFile()) { $alt = $alt ?? $image->alt(); $src = $image->url(); @@ -19,11 +19,11 @@ if ($block->location() == 'web') { $ratio, 'data-crop' => $crop], ' ') ?>> isNotEmpty()): ?> - - <?= $alt ?> + + <?= $alt->esc() ?> - <?= $alt ?> + <?= $alt->esc() ?> isNotEmpty()): ?> diff --git a/kirby/config/blocks/line/line.php b/kirby/config/blocks/line/line.php new file mode 100644 index 0000000..09d5649 --- /dev/null +++ b/kirby/config/blocks/line/line.php @@ -0,0 +1 @@ +
diff --git a/kirby/config/blocks/line/line.yml b/kirby/config/blocks/line/line.yml new file mode 100644 index 0000000..dcff956 --- /dev/null +++ b/kirby/config/blocks/line/line.yml @@ -0,0 +1,4 @@ +name: field.blocks.line.name +icon: divider +preview: line +wysiwyg: true diff --git a/kirby/config/blocks/video/video.php b/kirby/config/blocks/video/video.php index f28438f..9d0bfd3 100644 --- a/kirby/config/blocks/video/video.php +++ b/kirby/config/blocks/video/video.php @@ -1,7 +1,7 @@ -url()->isNotEmpty()): ?> +url())): ?>
- url()) ?> + caption()->isNotEmpty()): ?>
caption() ?>
diff --git a/kirby/config/blueprints.php b/kirby/config/blueprints.php deleted file mode 100644 index 95ffade..0000000 --- a/kirby/config/blueprints.php +++ /dev/null @@ -1,26 +0,0 @@ - $blocksRoot . '/code/code.yml', - 'blocks/gallery' => $blocksRoot . '/gallery/gallery.yml', - 'blocks/heading' => $blocksRoot . '/heading/heading.yml', - 'blocks/image' => $blocksRoot . '/image/image.yml', - 'blocks/list' => $blocksRoot . '/list/list.yml', - 'blocks/markdown' => $blocksRoot . '/markdown/markdown.yml', - 'blocks/quote' => $blocksRoot . '/quote/quote.yml', - 'blocks/table' => $blocksRoot . '/table/table.yml', - 'blocks/text' => $blocksRoot . '/text/text.yml', - 'blocks/video' => $blocksRoot . '/video/video.yml', - - // file blueprints - 'files/default' => __DIR__ . '/blueprints/files/default.yml', - - // page blueprints - 'pages/default' => __DIR__ . '/blueprints/pages/default.yml', - - // site blueprints - 'site' => __DIR__ . '/blueprints/site.yml' -]; diff --git a/kirby/config/blueprints/blocks/heading.yml b/kirby/config/blueprints/blocks/heading.yml index e381b5c..aa42575 100644 --- a/kirby/config/blueprints/blocks/heading.yml +++ b/kirby/config/blueprints/blocks/heading.yml @@ -5,7 +5,6 @@ fields: level: type: select width: 1/2 - default: 1 empty: false default: "2" options: diff --git a/kirby/config/components.php b/kirby/config/components.php index 0dd34ef..79a3a34 100644 --- a/kirby/config/components.php +++ b/kirby/config/components.php @@ -3,10 +3,12 @@ use Kirby\Cms\App; use Kirby\Cms\Collection; use Kirby\Cms\File; -use Kirby\Cms\Filename; use Kirby\Cms\FileVersion; use Kirby\Cms\Template; use Kirby\Data\Data; +use Kirby\Email\PHPMailer as Emailer; +use Kirby\Filesystem\F; +use Kirby\Filesystem\Filename; use Kirby\Http\Server; use Kirby\Http\Uri; use Kirby\Http\Url; @@ -14,7 +16,6 @@ use Kirby\Image\Darkroom; use Kirby\Text\Markdown; use Kirby\Text\SmartyPants; use Kirby\Toolkit\A; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; use Kirby\Toolkit\Tpl as Snippet; @@ -55,6 +56,17 @@ return [ return $output; }, + /** + * Add your own email provider + * + * @param \Kirby\Cms\App $kirby Kirby instance + * @param array $props + * @param bool $debug + */ + 'email' => function (App $kirby, array $props = [], bool $debug = false) { + return new Emailer($props, $debug); + }, + /** * Modify URLs for file objects * @@ -70,7 +82,7 @@ return [ * Adapt file characteristics * * @param \Kirby\Cms\App $kirby Kirby instance - * @param \Kirby\Cms\File|\Kirby\Cms\FileModifications $file The file object + * @param \Kirby\Cms\File|\Kirby\Filesystem\Asset $file The file object * @param array $options All thumb options (width, height, crop, blur, grayscale) * @return \Kirby\Cms\File|\Kirby\Cms\FileVersion */ @@ -233,7 +245,7 @@ return [ } } - return $item->searchHits > 0 ? true : false; + return $item->searchHits > 0; }); return $results->sort('searchScore', 'desc'); @@ -305,15 +317,18 @@ return [ * Add your own thumb generator * * @param \Kirby\Cms\App $kirby Kirby instance - * @param string $src The root of the original file - * @param string $template The template for the root to the desired destination + * @param string $src Root of the original file + * @param string $dst Template string for the root to the desired destination * @param array $options All thumb options that should be applied: `width`, `height`, `crop`, `blur`, `grayscale` * @return string */ - 'thumb' => function (App $kirby, string $src, string $template, array $options): string { - $darkroom = Darkroom::factory(option('thumbs.driver', 'gd'), option('thumbs', [])); + 'thumb' => function (App $kirby, string $src, string $dst, array $options): string { + $darkroom = Darkroom::factory( + option('thumbs.driver', 'gd'), + option('thumbs', []) + ); $options = $darkroom->preprocess($src, $options); - $root = (new Filename($src, $template, $options))->toString(); + $root = (new Filename($src, $dst, $options))->toString(); F::copy($src, $root, true); $darkroom->process($root, $options); @@ -327,13 +342,9 @@ return [ * @param \Kirby\Cms\App $kirby Kirby instance * @param string $path URL path * @param array|string|null $options Array of options for the Uri class - * @param Closure $originalHandler Deprecated: Callback function to the original URL handler with `$path` and `$options` as parameters - * Use `$kirby->nativeComponent('url')` inside your URL component instead. * @return string - * - * @todo Remove $originalHandler parameter in 3.6.0 */ - 'url' => function (App $kirby, string $path = null, $options = null, Closure $originalHandler = null): string { + 'url' => function (App $kirby, string $path = null, $options = null): string { $language = null; // get language from simple string option diff --git a/kirby/config/fields.php b/kirby/config/fields.php deleted file mode 100644 index 3c878b6..0000000 --- a/kirby/config/fields.php +++ /dev/null @@ -1,32 +0,0 @@ - 'Kirby\Form\Field\BlocksField', - 'checkboxes' => __DIR__ . '/fields/checkboxes.php', - 'date' => __DIR__ . '/fields/date.php', - 'email' => __DIR__ . '/fields/email.php', - 'files' => __DIR__ . '/fields/files.php', - 'gap' => __DIR__ . '/fields/gap.php', - 'headline' => __DIR__ . '/fields/headline.php', - 'hidden' => __DIR__ . '/fields/hidden.php', - 'info' => __DIR__ . '/fields/info.php', - 'layout' => 'Kirby\Form\Field\LayoutField', - 'line' => __DIR__ . '/fields/line.php', - 'list' => __DIR__ . '/fields/list.php', - 'multiselect' => __DIR__ . '/fields/multiselect.php', - 'number' => __DIR__ . '/fields/number.php', - 'pages' => __DIR__ . '/fields/pages.php', - 'radio' => __DIR__ . '/fields/radio.php', - 'range' => __DIR__ . '/fields/range.php', - 'select' => __DIR__ . '/fields/select.php', - 'structure' => __DIR__ . '/fields/structure.php', - 'tags' => __DIR__ . '/fields/tags.php', - 'tel' => __DIR__ . '/fields/tel.php', - 'text' => __DIR__ . '/fields/text.php', - 'textarea' => __DIR__ . '/fields/textarea.php', - 'time' => __DIR__ . '/fields/time.php', - 'toggle' => __DIR__ . '/fields/toggle.php', - 'url' => __DIR__ . '/fields/url.php', - 'users' => __DIR__ . '/fields/users.php', - 'writer' => __DIR__ . '/fields/writer.php' -]; diff --git a/kirby/config/fields/files.php b/kirby/config/fields/files.php index e4cb1f4..10fa851 100644 --- a/kirby/config/fields/files.php +++ b/kirby/config/fields/files.php @@ -5,9 +5,10 @@ use Kirby\Toolkit\A; return [ 'mixins' => [ - 'picker', 'filepicker', + 'layout', 'min', + 'picker', 'upload' ], 'props' => [ @@ -27,20 +28,6 @@ return [ return $default; }, - /** - * Changes the layout of the selected files. Available layouts: `list`, `cards` - */ - 'layout' => function (string $layout = 'list') { - return $layout; - }, - - /** - * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` - */ - 'size' => function (string $size = 'auto') { - return $size; - }, - 'value' => function ($value = null) { return $value; } @@ -68,11 +55,12 @@ return [ ], 'methods' => [ 'fileResponse' => function ($file) { - return $file->panelPickerData([ - 'image' => $this->image, - 'info' => $this->info ?? false, - 'model' => $this->model(), - 'text' => $this->text, + return $file->panel()->pickerData([ + 'image' => $this->image, + 'info' => $this->info ?? false, + 'layout' => $this->layout, + 'model' => $this->model(), + 'text' => $this->text, ]); }, 'toFiles' => function ($value = null) { @@ -101,6 +89,7 @@ return [ return $field->filepicker([ 'image' => $field->image(), 'info' => $field->info(), + 'layout' => $field->layout(), 'limit' => $field->limit(), 'page' => $this->requestQuery('page'), 'query' => $field->query(), @@ -116,14 +105,18 @@ return [ $field = $this->field(); $uploads = $field->uploads(); + // move_uploaded_file() not working with unit test + // @codeCoverageIgnoreStart return $field->upload($this, $uploads, function ($file, $parent) use ($field) { - return $file->panelPickerData([ - 'image' => $field->image(), - 'info' => $field->info(), - 'model' => $field->model(), - 'text' => $field->text(), + return $file->panel()->pickerData([ + 'image' => $field->image(), + 'info' => $field->info(), + 'layout' => $field->layout(), + 'model' => $field->model(), + 'text' => $field->text(), ]); }); + // @codeCoverageIgnoreEnd } ] ]; diff --git a/kirby/config/fields/info.php b/kirby/config/fields/info.php index f87c6d0..dcf174b 100644 --- a/kirby/config/fields/info.php +++ b/kirby/config/fields/info.php @@ -34,7 +34,7 @@ return [ 'computed' => [ 'text' => function () { if ($text = $this->text) { - $text = $this->model()->toString($text); + $text = $this->model()->toSafeString($text); $text = $this->kirby()->kirbytext($text); return $text; } diff --git a/kirby/config/fields/mixins/layout.php b/kirby/config/fields/mixins/layout.php new file mode 100644 index 0000000..3fdb1eb --- /dev/null +++ b/kirby/config/fields/mixins/layout.php @@ -0,0 +1,21 @@ + [ + /** + * Changes the layout of the selected entries. + * Available layouts: `list`, `cardlets`, `cards` + */ + 'layout' => function (string $layout = 'list') { + $layouts = ['list', 'cardlets', 'cards']; + return in_array($layout, $layouts) ? $layout : 'list'; + }, + + /** + * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` + */ + 'size' => function (string $size = 'auto') { + return $size; + }, + ] +]; diff --git a/kirby/config/fields/mixins/upload.php b/kirby/config/fields/mixins/upload.php index dd6422d..1572ae4 100644 --- a/kirby/config/fields/mixins/upload.php +++ b/kirby/config/fields/mixins/upload.php @@ -27,6 +27,7 @@ return [ if ($template) { $file = new File([ 'filename' => 'tmp', + 'parent' => $this->model(), 'template' => $template ]); diff --git a/kirby/config/fields/pages.php b/kirby/config/fields/pages.php index 471f8b1..389d75e 100644 --- a/kirby/config/fields/pages.php +++ b/kirby/config/fields/pages.php @@ -4,7 +4,12 @@ use Kirby\Data\Data; use Kirby\Toolkit\A; return [ - 'mixins' => ['min', 'pagepicker', 'picker'], + 'mixins' => [ + 'layout', + 'min', + 'pagepicker', + 'picker', + ], 'props' => [ /** * Unset inherited props @@ -22,13 +27,6 @@ return [ return $this->toPages($default); }, - /** - * Changes the layout of the selected files. Available layouts: `list`, `cards` - */ - 'layout' => function (string $layout = 'list') { - return $layout; - }, - /** * Optional query to select a specific set of pages */ @@ -36,13 +34,6 @@ return [ return $query; }, - /** - * Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge` - */ - 'size' => function (string $size = 'auto') { - return $size; - }, - /** * Optionally include subpages of pages */ @@ -62,10 +53,11 @@ return [ ], 'methods' => [ 'pageResponse' => function ($page) { - return $page->panelPickerData([ - 'image' => $this->image, - 'info' => $this->info, - 'text' => $this->text, + return $page->panel()->pickerData([ + 'image' => $this->image, + 'info' => $this->info, + 'layout' => $this->layout, + 'text' => $this->text, ]); }, 'toPages' => function ($value = null) { @@ -95,6 +87,7 @@ return [ return $field->pagepicker([ 'image' => $field->image(), 'info' => $field->info(), + 'layout' => $field->layout(), 'limit' => $field->limit(), 'page' => $this->requestQuery('page'), 'parent' => $this->requestQuery('parent'), diff --git a/kirby/config/fields/slug.php b/kirby/config/fields/slug.php new file mode 100644 index 0000000..d927415 --- /dev/null +++ b/kirby/config/fields/slug.php @@ -0,0 +1,55 @@ + 'text', + 'props' => [ + /** + * Unset inherited props + */ + 'converter' => null, + 'counter' => null, + 'spellcheck' => null, + + /** + * Set of characters allowed in the slug + */ + 'allow' => function (string $allow = '') { + return $allow; + }, + + /** + * Changes the link icon + */ + 'icon' => function (string $icon = 'url') { + return $icon; + }, + + /** + * Set prefix for the help text + */ + 'path' => function (string $path = null) { + return $path; + }, + + /** + * Name of another field that should be used to + * automatically update this field's value + */ + 'sync' => function (string $sync = null) { + return $sync; + }, + + /** + * Set to object with keys `field` and `text` to add + * button to generate from another field + */ + 'wizard' => function ($wizard = false) { + return $wizard; + } + ], + 'validations' => [ + 'minlength', + 'maxlength' + ], +]; diff --git a/kirby/config/fields/structure.php b/kirby/config/fields/structure.php index b834b2c..240406f 100644 --- a/kirby/config/fields/structure.php +++ b/kirby/config/fields/structure.php @@ -1,7 +1,7 @@ $file->filename(), - 'dragText' => $file->dragText('auto', $absolute), + 'dragText' => $file->panel()->dragText('auto', $absolute), ]; }); } diff --git a/kirby/config/fields/toggle.php b/kirby/config/fields/toggle.php index b8e9fef..6ea330f 100644 --- a/kirby/config/fields/toggle.php +++ b/kirby/config/fields/toggle.php @@ -1,6 +1,7 @@ function ($value = null) { + $model = $this->model(); + if (is_array($value) === true) { if (A::isAssociative($value) === true) { - return I18n::translate($value, $value); + return $model->toSafeString(I18n::translate($value, $value)); } foreach ($value as $key => $val) { - $value[$key] = I18n::translate($val, $val); + $value[$key] = $model->toSafeString(I18n::translate($val, $val)); } return $value; } - return I18n::translate($value, $value); + if (empty($value) === false) { + return $model->toSafeString(I18n::translate($value, $value)); + } + + return $value; }, ], 'computed' => [ diff --git a/kirby/config/fields/users.php b/kirby/config/fields/users.php index 6da224a..9608c9e 100644 --- a/kirby/config/fields/users.php +++ b/kirby/config/fields/users.php @@ -4,7 +4,12 @@ use Kirby\Data\Data; use Kirby\Toolkit\A; return [ - 'mixins' => ['min', 'picker', 'userpicker'], + 'mixins' => [ + 'layout', + 'min', + 'picker', + 'userpicker' + ], 'props' => [ /** * Unset inherited props @@ -44,10 +49,11 @@ return [ ], 'methods' => [ 'userResponse' => function ($user) { - return $user->panelPickerData([ - 'info' => $this->info, - 'image' => $this->image, - 'text' => $this->text, + return $user->panel()->pickerData([ + 'info' => $this->info, + 'image' => $this->image, + 'layout' => $this->layout, + 'text' => $this->text, ]); }, 'toUsers' => function ($value = null) { @@ -77,6 +83,7 @@ return [ return $field->userpicker([ 'image' => $field->image(), 'info' => $field->info(), + 'layout' => $field->layout(), 'limit' => $field->limit(), 'page' => $this->requestQuery('page'), 'query' => $field->query(), diff --git a/kirby/config/fields/writer.php b/kirby/config/fields/writer.php index 67ca348..ed864ff 100644 --- a/kirby/config/fields/writer.php +++ b/kirby/config/fields/writer.php @@ -1,5 +1,7 @@ [ /** @@ -11,14 +13,14 @@ return [ return $inline; }, /** - * Sets the allowed HTML formats. Available formats: `bold`, `italic`, `underline`, `strike`, `code`, `link`. Activate them all by passing `true`. Deactivate them all by passing `false` + * Sets the allowed HTML formats. Available formats: `bold`, `italic`, `underline`, `strike`, `code`, `link`, `email`. Activate them all by passing `true`. Deactivate them all by passing `false` * @param array|bool $marks */ 'marks' => function ($marks = true) { return $marks; }, /** - * Sets the allowed nodes. Available nodes: `bulletList`, `orderedList`, `heading`, `horizontalRule`, `listItem`. Activate/deactivate them all by passing `true`/`false`. Default nodes are `heading`, `bulletList`, `orderedList`. + * Sets the allowed nodes. Available nodes: `paragraph`, `heading`, `bulletList`, `orderedList`. Activate/deactivate them all by passing `true`/`false`. Default nodes are `paragraph`, `heading`, `bulletList`, `orderedList`. * @param array|bool|null $nodes */ 'nodes' => function ($nodes = null) { @@ -27,7 +29,7 @@ return [ ], 'computed' => [ 'value' => function () { - return trim($this->value); + return Sane::sanitize(trim($this->value), 'html'); } ], ]; diff --git a/kirby/config/helpers.php b/kirby/config/helpers.php index 800538e..e2246bc 100644 --- a/kirby/config/helpers.php +++ b/kirby/config/helpers.php @@ -1,13 +1,14 @@ session(); - // check explicitly if there have been no arguments at all; + // no arguments, generate/return a token + // (check explicitly if there have been no arguments at all; // checking for null introduces a security issue because null could come - // from user input or bugs in the calling code! + // from user input or bugs in the calling code!) if (func_num_args() === 0) { - // no arguments, generate/return a token - $token = $session->get('kirby.csrf'); + if (is_string($token) !== true) { $token = bin2hex(random_bytes(32)); $session->set('kirby.csrf', $token); } return $token; - } elseif (is_string($check) === true && is_string($session->get('kirby.csrf')) === true) { - // argument has been passed, check the token + } + + // argument has been passed, check the token + if ( + is_string($check) === true && + is_string($session->get('kirby.csrf')) === true + ) { return hash_equals($session->get('kirby.csrf'), $check) === true; } @@ -174,7 +180,7 @@ if (function_exists('e') === false) { * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) * @return string Escaped data */ -function esc($string, $context = 'html') +function esc(string $string, string $context = 'html'): string { if (method_exists('Kirby\Toolkit\Escape', $context) === true) { return Escape::$context($string); @@ -200,10 +206,10 @@ function get($key = null, $default = null) * Embeds a Github Gist * * @param string $url - * @param string $file + * @param string|null $file * @return string */ -function gist(string $url, string $file = null): string +function gist(string $url, ?string $file = null): string { return kirbytag([ 'gist' => $url, @@ -255,10 +261,10 @@ function html(?string $string, bool $keepTags = false) * Example: * * - * @param string $path + * @param string|null $path * @return \Kirby\Cms\File|null */ -function image(string $path = null) +function image(?string $path = null) { if ($path === null) { return page()->image(); @@ -296,9 +302,9 @@ function image(string $path = null) * @param array $data * @param array $rules * @param array $messages - * @return false|array + * @return array */ -function invalid(array $data = [], array $rules = [], array $messages = []) +function invalid(array $data = [], array $rules = [], array $messages = []): array { $errors = []; @@ -407,12 +413,12 @@ function kirby() * Makes it possible to use any defined Kirbytag as standalone function * * @param string|array $type - * @param string $value + * @param string|null $value * @param array $attr * @param array $data * @return string */ -function kirbytag($type, string $value = null, array $attr = [], array $data = []): string +function kirbytag($type, ?string $value = null, array $attr = [], array $data = []): string { if (is_array($type) === true) { $kirbytag = $type; @@ -434,11 +440,11 @@ function kirbytag($type, string $value = null, array $attr = [], array $data = [ * Parses KirbyTags in the given string. Shortcut * for `$kirby->kirbytags($text, $data)` * - * @param string $text + * @param string|null $text * @param array $data * @return string */ -function kirbytags(string $text = null, array $data = []): string +function kirbytags(?string $text = null, array $data = []): string { return App::instance()->kirbytags($text, $data); } @@ -447,11 +453,11 @@ function kirbytags(string $text = null, array $data = []): string * Parses KirbyTags and Markdown in the * given string. Shortcut for `$kirby->kirbytext()` * - * @param string $text + * @param string|null $text * @param array $data * @return string */ -function kirbytext(string $text = null, array $data = []): string +function kirbytext(?string $text = null, array $data = []): string { return App::instance()->kirbytext($text, $data); } @@ -461,11 +467,11 @@ function kirbytext(string $text = null, array $data = []): string * given string. * @since 3.1.0 * - * @param string $text + * @param string|null $text * @param array $data * @return string */ -function kirbytextinline(string $text = null, array $data = []): string +function kirbytextinline(?string $text = null, array $data = []): string { return App::instance()->kirbytext($text, $data, true); } @@ -473,11 +479,11 @@ function kirbytextinline(string $text = null, array $data = []): string /** * Shortcut for `kirbytext()` helper * - * @param string $text + * @param string|null $text * @param array $data * @return string */ -function kt(string $text = null, array $data = []): string +function kt(?string $text = null, array $data = []): string { return kirbytext($text, $data); } @@ -486,11 +492,11 @@ function kt(string $text = null, array $data = []): string * Shortcut for `kirbytextinline()` helper * @since 3.1.0 * - * @param string $text + * @param string|null $text * @param array $data * @return string */ -function kti(string $text = null, array $data = []): string +function kti(?string $text = null, array $data = []): string { return kirbytextinline($text, $data); } @@ -499,10 +505,10 @@ function kti(string $text = null, array $data = []): string * A super simple class autoloader * * @param array $classmap - * @param string $base + * @param string|null $base * @return void */ -function load(array $classmap, string $base = null) +function load(array $classmap, ?string $base = null) { // convert all classnames to lowercase $classmap = array_change_key_case($classmap); @@ -526,10 +532,10 @@ function load(array $classmap, string $base = null) * Parses markdown in the given string. Shortcut for * `$kirby->markdown($text)` * - * @param string $text + * @param string|null $text * @return string */ -function markdown(string $text = null): string +function markdown(?string $text = null): string { return App::instance()->markdown($text); } @@ -551,7 +557,8 @@ function option(string $key, $default = null) * id or the current page when no id is specified * * @param string|array ...$id - * @return \Kirby\Cms\Page|null + * @return \Kirby\Cms\Page|\Kirby\Cms\Pages|null + * @todo reduce to one parameter in 3.7.0 (also change return and return type) */ function page(...$id) { @@ -559,6 +566,12 @@ function page(...$id) return App::instance()->site()->page(); } + if (count($id) > 1) { + // @codeCoverageIgnoreStart + deprecated('Passing multiple parameters to the `page()` helper has been deprecated. Please use the `pages()` helper instead.'); + // @codeCoverageIgnoreEnd + } + return App::instance()->site()->find(...$id); } @@ -566,10 +579,17 @@ function page(...$id) * Helper to build page collections * * @param string|array ...$id - * @return \Kirby\Cms\Pages + * @return \Kirby\Cms\Page|\Kirby\Cms\Pages|null + * @todo return only Pages|null in 3.7.0, wrap in Pages for single passed id */ function pages(...$id) { + if (count($id) === 1) { + // @codeCoverageIgnoreStart + deprecated('Passing a single id to the `pages()` helper will return a Kirby\Cms\Pages collection with a single element instead of the single Kirby\Cms\Page object itself - starting in 3.7.0.'); + // @codeCoverageIgnoreEnd + } + return App::instance()->site()->find(...$id); } @@ -577,10 +597,10 @@ function pages(...$id) * Returns a single param from the URL * * @param string $key - * @param string $fallback + * @param string|null $fallback * @return string|null */ -function param(string $key, string $fallback = null): ?string +function param(string $key, ?string $fallback = null): ?string { return App::instance()->request()->url()->params()->$key ?? $fallback; } @@ -608,6 +628,22 @@ function r($condition, $value, $alternative = null) return $condition ? $value : $alternative; } +/** + * Creates a micro-router and executes + * the routing action immediately + * @since 3.6.0 + * + * @param string|null $path + * @param string $method + * @param array $routes + * @param \Closure|null $callback + * @return mixed + */ +function router(?string $path = null, string $method = 'GET', array $routes = [], ?Closure $callback = null) +{ + return (new Router($routes))->call($path, $method, $callback); +} + /** * Returns the current site object * @@ -623,6 +659,7 @@ function site() * * @param mixed $value * @return int + * @throws \Kirby\Exception\InvalidArgumentException */ function size($value): int { @@ -655,10 +692,10 @@ function size($value): int * Enhances the given string with * smartypants. Shortcut for `$kirby->smartypants($text)` * - * @param string $text + * @param string|null $text * @return string */ -function smartypants(string $text = null): string +function smartypants(?string $text = null): string { return App::instance()->smartypants($text); } @@ -725,7 +762,7 @@ function svg($file) * * @param string|array $key * @param string|null $fallback - * @return mixed + * @return array|string|null */ function t($key, string $fallback = null) { @@ -735,11 +772,11 @@ function t($key, string $fallback = null) /** * Translates a count * - * @param string|array $key + * @param string $key * @param int $count * @return mixed */ -function tc($key, int $count) +function tc(string $key, int $count) { return I18n::translateCount($key, $count); } @@ -748,11 +785,11 @@ function tc($key, int $count) * Rounds the minutes of the given date * by the defined step * - * @param string $date - * @param int $step array of `unit` and `size` to round to nearest + * @param string|null $date + * @param int|array|null $step array of `unit` and `size` to round to nearest * @return int|null */ -function timestamp(string $date = null, $step = null): ?int +function timestamp(?string $date = null, $step = null): ?int { if (V::date($date) === false) { return null; @@ -807,7 +844,7 @@ function timestamp(string $date = null, $step = null): ?int ); // on error, convert `false` into `null` - return $timestamp ? $timestamp : null; + return $timestamp ?? null; } /** @@ -815,12 +852,12 @@ function timestamp(string $date = null, $step = null): ?int * placeholders in the text * * @param string $key - * @param string $fallback - * @param array $replace - * @param string $locale + * @param string|array|null $fallback + * @param array|null $replace + * @param string|null $locale * @return string */ -function tt(string $key, $fallback = null, array $replace = null, string $locale = null) +function tt(string $key, $fallback = null, ?array $replace = null, ?string $locale = null) { return I18n::template($key, $fallback, $replace, $locale); } @@ -829,12 +866,12 @@ function tt(string $key, $fallback = null, array $replace = null, string $locale * Builds a Twitter link * * @param string $username - * @param string $text - * @param string $title - * @param string $class + * @param string|null $text + * @param string|null $title + * @param string|null $class * @return string */ -function twitter(string $username, string $text = null, string $title = null, string $class = null): string +function twitter(string $username, ?string $text = null, ?string $title = null, ?string $class = null): string { return kirbytag([ 'twitter' => $username, @@ -847,11 +884,11 @@ function twitter(string $username, string $text = null, string $title = null, st /** * Shortcut for url() * - * @param string $path + * @param string|null $path * @param array|string|null $options * @return string */ -function u(string $path = null, $options = null): string +function u(?string $path = null, $options = null): string { return Url::to($path, $options); } @@ -859,11 +896,11 @@ function u(string $path = null, $options = null): string /** * Builds an absolute URL for a given path * - * @param string $path + * @param string|null $path * @param array|string|null $options * @return string */ -function url(string $path = null, $options = null): string +function url(?string $path = null, $options = null): string { return Url::to($path, $options); } @@ -906,9 +943,9 @@ function uuid(): string * @param string $url * @param array $options * @param array $attr - * @return string + * @return string|null */ -function video(string $url, array $options = [], array $attr = []): string +function video(string $url, array $options = [], array $attr = []): ?string { return Html::video($url, $options, $attr); } @@ -919,9 +956,9 @@ function video(string $url, array $options = [], array $attr = []): string * @param string $url * @param array $options * @param array $attr - * @return string + * @return string|null */ -function vimeo(string $url, array $options = [], array $attr = []): string +function vimeo(string $url, array $options = [], array $attr = []): ?string { return Html::vimeo($url, $options, $attr); } @@ -945,9 +982,9 @@ function widont(string $string = null): string * @param string $url * @param array $options * @param array $attr - * @return string + * @return string|null */ -function youtube(string $url, array $options = [], array $attr = []): string +function youtube(string $url, array $options = [], array $attr = []): ?string { return Html::youtube($url, $options, $attr); } diff --git a/kirby/config/methods.php b/kirby/config/methods.php index 04491a3..b153b63 100644 --- a/kirby/config/methods.php +++ b/kirby/config/methods.php @@ -366,7 +366,7 @@ return function (App $app) { * @return \Kirby\Cms\Field */ 'html' => function (Field $field) { - $field->value = htmlentities($field->value, ENT_COMPAT, 'utf-8'); + $field->value = Html::encode($field->value); return $field; }, @@ -498,13 +498,14 @@ return function (App $app) { */ 'replace' => function (Field $field, array $data = [], string $fallback = '') use ($app) { if ($parent = $field->parent()) { - $field->value = $field->parent()->toString($field->value, $data, $fallback); + // never pass `null` as the $template to avoid the fallback to the model ID + $field->value = $parent->toString($field->value ?? '', $data, $fallback); } else { $field->value = Str::template($field->value, array_replace([ 'kirby' => $app, 'site' => $app->site(), 'page' => $app->page() - ], $data), $fallback); + ], $data), ['fallback' => $fallback]); } return $field; diff --git a/kirby/config/roots.php b/kirby/config/roots.php deleted file mode 100644 index d4f5b20..0000000 --- a/kirby/config/roots.php +++ /dev/null @@ -1,93 +0,0 @@ - function (array $roots) { - return realpath(__DIR__ . '/../'); - }, - - // i18n - 'i18n' => function (array $roots) { - return $roots['kirby'] . '/i18n'; - }, - 'i18n:translations' => function (array $roots) { - return $roots['i18n'] . '/translations'; - }, - 'i18n:rules' => function (array $roots) { - return $roots['i18n'] . '/rules'; - }, - - // index - 'index' => function (array $roots) { - return realpath(__DIR__ . '/../../'); - }, - - // assets - 'assets' => function (array $roots) { - return $roots['index'] . '/assets'; - }, - - // content - 'content' => function (array $roots) { - return $roots['index'] . '/content'; - }, - - // media - 'media' => function (array $roots) { - return $roots['index'] . '/media'; - }, - - // panel - 'panel' => function (array $roots) { - return $roots['kirby'] . '/panel'; - }, - - // site - 'site' => function (array $roots) { - return $roots['index'] . '/site'; - }, - 'accounts' => function (array $roots) { - return $roots['site'] . '/accounts'; - }, - 'blueprints' => function (array $roots) { - return $roots['site'] . '/blueprints'; - }, - 'cache' => function (array $roots) { - return $roots['site'] . '/cache'; - }, - 'collections' => function (array $roots) { - return $roots['site'] . '/collections'; - }, - 'config' => function (array $roots) { - return $roots['site'] . '/config'; - }, - 'controllers' => function (array $roots) { - return $roots['site'] . '/controllers'; - }, - 'languages' => function (array $roots) { - return $roots['site'] . '/languages'; - }, - 'logs' => function (array $roots) { - return $roots['site'] . '/logs'; - }, - 'models' => function (array $roots) { - return $roots['site'] . '/models'; - }, - 'plugins' => function (array $roots) { - return $roots['site'] . '/plugins'; - }, - 'sessions' => function (array $roots) { - return $roots['site'] . '/sessions'; - }, - 'snippets' => function (array $roots) { - return $roots['site'] . '/snippets'; - }, - 'templates' => function (array $roots) { - return $roots['site'] . '/templates'; - }, - - // blueprints - 'roles' => function (array $roots) { - return $roots['blueprints'] . '/users'; - }, -]; diff --git a/kirby/config/routes.php b/kirby/config/routes.php index 6e1d418..2c55031 100644 --- a/kirby/config/routes.php +++ b/kirby/config/routes.php @@ -2,9 +2,9 @@ use Kirby\Cms\LanguageRoutes; use Kirby\Cms\Media; -use Kirby\Cms\Panel; -use Kirby\Cms\PanelPlugins; use Kirby\Cms\PluginAssets; +use Kirby\Panel\Panel; +use Kirby\Panel\Plugins; use Kirby\Toolkit\Str; return function ($kirby) { @@ -50,7 +50,7 @@ return function ($kirby) { 'pattern' => $media . '/plugins/index.(css|js)', 'env' => 'media', 'action' => function (string $type) use ($kirby) { - $plugins = new PanelPlugins(); + $plugins = new Plugins(); return $kirby ->response() @@ -65,17 +65,6 @@ return function ($kirby) { return PluginAssets::resolve($provider . '/' . $pluginName, $filename . '.' . $extension); } ], - [ - 'pattern' => $panel . '/(:all?)', - 'env' => 'panel', - 'action' => function () use ($kirby) { - if ($kirby->option('panel') === false) { - return null; - } - - return Panel::render($kirby); - } - ], [ 'pattern' => $media . '/pages/(:all)/(:any)/(:any)', 'env' => 'media', @@ -103,7 +92,15 @@ return function ($kirby) { 'action' => function ($path, $hash, $filename) { return Media::thumb($path, $hash, $filename); } - ] + ], + [ + 'pattern' => $panel . '/(:all?)', + 'method' => 'ALL', + 'env' => 'panel', + 'action' => function ($path = null) { + return Panel::router($path); + } + ], ]; // Multi-language setup diff --git a/kirby/config/sections/fields.php b/kirby/config/sections/fields.php index c9a2661..4cb6a46 100644 --- a/kirby/config/sections/fields.php +++ b/kirby/config/sections/fields.php @@ -1,6 +1,6 @@ [ diff --git a/kirby/config/sections/files.php b/kirby/config/sections/files.php index 4dd1387..ca23a2a 100644 --- a/kirby/config/sections/files.php +++ b/kirby/config/sections/files.php @@ -1,7 +1,6 @@ function ($info = null) { return I18n::translate($info, $info); @@ -70,6 +69,7 @@ return [ if ($this->template) { $file = new File([ 'filename' => 'tmp', + 'parent' => $this->model(), 'template' => $this->template ]); @@ -90,7 +90,7 @@ return [ if ($this->sortBy) { $files = $files->sort(...$files::sortArgs($this->sortBy)); } else { - $files = $files->sort('sort', 'asc', 'filename', 'asc'); + $files = $files->sorted(); } // flip @@ -115,28 +115,21 @@ return [ $dragTextAbsolute = $this->model->is($this->parent) === false; foreach ($this->files as $file) { - $image = $file->panelImage($this->image); - - // escape the default text - // TODO: no longer needed in 3.6 - $text = $file->toString($this->text); - if ($this->text === '{{ file.filename }}') { - $text = Escape::html($text); - } + $panel = $file->panel(); $data[] = [ - 'dragText' => $file->dragText('auto', $dragTextAbsolute), + 'dragText' => $panel->dragText('auto', $dragTextAbsolute), 'extension' => $file->extension(), - 'filename' => $file->filename(), - 'id' => $file->id(), - 'icon' => $file->panelIcon($image), - 'image' => $image, - 'info' => $file->toString($this->info ?? false), - 'link' => $file->panelUrl(true), - 'mime' => $file->mime(), - 'parent' => $file->parent()->panelPath(), - 'text' => $text, - 'url' => $file->url(), + 'filename' => $file->filename(), + 'id' => $file->id(), + 'image' => $panel->image($this->image, $this->layout), + 'info' => $file->toSafeString($this->info ?? false), + 'link' => $panel->url(true), + 'mime' => $file->mime(), + 'parent' => $file->parent()->panel()->path(), + 'template' => $file->template(), + 'text' => $file->toSafeString($this->text), + 'url' => $file->url(), ]; } @@ -174,8 +167,8 @@ return [ ]; }, 'link' => function () { - $modelLink = $this->model->panelUrl(true); - $parentLink = $this->parent->panelUrl(true); + $modelLink = $this->model->panel()->url(true); + $parentLink = $this->parent->panel()->url(true); if ($modelLink !== $parentLink) { return $parentLink; @@ -222,6 +215,7 @@ return [ 'max' => $max, 'api' => $this->parent->apiUrl(true) . '/files', 'attributes' => array_filter([ + 'sort' => $this->sortable === true ? $total + 1 : null, 'template' => $template ]) ]; diff --git a/kirby/config/sections/info.php b/kirby/config/sections/info.php index 254a76b..555af89 100644 --- a/kirby/config/sections/info.php +++ b/kirby/config/sections/info.php @@ -17,7 +17,7 @@ return [ 'computed' => [ 'text' => function () { if ($this->text) { - $text = $this->model()->toString($this->text); + $text = $this->model()->toSafeString($this->text); $text = $this->kirby()->kirbytext($text); return $text; } @@ -25,11 +25,9 @@ return [ ], 'toArray' => function () { return [ - 'options' => [ - 'headline' => $this->headline, - 'text' => $this->text, - 'theme' => $this->theme - ] + 'headline' => $this->headline, + 'text' => $this->text, + 'theme' => $this->theme ]; } ]; diff --git a/kirby/config/sections/mixins/empty.php b/kirby/config/sections/mixins/empty.php index 1c58194..967b252 100644 --- a/kirby/config/sections/mixins/empty.php +++ b/kirby/config/sections/mixins/empty.php @@ -14,7 +14,7 @@ return [ 'computed' => [ 'empty' => function () { if ($this->empty) { - return $this->model()->toString($this->empty); + return $this->model()->toSafeString($this->empty); } } ] diff --git a/kirby/config/sections/mixins/help.php b/kirby/config/sections/mixins/help.php index 80f42ee..1619e32 100644 --- a/kirby/config/sections/mixins/help.php +++ b/kirby/config/sections/mixins/help.php @@ -14,7 +14,7 @@ return [ 'computed' => [ 'help' => function () { if ($this->help) { - $help = $this->model()->toString($this->help); + $help = $this->model()->toSafeString($this->help); $help = $this->kirby()->kirbytext($help); return $help; } diff --git a/kirby/config/sections/mixins/layout.php b/kirby/config/sections/mixins/layout.php index 4a7a621..c545429 100644 --- a/kirby/config/sections/mixins/layout.php +++ b/kirby/config/sections/mixins/layout.php @@ -3,10 +3,12 @@ return [ 'props' => [ /** - * Section layout. Available layout methods: `list`, `cards`. + * Section layout. + * Available layout methods: `list`, `cardlets`, `cards`. */ 'layout' => function (string $layout = 'list') { - return $layout === 'cards' ? 'cards' : 'list'; + $layouts = ['list', 'cardlets', 'cards']; + return in_array($layout, $layouts) ? $layout : 'list'; } ] ]; diff --git a/kirby/config/sections/pages.php b/kirby/config/sections/pages.php index b8b8814..541f7c0 100644 --- a/kirby/config/sections/pages.php +++ b/kirby/config/sections/pages.php @@ -1,8 +1,8 @@ [ 'parent' => function () { - return $this->parentModel(); + $parent = $this->parentModel(); + + if (is_a($parent, 'Kirby\Cms\Site') === false && is_a($parent, 'Kirby\Cms\Page') === false) { + throw new InvalidArgumentException('The parent is invalid. You must choose the site or a page as parent.'); + } + + return $parent; }, 'pages' => function () { switch ($this->status) { @@ -151,32 +157,25 @@ return [ $data = []; foreach ($this->pages as $item) { + $panel = $item->panel(); $permissions = $item->permissions(); - $image = $item->panelImage($this->image); - - // escape the default text - // TODO: no longer needed in 3.6 - $text = $item->toString($this->text); - if ($this->text === '{{ page.title }}') { - $text = Escape::html($text); - } $data[] = [ + 'dragText' => $panel->dragText(), 'id' => $item->id(), - 'dragText' => $item->dragText(), - 'text' => $text, - 'info' => $item->toString($this->info ?? false), + 'image' => $panel->image($this->image, $this->layout), + 'info' => $item->toSafeString($this->info ?? false), + 'link' => $panel->url(true), 'parent' => $item->parentId(), - 'icon' => $item->panelIcon($image), - 'image' => $image, - 'link' => $item->panelUrl(true), - 'status' => $item->status(), 'permissions' => [ 'sort' => $permissions->can('sort'), 'changeSlug' => $permissions->can('changeSlug'), 'changeStatus' => $permissions->can('changeStatus'), - 'changeTitle' => $permissions->can('changeTitle') - ] + 'changeTitle' => $permissions->can('changeTitle'), + ], + 'status' => $item->status(), + 'template' => $item->intendedTemplate()->name(), + 'text' => $item->toSafeString($this->text), ]; } @@ -226,8 +225,8 @@ return [ return true; }, 'link' => function () { - $modelLink = $this->model->panelUrl(true); - $parentLink = $this->parent->panelUrl(true); + $modelLink = $this->model->panel()->url(true); + $parentLink = $this->parent->panel()->url(true); if ($modelLink !== $parentLink) { return $parentLink; diff --git a/kirby/config/snippets.php b/kirby/config/snippets.php deleted file mode 100644 index cdfadc6..0000000 --- a/kirby/config/snippets.php +++ /dev/null @@ -1,17 +0,0 @@ - $blocksRoot . '/code/code.php', - 'blocks/gallery' => $blocksRoot . '/gallery/gallery.php', - 'blocks/heading' => $blocksRoot . '/heading/heading.php', - 'blocks/image' => $blocksRoot . '/image/image.php', - 'blocks/list' => $blocksRoot . '/list/list.php', - 'blocks/markdown' => $blocksRoot . '/markdown/markdown.php', - 'blocks/quote' => $blocksRoot . '/quote/quote.php', - 'blocks/table' => $blocksRoot . '/table/table.php', - 'blocks/text' => $blocksRoot . '/text/text.php', - 'blocks/video' => $blocksRoot . '/video/video.php', -]; diff --git a/kirby/config/tags.php b/kirby/config/tags.php index 00168f7..a2edfc9 100644 --- a/kirby/config/tags.php +++ b/kirby/config/tags.php @@ -2,8 +2,6 @@ use Kirby\Cms\Html; use Kirby\Cms\Url; -use Kirby\Text\KirbyTag; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; /** @@ -252,29 +250,6 @@ return [ 'width', ], 'html' => function ($tag) { - // all available video tag attributes - $availableAttrs = KirbyTag::$types[$tag->type]['attr']; - - // global video tag options - $attrs = $tag->kirby()->option('kirbytext.video', []); - $options = $attrs['options'] ?? []; - - // removes options from attributes - if (isset($attrs['options']) === true) { - unset($attrs['options']); - } - - // injects default values from global options - // applies only defined attributes to safely update tag props - foreach ($attrs as $key => $value) { - if ( - in_array($key, $availableAttrs) === true && - (isset($tag->{$key}) === false || $tag->{$key} === null) - ) { - $tag->{$key} = $value; - } - } - // checks and gets if poster is local file if ( empty($tag->poster) === false && @@ -286,26 +261,41 @@ return [ } } - // converts tag attributes to supported formats (listed below) to output correct html - // booleans: autoplay, controls, loop, muted - // strings : height, poster, preload, width - // for ex : `autoplay` will not work if `false` is a `string` instead of a `boolean` - $attrs = [ - 'autoplay' => $autoplay = Str::toType($tag->autoplay, 'bool'), - 'controls' => Str::toType($tag->controls ?? true, 'bool'), - 'height' => $tag->height, - 'loop' => Str::toType($tag->loop, 'bool'), - 'muted' => Str::toType($tag->muted ?? $autoplay, 'bool'), - 'poster' => $tag->poster, - 'preload' => $tag->preload, - 'width' => $tag->width - ]; - - // handles local and remote video file - if ( + // checks video is local or provider(remote) + $isLocalVideo = ( Str::startsWith($tag->value, 'http://') !== true && Str::startsWith($tag->value, 'https://') !== true - ) { + ); + $isProviderVideo = ( + $isLocalVideo === false && + ( + Str::contains($tag->value, 'youtu', true) === true || + Str::contains($tag->value, 'vimeo', true) === true + ) + ); + + // default attributes for local and remote videos + $attrs = [ + 'height' => $tag->height, + 'width' => $tag->width + ]; + + // don't use attributes that iframe doesn't support + if ($isProviderVideo === false) { + // converts tag attributes to supported formats (listed below) to output correct html + // booleans: autoplay, controls, loop, muted + // strings : poster, preload + // for ex : `autoplay` will not work if `false` is a `string` instead of a `boolean` + $attrs['autoplay'] = $autoplay = Str::toType($tag->autoplay, 'bool'); + $attrs['controls'] = Str::toType($tag->controls ?? true, 'bool'); + $attrs['loop'] = Str::toType($tag->loop, 'bool'); + $attrs['muted'] = Str::toType($tag->muted ?? $autoplay, 'bool'); + $attrs['poster'] = $tag->poster; + $attrs['preload'] = $tag->preload; + } + + // handles local and remote video file + if ($isLocalVideo === true) { // handles local video file if ($tag->file = $tag->file($tag->value)) { $source = Html::tag('source', null, [ @@ -315,32 +305,11 @@ return [ $video = Html::tag('video', [$source], $attrs); } } else { - // firstly handles supported video providers as youtube, vimeo, etc - try { - $video = Html::video( - $tag->value, - $options, - // providers only support width and height attributes - [ - 'height' => $tag->height, - 'width' => $tag->width - ] - ); - } catch (Exception $e) { - // if not one of the supported video providers - // it checks if there is a valid remote video file - $extension = F::extension($tag->value); - $type = F::extensionToType($extension); - $mime = F::extensionToMime($extension); - - if ($type === 'video') { - $source = Html::tag('source', null, [ - 'src' => $tag->value, - 'type' => $mime - ]); - $video = Html::tag('video', [$source], $attrs); - } - } + $video = Html::video( + $tag->value, + $tag->kirby()->option('kirbytext.video.options', []), + $attrs + ); } return Html::figure([$video ?? ''], $tag->caption, [ diff --git a/kirby/config/templates.php b/kirby/config/templates.php deleted file mode 100644 index b699394..0000000 --- a/kirby/config/templates.php +++ /dev/null @@ -1,8 +0,0 @@ - __DIR__ . '/templates/emails/auth/login.php', - 'emails/auth/password-reset' => __DIR__ . '/templates/emails/auth/password-reset.php' -]; -// @codeCoverageIgnoreEnd diff --git a/kirby/config/templates/emails/auth/login.php b/kirby/config/templates/emails/auth/login.php index 55d9dce..e552481 100644 --- a/kirby/config/templates/emails/auth/login.php +++ b/kirby/config/templates/emails/auth/login.php @@ -1,8 +1,16 @@ language()); +echo I18n::template( + 'login.email.login.body', + null, + compact('user', 'site', 'code', 'timeout'), + $user->language() +); diff --git a/kirby/config/templates/emails/auth/password-reset.php b/kirby/config/templates/emails/auth/password-reset.php index ff1e09c..3cd55de 100644 --- a/kirby/config/templates/emails/auth/password-reset.php +++ b/kirby/config/templates/emails/auth/password-reset.php @@ -1,8 +1,16 @@ language()); +echo I18n::template( + 'login.email.password-reset.body', + null, + compact('user', 'site', 'code', 'timeout'), + $user->language() +); diff --git a/kirby/config/urls.php b/kirby/config/urls.php deleted file mode 100644 index 1bfe0fd..0000000 --- a/kirby/config/urls.php +++ /dev/null @@ -1,33 +0,0 @@ - function () { - return Url::index(); - }, - 'base' => function (array $urls) { - return rtrim($urls['index'], '/'); - }, - 'current' => function (array $urls) { - $path = trim($this->path(), '/'); - - if (empty($path) === true) { - return $urls['index']; - } else { - return $urls['base'] . '/' . $path; - } - }, - 'assets' => function (array $urls) { - return $urls['base'] . '/assets'; - }, - 'api' => function (array $urls) { - return $urls['base'] . '/' . ($this->options['api']['slug'] ?? 'api'); - }, - 'media' => function (array $urls) { - return $urls['base'] . '/media'; - }, - 'panel' => function (array $urls) { - return $urls['base'] . '/' . ($this->options['panel']['slug'] ?? 'panel'); - } -]; diff --git a/kirby/i18n/rules/is_IS.json b/kirby/i18n/rules/is_IS.json new file mode 100644 index 0000000..7035056 --- /dev/null +++ b/kirby/i18n/rules/is_IS.json @@ -0,0 +1,22 @@ +{ + "Æ": "Ae", + "æ": "ae", + "Ö": "O", + "ö": "o", + "Þ": "Th", + "þ": "th", + "Ð": "D", + "ð": "d", + "Á": "A", + "á": "a", + "É": "E", + "é": "e", + "Í": "I", + "í": "i", + "Ó": "O", + "ó": "o", + "Ú": "U", + "ú": "u", + "Ý": "Y", + "ý": "y" +} diff --git a/kirby/i18n/translations/bg.json b/kirby/i18n/translations/bg.json index 24d79d3..74997aa 100644 --- a/kirby/i18n/translations/bg.json +++ b/kirby/i18n/translations/bg.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "\u0414\u043e\u0431\u0430\u0432\u0438", + "author": "Author", "avatar": "Профилна снимка", "back": "Назад", "cancel": "\u041e\u0442\u043a\u0430\u0436\u0438", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Копирай", + "copy.all": "Copy all", "create": "Създай", "date": "Дата", @@ -23,24 +29,28 @@ "days.tue": "\u0412\u0442", "days.wed": "\u0421\u0440", + "debugging": "Debugging", + "delete": "\u0418\u0437\u0442\u0440\u0438\u0439", "delete.all": "Delete all", - "dimensions": "Размери", - "disabled": "Disabled", - "discard": "\u041e\u0442\u043c\u0435\u043d\u0438", - "download": "Download", - "duplicate": "Duplicate", - "edit": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "Размери", + "disabled": "Disabled", + "discard": "\u041e\u0442\u043c\u0435\u043d\u0438", + "download": "Download", + "duplicate": "Duplicate", + + "edit": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439", + "email": "Email", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Invalid login", "error.access.panel": "Нямате права за достъп до панела", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Моля въведете валиден email адрес", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Не можете да смените URL на \"{slug}\"", "error.page.changeStatus.incomplete": "Страницата съдържа грешки и не може да бъде публикувана", "error.page.changeStatus.permission": "Статусът на страницата не може да бъде променен", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Потребителят няма парола", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Моля въведете валидна роля", + "error.user.undefined": "Потребителят не може да бъде намерен.", "error.user.update.permission": "Нямате права да обновите този потребител \"{name}\"", "error.validation.accepted": "Моля потвърдете", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Моля въведете валиден URL", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Код", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Все още няма статии", "field.users.empty": "Все още не са избрани потребители", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Сигурни ли сте, че искате да изтриете
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hour", + "import": "Import", "insert": "\u0412\u043c\u044a\u043a\u043d\u0438", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Keep me logged in", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Портрет", "orientation.square": "Квадрат", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "\u041f\u0440\u043e\u043c\u0435\u043d\u0438 URL", "page.changeSlug.fromTitle": "\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043e\u0442 \u0437\u0430\u0433\u043b\u0430\u0432\u0438\u0435\u0442\u043e", "page.changeStatus": "Промени статус", @@ -417,7 +437,10 @@ "pagination.page": "Страница", "password": "\u041f\u0430\u0440\u043e\u043b\u0430", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Пиксел", + "plugins": "Plugins", "prev": "Previous", "preview": "Preview", "remove": "Премахни", @@ -454,6 +477,8 @@ "template": "Образец", "today": "Днес", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Код", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Заглавие 1", "toolbar.button.heading.2": "Заглавие 2", "toolbar.button.heading.3": "Заглавие 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "\u041d\u0430\u043a\u043b\u043e\u043d\u0435\u043d \u0448\u0440\u0438\u0444\u0442", "toolbar.button.file": "Файл", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "\u0412\u0440\u044a\u0437\u043a\u0430", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Подреден списък", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Потребител", - "user.blueprint": "Можете да дефинирате допълнителни секции и полета на форми за тази потребителска роля в /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Промени email", "user.changeLanguage": "Промени език", "user.changeName": "Преименувай този потребител", @@ -516,9 +545,10 @@ "view.account": "\u0412\u0430\u0448\u0438\u044f \u0430\u043a\u0430\u0443\u043d\u0442", "view.installation": "\u0418\u043d\u0441\u0442\u0430\u043b\u0430\u0446\u0438\u044f", + "view.languages": "Езици", "view.resetPassword": "Reset password", - "view.settings": "Настройки", "view.site": "Сайт", + "view.system": "System", "view.users": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438", "welcome": "Добре дошли", diff --git a/kirby/i18n/translations/ca.json b/kirby/i18n/translations/ca.json index 87911e0..e0eb58d 100644 --- a/kirby/i18n/translations/ca.json +++ b/kirby/i18n/translations/ca.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Afegir", + "author": "Author", "avatar": "Imatge del perfil", "back": "Tornar", "cancel": "Cancel\u00b7lar", @@ -9,6 +14,7 @@ "collapse": "Col·lapsar", "collapse.all": "Col·lapsar tot", "copy": "Copiar", + "copy.all": "Copy all", "create": "Crear", "date": "Data", @@ -23,24 +29,28 @@ "days.tue": "dt.", "days.wed": "dc.", + "debugging": "Debugging", + "delete": "Eliminar", "delete.all": "Eliminar tot", - "dimensions": "Dimensions", - "disabled": "Desactivat", - "discard": "Descartar", - "download": "Descarregar", - "duplicate": "Duplicar", - "edit": "Editar", - "expand": "Expandir", - "expand.all": "Expandir tot", "dialog.files.empty": "No hi ha cap fitxer per seleccionar", "dialog.pages.empty": "No hi ha cap pàgina per seleccionar", "dialog.users.empty": "No hi ha cap usuari per seleccionar", + "dimensions": "Dimensions", + "disabled": "Desactivat", + "discard": "Descartar", + "download": "Descarregar", + "duplicate": "Duplicar", + + "edit": "Editar", + "email": "Email", "email.placeholder": "mail@exemple.com", + "environment": "Environment", + "error.access.code": "Codi invàlid", "error.access.login": "Inici de sessió no vàlid", "error.access.panel": "No tens permís per accedir al panell", @@ -92,6 +102,7 @@ "error.language.code": "Introdueix un codi vàlid per a l’idioma", "error.language.duplicate": "L'idioma ja existeix", "error.language.name": "Introdueix un nom vàlid per a l'idioma", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Si us plau, introdueix una adreça de correu electrònic vàlida", "error.license.verification": "No s’ha pogut verificar la llicència", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "No teniu permís per canviar l'apèndix d'URL per a \"{slug}\"", "error.page.changeStatus.incomplete": "La pàgina té errors i no es pot publicar", "error.page.changeStatus.permission": "No es pot canviar l'estat d'aquesta pàgina", @@ -165,6 +178,7 @@ "error.user.password.undefined": "L'usuari no té una contrasenya", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Si us plau, introdueix un rol vàlid", + "error.user.undefined": "L'usuari no s'ha trobat", "error.user.update.permission": "No tens permís per actualitzar l'usuari \"{name}\"", "error.validation.accepted": "Si us plau confirma", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Si us plau, introduïu una URL vàlida", + "expand": "Expandir", + "expand.all": "Expandir tot", + "field.required": "El camp és obligatori", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Codi", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Encara no hi ha entrades.", "field.users.empty": "Encara no s'ha seleccionat cap usuari", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Esteu segurs d'eliminar
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hora", + "import": "Import", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Manten-me connectat", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Vertical", "orientation.square": "Quadrat", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Canviar URL", "page.changeSlug.fromTitle": "Crear a partir del t\u00edtol", "page.changeStatus": "Canviar l'estat", @@ -417,7 +437,10 @@ "pagination.page": "Pàgina", "password": "Contrasenya", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Anterior", "preview": "Preview", "remove": "Eliminar", @@ -454,6 +477,8 @@ "template": "Plantilla", "today": "Avui", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Codi", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Encapçalament 1", "toolbar.button.heading.2": "Encapçalament 2", "toolbar.button.heading.3": "Encapçalament 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Cursiva", "toolbar.button.file": "Arxiu", "toolbar.button.file.select": "Selecciona un fitxer", "toolbar.button.file.upload": "Carrega un fitxer", "toolbar.button.link": "Enlla\u00e7", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Llista ordenada", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Usuari", - "user.blueprint": "Podeu definir seccions addicionals i camps de formulari per a aquest rol d'usuari a /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Canviar e-mail", "user.changeLanguage": "Canviar idioma", "user.changeName": "Canviar el nom d'aquest usuari", @@ -516,9 +545,10 @@ "view.account": "La teva compta", "view.installation": "Instal·lació", + "view.languages": "Idiomes", "view.resetPassword": "Reset password", - "view.settings": "Configuració", "view.site": "Lloc web", + "view.system": "System", "view.users": "Usuaris", "welcome": "Benvinguda", diff --git a/kirby/i18n/translations/cs.json b/kirby/i18n/translations/cs.json index aecb896..5c92ded 100644 --- a/kirby/i18n/translations/cs.json +++ b/kirby/i18n/translations/cs.json @@ -1,5 +1,10 @@ { + "account.changeName": "Přejmenovat", + "account.delete": "Smazat účet", + "account.delete.confirm": "Opravdu chcete smazat svůj účet? Budete okamžitě odhlášeni. Účet nemůže být zpětně obnoven.", + "add": "P\u0159idat", + "author": "Autor", "avatar": "Profilov\u00fd obr\u00e1zek", "back": "Zpět", "cancel": "Zru\u0161it", @@ -9,6 +14,7 @@ "collapse": "Sbalit", "collapse.all": "Sbalit vše", "copy": "Kopírovat", + "copy.all": "Kopírovat vše", "create": "Vytvořit", "date": "Datum", @@ -23,24 +29,28 @@ "days.tue": "\u00fat", "days.wed": "st", + "debugging": "Ladění", + "delete": "Smazat", "delete.all": "Smazat vše", - "dimensions": "Rozměry", - "disabled": "Zakázáno", - "discard": "Zahodit", - "download": "Stáhnout", - "duplicate": "Duplikovat", - "edit": "Upravit", - "expand": "Rozbalit", - "expand.all": "Rozbalit vše", "dialog.files.empty": "Žádné soubory k výběru", "dialog.pages.empty": "Žádné stránky k výběru", "dialog.users.empty": "Žádní uživatelé k výběru", + "dimensions": "Rozměry", + "disabled": "Zakázáno", + "discard": "Zahodit", + "download": "Stáhnout", + "duplicate": "Duplikovat", + + "edit": "Upravit", + "email": "Email", "email.placeholder": "mail@example.com", + "environment": "Prostředí", + "error.access.code": "Neplatný kód", "error.access.login": "Neplatné přihlášení", "error.access.panel": "Nemáte oprávnění k přihlášení do panelu", @@ -92,6 +102,7 @@ "error.language.code": "Zadejte prosím platný kód jazyka", "error.language.duplicate": "Jazyk již existuje", "error.language.name": "Zadejte prosím platné jméno jazyka", + "error.language.notFound": "Jazyk nebyl nalezen", "error.layout.validation.block": "Chyba v bloku {blockIndex} v rozvržení {layoutIndex}", "error.layout.validation.settings": "Chyba v nastavení rozvržení {index}", @@ -100,6 +111,8 @@ "error.license.email": "Zadejte prosím platnou emailovou adresu", "error.license.verification": "Licenci nelze ověřit", + "error.offline": "Panel je v současnosti off-line", + "error.page.changeSlug.permission": "Nem\u016f\u017eete zm\u011bnit URL t\u00e9to str\u00e1nky", "error.page.changeStatus.incomplete": "Stránka obsahuje chyby a nemohla být zveřejněna", "error.page.changeStatus.permission": "Status této stránky nelze změnit", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Uživatel nemá nastavené heslo.", "error.user.password.wrong": "Špatné heslo", "error.user.role.invalid": "Zadejte prosím platnou roli", + "error.user.undefined": "Uživatele se nepodařilo nalézt", "error.user.update.permission": "Nemáte dovoleno upravit uživatele \"{name}\"", "error.validation.accepted": "Potvrďte prosím", @@ -208,6 +222,9 @@ "error.validation.time.between": "Zadejte prosím čas v rozmezí od {min} do {max}", "error.validation.url": "Zadejte prosím platnou adresu URL", + "expand": "Rozbalit", + "expand.all": "Rozbalit vše", + "field.required": "Pole musí být vyplněno.", "field.blocks.changeType": "Změnit typ", "field.blocks.code.name": "Kód", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Opravdu chcete smazat vybrané bloky?", "field.blocks.empty": "Zatím žádné bloky", "field.blocks.fieldsets.label": "Vyberte prosím typ bloku …", + "field.blocks.fieldsets.paste": "Stiskněte{{ shortcut }} pro vložení/import bloků z Vaší schránky", "field.blocks.gallery.name": "Galerie", "field.blocks.gallery.images.empty": "Zatím žádné obrázky", "field.blocks.gallery.images.label": "Obrázky", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Vyberte obrázek", "field.blocks.image.ratio": "Poměr stran", "field.blocks.image.url": "URL obrázku", + "field.blocks.line.name": "Čára", "field.blocks.list.name": "Seznam", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Zat\u00edm nejsou \u017e\u00e1dn\u00e9 z\u00e1znamy.", "field.users.empty": "Nebyli zatím vybráni žádní uživatelé", - "file.blueprint": "Tento typ souboru nemá blueprint. Blueprint můžete definovat v /site/blueprints/{template}.yml", + "file.blueprint": "Tento typ souboru nemá blueprint. Blueprint můžete definovat v /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Opravdu chcete smazat tento soubor?", "file.sort": "Změnit pozici", @@ -272,6 +291,7 @@ "hide": "Skrýt", "hour": "Hodina", + "import": "Import", "insert": "Vlo\u017eit", "insert.after": "Vložit za", "insert.before": "Vložit před", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Kód pro resetování hesla", "login.code.placeholder.email": "000 000", "login.code.text.email": "Vaše e-mailová adresa byla zaregistrována, kód byl odeslán do Vaší e-mailové schránky.", - "login.email.login.body": "Ahoj {user.nameOrEmail},\n\nV nedávné době jsi zažádal(a) o kód pro přihlášení do Kirby Panelu.\nNásledující kód pro přihlášení je platný {timeout} minut:\n\n{code}\n\nPokud jsi o kód pro přihlášení nežádal(a), tuto zprávu prosím ignoruj a v případě dotazů prosím kontaktuj svého administrátora.\nZ bezpečnostních důvodů prosím tuto zprávu nepřeposílej.", + "login.email.login.body": "Ahoj {user.nameOrEmail},\n\nV nedávné době jsi zažádal(a) o kód pro přihlášení do Kirby Panelu na stránce {site}.\nNásledující kód pro přihlášení je platný {timeout} minut:\n\n{code}\n\nPokud jsi o kód pro přihlášení nežádal(a), tuto zprávu prosím ignoruj a v případě dotazů prosím kontaktuj svého administrátora.\nZ bezpečnostních důvodů prosím tuto zprávu nepřeposílej nikomu dalšímu.", "login.email.login.subject": "Váš kód pro přihlášení", - "login.email.password-reset.body": "Ahoj {user.nameOrEmail},\n\nV nedávné době jsi zažádal(a) o kód pro přihlášení do Kirby Panelu.\nNásledující kód pro přihlášení je platný {timeout} minut:\n\n{code}\n\nPokud jsi o kód pro přihlášení nežádal(a), tuto zprávu prosím ignoruj a v případě dotazů prosím kontaktuj svého administrátora.\nZ bezpečnostních důvodů prosím tuto zprávu nepřeposílej.", + "login.email.password-reset.body": "Ahoj {user.nameOrEmail},\n\nV nedávné době jsi zažádal(a) o kód pro resetování hesla do Kirby Panelu na stránce {site}.\nNásledující kód pro resetování hesla je platný {timeout} minut:\n\n{code}\n\nPokud jsi o kód pro resetování hesla nežádal(a), tuto zprávu prosím ignoruj a v případě dotazů prosím kontaktuj svého administrátora.\nZ bezpečnostních důvodů prosím tuto zprávu nepřeposílej nikomu dalšímu.", "login.email.password-reset.subject": "Váš kód pro resetování hesla", "login.remember": "Zůstat přihlášen", "login.reset": "Resetovat heslo", @@ -385,7 +405,7 @@ "orientation.portrait": "Na výšku", "orientation.square": "Čtverec", - "page.blueprint": "Tento typ stránky nemá blueprint. Blueprint můžete definovat v /site/blueprints/{template}.yml", + "page.blueprint": "Tento typ stránky nemá blueprint. Blueprint můžete definovat v /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Zm\u011bnit URL", "page.changeSlug.fromTitle": "Vytvo\u0159it z n\u00e1zvu", "page.changeStatus": "Změnit status", @@ -417,7 +437,10 @@ "pagination.page": "Stránka", "password": "Heslo", + "paste": "Vložit", + "paste.after": "Vložit za", "pixel": "Pixel", + "plugins": "Doplňky", "prev": "Předchozí", "preview": "Náhled", "remove": "Odstranit", @@ -454,6 +477,8 @@ "template": "\u0160ablona", "today": "Dnes", + "server": "Server", + "site.blueprint": "Hlavní panel nemá blueprint. Blueprint můžete definovat v /site/blueprints/site.yml", "toolbar.button.code": "Kód", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Nadpis 1", "toolbar.button.heading.2": "Nadpis 2", "toolbar.button.heading.3": "Nadpis 3", + "toolbar.button.heading.4": "Nadpis 4", + "toolbar.button.heading.5": "Nadpis 5", + "toolbar.button.heading.6": "Nadpis 6", "toolbar.button.italic": "Kurz\u00edva", "toolbar.button.file": "Soubor", "toolbar.button.file.select": "Vyberte soubor", "toolbar.button.file.upload": "Nahrajte soubor", "toolbar.button.link": "Odkaz", + "toolbar.button.paragraph": "Odstavec", "toolbar.button.strike": "Přeškrtnutí", "toolbar.button.ol": "Číslovaný seznam", "toolbar.button.underline": "Podtržení", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Uživatel", - "user.blueprint": "Pro tuto uživatelskou roli můžete definovat další sekce a pole v /site/blueprints/users/{role}.yml", + "user.blueprint": "Pro tuto uživatelskou roli můžete definovat další sekce a pole v /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Změnit email", "user.changeLanguage": "Změnit jazyk", "user.changeName": "Přejmenovat tohoto uživatele", @@ -516,9 +545,10 @@ "view.account": "V\u00e1\u0161 \u00fa\u010det", "view.installation": "Instalace", + "view.languages": "Jazyky", "view.resetPassword": "Resetovat heslo", - "view.settings": "Nastavení", "view.site": "Stránka", + "view.system": "Systém", "view.users": "U\u017eivatel\u00e9", "welcome": "Vítejte", diff --git a/kirby/i18n/translations/da.json b/kirby/i18n/translations/da.json index b40d2e1..79631f9 100644 --- a/kirby/i18n/translations/da.json +++ b/kirby/i18n/translations/da.json @@ -1,5 +1,10 @@ { + "account.changeName": "Ændre dit navn", + "account.delete": "Slet din konto", + "account.delete.confirm": "Ønsker du virkelig at slette din konto? Du vil blive logget ud med det samme. Din konto kan ikke gendannes.", + "add": "Ny", + "author": "Forfatter", "avatar": "Profilbillede", "back": "Tilbage", "cancel": "Annuller", @@ -9,6 +14,7 @@ "collapse": "Fold sammen", "collapse.all": "Fold alle sammen", "copy": "Kopier", + "copy.all": "Kopier alle", "create": "Opret", "date": "Dato", @@ -23,24 +29,28 @@ "days.tue": "Tir", "days.wed": "Ons", + "debugging": "Fejlfinding", + "delete": "Slet", "delete.all": "Slet alle", - "dimensions": "Dimensioner", - "disabled": "Deaktiveret", - "discard": "Kass\u00e9r", - "download": "Download", - "duplicate": "Dupliker", - "edit": "Rediger", - "expand": "Fold ud", - "expand.all": "Fold alle ud", "dialog.files.empty": "Ingen filer kan vælges", "dialog.pages.empty": "Ingen sider kan vælges", "dialog.users.empty": "Ingen brugere kan vælges", + "dimensions": "Dimensioner", + "disabled": "Deaktiveret", + "discard": "Kass\u00e9r", + "download": "Download", + "duplicate": "Dupliker", + + "edit": "Rediger", + "email": "Email", "email.placeholder": "mail@eksempel.dk", + "environment": "Miljø", + "error.access.code": "Ugyldig kode", "error.access.login": "Ugyldigt log ind", "error.access.panel": "Du har ikke adgang til panelet", @@ -92,6 +102,7 @@ "error.language.code": "Indtast venligst en gyldig kode for sproget", "error.language.duplicate": "Sproget eksisterer allerede", "error.language.name": "Indtast venligst et gyldigt navn for sproget", + "error.language.notFound": "Sproget fandtes ikke", "error.layout.validation.block": "Der er fejl i blok {blockIndex} i layout {layoutIndex}", "error.layout.validation.settings": "Der er fejl i layout {index} indstillinger", @@ -100,6 +111,8 @@ "error.license.email": "Indtast venligst en gyldig email adresse", "error.license.verification": "Licensen kunne ikke verificeres", + "error.offline": "Panelet er i øjeblikket offline", + "error.page.changeSlug.permission": "Du kan ikke ændre URL-endelse for \"{slug}\"", "error.page.changeStatus.incomplete": "Siden indeholder fejl og kan derfor ikke udgives", "error.page.changeStatus.permission": "Status for denne side kan ikke ændres", @@ -118,7 +131,7 @@ "error.page.duplicate.permission": "Du har ikke mulighed for at duplikere \"{slug}\"", "error.page.notFound": "Siden kunne ikke findes", "error.page.num.invalid": "Indtast venligst et gyldigt sorteringsnummer. Nummeret kan ikke være negativt.", - "error.page.slug.invalid": "Please enter a valid URL appendix", + "error.page.slug.invalid": "Indtast venligst et gyldigt URL appendix", "error.page.slug.maxlength": "Navnet skal være kortere end \"{length}\" tegn", "error.page.sort.permission": "Siden \"{slug}\" kan ikke sorteres", "error.page.status.invalid": "Sæt venligst en gyldig status for siden", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Indtast venligst en gyldig adgangskode. Adgangskoder skal minimum være 8 tegn lange.", "error.user.password.notSame": "Bekr\u00e6ft venligst adgangskoden", "error.user.password.undefined": "Brugeren har ikke en adgangskode", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Forkert adgangskode", "error.user.role.invalid": "Indtast venligst en gyldig rolle", + "error.user.undefined": "Brugeren kunne ikke findes", "error.user.update.permission": "Du har ikke tilladelse til at opdatere brugeren \"{name}\"", "error.validation.accepted": "Bekræft venligst", @@ -208,6 +222,9 @@ "error.validation.time.between": "Indtast venligst et tidspunkt imellem {min} og {max}", "error.validation.url": "Indtast venligst en gyldig URL", + "expand": "Fold ud", + "expand.all": "Fold alle ud", + "field.required": "Feltet er påkrævet", "field.blocks.changeType": "Skift type", "field.blocks.code.name": "Kode", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Ønsker du virkelig at slette de valgte blokke?", "field.blocks.empty": "Ingen blokke endnu", "field.blocks.fieldsets.label": "Vælg venligst en blok type", + "field.blocks.fieldsets.paste": "Tryk {{ shortcut }} for at indsætte/importere blokke fra dit udklipsholder", "field.blocks.gallery.name": "Galleri", "field.blocks.gallery.images.empty": "Ingen billeder endnu", "field.blocks.gallery.images.label": "Billeder", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Vælg et billede", "field.blocks.image.ratio": "Størrelsesforhold", "field.blocks.image.url": "Billede URL", + "field.blocks.line.name": "Linje", "field.blocks.list.name": "Liste", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Tekst", @@ -263,7 +282,7 @@ "field.structure.empty": "Ingen indtastninger endnu.", "field.users.empty": "Ingen brugere er valgt", - "file.blueprint": "Denne fil har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/{template}.yml", + "file.blueprint": "Denne fil har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "\u00d8nsker du virkelig at slette denne fil?", "file.sort": "Skift position", @@ -272,6 +291,7 @@ "hide": "Skjul", "hour": "Time", + "import": "Importer", "insert": "Inds\u00e6t", "insert.after": "Indsæt efter", "insert.before": "Indsæt før", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Sikkerhedskode", "login.code.placeholder.email": "000 000", "login.code.text.email": "Hvis din email adresse er registreret er en sikkerhedskode blevet sendt via email.", - "login.email.login.body": "Hej {user.nameOrEmail},\n\nDu har for nyligt anmodet om en log ind kode til Kirby Panel.\nFølgende log ind kode vil være gyldig i {timeout} minutter:\n\n{code}\n\nHvis du ikke har anmodet om en log ind kode, kan du blot ignorere denne email eller kontakte din administrator hvis du har spørgsmål.\nAf sikkerhedsmæssige årsager, bør du IKKE videresende denne email.", + "login.email.login.body": "Hej {user.nameOrEmail},\n\nDu har for nyligt anmodet om en log ind kode til panelet af {site}.\nFølgende log ind kode vil være gyldig i {timeout} minutter:\n\n{code}\n\nHvis du ikke har anmodet om en log ind kode, kan du blot ignorere denne email eller kontakte din administrator hvis du har spørgsmål.\nAf sikkerhedsmæssige årsager, bør du IKKE videresende denne email.", "login.email.login.subject": "Din log ind kode", - "login.email.password-reset.body": "Hej {user.nameOrEmail},\n\nDu har for nyligt anmodet om kode til nulstilling af adgangskode til Kirby Panel.\nFølgende kode til nulstilling af adgangskode vil være gyldig i {timeout} minutter:\n\n{code}\n\nHvis du ikke har anmodet om kode til nulstilling af adgangskode, kan du blot ignorere denne email eller kontakte din administrator hvis du har spørgsmål.\nAf sikkerhedsmæssige årsager, bør du IKKE videresende denne email.", + "login.email.password-reset.body": "Hej {user.nameOrEmail},\n\nDu har for nyligt anmodet om kode til nulstilling af adgangskode til panelet af {site}.\nFølgende kode til nulstilling af adgangskode vil være gyldig i {timeout} minutter:\n\n{code}\n\nHvis du ikke har anmodet om kode til nulstilling af adgangskode, kan du blot ignorere denne email eller kontakte din administrator hvis du har spørgsmål.\nAf sikkerhedsmæssige årsager, bør du IKKE videresende denne email.", "login.email.password-reset.subject": "Din kode til nulstilling af adgangskode", "login.remember": "Forbliv logget ind", "login.reset": "Nulstil adgangskode", @@ -372,11 +392,11 @@ "more": "Mere", "name": "Navn", "next": "Næste", - "no": "no", + "no": "nej", "off": "Sluk", "on": "Tænd", "open": "Åben", - "open.newWindow": "Open in new window", + "open.newWindow": "Åben i et nyt vindue", "options": "Indstillinger", "options.none": "Ingen muligheder", @@ -385,7 +405,7 @@ "orientation.portrait": "Portræt", "orientation.square": "Kvadrat", - "page.blueprint": "Denne side har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/{template}.yml", + "page.blueprint": "Denne side har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "\u00c6ndre URL", "page.changeSlug.fromTitle": "Generer udfra titel", "page.changeStatus": "Skift status", @@ -417,7 +437,10 @@ "pagination.page": "Side", "password": "Adgangskode", + "paste": "Indsæt", + "paste.after": "Indsæt efter", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Forrige", "preview": "Forhåndsvisning", "remove": "Fjern", @@ -454,6 +477,8 @@ "template": "Skabelon", "today": "Idag", + "server": "Server", + "site.blueprint": "Sitet har intet blueprint endnu. Du kan definere opsætningen i /site/blueprints/site.yml", "toolbar.button.code": "Kode", @@ -463,14 +488,18 @@ "toolbar.button.heading.1": "Overskrift 1", "toolbar.button.heading.2": "Overskrift 2", "toolbar.button.heading.3": "Overskrift 3", + "toolbar.button.heading.4": "Overskrift 4", + "toolbar.button.heading.5": "Overskrift 5", + "toolbar.button.heading.6": "Overskrift 6", "toolbar.button.italic": "Kursiv tekst", "toolbar.button.file": "Fil", "toolbar.button.file.select": "Vælg en fil", "toolbar.button.file.upload": "Upload en fil", "toolbar.button.link": "Link", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Afsnit", + "toolbar.button.strike": "Gennemstreg", "toolbar.button.ol": "Ordnet liste", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Understreg", "toolbar.button.ul": "Punktliste", "translation.author": "Kirby Team", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Bruger", - "user.blueprint": "Du kan definere yderligere sektioner og formular felter for denne brugerrolle i /site/blueprints/users/{role}.yml", + "user.blueprint": "Du kan definere yderligere sektioner og formular felter for denne brugerrolle i /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Skift email", "user.changeLanguage": "Skift sprog", "user.changeName": "Omdøb denne bruger", @@ -516,12 +545,13 @@ "view.account": "Din konto", "view.installation": "Installation", + "view.languages": "Sprog", "view.resetPassword": "Nulstil adgangskode", - "view.settings": "Indstillinger", "view.site": "Website", + "view.system": "System", "view.users": "Brugere", "welcome": "Velkommen", "year": "År", - "yes": "yes" + "yes": "ja" } diff --git a/kirby/i18n/translations/de.json b/kirby/i18n/translations/de.json index 389db26..f549a5d 100644 --- a/kirby/i18n/translations/de.json +++ b/kirby/i18n/translations/de.json @@ -1,5 +1,10 @@ { + "account.changeName": "Deinen Namen ändern", + "account.delete": "Deinen Account löschen", + "account.delete.confirm": "Willst du deinen Account wirklich löschen? Du wirst sofort danach abgemeldet. Dein Account kann nicht wieder hergestellt werden. ", + "add": "Hinzuf\u00fcgen", + "author": "Autor", "avatar": "Profilbild", "back": "Zurück", "cancel": "Abbrechen", @@ -9,6 +14,7 @@ "collapse": "Zusammenklappen", "collapse.all": "Alle zusammenklappen", "copy": "Kopieren", + "copy.all": "Alle kopieren", "create": "Erstellen", "date": "Datum", @@ -23,24 +29,28 @@ "days.tue": "Di", "days.wed": "Mi", + "debugging": "Debugging", + "delete": "L\u00f6schen", "delete.all": "Alle löschen", - "dimensions": "Maße", - "disabled": "Gesperrt", - "discard": "Verwerfen", - "download": "Download", - "duplicate": "Duplizieren", - "edit": "Bearbeiten", - "expand": "Aufklappen", - "expand.all": "Alle aufklappen", "dialog.files.empty": "Keine verfügbaren Dateien", "dialog.pages.empty": "Keine verfügbaren Seiten", "dialog.users.empty": "Keine verfügbaren Accounts", + "dimensions": "Maße", + "disabled": "Gesperrt", + "discard": "Verwerfen", + "download": "Download", + "duplicate": "Duplizieren", + + "edit": "Bearbeiten", + "email": "E-Mail", "email.placeholder": "mail@beispiel.de", + "environment": "Umgebung", + "error.access.code": "Ungültiger Code", "error.access.login": "Ungültige Zugangsdaten", "error.access.panel": "Du hast keinen Zugang zum Panel", @@ -92,6 +102,7 @@ "error.language.code": "Bitte gib einen gültigen Code für die Sprache an", "error.language.duplicate": "Die Sprache besteht bereits", "error.language.name": "Bitte gib einen gültigen Namen für die Sprache an", + "error.language.notFound": "Die Sprache konnte nicht gefunden werden", "error.layout.validation.block": "Fehler in Block {blockIndex} in Layout {layoutIndex}", "error.layout.validation.settings": "Fehler in den Einstellungen von Layout {index}", @@ -100,6 +111,8 @@ "error.license.email": "Bitte gib eine gültige E-Mailadresse an", "error.license.verification": "Die Lizenz konnte nicht verifiziert werden", + "error.offline": "Das Panel ist zur Zeit offline", + "error.page.changeSlug.permission": "Du darfst die URL der Seite \"{slug}\" nicht ändern", "error.page.changeStatus.incomplete": "Die Seite ist nicht vollständig und kann daher nicht veröffentlicht werden", "error.page.changeStatus.permission": "Der Status der Seite kann nicht geändert werden", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Der Account hat kein Passwort", "error.user.password.wrong": "Falsches Passwort", "error.user.role.invalid": "Bitte gib eine gültige Rolle an", + "error.user.undefined": "Der Benutzer wurde nicht gefunden", "error.user.update.permission": "Du darfst den den Account \"{name}\" nicht bearbeiten", "error.validation.accepted": "Bitte bestätige", @@ -208,6 +222,9 @@ "error.validation.time.between": "Bitte gib eine Zeit zwischen {min} und {max} ein", "error.validation.url": "Bitte gib eine gültige URL ein", + "expand": "Aufklappen", + "expand.all": "Alle aufklappen", + "field.required": "Das Feld ist Pflicht", "field.blocks.changeType": "Blocktyp ändern", "field.blocks.code.name": "Code", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Willst du wirklich die ausgewählten Blöcke löschen?", "field.blocks.empty": "Keine Blöcke", "field.blocks.fieldsets.label": "Bitte wähle einen Blocktyp aus …", + "field.blocks.fieldsets.paste": "Drücke {{ shortcut }} um Blöcke aus der Zwischenablage zu importieren", "field.blocks.gallery.name": "Galerie", "field.blocks.gallery.images.empty": "Keine Bilder", "field.blocks.gallery.images.label": "Bilder", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Bild auswählen", "field.blocks.image.ratio": "Seitenverhältnis", "field.blocks.image.url": "Bild URL", + "field.blocks.line.name": "Linie", "field.blocks.list.name": "Liste", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Es bestehen keine Eintr\u00e4ge.", "field.users.empty": "Keine Accounts ausgewählt", - "file.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Datei in /site/blueprints/{template}.yml anlegen", + "file.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Datei in /site/blueprints/files/{blueprint}.yml anlegen", "file.delete.confirm": "Willst du die Datei {filename}
wirklich löschen?", "file.sort": "Position ändern", @@ -272,6 +291,7 @@ "hide": "Verbergen", "hour": "Stunde", + "import": "Importieren", "insert": "Einf\u00fcgen", "insert.after": "Danach einfügen", "insert.before": "Davor einfügen", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Anmeldecode", "login.code.placeholder.email": "000 000", "login.code.text.email": "Wenn deine E-Mail-Adresse registriert ist, wurde der angeforderte Code per E-Mail versendet.", - "login.email.login.body": "Hallo {user.nameOrEmail},\n\ndu hast gerade einen Anmeldecode für das Kirby Panel angefordert.\nDer folgende Anmeldecode ist für die nächsten {timeout} Minuten gültig:\n\n{code}\n\nWenn du keinen Anmeldecode angefordert hast, ignoriere bitte diese E-Mail oder kontaktiere bei Fragen deinen Administrator.\nBitte leite diese E-Mail aus Sicherheitsgründen NICHT weiter.", + "login.email.login.body": "Hallo {user.nameOrEmail},\n\ndu hast gerade einen Anmeldecode für das Kirby Panel von {site} angefordert.\n\nDer folgende Anmeldecode ist für die nächsten {timeout} Minuten gültig:\n\n{code}\n\nWenn du keinen Anmeldecode angefordert hast, ignoriere bitte diese E-Mail oder kontaktiere bei Fragen deinen Administrator.\nBitte leite diese E-Mail aus Sicherheitsgründen NICHT weiter.", "login.email.login.subject": "Dein Anmeldecode", - "login.email.password-reset.body": "Hallo {user.nameOrEmail},\n\ndu hast gerade einen Anmeldecode für das Kirby Panel angefordert.\nDer folgende Anmeldecode ist für die nächsten {timeout} Minuten gültig:\n\n{code}\n\nWenn du keinen Anmeldecode angefordert hast, ignoriere bitte diese E-Mail oder kontaktiere bei Fragen deinen Administrator.\nBitte leite diese E-Mail aus Sicherheitsgründen NICHT weiter.", + "login.email.password-reset.body": "Hallo {user.nameOrEmail},\n\ndu hast gerade einen Anmeldecode für das Kirby Panel von {site} angefordert.\n\nDer folgende Anmeldecode ist für die nächsten {timeout} Minuten gültig:\n\n{code}\n\nWenn du keinen Anmeldecode angefordert hast, ignoriere bitte diese E-Mail oder kontaktiere bei Fragen deinen Administrator.\nBitte leite diese E-Mail aus Sicherheitsgründen NICHT weiter.", "login.email.password-reset.subject": "Dein Anmeldecode", "login.remember": "Angemeldet bleiben", "login.reset": "Passwort zurücksetzen", @@ -385,7 +405,7 @@ "orientation.portrait": "Hochformat", "orientation.square": "Quadratisch", - "page.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Seite in /site/blueprints/{template}.yml anlegen", + "page.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Seite in /site/blueprints/pages/{blueprint}.yml anlegen", "page.changeSlug": "URL \u00e4ndern", "page.changeSlug.fromTitle": "Aus Titel erzeugen", "page.changeStatus": "Status ändern", @@ -417,7 +437,10 @@ "pagination.page": "Seite", "password": "Passwort", + "paste": "Einfügen", + "paste.after": "Danach einfügen", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Vorheriger Eintrag", "preview": "Vorschau", "remove": "Entfernen", @@ -454,6 +477,8 @@ "template": "Vorlage", "today": "Heute", + "server": "Server", + "site.blueprint": "Du kannst zusätzliche Felder und Bereiche für die Seite in /site/blueprints/site.yml anlegen", "toolbar.button.code": "Code", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Überschrift 1", "toolbar.button.heading.2": "Überschrift 2", "toolbar.button.heading.3": "Überschrift 3", + "toolbar.button.heading.4": "Überschrift 4", + "toolbar.button.heading.5": "Überschrift 5", + "toolbar.button.heading.6": "Überschrift 6", "toolbar.button.italic": "Kursiver Text", "toolbar.button.file": "Datei", "toolbar.button.file.select": "Datei auswählen", "toolbar.button.file.upload": "Datei hochladen", "toolbar.button.link": "Link", + "toolbar.button.paragraph": "Absatz", "toolbar.button.strike": "Durchgestrichen", "toolbar.button.ol": "Geordnete Liste", "toolbar.button.underline": "Unterstrichen", @@ -497,7 +526,7 @@ "url.placeholder": "https://beispiel.de", "user": "Account", - "user.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Rolle in /site/blueprints/users/{role}.yml anlegen", + "user.blueprint": "Du kannst zusätzliche Felder und Bereiche für diese Rolle in /site/blueprints/users/{blueprint}.yml anlegen", "user.changeEmail": "E-Mail ändern", "user.changeLanguage": "Sprache ändern", "user.changeName": "Account umbenennen", @@ -516,9 +545,10 @@ "view.account": "Dein Account", "view.installation": "Installation", + "view.languages": "Sprachen", "view.resetPassword": "Passwort zurücksetzen", - "view.settings": "Einstellungen", "view.site": "Seite", + "view.system": "System", "view.users": "Accounts", "welcome": "Willkommen", diff --git a/kirby/i18n/translations/el.json b/kirby/i18n/translations/el.json index 5d1cb4f..e85d30d 100644 --- a/kirby/i18n/translations/el.json +++ b/kirby/i18n/translations/el.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7", + "author": "Author", "avatar": "\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c0\u03c1\u03bf\u03c6\u03af\u03bb", "back": "Πίσω", "cancel": "\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Αντιγραφή", + "copy.all": "Copy all", "create": "Δημιουργία", "date": "Ημερομηνία", @@ -23,24 +29,28 @@ "days.tue": "\u03a4\u03c1\u03af", "days.wed": "\u03a4\u03b5\u03c4", + "debugging": "Debugging", + "delete": "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae", "delete.all": "Delete all", - "dimensions": "Διαστάσεις", - "disabled": "Disabled", - "discard": "Απόρριψη", - "download": "Λήψη", - "duplicate": "Αντίγραφο", - "edit": "\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "Διαστάσεις", + "disabled": "Disabled", + "discard": "Απόρριψη", + "download": "Λήψη", + "duplicate": "Αντίγραφο", + + "edit": "\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1", + "email": "Διεύθυνση ηλεκτρονικού ταχυδρομείου", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Mη έγκυρος κωδικός", "error.access.login": "Mη έγκυρη σύνδεση", "error.access.panel": "Δεν επιτρέπεται η πρόσβαση στον πίνακα ελέγχου", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση ηλεκτρονικού ταχυδρομείου", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Δεν επιτρέπεται να αλλάξετε το URL της σελίδας \"{slug}\"", "error.page.changeStatus.incomplete": "Δεν ήταν δυνατή η δημοσίευση της σελίδας καθώς περιέχει σφάλματα", "error.page.changeStatus.permission": "Δεν είναι δυνατή η αλλαγή κατάστασης για αυτή τη σελίδα", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Ο χρήστης δεν έχει κωδικό πρόσβασης", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Παρακαλώ εισαγάγετε έναν έγκυρο ρόλο", + "error.user.undefined": "Δεν είναι δυνατή η εύρεση του χρήστη", "error.user.update.permission": "Δεν επιτρέπεται η ενημέρωση του χρήστη \"{name}\"", "error.validation.accepted": "Παρακαλώ επιβεβαιώστε", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση URL", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Κώδικας", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "\u0394\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03c5\u03bd \u03b1\u03ba\u03cc\u03bc\u03b7 \u03ba\u03b1\u03c4\u03b1\u03c7\u03c9\u03c1\u03af\u03c3\u03b5\u03b9\u03c2.", "field.users.empty": "Δεν έχουν επιλεγεί ακόμη χρήστες", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03c3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03bd\u03b1 \u03b4\u03b9\u03b1\u03b3\u03c1\u03ac\u03c8\u03b5\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf;", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Ώρα", + "import": "Import", "insert": "\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Κρατήστε με συνδεδεμένο", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Κάθετος", "orientation.square": "Τετράγωνος", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "\u0391\u03bb\u03bb\u03b1\u03b3\u03ae URL", "page.changeSlug.fromTitle": "\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03c4\u03af\u03c4\u03bb\u03bf", "page.changeStatus": "Αλλαγή κατάστασης", @@ -417,7 +437,10 @@ "pagination.page": "Σελίδα", "password": "\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03a0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Εικονοστοιχέιο", + "plugins": "Plugins", "prev": "Προηγούμενο", "preview": "Preview", "remove": "Αφαίρεση", @@ -454,6 +477,8 @@ "template": "\u03a0\u03c1\u03cc\u03c4\u03c5\u03c0\u03bf", "today": "Σήμερα", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Κώδικας", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Επικεφαλίδα 1", "toolbar.button.heading.2": "Επικεφαλίδα 2", "toolbar.button.heading.3": "Επικεφαλίδα 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "\u03a0\u03bb\u03ac\u03b3\u03b9\u03b1 \u03b3\u03c1\u03b1\u03c6\u03ae", "toolbar.button.file": "Αρχείο", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Ταξινομημένη λίστα", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Χρήστης", - "user.blueprint": "Μπορείτε να ορίσετε επιπλέον τμήματα και πεδία φόρμας για αυτόν τον ρόλο χρήστη στο /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Αλλαγή διεύθινσης ηλεκτρονικού ταχυδρομείου", "user.changeLanguage": "Αλλαγή γλώσσας", "user.changeName": "Μετονομασία χρήστη", @@ -516,9 +545,10 @@ "view.account": "\u039f \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc\u03c2 \u03c3\u03b1\u03c2", "view.installation": "\u0395\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7", + "view.languages": "Γλώσσες", "view.resetPassword": "Reset password", - "view.settings": "Ρυθμίσεις", "view.site": "Iστοσελίδα", + "view.system": "System", "view.users": "\u03a7\u03c1\u03ae\u03c3\u03c4\u03b5\u03c2", "welcome": "Καλώς ήρθατε", diff --git a/kirby/i18n/translations/en.json b/kirby/i18n/translations/en.json index d484572..dc04e66 100644 --- a/kirby/i18n/translations/en.json +++ b/kirby/i18n/translations/en.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Add", + "author": "Author", "avatar": "Profile picture", "back": "Back", "cancel": "Cancel", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Copy", + "copy.all": "Copy all", "create": "Create", "date": "Date", @@ -23,24 +29,28 @@ "days.tue": "Tue", "days.wed": "Wed", + "debugging": "Debugging", + "delete": "Delete", "delete.all": "Delete all", - "dimensions": "Dimensions", - "disabled": "Disabled", - "discard": "Discard", - "download": "Download", - "duplicate": "Duplicate", - "edit": "Edit", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "Dimensions", + "disabled": "Disabled", + "discard": "Discard", + "download": "Download", + "duplicate": "Duplicate", + + "edit": "Edit", + "email": "Email", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Invalid login", "error.access.panel": "You are not allowed to access the panel", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Please enter a valid email address", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "You are not allowed to change the URL appendix for \"{slug}\"", "error.page.changeStatus.incomplete": "The page has errors and cannot be published", "error.page.changeStatus.permission": "The status for this page cannot be changed", @@ -165,6 +178,7 @@ "error.user.password.undefined": "The user does not have a password", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Please enter a valid role", + "error.user.undefined": "The user cannot be found", "error.user.update.permission": "You are not allowed to update the user \"{name}\"", "error.validation.accepted": "Please confirm", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Please enter a valid URL", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Code", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "No entries yet", "field.users.empty": "No users selected yet", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Do you really want to delete
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hour", + "import": "Import", "insert": "Insert", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Keep me logged in", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Portrait", "orientation.square": "Square", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Change URL", "page.changeSlug.fromTitle": "Create from title", "page.changeStatus": "Change status", @@ -417,7 +437,10 @@ "pagination.page": "Page", "password": "Password", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Previous", "preview": "Preview", "remove": "Remove", @@ -454,6 +477,8 @@ "template": "Template", "today": "Today", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Code", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Heading 1", "toolbar.button.heading.2": "Heading 2", "toolbar.button.heading.3": "Heading 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Italic", "toolbar.button.file": "File", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "Link", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Ordered list", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "User", - "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Change email", "user.changeLanguage": "Change language", "user.changeName": "Rename this user", @@ -516,9 +545,10 @@ "view.account": "Your account", "view.installation": "Installation", + "view.languages": "Languages", "view.resetPassword": "Reset password", - "view.settings": "Settings", "view.site": "Site", + "view.system": "System", "view.users": "Users", "welcome": "Welcome", diff --git a/kirby/i18n/translations/eo.json b/kirby/i18n/translations/eo.json new file mode 100644 index 0000000..dbe2893 --- /dev/null +++ b/kirby/i18n/translations/eo.json @@ -0,0 +1,557 @@ +{ + "account.changeName": "Ŝanĝi vian nomon", + "account.delete": "Forigi vian konton", + "account.delete.confirm": "Ĉu vi certe deziras forigi vian konton? Vi estos tuj elsalutita. Ne eblos malforigi vian konton.", + + "add": "Aldoni", + "author": "Aŭtoro", + "avatar": "Profilbildo", + "back": "Reen", + "cancel": "Nuligi", + "change": "Ŝanĝi", + "close": "Fermi", + "confirm": "Bone", + "collapse": "Fermi", + "collapse.all": "Fermi ĉiujn", + "copy": "Kopii", + "copy.all": "Kopii ĉiujn", + "create": "Krei", + + "date": "Dato", + "date.select": "Elekti daton", + + "day": "Tago", + "days.fri": "Ven", + "days.mon": "Lun", + "days.sat": "Sab", + "days.sun": "Dim", + "days.thu": "Ĵaŭ", + "days.tue": "Mar", + "days.wed": "Mer", + + "debugging": "Sencimigado", + + "delete": "Forigi", + "delete.all": "Forigi ĉiujn", + + "dialog.files.empty": "Neniu dosiero por elekti", + "dialog.pages.empty": "Neniu paĝo por elekti", + "dialog.users.empty": "Neniu uzanto por elekti", + + "dimensions": "Dimensioj", + "disabled": "Malebligita", + "discard": "Forĵeti", + "download": "Elŝuti", + "duplicate": "Duobligi", + + "edit": "Modifi", + + "email": "Retpoŝto", + "email.placeholder": "retpoŝto@ekzemplo.com", + + "environment": "Medio", + + "error.access.code": "Nevalida kodo", + "error.access.login": "Nevalida ensaluto", + "error.access.panel": "Vi ne rajtas eniri la administran panelon", + "error.access.view": "Vi ne rajtas eniri ĉi tiun areon de la panelo", + + "error.avatar.create.fail": "La profilbildo ne povis esti alŝutita", + "error.avatar.delete.fail": "La profilbildo ne povis esti forigita", + "error.avatar.dimensions.invalid": "Bonvolu certigi ke la profilbildo ne estas pli ol 3000 bilderojn larĝa kaj alta", + "error.avatar.mime.forbidden": "La profilbildo devas esti dosiero en dosierformo aŭ JPEG aŭ PNG", + + "error.blueprint.notFound": "La plano \"{name}\" ne povis esti ŝargita", + + "error.blocks.max.plural": "Oni devas ne aldoni pli ol {max} blokoj", + "error.blocks.max.singular": "Vi devas ne aldoni pli ol unu bloko", + "error.blocks.min.plural": "Oni devas aldoni almenaŭ {min} blokojn", + "error.blocks.min.singular": "Oni devas aldoni almenaŭ unu blokon", + "error.blocks.validation": "Estas eraro en bloko {index}", + + "error.email.preset.notFound": "La retpoŝta antaŭagordo \"{name}\" ne estas trovebla", + + "error.field.converter.invalid": "Nevalida konvertilo \"{converter}\"", + + "error.file.changeName.empty": "La nomo ne rajtas esti malplena", + "error.file.changeName.permission": "Vi ne rajtas ŝanĝi la nomon de \"{filename}\"", + "error.file.duplicate": "Jam ekzistas dosiero nomita \"{filename}\"", + "error.file.extension.forbidden": "La dosiersufikso \"{extension}\" ne estas permesita", + "error.file.extension.invalid": "Nevalida dosiersufikso: {extension}", + "error.file.extension.missing": "Mankas la dosiersufiksoj por \"{filename}\"", + "error.file.maxheight": "La bildo ne povas esti pli ol {height} bilderojn alta ", + "error.file.maxsize": "La dosiero estas tro granda", + "error.file.maxwidth": "La bildo ne povas esti pli oll {width} bilderojn larĝa", + "error.file.mime.differs": "La alŝutata dosiero devas havi la saman MIME-tipon \"{mime}\"", + "error.file.mime.forbidden": "La MIME-tipo \"{mime}\" ne povas esti uzata ĉi tie", + "error.file.mime.invalid": "Nevalida MIME-tipo: {mime}", + "error.file.mime.missing": "La MIME-tipo for \"{filename}\" ne estas detektebla", + "error.file.minheight": "La bildo devas esti almenaŭ {height} bilderojn alta", + "error.file.minsize": "La dosiero estas tro malgranda", + "error.file.minwidth": "La bildo devas esti almenaŭ {width} bilderojn larĝa", + "error.file.name.missing": "La dosiernomo ne rajtas esti malplena", + "error.file.notFound": "La dosiero \"{filename}\" ne troveblas", + "error.file.orientation": "La orientiĝo de la bildo devas esti \"{orientation}\"", + "error.file.type.forbidden": "Vi ne rajtas alŝuti dosiertipon {type}", + "error.file.type.invalid": "Nevalida dosiertipo: {type}", + "error.file.undefined": "La dosiero ne troveblas", + + "error.form.incomplete": "Bonvolu korekti ĉiujn erarojn en formularo...", + "error.form.notSaved": "Ne eblis konservi la formularon", + + "error.language.code": "Bonvolu entajpi validan kodon por la lingvo", + "error.language.duplicate": "La lingvo jam ekzistas", + "error.language.name": "Bonvolu entajpi validan nomon por la lingvo", + "error.language.notFound": "La lingvo ne troveblas", + + "error.layout.validation.block": "Estas eraro en bloko {blockIndex}, en blokaranĝo {layoutIndex}", + "error.layout.validation.settings": "Estas eraro en la agordoj de blokaranĝo {index}", + + "error.license.format": "Bonvolu entajpi validan kodon de permisilo", + "error.license.email": "Bonvolu entajpi validan retpoŝtadreson", + "error.license.verification": "Ne eblis kontroli la permisilon", + + "error.offline": "La panelo estas ĉi-momente nekonektita", + + "error.page.changeSlug.permission": "Vi ne rajtas ŝanĝi la URL-nomon de \"{slug}\"", + "error.page.changeStatus.incomplete": "La paĝo havas erarojn, kaj tiel ne povas esti publikigita", + "error.page.changeStatus.permission": "La paĝstato ne estas ŝanĝebla", + "error.page.changeStatus.toDraft.invalid": "Ne eblas konverti la paĝon \"{slug}\" al malneto", + "error.page.changeTemplate.invalid": "Ne eblas ŝanĝi la ŝablonon de la paĝo \"{slug}\"", + "error.page.changeTemplate.permission": "Vi ne rajtas ŝanĝi la ŝablonon de \"{slug}\"", + "error.page.changeTitle.empty": "La titolo ne rajtas esti malplena", + "error.page.changeTitle.permission": "Vi ne rajtas ŝanĝi la titolon de \"{slug}\"", + "error.page.create.permission": "Vi ne rajtas krei \"{slug}\"", + "error.page.delete": "Ne eblas forigi la paĝon \"{slug}\"", + "error.page.delete.confirm": "Bonvolu entajpi la titolon de la paĝo for konfirmi", + "error.page.delete.hasChildren": "Ne eblas forigi la paĝon ĉar ĝi havas subpaĝojn", + "error.page.delete.permission": "Vi ne rajtas forigi \"{slug}\"", + "error.page.draft.duplicate": "Malneto uzanta la URL-nomon \"{slug}\" jam ekzistas", + "error.page.duplicate": "Paĝo uzanta la URL-nomon \"{slug}\" jam ekzistas", + "error.page.duplicate.permission": "Vi ne rajtas duobligi \"{slug}\"", + "error.page.notFound": "La paĝo \"{slug}\" ne troveblas", + "error.page.num.invalid": "Bonvolu entajpi validan ord-numeron. Numeroj devas esti pozitivaj.", + "error.page.slug.invalid": "Bonvolu entajpi validan URL-nomon", + "error.page.slug.maxlength": "URL-nomo devas esti malpli ol \"{length}\" literojn longa", + "error.page.sort.permission": "Ne eblas ordigi la paĝon \"{slug}\" ", + "error.page.status.invalid": "Bonvolu elekti validan paĝstaton", + "error.page.undefined": "La paĝo ne estas trovebla", + "error.page.update.permission": "Vi ne rajtas ĝisdatigi \"{slug}\"", + + "error.section.files.max.plural": "Vi devas aldoni maksimume {max} dosierojn al sekcio \"{section}\"", + "error.section.files.max.singular": "Vi devas aldoni maksimume unu dosieron al sekcio \"{section}\"", + "error.section.files.min.plural": "La sekcio \"{section}\" bezonas almenaŭ {min} dosierojn", + "error.section.files.min.singular": "La sekcio \"{section}\" bezonas almenaŭ unu dosieron", + + "error.section.pages.max.plural": "Vi devas aldoni maksimume {max} paĝojn al sekcio \"{section}\"", + "error.section.pages.max.singular": "Vi devas aldoni maksimume unu paĝon al sekcio \"{section}\"", + "error.section.pages.min.plural": "La sekcio \"{section}\" bezonas almenaŭ {min} paĝojn", + "error.section.pages.min.singular": "La sekcio \"{section}\" bezonas almenaŭ unu paĝon", + + "error.section.notLoaded": "Ne eblis ŝarĝi la sekcion \"{section}\"", + "error.section.type.invalid": "La sekcia tipo \"{type}\" ne estas valida", + + "error.site.changeTitle.empty": "La titolo ne rajtas esti malplena", + "error.site.changeTitle.permission": "Vi ne rajtas ŝanĝi la titolon de la retejo", + "error.site.update.permission": "Vi ne rajtas ĝisdatigi la retejon", + + "error.template.default.notFound": "La defaŭlta ŝablono ne ekzistas", + + "error.user.changeEmail.permission": "Vi ne rajtas ŝanĝi la retpoŝtadreson de la uzanto \"{name}\"", + "error.user.changeLanguage.permission": "Vi ne rajtas ŝanĝi la lingvon de la uzanto \"{name}\"", + "error.user.changeName.permission": "Vi ne rajtas ŝanĝi la nomon de la uzanto \"{name}\"", + "error.user.changePassword.permission": "Vi ne rajtas ŝanĝi la pasvorton de la uzanto \"{name}\"", + "error.user.changeRole.lastAdmin": "Ne eblas ŝanĝi la rolon de la lasta administranto", + "error.user.changeRole.permission": "Vi ne rajtas ŝanĝi la rolon de la uzanto \"{name}\"", + "error.user.changeRole.toAdmin": "Vi ne rajtas promocii uzanton al rolo 'administranto'", + "error.user.create.permission": "Vi ne rajtas krei ĉi-tiun uzanton", + "error.user.delete": "Ne eblas forigi uzanton \"{name}\"", + "error.user.delete.lastAdmin": "Ne eblas forigi la lastan administranton", + "error.user.delete.lastUser": "Ne eblas forigi la lastan uzanton", + "error.user.delete.permission": "Vi ne rajtas forigi la uzanton \"{name}\"", + "error.user.duplicate": "Jam ekzistas uzanto kies retpoŝtadreso estas \"{email}\"", + "error.user.email.invalid": "Bonvolu entajpi validan retpoŝtadreson", + "error.user.language.invalid": "Bonvolu entajpi validan lingvon", + "error.user.notFound": "La uzanto \"{name}\" ne troveblas", + "error.user.password.invalid": "Bonvolu entajpi validan pasvorton. Pasvortoj devas esti almenaŭ 8 literojn longaj.", + "error.user.password.notSame": "La pasvortoj ne estas kongruantaj", + "error.user.password.undefined": "La uzanto ne havas pasvorton", + "error.user.password.wrong": "Malĝusta pasvorto", + "error.user.role.invalid": "Bonvolu entajpi validan rolon", + "error.user.undefined": "La uzanto ne troveblas", + "error.user.update.permission": "Vi ne rajtas ĝisdatigi la uzanton \"{name}\"", + + "error.validation.accepted": "Bonvolu konfirmi", + "error.validation.alpha": "Bonvolu entajpi nur literojn inter a-z", + "error.validation.alphanum": "Bonvolu entajpi nur aŭ literojn inter a-z aũ numerojn inter 0-9", + "error.validation.between": "Bonvolu entajpi valoron inter \"{min}\" kaj \"{max}\"", + "error.validation.boolean": "Bonvolu konfirmi aŭ malkonfirmi", + "error.validation.contains": "Bonvolu entajpi valoron kiu enhavas \"{needle}\"", + "error.validation.date": "Bonvolu entajpi validan daton", + "error.validation.date.after": "Bonvolu entajpi daton post {date}", + "error.validation.date.before": "Bonvolu entajpi daton antaũ {date}", + "error.validation.date.between": "Bonvolu entajpi daton inter {min} kaj {max}", + "error.validation.denied": "Bonvolu malkonfirmi", + "error.validation.different": "La valoro ne rajtas esti \"{other}\"", + "error.validation.email": "Bonvolu entajpi validan retpoŝtadreson", + "error.validation.endswith": "La valoro devas finiĝi per \"{end}\"", + "error.validation.filename": "Bonvolu entajpi validan dosiernomon", + "error.validation.in": "Bonvolu entajpi unu el la sekvaj: ({in})", + "error.validation.integer": "Bonvolu entajpi validan entjeron", + "error.validation.ip": "Bonvolu entajpi validan IP-adreson", + "error.validation.less": "Bonvolu entajpi valoron malpli ol {max}", + "error.validation.match": "La valoro ne kongruas al la atendata ŝablono", + "error.validation.max": "Bonvolu entajpi valoron egalan al aũ malpli ol {max}", + "error.validation.maxlength": "Bonvolu entajpi pli mallongan valoron (maksimume {max} literojn)", + "error.validation.maxwords": "Bonvolu entajpi maksimume {max} vorto(j)n", + "error.validation.min": "Bonvolu entajpi valoron egalan al aŭ pli granda ol {min}", + "error.validation.minlength": "Bonvolu entajpi pli longan valoron (minimume {min} literojn)", + "error.validation.minwords": "Bonvolu entajpi almenaŭ {min} vorto(j)n", + "error.validation.more": "Bonvolu entajpi valoron pli grandan ol {min}", + "error.validation.notcontains": "Bonvolu entajpi valoron kiu ne enhavas \"{needle}\"", + "error.validation.notin": "Bonvolu entajpi neniu ajn el la sekvaj: ({notin})", + "error.validation.option": "Bonvolu fari validan elekton", + "error.validation.num": "Bonvolu entajpi validan numeron", + "error.validation.required": "Bonvolu entajpi ion", + "error.validation.same": "Bonvolu entajpi \"{other}\"", + "error.validation.size": "La grando de la valoro devas esti \"{size}\"", + "error.validation.startswith": "La valoro devas komenciĝi per \"{start}\"", + "error.validation.time": "Bonvolu entajpi validan horaron", + "error.validation.time.after": "Bonvolu entajpi horaron post {time}", + "error.validation.time.before": "Bonvolu entajpi horaron antaŭ {time}", + "error.validation.time.between": "Bonvolu entajpi horaron inter {min} kaj {max}", + "error.validation.url": "Bonvolu entajpi validan URL", + + "expand": "Etendi", + "expand.all": "Etendi ĉiujn", + + "field.required": "La kampo ne rajtas esti malplena", + "field.blocks.changeType": "Ŝanĝi tipon", + "field.blocks.code.name": "Kodo", + "field.blocks.code.language": "Lingvo", + "field.blocks.code.placeholder": "Via kodo ...", + "field.blocks.delete.confirm": "Ĉu vi certe volas forigi ĉi tiun blokon?", + "field.blocks.delete.confirm.all": "Ĉu vi certe volas forigi ĉiujn blokojn?", + "field.blocks.delete.confirm.selected": "Ĉu vi certe volas forigi la elektitajn blokojn?", + "field.blocks.empty": "Ankoraŭ neniu bloko", + "field.blocks.fieldsets.label": "Bonvolu elekti tipon de bloko ...", + "field.blocks.fieldsets.paste": "Premu {{ shortcut }}por alglui/importi blokojn el via tondujo", + "field.blocks.gallery.name": "Galerio", + "field.blocks.gallery.images.empty": "Ankoraŭ neniu bildo", + "field.blocks.gallery.images.label": "Bildoj", + "field.blocks.heading.level": "Nivelo", + "field.blocks.heading.name": "Titolo", + "field.blocks.heading.text": "Teksto", + "field.blocks.heading.placeholder": "Titolo ...", + "field.blocks.image.alt": "Alternativa titolo", + "field.blocks.image.caption": "Apudskribo", + "field.blocks.image.crop": "Stuci", + "field.blocks.image.link": "Ligilo", + "field.blocks.image.location": "Loko", + "field.blocks.image.name": "Bildo", + "field.blocks.image.placeholder": "Elekti bildon", + "field.blocks.image.ratio": "Proporcio", + "field.blocks.image.url": "URL de la bildo", + "field.blocks.line.name": "Linio", + "field.blocks.list.name": "Listo", + "field.blocks.markdown.name": "Markdown", + "field.blocks.markdown.label": "Teksto", + "field.blocks.markdown.placeholder": "Markdown ...", + "field.blocks.quote.name": "Citaĵo", + "field.blocks.quote.text.label": "Teksto", + "field.blocks.quote.text.placeholder": "Citaĵo ...", + "field.blocks.quote.citation.label": "Citaĵo", + "field.blocks.quote.citation.placeholder": "de ...", + "field.blocks.text.name": "Teksto", + "field.blocks.text.placeholder": "Teksto ...", + "field.blocks.video.caption": "Apudskribo", + "field.blocks.video.name": "Videâjo", + "field.blocks.video.placeholder": "Entajpi URL de videaĵo", + "field.blocks.video.url.label": "Video-URL", + "field.blocks.video.url.placeholder": "https://youtube.com/?v=", + + "field.files.empty": "Ankoraŭ neniu dosiero elektita", + + "field.layout.delete": "Forigi blokaranĝo", + "field.layout.delete.confirm": "Ĉu vi certe volas forigi ĉi tiun blokaranĝon?", + "field.layout.empty": "Ankoraŭ neniu vico", + "field.layout.select": "Elekti blokaranĝon", + + "field.pages.empty": "Ankoraŭ neniu paĝo elektita", + "field.structure.delete.confirm": "Ĉu vi certe volas forigi ĉi tiun vicon?", + "field.structure.empty": "Ankoraŭ neniu enigo", + "field.users.empty": "Ankoraŭ neniu uzanto elektita", + + "file.blueprint": "Ĉi tiu dosiero ankoraŭ havas neniun planon. Vi povas difini planon ĉe /site/blueprints/files/{blueprint}.yml", + "file.delete.confirm": "Ĉu vi certe vollas forigi
{filename}?", + "file.sort": "Ŝanĝi ordon", + + "files": "Dosieroj", + "files.empty": "Ankoraŭ neniu dosiero", + + "hide": "Kaŝi", + "hour": "Horo", + "import": "Importi", + "insert": "Enmeti", + "insert.after": "Enmeti post", + "insert.before": "Enmeti antaŭ", + "install": "Instali", + + "installation": "Instalado", + "installation.completed": "La panelo estas instalita", + "installation.disabled": "La instalilo de la panelo estas norme malebligita en publikaj serviloj. Bonvolu uzi la instalilon en via loka komputilo, aŭ ebligu ĝin per la opcio panel.install", + "installation.issues.accounts": "La dosierujo /site/accounts ne ekzistas, aŭ ne estas skribebla", + "installation.issues.content": "La dosierujo /content ne ekzistas, aŭ ne estas skribebla", + "installation.issues.curl": "La kromprogramo CURL estas deviga", + "installation.issues.headline": "Ne eblas instali la panelon", + "installation.issues.mbstring": "La kromprogramo MB String estas deviga", + "installation.issues.media": "La dosierujo /media ne ekzistas, aũ ne estas skribebla", + "installation.issues.php": "Nepre uzu PHP 7+", + "installation.issues.server": "Kirby bezonas Apache, NginxCaddy", + "installation.issues.sessions": "La dosierujo /site/sessions ne ekzistas, aŭ ne estas skribebla", + + "language": "Lingvo", + "language.code": "Kodo", + "language.convert": "Farigi defaŭlton", + "language.convert.confirm": "

Ĉu vi certe volas konverti {name} al la defaŭlta lingvo? Ĉi tion vi ne povos malfari.

Se {name} havas netradukitan enhavon, tiuj tekstoj nun ne havos defaŭlton, kaj simple ne aperos en via retejo.

", + "language.create": "Aldoni novan lingvon", + "language.delete.confirm": "Ĉu vi certe volas forigi la lingvon {name}, inkluzive de ĉiuj tradukoj? Vi ne povos malfari tion!", + "language.deleted": "La lingvo estas forigita", + "language.direction": "Direkto de leĝado", + "language.direction.ltr": "Dekstren", + "language.direction.rtl": "Maldesktren", + "language.locale": "Lokaĵaro de PHP", + "language.locale.warning": "Vi uzas tajloritan agordon de lokaĵaro. Bonvolu ŝanĝi viajn agordojn laŭmende en la lingva dosiero ĉe /site/languages", + "language.name": "Nomo", + "language.updated": "La lingvo estas ĝisdatigita", + + "languages": "Lingvoj", + "languages.default": "Defaŭlta lingvo", + "languages.empty": "Ankoraũ estas neniu lingvo", + "languages.secondary": "Kromlingvoj", + "languages.secondary.empty": "Ankoraŭ estas neniu kromlingvoj", + + "license": "Permisilo", + "license.buy": "Aĉeti permisilon", + "license.register": "Registriĝi", + "license.register.help": "Vi ricevis vian kodon de permisilo retpoŝte, post aĉeti ĝin. Bonvolu kopii kaj alglui ĝin por registriĝi.", + "license.register.label": "Bonvolu entajpi vian kodon de permisilo", + "license.register.success": "Dankon pro subteni Kirby", + "license.unregistered": "Ĉi tiu estas neregistrita kopio de Kirby", + + "link": "Ligilo", + "link.text": "Ligila teksto", + + "loading": "Ŝargante", + + "lock.unsaved": "Nekonservitaj ŝanĝoj", + "lock.unsaved.empty": "Ĉiuj ŝanĝoj estas nun konservitaj", + "lock.isLocked": "Nekonservitaj ŝanĝoj de {email}", + "lock.file.isLocked": "La dosiero estas ĉi-momente redaktata de {email}, kaj tial ne povas esti ŝanĝita", + "lock.page.isLocked": "La paĝo estas ĉi-momente redaktata de {email}, kaj tial ne povas esti ŝanĝita", + "lock.unlock": "Malŝlosi", + "lock.isUnlocked": "Viaj nekonservitaj ŝanĝoj estas ŝanĝitaj de alia uzanto. Vi povas elŝuti dosieron kun viaj ŝanĝoj por permane kunfandi ilin.", + + "login": "Ensaluti", + "login.code.label.login": "Ensaluta kodo", + "login.code.label.password-reset": "Kodo por restarigi pasvorton", + "login.code.placeholder.email": "000 000", + "login.code.text.email": "Se via retpoŝtadreso estas enregistrita, via kodo estis sendita retpoŝte", + "login.email.login.body": "Saluton {user.nameOrEmail},\n\nVi petis ensalutan kodon por la panelo de la retejo {site}.\nLa sekvanta kodo validos dum {timeout} minutoj:\n\n{code}\n\nSe vi ne petis ensalutan kodon, bonvolu ignori ĉi tiun mesaĝon, aŭ kontaktu vian sistem-administranton se vi havas demandojn.\nPro sekureco, bonvolu NE plusendi ĉi tiun mesaĝon.", + "login.email.login.subject": "Via ensaluta kodo", + "login.email.password-reset.body": "Saluton {user.nameOrEmail},\n\nVi petis kodon por restarigi vian pasvorton por la panelo de la retejo {site}.\nLa sekvanta kodo validos dum {timeout} minutoj:\n\n{code}\n\nSe vi ne petis kodon por restarigi vian pasvorton, bonvolu ignori ĉi tiun mesaĝon, aŭ kontaktu vian sistem-administranton se vi havas demandojn.\nPro sekureco, bonvolu NE plusendi ĉi tiun mesaĝon.", + "login.email.password-reset.subject": "Kodo por restarigi pasvorton", + "login.remember": "Daŭre tenu min ensalutita", + "login.reset": "Restarigi pasvorton", + "login.toggleText.code.email": "Ensaluti retpoŝte", + "login.toggleText.code.email-password": "Ensaluti per pasvorto", + "login.toggleText.password-reset.email": "Ĉu vi forgesis vian pasvorton?", + "login.toggleText.password-reset.email-password": "← Reen al ensaluto", + + "logout": "Elsaluti", + + "menu": "Menuo", + "meridiem": "atm/ptm", + "mime": "Tipo de aŭdvidaĵo", + "minutes": "Minutoj", + + "month": "Monato", + "months.april": "aprilo", + "months.august": "aŭgusto", + "months.december": "decembro", + "months.february": "februaro", + "months.january": "januaro", + "months.july": "julio", + "months.june": "junio", + "months.march": "marto", + "months.may": "majo", + "months.november": "novembro", + "months.october": "oktobro", + "months.september": "septembro", + + "more": "Pli", + "name": "Nomo", + "next": "Sekve", + "no": "ne", + "off": "ne", + "on": "jes", + "open": "Malfermi", + "open.newWindow": "Malfermi novan fenestron", + "options": "Opcioj", + "options.none": "Neniu opcio", + + "orientation": "Orientiĝo", + "orientation.landscape": "Horizontala", + "orientation.portrait": "Vertikala", + "orientation.square": "Kvadrata", + + "page.blueprint": "Ĉi tiu paĝo ankoraŭ ne havas planon. Vi povas difini planon ĉe /site/blueprints/pages/{blueprint}.yml", + "page.changeSlug": "Ŝanĝi URL", + "page.changeSlug.fromTitle": "Krei el titolo", + "page.changeStatus": "Ŝanĝi staton", + "page.changeStatus.position": "Bonvolu elekti ordon", + "page.changeStatus.select": "Elekti novan staton", + "page.changeTemplate": "Ŝanĝi ŝablonon", + "page.delete.confirm": "Ĉu vi certe volas forigi {title}?", + "page.delete.confirm.subpages": "Ĉi tiu paĝo havas subpaĝojn.
Ĉiuj subpaĝoj estos ankaŭ forigitaj.", + "page.delete.confirm.title": "Entajpu la titolon de la paĝo por konfirmi", + "page.draft.create": "Krei malneton", + "page.duplicate.appendix": "Kopii", + "page.duplicate.files": "Kopii dosierojn", + "page.duplicate.pages": "Kopii paĝojn", + "page.sort": "Ŝanĝi ordon", + "page.status": "Stato", + "page.status.draft": "Malneto", + "page.status.draft.description": "La paĝo estas malneto, kaj nur atingebla de ensalutitaj redaktantoj, aŭ per sekreta ligilo", + "page.status.listed": "Publika", + "page.status.listed.description": "La paĝo estas publika por ĉiuj ajn", + "page.status.unlisted": "Nelistata", + "page.status.unlisted.description": "La paĝo estas atingebla nur per URL", + + "pages": "Paĝoj", + "pages.empty": "Ankoraŭ neniu paĝo", + "pages.status.draft": "Malnetoj", + "pages.status.listed": "Publikigita", + "pages.status.unlisted": "Nelistata", + + "pagination.page": "Paĝo", + + "password": "Pasvorto", + "paste": "Alglui", + "paste.after": "Alglui post", + "pixel": "Pikselo", + "plugins": "Kromprogramoj", + "prev": "Antaŭe", + "preview": "Antaŭrigardi", + "remove": "Forigi", + "rename": "Ŝanĝi nomon", + "replace": "Anstataŭi", + "retry": "Provi denove", + "revert": "Malfari", + "revert.confirm": "Ĉu vi certe volas forigi ĉiujn nekonservitajn ŝanĝojn?", + + "role": "Rolo", + "role.admin.description": "La administranto havas ĉiujn rajtojn", + "role.admin.title": "Administranto", + "role.all": "Ĉiuj", + "role.empty": "Neniu uzanto havas ĉi tiun rolon", + "role.description.placeholder": "Neniu priskribo", + "role.nobody.description": "Ĉi tiu estas retrodefaŭlta rolo sen permesoj", + "role.nobody.title": "Neniu", + + "save": "Konservi", + "search": "Serĉi", + "search.min": "Entajpu {min} literojn por serĉi", + "search.all": "Montri ĉiujn", + "search.results.none": "Neniu rezulto", + + "section.required": "La sekcio estas deviga", + + "select": "Elekti", + "settings": "Agordoj", + "show": "Montri", + "size": "Grando", + "slug": "URL-nomo", + "sort": "Ordigi", + "title": "Titolo", + "template": "Ŝablono", + "today": "Hodiaŭ", + + "server": "Servilo", + + "site.blueprint": "La retejo ankoraŭ ne havas planon. Vi povas difini planon ĉe /site/blueprints/site.yml", + + "toolbar.button.code": "Kodo", + "toolbar.button.bold": "Grasa", + "toolbar.button.email": "Retpoŝto", + "toolbar.button.headings": "Titoloj", + "toolbar.button.heading.1": "Titolo 1", + "toolbar.button.heading.2": "Titolo 2", + "toolbar.button.heading.3": "Titolo 3", + "toolbar.button.heading.4": "Titolo 4", + "toolbar.button.heading.5": "Titolo 5", + "toolbar.button.heading.6": "Titolo 6", + "toolbar.button.italic": "Kursiva", + "toolbar.button.file": "Dosiero", + "toolbar.button.file.select": "Elekti dosieron", + "toolbar.button.file.upload": "Alŝuti dosieron", + "toolbar.button.link": "Ligilo", + "toolbar.button.paragraph": "Paragrafo", + "toolbar.button.strike": "Trastrekita", + "toolbar.button.ol": "Numerita listo", + "toolbar.button.underline": "Substrekita", + "toolbar.button.ul": "Bula listo", + + "translation.author": "Teamo Kirby", + "translation.direction": "demaldekstre", + "translation.name": "Esperanto", + "translation.locale": "eo", + + "upload": "Alŝuti", + "upload.error.cantMove": "Ne eblis movi la alŝutita dosiero", + "upload.error.cantWrite": "Ne eblis registri la dosieron en la diskon", + "upload.error.default": "Ne eblis alŝuti la dosieron", + "upload.error.extension": "Alŝutado haltita pro la dosiersufikso", + "upload.error.formSize": "La alŝutita dosiero estas pli granda ol la direktivo MAX_FILE_SIZE indikata en la formularo", + "upload.error.iniPostSize": "La alŝutita dosiero estas pli granda ol la direktivo post_max_size de php.ini", + "upload.error.iniSize": "La alŝutita dosiero estas pli granda ol la direktivo upload_max_filesize de php.ini", + "upload.error.noFile": "Neniu dosiero alŝutita", + "upload.error.noFiles": "Neniuj dosieroj alŝutitaj", + "upload.error.partial": "La dosiero estis nur parte alŝutita", + "upload.error.tmpDir": "Mankas provizora dosierujo", + "upload.errors": "Eraro", + "upload.progress": "Alŝutante...", + + "url": "URL", + "url.placeholder": "https://ekzemplo.com", + + "user": "Uzanto", + "user.blueprint": "Vi povas difini pluajn sekciojn kaj kampojn de formularo por ĉi tiu rolo de uzanto ĉe /site/blueprints/users/{blueprint}.yml", + "user.changeEmail": "Ŝanĝi retpoŝtadreson", + "user.changeLanguage": "Ŝanĝi lingvon", + "user.changeName": "Ŝangi la nomon de la uzanto", + "user.changePassword": "Ŝanĝi pasvorton", + "user.changePassword.new": "Nova pasvorto", + "user.changePassword.new.confirm": "Konfirmi la novan pasvorton...", + "user.changeRole": "Ŝanĝi rolon", + "user.changeRole.select": "Elekti novan rolon", + "user.create": "Aldoni novan uzanton", + "user.delete": "Forigi ĉi tiun uzanton", + "user.delete.confirm": "Ĉu vi certe volas forigi
{email}?", + + "users": "Uzantoj", + + "version": "Versio", + + "view.account": "Via konto", + "view.installation": "Instalado", + "view.languages": "Lingvoj", + "view.resetPassword": "Restarigi pasvorton", + "view.site": "Retejo", + "view.system": "Sistemo", + "view.users": "Uzantoj", + + "welcome": "Bonvenon", + "year": "Jaro", + "yes": "jes" +} diff --git a/kirby/i18n/translations/es_419.json b/kirby/i18n/translations/es_419.json index 1da05f3..15e3553 100644 --- a/kirby/i18n/translations/es_419.json +++ b/kirby/i18n/translations/es_419.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Agregar", + "author": "Author", "avatar": "Foto de perfil", "back": "Regresar", "cancel": "Cancelar", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Copiar", + "copy.all": "Copy all", "create": "Crear", "date": "Fecha", @@ -23,24 +29,28 @@ "days.tue": "Mar", "days.wed": "Mi\u00e9", + "debugging": "Debugging", + "delete": "Eliminar", "delete.all": "Eliminar todos", - "dimensions": "Dimensiones", - "disabled": "Desabilitado", - "discard": "Descartar", - "download": "Descargar", - "duplicate": "Duplicar", - "edit": "Editar", - "expand": "Expandir", - "expand.all": "Expandir todo", "dialog.files.empty": "No has seleccionado ningún archivo", "dialog.pages.empty": "No has seleccionado ninguna página", "dialog.users.empty": "No has seleccionado ningún usuario", + "dimensions": "Dimensiones", + "disabled": "Desabilitado", + "discard": "Descartar", + "download": "Descargar", + "duplicate": "Duplicar", + + "edit": "Editar", + "email": "Correo Electrónico", "email.placeholder": "correo@ejemplo.com", + "environment": "Environment", + "error.access.code": "Código inválido", "error.access.login": "Ingreso inválido", "error.access.panel": "No tienes permitido acceder al panel", @@ -92,6 +102,7 @@ "error.language.code": "Por favor introduce un código válido para el idioma", "error.language.duplicate": "El idioma ya existe", "error.language.name": "Por favor introduce un nombre válido para el idioma", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Por favor ingresa un correo electrónico valido", "error.license.verification": "La licencia no pude ser verificada", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "No está permitido cambiar el apéndice de URL para \"{slug}\".", "error.page.changeStatus.incomplete": "La página tiene errores y no puede ser publicada.", "error.page.changeStatus.permission": "El estado de esta página no se puede cambiar.", @@ -165,6 +178,7 @@ "error.user.password.undefined": "El usuario no tiene contraseña", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Por favor ingresa un rol valido", + "error.user.undefined": "El usuario no pudo ser encontrado", "error.user.update.permission": "No tienes permiso para actualizar al usuario \"{name}\"", "error.validation.accepted": "Por favor, confirma", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Por favor ingresa un URL válido", + "expand": "Expandir", + "expand.all": "Expandir todo", + "field.required": "Este campo es requerido", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Código", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "A\u00fan no existen entradas.", "field.users.empty": "Aún no ha seleccionado ningún usuario", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "\u00bfEst\u00e1s seguro que deseas eliminar este archivo?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hora", + "import": "Import", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Mantener mi sesión iniciada", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Retrato", "orientation.square": "Diapositiva", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Cambiar URL", "page.changeSlug.fromTitle": "Crear a partir del t\u00edtulo", "page.changeStatus": "Cambiar estado", @@ -417,7 +437,10 @@ "pagination.page": "Página", "password": "Contrase\u00f1a", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Anterior", "preview": "Preview", "remove": "Eliminar", @@ -454,6 +477,8 @@ "template": "Plantilla", "today": "Hoy", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Código", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Encabezado 1", "toolbar.button.heading.2": "Encabezado 2", "toolbar.button.heading.3": "Encabezado 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Texto en It\u00e1licas", "toolbar.button.file": "Archivo", "toolbar.button.file.select": "Selecciona un archivo", "toolbar.button.file.upload": "Sube un archivo", "toolbar.button.link": "Enlace", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Lista en orden", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://ejemplo.com", "user": "Usuario", - "user.blueprint": "Puedes definir secciones adicionales y campos de formulario para este rol de usuario en /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Cambiar correo electrónico", "user.changeLanguage": "Cambiar idioma", "user.changeName": "Renombrar este usuario", @@ -516,9 +545,10 @@ "view.account": "Tu cuenta", "view.installation": "Instalaci\u00f3n", + "view.languages": "Idiomas", "view.resetPassword": "Reset password", - "view.settings": "Ajustes", "view.site": "Sitio", + "view.system": "System", "view.users": "Usuarios", "welcome": "Bienvenido", diff --git a/kirby/i18n/translations/es_ES.json b/kirby/i18n/translations/es_ES.json index 35664f8..e7ea844 100644 --- a/kirby/i18n/translations/es_ES.json +++ b/kirby/i18n/translations/es_ES.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Añadir", + "author": "Author", "avatar": "Foto de perfil", "back": "Atrás", "cancel": "Cancelar", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Copiar", + "copy.all": "Copy all", "create": "Crear", "date": "Fecha", @@ -23,24 +29,28 @@ "days.tue": "Ma", "days.wed": "Mi", + "debugging": "Debugging", + "delete": "Borrar", "delete.all": "Delete all", - "dimensions": "Dimensiones", - "disabled": "Desabilitado", - "discard": "Descartar", - "download": "Descargar", - "duplicate": "Duplicar", - "edit": "Editar", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No se ha seleccionado ningún archivo", "dialog.pages.empty": "No se ha seleccionado ninguna página", "dialog.users.empty": "No se ha seleccionado ningún usuario", + "dimensions": "Dimensiones", + "disabled": "Desabilitado", + "discard": "Descartar", + "download": "Descargar", + "duplicate": "Duplicar", + + "edit": "Editar", + "email": "Correo electrónico", "email.placeholder": "correo@ejemplo.com", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Ingreso inválido", "error.access.panel": "No estás autorizado para acceder al panel", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Por favor, introduce un correo electrónico válido", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "No está permitido cambiar el apéndice de URL para \"{slug}\"", "error.page.changeStatus.incomplete": "La página tiene errores y no puede ser publicada.", "error.page.changeStatus.permission": "El estado de esta página no se puede cambiar", @@ -165,6 +178,7 @@ "error.user.password.undefined": "El usuario no tiene contraseña", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Por favor ingrese un rol válido", + "error.user.undefined": "El usuario no puede ser encontrado", "error.user.update.permission": "No tienes permitido actualizar al usuario \"{name}\"", "error.validation.accepted": "Por favor, confirma", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Por favor introduzca un URL válido", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Código", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Aún no hay entradas", "field.users.empty": "Aún no hay usuarios seleccionados", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "¿Realmente quieres eliminar
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hora", + "import": "Import", "insert": "Insertar", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Mantener sesión iniciada", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Retrato", "orientation.square": "Cuadrado", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Cambiar URL", "page.changeSlug.fromTitle": "Crear en base al título", "page.changeStatus": "Cambiar estado", @@ -417,7 +437,10 @@ "pagination.page": "Página", "password": "Contraseña", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Anterior", "preview": "Preview", "remove": "Eliminar", @@ -454,6 +477,8 @@ "template": "Plantilla", "today": "Hoy", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Código", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Encabezado 1", "toolbar.button.heading.2": "Encabezado 2", "toolbar.button.heading.3": "Encabezado 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Italica", "toolbar.button.file": "Archivo", "toolbar.button.file.select": "Seleccione un archivo", "toolbar.button.file.upload": "Sube un archivo", "toolbar.button.link": "Enlace", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Lista ordenada", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://ejemplo.com", "user": "Usuario", - "user.blueprint": "Puede definir secciones adicionales y campos de formulario para este rol de usuario en /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Cambiar correo electrónico", "user.changeLanguage": "Cambiar idioma", "user.changeName": "Renombrar a este usuario", @@ -516,9 +545,10 @@ "view.account": "Su cuenta", "view.installation": "Instalación", + "view.languages": "Idiomas", "view.resetPassword": "Reset password", - "view.settings": "Ajustes", "view.site": "Sitio", + "view.system": "System", "view.users": "Usuarios", "welcome": "Bienvenido(a)", diff --git a/kirby/i18n/translations/fa.json b/kirby/i18n/translations/fa.json index 3b3283a..1dbdc71 100644 --- a/kirby/i18n/translations/fa.json +++ b/kirby/i18n/translations/fa.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "\u0627\u0641\u0632\u0648\u062f\u0646", + "author": "Author", "avatar": "\u062a\u0635\u0648\u06cc\u0631 \u067e\u0631\u0648\u0641\u0627\u06cc\u0644", "back": "بازگشت", "cancel": "\u0627\u0646\u0635\u0631\u0627\u0641", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "کپی", + "copy.all": "Copy all", "create": "ایجاد", "date": "تاریخ", @@ -23,24 +29,28 @@ "days.tue": "\u0633\u0647 \u0634\u0646\u0628\u0647", "days.wed": "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", + "debugging": "Debugging", + "delete": "\u062d\u0630\u0641", "delete.all": "Delete all", - "dimensions": "ابعاد", - "disabled": "Disabled", - "discard": "\u0627\u0646\u0635\u0631\u0627\u0641", - "download": "Download", - "duplicate": "Duplicate", - "edit": "\u0648\u06cc\u0631\u0627\u06cc\u0634", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "ابعاد", + "disabled": "Disabled", + "discard": "\u0627\u0646\u0635\u0631\u0627\u0641", + "download": "Download", + "duplicate": "Duplicate", + + "edit": "\u0648\u06cc\u0631\u0627\u06cc\u0634", + "email": "\u067e\u0633\u062a \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "اطلاعات ورودی نامعتبر است", "error.access.panel": "شما اجازه دسترسی به پانل را ندارید", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "لطفا ایمیل صحیحی وارد کنید", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "شما امکان تغییر پسوند Url صفحه «{slug}» را ندارید", "error.page.changeStatus.incomplete": "صفحه حاوی خطا است و قابل انتشار نیست", "error.page.changeStatus.permission": "وضعیت صفحه جاری قابل تغییر نیست", @@ -165,6 +178,7 @@ "error.user.password.undefined": "کاربر فاقد گذرواژه است", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "لطفا نقش صحیحی وارد نمایید", + "error.user.undefined": "کاربر مورد نظر پیدا نشد", "error.user.update.permission": "شما اجازه بروزرسانی کاربر «{name}» را ندارید", "error.validation.accepted": "لطفا تایید کنید", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "لطفا آدرس URL صحیح وارد کنید", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "کد", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "\u0645\u0648\u0631\u062f\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f.", "field.users.empty": "کاربری انتخاب نشده است", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "آیا واقعا می خواهید این فایل را حذف کنید؟
{filename}", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "ساعت", + "import": "Import", "insert": "\u062f\u0631\u062c", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "مرا به خاطر بسپار", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "عمودی", "orientation.square": "مربع", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "تغییر Url صفحه", "page.changeSlug.fromTitle": "\u0627\u06cc\u062c\u0627\u062f \u0627\u0632 \u0631\u0648\u06cc \u0639\u0646\u0648\u0627\u0646", "page.changeStatus": "تغییر وضعیت", @@ -417,7 +437,10 @@ "pagination.page": "صفحه", "password": "\u06af\u0630\u0631\u0648\u0627\u0698\u0647", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "پیکسل", + "plugins": "Plugins", "prev": "قبلی", "preview": "Preview", "remove": "حذف", @@ -454,6 +477,8 @@ "template": "\u0642\u0627\u0644\u0628 \u0635\u0641\u062d\u0647", "today": "امروز", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "کد", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "عنوان 1", "toolbar.button.heading.2": "عنوان 2", "toolbar.button.heading.3": "عنوان 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "\u0645\u062a\u0646 \u0627\u0631\u06cc\u0628", "toolbar.button.file": "فایل", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "\u067e\u06cc\u0648\u0646\u062f", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "لیست مرتب", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "کاربر", - "user.blueprint": "شما می توانید قسمت‌های اضافی و فیلدهای فرم را برای این نقش کاربر در /site/blueprints/users/{role}.yml تعریف کنید", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "تغییر ایمیل", "user.changeLanguage": "تغییر زبان", "user.changeName": "تغییر نام این کاربر", @@ -516,9 +545,10 @@ "view.account": "حساب کاربری شما", "view.installation": "\u0646\u0635\u0628 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc", + "view.languages": "زبان‌ها", "view.resetPassword": "Reset password", - "view.settings": "تنظیمات", "view.site": "سایت", + "view.system": "System", "view.users": "\u06a9\u0627\u0631\u0628\u0631\u0627\u0646", "welcome": "خوش آمدید", diff --git a/kirby/i18n/translations/fi.json b/kirby/i18n/translations/fi.json index f1c5410..b4456cb 100644 --- a/kirby/i18n/translations/fi.json +++ b/kirby/i18n/translations/fi.json @@ -1,14 +1,20 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Lis\u00e4\u00e4", + "author": "Author", "avatar": "Profiilikuva", "back": "Takaisin", "cancel": "Peruuta", "change": "Muuta", "close": "Sulje", "confirm": "Ok", - "collapse": "Collapse", - "collapse.all": "Collapse All", + "collapse": "Pienennä", + "collapse.all": "Pienennä kaikki", "copy": "Kopioi", + "copy.all": "Copy all", "create": "Luo", "date": "Päivämäärä", @@ -23,25 +29,29 @@ "days.tue": "Ti", "days.wed": "Ke", + "debugging": "Debugging", + "delete": "Poista", - "delete.all": "Delete all", - "dimensions": "Mitat", - "disabled": "Disabled", - "discard": "Hylkää", - "download": "Lataa", - "duplicate": "Kahdenna", - "edit": "Muokkaa", - "expand": "Expand", - "expand.all": "Expand All", + "delete.all": "Poista kaikki", "dialog.files.empty": "Ei valittavissa olevia tiedostoja", "dialog.pages.empty": "Ei valittavissa olevia sivuja", "dialog.users.empty": "Ei valittavissa olevia käyttäjiä", + "dimensions": "Mitat", + "disabled": "Pois käytöstä", + "discard": "Hylkää", + "download": "Lataa", + "duplicate": "Kahdenna", + + "edit": "Muokkaa", + "email": "S\u00e4hk\u00f6posti", "email.placeholder": "nimi@osoite.fi", - "error.access.code": "Invalid code", + "environment": "Environment", + + "error.access.code": "Väärä koodi", "error.access.login": "Kirjautumistiedot eivät kelpaa", "error.access.panel": "Sinulla ei ole oikeutta käyttää paneelia", "error.access.view": "Sinulla ei ole oikeutta käyttää tätä osaa paneelista", @@ -51,13 +61,13 @@ "error.avatar.dimensions.invalid": "Profiilikuvan leveys ja korkeus voivat olla enintään 3000 pikseliä", "error.avatar.mime.forbidden": "Profiilikuvan täytyy olla joko JPEG- tai PNG-formaatissa", - "error.blueprint.notFound": "Kaavaa \"{name}\" ei voitu ladata", + "error.blueprint.notFound": "Suunnitelmaa \"{name}\" ei voitu ladata", - "error.blocks.max.plural": "You must not add more than {max} blocks", - "error.blocks.max.singular": "You must not add more than one block", - "error.blocks.min.plural": "You must add at least {min} blocks", - "error.blocks.min.singular": "You must add at least one block", - "error.blocks.validation": "There's an error in block {index}", + "error.blocks.max.plural": "Voit lisätä enintään {max} lohkoa", + "error.blocks.max.singular": "Voit lisätä enintään yhden lohkon", + "error.blocks.min.plural": "Lisää vähintään {min} lohkoa", + "error.blocks.min.singular": "Lisää vähintään yksi lohko", + "error.blocks.validation": "Virhe lohkossa {index}", "error.email.preset.notFound": "Nimellä \"{name}\" ja kyseisellä verkkotunnuksella ei löydy sähköpostiosoitetta", @@ -65,41 +75,44 @@ "error.file.changeName.empty": "Nimi ei voi olla tyhjä", "error.file.changeName.permission": "Sinulla ei ole oikeutta muuttaa tiedoston \"{filename}\" nimeä", - "error.file.duplicate": "Tiedosto nimellä \"{filename}\" on jo olemassa", + "error.file.duplicate": "Tiedosto nimeltä \"{filename}\" on jo olemassa", "error.file.extension.forbidden": "Tiedostopääte \"{extension}\" ei ole sallittu", - "error.file.extension.invalid": "Invalid extension: {extension}", + "error.file.extension.invalid": "Pääte {extension} ei kelpaa", "error.file.extension.missing": "Tiedoston \"{filename}\" tiedostopääte puuttuu", - "error.file.maxheight": "The height of the image must not exceed {height} pixels", - "error.file.maxsize": "The file is too large", - "error.file.maxwidth": "The width of the image must not exceed {width} pixels", + "error.file.maxheight": "Kuvan korkeus ei voi ylittää {height} pikseliä", + "error.file.maxsize": "Tiedosto on liian suuri", + "error.file.maxwidth": "Kuvan leveys ei voi ylittää {width} pikseliä", "error.file.mime.differs": "Lähetetyllä tiedostolla täytyy olla sama mime-tyyppi \"{mime}\"", "error.file.mime.forbidden": "Median tyyppi \"{mime}\" ei ole sallittu", - "error.file.mime.invalid": "Invalid mime type: {mime}", + "error.file.mime.invalid": "Mime-tyyppi {mime} ei kelpaa", "error.file.mime.missing": "Tiedoston \"{filename}\" mediatyyppiä ei voida tunnistaa", - "error.file.minheight": "The height of the image must be at least {height} pixels", - "error.file.minsize": "The file is too small", - "error.file.minwidth": "The width of the image must be at least {width} pixels", + "error.file.minheight": "Kuvan korkeus täytyy olla vähintään {height} pikseliä", + "error.file.minsize": "Tiedosto on liian pieni", + "error.file.minwidth": "Kuvan leveys täytyy olla vähintään {width} pikseliä", "error.file.name.missing": "Tiedostonimi ei voi olla tyhjä", "error.file.notFound": "Tiedostoa \"{filename}\" ei löytynyt", - "error.file.orientation": "The orientation of the image must be \"{orientation}\"", + "error.file.orientation": "Kuvan suuntaus täytyy olla \"{orientation}\"", "error.file.type.forbidden": "Sinulla ei ole oikeutta lähettää tiedostoja joiden tyyppi on {type}", - "error.file.type.invalid": "Invalid file type: {type}", + "error.file.type.invalid": "Tiedostotyyppi {type} ei kelpaa", "error.file.undefined": "Tiedostoa ei l\u00f6ytynyt", - "error.form.incomplete": "Korjaa kaikki lomakkeen virheet...", + "error.form.incomplete": "Korjaa kaikki lomakkeen virheet…", "error.form.notSaved": "Lomaketta ei voitu tallentaa", "error.language.code": "Anna kielen lyhenne", "error.language.duplicate": "Kieli on jo olemassa", "error.language.name": "Anna kielen nimi", + "error.language.notFound": "The language could not be found", - "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", - "error.layout.validation.settings": "There's an error in layout {index} settings", + "error.layout.validation.block": "Lohkon {blockIndex} asetelmassa {layoutIndex} tapahtui virhe", + "error.layout.validation.settings": "Virhe asetelman {index} asetuksissa", "error.license.format": "Anna lisenssiavain", - "error.license.email": "Anna kelpaava sähköpostiosoite", + "error.license.email": "Anna sähköpostiosoite", "error.license.verification": "Lisenssiä ei voitu vahvistaa", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Sinulla ei ole oikeutta muuttaa URL-liitettä sivulle \"{slug}\"", "error.page.changeStatus.incomplete": "Sivulla on virheitä eikä sitä voitu julkaista", "error.page.changeStatus.permission": "Tämän sivun tilaa ei voi muuttaa", @@ -118,8 +131,8 @@ "error.page.duplicate.permission": "Sinulla ei ole oikeutta kahdentaa sivua \"{slug}\"", "error.page.notFound": "Sivua \"{slug}\" ei löytynyt", "error.page.num.invalid": "Anna kelpaava järjestysnumero. Numero ei voi olla negatiivinen.", - "error.page.slug.invalid": "Please enter a valid URL appendix", - "error.page.slug.maxlength": "Slug length must be less than \"{length}\" characters", + "error.page.slug.invalid": "Anna kelpaava URL-liite", + "error.page.slug.maxlength": "URL-liite täytyy olla vähemmän kuin \"{length}\" merkkiä pitkä", "error.page.sort.permission": "Sivua \"{slug}\" ei voi järjestellä", "error.page.status.invalid": "Aseta kelvollinen sivun tila", "error.page.undefined": "Sivua ei l\u00f6ytynyt", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Anna kelpaava salasana. Salasanan täytyy olla ainakin 8 merkkiä pitkä.", "error.user.password.notSame": "Salasanat eivät täsmää", "error.user.password.undefined": "Käyttäjällä ei ole salasanaa", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Väärä salasana", "error.user.role.invalid": "Anna kelpaava käyttäjätaso", + "error.user.undefined": "Käyttäjää ei löytynyt", "error.user.update.permission": "Sinulla ei ole oikeutta päivittää käyttäjää \"{name}\"", "error.validation.accepted": "Ole hyvä ja vahvista", @@ -203,78 +217,84 @@ "error.validation.size": "Arvon koko täytyy olla \"{size}\"", "error.validation.startswith": "Arvon alkuosa täytyy olla \"{start}\"", "error.validation.time": "Anna kelpaava aika", - "error.validation.time.after": "Please enter a time after {time}", - "error.validation.time.before": "Please enter a time before {time}", - "error.validation.time.between": "Please enter a time between {min} and {max}", + "error.validation.time.after": "Anna myöhempi aika kuin {time}", + "error.validation.time.before": "Anna aiempi aika kuin {time}", + "error.validation.time.between": "Anna aika väliltä {min} ja {max}", "error.validation.url": "Anna kelpaava URL", + "expand": "Laajenna", + "expand.all": "Laajenna kaikki", + "field.required": "Kenttä on pakollinen", - "field.blocks.changeType": "Change type", + "field.blocks.changeType": "Vaihda tyyppiä", "field.blocks.code.name": "Koodi", "field.blocks.code.language": "Kieli", - "field.blocks.code.placeholder": "Your code …", - "field.blocks.delete.confirm": "Do you really want to delete this block?", - "field.blocks.delete.confirm.all": "Do you really want to delete all blocks?", - "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", - "field.blocks.empty": "No blocks yet", - "field.blocks.fieldsets.label": "Please select a block type …", - "field.blocks.gallery.name": "Gallery", - "field.blocks.gallery.images.empty": "No images yet", - "field.blocks.gallery.images.label": "Images", - "field.blocks.heading.level": "Level", - "field.blocks.heading.name": "Heading", - "field.blocks.heading.text": "Text", - "field.blocks.heading.placeholder": "Heading …", - "field.blocks.image.alt": "Alternative text", - "field.blocks.image.caption": "Caption", - "field.blocks.image.crop": "Crop", + "field.blocks.code.placeholder": "Koodisi …", + "field.blocks.delete.confirm": "Haluatko varmasti poistaa tämän lohkon?", + "field.blocks.delete.confirm.all": "Haluatko varmasti poistaa kaikki lohkot?", + "field.blocks.delete.confirm.selected": "Haluatko varmasti poistaa valitut lohkot?", + "field.blocks.empty": "Ei lohkoja", + "field.blocks.fieldsets.label": "Valitse lohkon tyyppi …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", + "field.blocks.gallery.name": "Galleria", + "field.blocks.gallery.images.empty": "Ei kuvia", + "field.blocks.gallery.images.label": "Kuvat", + "field.blocks.heading.level": "Taso", + "field.blocks.heading.name": "Otsikko", + "field.blocks.heading.text": "Teksti", + "field.blocks.heading.placeholder": "Otsikko …", + "field.blocks.image.alt": "Vaihtoehtoinen teksti", + "field.blocks.image.caption": "Kuvateksti", + "field.blocks.image.crop": "Rajaa", "field.blocks.image.link": "Linkki", - "field.blocks.image.location": "Location", + "field.blocks.image.location": "Sijainti", "field.blocks.image.name": "Kuva", - "field.blocks.image.placeholder": "Select an image", - "field.blocks.image.ratio": "Ratio", - "field.blocks.image.url": "Image URL", - "field.blocks.list.name": "List", + "field.blocks.image.placeholder": "Valitse kuva", + "field.blocks.image.ratio": "Kuvasuhde", + "field.blocks.image.url": "Kuvan URL", + "field.blocks.line.name": "Line", + "field.blocks.list.name": "Lista", "field.blocks.markdown.name": "Markdown", - "field.blocks.markdown.label": "Text", + "field.blocks.markdown.label": "Teksti", "field.blocks.markdown.placeholder": "Markdown …", - "field.blocks.quote.name": "Quote", - "field.blocks.quote.text.label": "Text", - "field.blocks.quote.text.placeholder": "Quote …", - "field.blocks.quote.citation.label": "Citation", - "field.blocks.quote.citation.placeholder": "by …", - "field.blocks.text.name": "Text", - "field.blocks.text.placeholder": "Text …", - "field.blocks.video.caption": "Caption", + "field.blocks.quote.name": "Lainaus", + "field.blocks.quote.text.label": "Teksti", + "field.blocks.quote.text.placeholder": "Lainaus …", + "field.blocks.quote.citation.label": "Sitaatti", + "field.blocks.quote.citation.placeholder": "Lähde …", + "field.blocks.text.name": "Teksti", + "field.blocks.text.placeholder": "Teksti …", + "field.blocks.video.caption": "Videon teksti", "field.blocks.video.name": "Video", - "field.blocks.video.placeholder": "Enter a video URL", - "field.blocks.video.url.label": "Video-URL", + "field.blocks.video.placeholder": "Anna videon URL", + "field.blocks.video.url.label": "Videon URL", "field.blocks.video.url.placeholder": "https://youtube.com/?v=", "field.files.empty": "Tiedostoja ei ole vielä valittu", - "field.layout.delete": "Delete layout", - "field.layout.delete.confirm": "Do you really want to delete this layout?", - "field.layout.empty": "No rows yet", - "field.layout.select": "Select a layout", + "field.layout.delete": "Poista asettelu", + "field.layout.delete.confirm": "Halutako varmasti poistaa tämän asettelun?", + "field.layout.empty": "Ei rivejä", + "field.layout.select": "Valitse asettelu", "field.pages.empty": " Sivuja ei ole vielä valittu", "field.structure.delete.confirm": "Haluatko varmasti poistaa tämän rivin?", "field.structure.empty": "Rivejä ei ole vielä lisätty", "field.users.empty": "Käyttäjiä ei ole vielä valittu", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Haluatko varmasti poistaa tiedoston
{filename}?", - "file.sort": "Change position", + "file.sort": "Muuta järjestyspaikkaa", "files": "Tiedostot", "files.empty": "Tiedostoja ei ole vielä lisätty", - "hide": "Hide", + "hide": "Piilota", "hour": "Tunti", + "import": "Import", "insert": "Lis\u00e4\u00e4", - "insert.after": "Insert after", - "insert.before": "Insert before", + "insert.after": "Lisää eteen", + "insert.before": "Lisää jälkeen", "install": "Asenna", "installation": "Asennus", @@ -300,8 +320,8 @@ "language.direction": "Lukusuunta", "language.direction.ltr": "Vasemmalta oikealle", "language.direction.rtl": "Oikealta vasemmalle", - "language.locale": "PHP-lokaalin tunniste", - "language.locale.warning": "You are using a custom locale set up. Please modify it in the language file in /site/languages", + "language.locale": "PHP-aluemäärityksen tunniste", + "language.locale.warning": "Käytät mukautettua aluemääritystä. Muokkaa sitä kielitiedostossa /site/languages", "language.name": "Nimi", "language.updated": "Kieli on päivitetty", @@ -325,28 +345,28 @@ "loading": "Ladataan", "lock.unsaved": "Tallentamattomia muutoksia", - "lock.unsaved.empty": "There are no more unsaved changes", + "lock.unsaved.empty": "Ei enempää tallentamattomia muutoksia ", "lock.isLocked": "Käyttäjällä {email} on tallentamattomia muutoksia", - "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", - "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", + "lock.file.isLocked": "Tiedostoa ei voi muokata juuri nyt, sillä {email} on muokkaamassa tiedostoa.", + "lock.page.isLocked": "Sivua ei voi muokata juuri nyt, sillä {email} on muokkaamassa sivua.", "lock.unlock": "Vapauta", - "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "lock.isUnlocked": "Toinen käyttäjä ylikirjoitti tallentamattomat muutoksesi. Voit ladata tekemäsi muutokset ja lisätä ne käsin.", "login": "Kirjaudu", - "login.code.label.login": "Login code", - "login.code.label.password-reset": "Password reset code", + "login.code.label.login": "Kirjautumiskoodi", + "login.code.label.password-reset": "Salasanan asetuskoodi", "login.code.placeholder.email": "000 000", - "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", - "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", - "login.email.password-reset.subject": "Your password reset code", + "login.code.text.email": "Jos sähköpostiosoitteesi on rekisteröity, tilaamasi koodi lähetetään tähän osoitteeseen.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.subject": "Kirjautumiskoodisi", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.subject": "Salasanan asetuskoodisi", "login.remember": "Pidä minut kirjautuneena", - "login.reset": "Reset password", - "login.toggleText.code.email": "Login via email", - "login.toggleText.code.email-password": "Login with password", - "login.toggleText.password-reset.email": "Forgot your password?", - "login.toggleText.password-reset.email-password": "← Back to login", + "login.reset": "Aseta salasana", + "login.toggleText.code.email": "Kirjaudu sähköpostiosoitteella", + "login.toggleText.code.email-password": "Kirjaudu salasanalla", + "login.toggleText.password-reset.email": "Unohditko salasanasi?", + "login.toggleText.password-reset.email-password": "← Takaisin kirjautumiseen", "logout": "Kirjaudu ulos", @@ -372,20 +392,20 @@ "more": "Lisää", "name": "Nimi", "next": "Seuraava", - "no": "no", - "off": "off", - "on": "on", + "no": "ei", + "off": "Pois käytöstä", + "on": "Käytössä", "open": "Avaa", - "open.newWindow": "Open in new window", + "open.newWindow": "Avaa uudessa ikkunassa", "options": "Asetukset", - "options.none": "No options", + "options.none": "Ei valintoja", "orientation": "Suunta", "orientation.landscape": "Vaakasuuntainen", "orientation.portrait": "Pystysuuntainen", "orientation.square": "Neliskulmainen", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Vaihda URL-osoite", "page.changeSlug.fromTitle": "Luo nimen perusteella", "page.changeStatus": "Muuta tilaa", @@ -397,12 +417,12 @@ "page.delete.confirm.title": "Anna vahvistuksena sivun nimi", "page.draft.create": "Uusi luonnos", "page.duplicate.appendix": "Kopioi", - "page.duplicate.files": "Copy files", - "page.duplicate.pages": "Copy pages", - "page.sort": "Change position", + "page.duplicate.files": "Kopioi tiedostot", + "page.duplicate.pages": "Kopioi sivut", + "page.sort": "Muuta järjestyspaikkaa", "page.status": "Tila", "page.status.draft": "Luonnos", - "page.status.draft.description": "The page is in draft mode and only visible for logged in editors or via secret link", + "page.status.draft.description": "Sivu on luonnostilassa ja näkyvissä vain kirjautuneille editoijille tai yksityisen linkin kautta", "page.status.listed": "Julkinen", "page.status.listed.description": "Sivu on julkinen kaikille", "page.status.unlisted": "Listaamaton", @@ -417,15 +437,18 @@ "pagination.page": "Sivu", "password": "Salasana", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pikseli", + "plugins": "Plugins", "prev": "Edellinen", - "preview": "Preview", + "preview": "Esikatselu", "remove": "Poista", "rename": "Nimeä uudelleen", "replace": "Korvaa", "retry": "Yrit\u00e4 uudelleen", "revert": "Palauta", - "revert.confirm": "Do you really want to delete all unsaved changes?", + "revert.confirm": "Haluatko varmasti poistaa kaikki tallentamattomat muutokset?", "role": "K\u00e4ytt\u00e4j\u00e4taso", "role.admin.description": "Pääkäyttäjällä on kaikki oikeudet", @@ -433,20 +456,20 @@ "role.all": "Kaikki", "role.empty": "Tällä käyttäjätasolla ei ole yhtään käyttäjää", "role.description.placeholder": "Ei kuvausta", - "role.nobody.description": "This is a fallback role without any permissions", - "role.nobody.title": "Nobody", + "role.nobody.description": "Tämä on vararooli, jolla ei ole mitään oikeuksia", + "role.nobody.title": "Tuntematon", "save": "Tallenna", "search": "Haku", - "search.min": "Enter {min} characters to search", - "search.all": "Show all", - "search.results.none": "No results", + "search.min": "Anna vähintään {min} merkkiä hakua varten", + "search.all": "Näytä kaikki", + "search.results.none": "Ei tuloksia", "section.required": "Osio on pakollinen", "select": "Valitse", "settings": "Asetukset", - "show": "Show", + "show": "Näytä", "size": "Koko", "slug": "URL-tunniste", "sort": "Järjestele", @@ -454,7 +477,9 @@ "template": "Sivupohja", "today": "Tänään", - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", + "server": "Server", + + "site.blueprint": "Tällä sivustolla ei ole vielä suunnitelmaa. Voit määrittää suunnitelman tiedostoon /site/blueprints/site.yml", "toolbar.button.code": "Koodi", "toolbar.button.bold": "Lihavointi", @@ -463,14 +488,18 @@ "toolbar.button.heading.1": "Otsikko 1", "toolbar.button.heading.2": "Otsikko 2", "toolbar.button.heading.3": "Otsikko 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Kursivointi", "toolbar.button.file": "Tiedosto", "toolbar.button.file.select": "Valitse tiedosto", "toolbar.button.file.upload": "Lähetä tiedosto", "toolbar.button.link": "Linkki", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Paragraph", + "toolbar.button.strike": "Yliviivaus", "toolbar.button.ol": "Järjestetty lista", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Alaviiva", "toolbar.button.ul": "Järjestämätön lista", "translation.author": "Kirby-tiimi", @@ -482,14 +511,14 @@ "upload.error.cantMove": "Lähetettyä tiedostoa ei voitu siirtää", "upload.error.cantWrite": "Tiedoston kirjoitus levylle epäonnistui", "upload.error.default": "Tiedostoa ei voitu lähettää", - "upload.error.extension": "File upload stopped by extension", + "upload.error.extension": "Tiedostoa ei lähetetty tiedostopäätteen takia", "upload.error.formSize": "Lähetetyn tiedoston koko ylittää lomakkeen sallitun ylärajan MAX_FILE_SIZE", "upload.error.iniPostSize": "Lähetetyn tiedoston koko ylittää sallitun ylärajan post_max_size asetustiedostossa php.ini", "upload.error.iniSize": "Lähetetyn tiedoston koko ylittää sallitun ylärajan upload_max_filesize asetustiedostossa php.ini", "upload.error.noFile": "Tiedostoa ei lähetetty", "upload.error.noFiles": "Tiedostoja ei lähetetty", - "upload.error.partial": "The uploaded file was only partially uploaded", - "upload.error.tmpDir": "Missing a temporary folder", + "upload.error.partial": "Tiedoston lähetys onnistui vain osittain", + "upload.error.tmpDir": "Väliaikainen hakemisto puuttuu", "upload.errors": "Virhe", "upload.progress": "Lähetetään...", @@ -497,7 +526,7 @@ "url.placeholder": "https://esimerkki.fi", "user": "Käyttäjä", - "user.blueprint": "Voit määrittää lisää osioita ja lomakekenttiä tälle käyttäjälle kaavassa /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Muuta sähköpostiosoite", "user.changeLanguage": "Vaihda kieli", "user.changeName": "Nimeä uudelleen", @@ -516,12 +545,13 @@ "view.account": "Oma käyttäjätili", "view.installation": "Asennus", - "view.resetPassword": "Reset password", - "view.settings": "Asetukset", + "view.languages": "Kielet", + "view.resetPassword": "Aseta salasana", "view.site": "Sivusto", + "view.system": "System", "view.users": "K\u00e4ytt\u00e4j\u00e4t", "welcome": "Tervetuloa", "year": "Vuosi", - "yes": "yes" + "yes": "kyllä" } diff --git a/kirby/i18n/translations/fr.json b/kirby/i18n/translations/fr.json index 3297e81..fa1bbf4 100644 --- a/kirby/i18n/translations/fr.json +++ b/kirby/i18n/translations/fr.json @@ -1,5 +1,10 @@ { + "account.changeName": "Modifier votre nom", + "account.delete": "Supprimer votre compte", + "account.delete.confirm": "Voulez-vous vraiment supprimer votre compte ? Vous serez déconnecté immédiatement. Votre compte ne pourra pas être récupéré.", + "add": "Ajouter", + "author": "Auteur", "avatar": "Image du profil", "back": "Retour", "cancel": "Annuler", @@ -9,6 +14,7 @@ "collapse": "Replier", "collapse.all": "Tout replier", "copy": "Copier", + "copy.all": "Tout copier", "create": "Créer", "date": "Date", @@ -23,24 +29,28 @@ "days.tue": "Mar", "days.wed": "Mer", + "debugging": "Débogage", + "delete": "Supprimer", "delete.all": "Tout supprimer", - "dimensions": "Dimensions", - "disabled": "Désactivé", - "discard": "Supprimer", - "download": "Télécharger", - "duplicate": "Dupliquer", - "edit": "Éditer", - "expand": "Déplier", - "expand.all": "Tout déplier", "dialog.files.empty": "Aucun fichier à sélectionner", "dialog.pages.empty": "Aucune page à sélectionner", "dialog.users.empty": "Aucun utilisateur à sélectionner", + "dimensions": "Dimensions", + "disabled": "Désactivé", + "discard": "Supprimer", + "download": "Télécharger", + "duplicate": "Dupliquer", + + "edit": "Éditer", + "email": "Courriel", "email.placeholder": "mail@example.com", + "environment": "Environnement", + "error.access.code": "Code incorrect", "error.access.login": "Identifiant incorrect", "error.access.panel": "Vous n’êtes pas autorisé à accéder au Panel", @@ -92,6 +102,7 @@ "error.language.code": "Veuillez saisir un code valide pour cette langue", "error.language.duplicate": "Cette langue existe déjà", "error.language.name": "Veuillez saisir un nom valide pour cette langue", + "error.language.notFound": "La langue n’a pu être trouvée", "error.layout.validation.block": "Il y a une erreur dans le block {blockIndex} de la disposition {layoutIndex}", "error.layout.validation.settings": "Il y a une erreur dans les paramètres de la disposition {index}", @@ -100,6 +111,8 @@ "error.license.email": "Veuillez saisir un courriel valide", "error.license.verification": "La licence n’a pu être vérifiée", + "error.offline": "Le Panel est actuellement hors ligne", + "error.page.changeSlug.permission": "Vous n’êtes pas autorisé à modifier l’identifiant d’URL pour « {slug} »", "error.page.changeStatus.incomplete": "La page comporte des erreurs et ne peut pas être publiée", "error.page.changeStatus.permission": "Le statut de cette page ne peut être modifié", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Cet utilisateur n’a pas de mot de passe", "error.user.password.wrong": "Mot de passe incorrect", "error.user.role.invalid": "Veuillez saisir un rôle valide", + "error.user.undefined": "L’utilisateur n’a pu être trouvé", "error.user.update.permission": "Vous n’êtes pas autorisé à modifier l’utilisateur « {name} »", "error.validation.accepted": "Veuillez confirmer", @@ -208,6 +222,9 @@ "error.validation.time.between": "Veuillez entrer une heure entre {min} et {max}", "error.validation.url": "Veuillez saisir une URL valide", + "expand": "Déplier", + "expand.all": "Tout déplier", + "field.required": "Le champ est obligatoire", "field.blocks.changeType": "Changer le type", "field.blocks.code.name": "Code", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Voulez-vous vraiment supprimer les blocs sélectionnés ?", "field.blocks.empty": "Pas encore de blocs", "field.blocks.fieldsets.label": "Veuillez sélectionner un type de bloc…", + "field.blocks.fieldsets.paste": "Presser {{ shortcut }} pour coller/importer des blocks depuis votre presse-papier", "field.blocks.gallery.name": "Galerie", "field.blocks.gallery.images.empty": "Pas encore d’images", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Sélectionnez une image", "field.blocks.image.ratio": "Proportions", "field.blocks.image.url": "URL de l'image", + "field.blocks.line.name": "Ligne", "field.blocks.list.name": "Liste", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Texte", @@ -263,7 +282,7 @@ "field.structure.empty": "Pas encore d’entrée", "field.users.empty": "Pas encore d’utilisateur sélectionné", - "file.blueprint": "Ce fichier n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/{template}.yml", + "file.blueprint": "Ce fichier n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Voulez-vous vraiment supprimer
{filename} ?", "file.sort": "Modifier la position", @@ -272,6 +291,7 @@ "hide": "Masquer", "hour": "Heure", + "import": "Importer", "insert": "Insérer", "insert.after": "Insérer après", "insert.before": "Insérer avant", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Code de réinitialisation du mot de passe", "login.code.placeholder.email": "000 000", "login.code.text.email": "Si votre adresse de courriel est enregistrée, le code demandé vous sera envoyé par courriel.", - "login.email.login.body": "Bonjour {user.nameOrEmail},\n\nVous avez demandé récemment un code de connexion pour le Panel de Kirby.\nLe code suivant sera valide pendant {timeout} minutes:\n\n{code}\n\nSi vous n’avez pas demandé de code de connexion, veuillez ignorer cet email ou contacter l’administrateur si vous avez des questions.\nPar sécurité, ne faites PAS suivre cet email.", + "login.email.login.body": "Bonjour {user.nameOrEmail},\n\nVous avez récemment demandé un code de connexion pour le Panel de {site}.\nLe codede connexion suivant sera valide pendant {timeout} minutes :\n\n{code}\n\nSi vous n’avez pas demandé de codede connexion, veuillez ignorer cet email ou contacter votre administrateur si vous avez des questions.\nPar sécurité, merci de ne PAS faire suivre cet email.", "login.email.login.subject": "Votre code de connexion", - "login.email.password-reset.body": "Bonjour {user.nameOrEmail},\n\nVous avez demandé récemment un code de connexion pour le Panel de Kirby.\nLe code suivant sera valide pendant {timeout} minutes:\n\n{code}\n\nSi vous n’avez pas demandé de code de connexion, veuillez ignorer ce courriel ou contacter l’administrateur si vous avez des questions.\nPar sécurité, ne faites PAS suivre ce courriel.", + "login.email.password-reset.body": "Bonjour {user.nameOrEmail},\n\nVous avez récemment demandé un code de réinitialisation de mot de passe pour le Panel de {site}.\nLe code de réinitialisation de mot de passe suivant sera valide pendant {timeout} minutes :\n\n{code}\n\nSi vous n’avez pas demandé de code de réinitialisation de mot de passe, veuillez ignorer cet email ou contacter votre administrateur si vous avez des questions.\nPar sécurité, merci de ne PAS faire suivre cet email.", "login.email.password-reset.subject": "Votre code de réinitialisation du mot de passe", "login.remember": "Rester connecté", "login.reset": "Réinitialiser le mot de passe", @@ -385,7 +405,7 @@ "orientation.portrait": "Portrait", "orientation.square": "Carré", - "page.blueprint": "Cette page n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/{template}.yml", + "page.blueprint": "Cette page n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Modifier l’URL", "page.changeSlug.fromTitle": "Créer à partir du titre", "page.changeStatus": "Changer le statut", @@ -417,7 +437,10 @@ "pagination.page": "Page", "password": "Mot de passe", + "paste": "Coller", + "paste.after": "Coller après", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Précédent", "preview": "Prévisualiser", "remove": "Supprimer", @@ -454,6 +477,8 @@ "template": "Modèle", "today": "Aujourd’hui", + "server": "Serveur", + "site.blueprint": "Ce site n’a pas encore de blueprint. Vous pouvez en définir les paramètres dans /site/blueprints/site.yml", "toolbar.button.code": "Code", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Titre 1", "toolbar.button.heading.2": "Titre 2", "toolbar.button.heading.3": "Titre 3", + "toolbar.button.heading.4": "Titre 4", + "toolbar.button.heading.5": "Titre 5", + "toolbar.button.heading.6": "Titre 6", "toolbar.button.italic": "Italique", "toolbar.button.file": "Fichier", "toolbar.button.file.select": "Sélectionner un fichier", "toolbar.button.file.upload": "Transférer un fichier", "toolbar.button.link": "Lien", + "toolbar.button.paragraph": "Paragraphe", "toolbar.button.strike": "Barré", "toolbar.button.ol": "Liste ordonnée", "toolbar.button.underline": "Souligné", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Utilisateur", - "user.blueprint": "Vous pouvez définir des sections et des champs de formulaire supplémentaires pour ce rôle d’utilisateur dans /site/blueprints/users/{role}.yml", + "user.blueprint": "Vous pouvez définir de nouvelles sections et champs de formulaires pour ce rôle d'utilisateur dans /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Modifier le courriel", "user.changeLanguage": "Modifier la langue", "user.changeName": "Renommer cet utilisateur", @@ -516,9 +545,10 @@ "view.account": "Votre compte", "view.installation": "Installation", + "view.languages": "Langages", "view.resetPassword": "Réinitialiser le mot de passe", - "view.settings": "Paramètres", "view.site": "Site", + "view.system": "Système", "view.users": "Utilisateurs", "welcome": "Bienvenue", diff --git a/kirby/i18n/translations/hu.json b/kirby/i18n/translations/hu.json index 47cb39e..a0edac9 100644 --- a/kirby/i18n/translations/hu.json +++ b/kirby/i18n/translations/hu.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Hozz\u00e1ad", + "author": "Author", "avatar": "Profilkép", "back": "Vissza", "cancel": "M\u00e9gsem", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Másol", + "copy.all": "Copy all", "create": "Létrehoz", "date": "Dátum", @@ -23,24 +29,28 @@ "days.tue": "ke", "days.wed": "sze", + "debugging": "Debugging", + "delete": "T\u00f6rl\u00e9s", "delete.all": "Delete all", - "dimensions": "Méretek", - "disabled": "Disabled", - "discard": "Visszavon\u00e1s", - "download": "Letöltés", - "duplicate": "Másolat", - "edit": "Aloldal szerkeszt\u00e9se", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "Nincsenek fájlok kiválasztva", "dialog.pages.empty": "Nincsenek oldalak kiválasztva", "dialog.users.empty": "Nincsenek felhasználók kiválasztva", + "dimensions": "Méretek", + "disabled": "Disabled", + "discard": "Visszavon\u00e1s", + "download": "Letöltés", + "duplicate": "Másolat", + + "edit": "Aloldal szerkeszt\u00e9se", + "email": "Email", "email.placeholder": "mail@pelda.hu", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Érvénytelen bejelentkezés", "error.access.panel": "Nincs jogosultságod megnyitni a panelt", @@ -92,6 +102,7 @@ "error.language.code": "Kérlek, add meg a nyelv érvényes kódját", "error.language.duplicate": "A nyelv már létezik", "error.language.name": "Kérlek, add meg a nyelv érvényes nevét", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Kérlek adj meg egy valós email-címet", "error.license.verification": "A licensz nem ellenőrizhető", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Nem változtathatod meg az URL-előtagot: \"{slug}\"", "error.page.changeStatus.incomplete": "Az oldal hibákat tartalmaz és nem publikálható", "error.page.changeStatus.permission": "Az oldal státusza nem változtatható meg", @@ -165,6 +178,7 @@ "error.user.password.undefined": "A felhasználónak nincs jelszó megadva", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Kérlek adj meg egy megfelelő szerepkört", + "error.user.undefined": "A felhasználó nem található", "error.user.update.permission": "Nincs jogosultságod frissíteni \"{name}\" felhasználó adatait", "error.validation.accepted": "Kérlek erősítsd meg", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Kérlek megfelelő URL-t adj meg", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Kód", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Nincs m\u00e9g bejegyz\u00e9s", "field.users.empty": "Nincs felhasználó kiválasztva", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Biztos törölni akarod ezt a fájlt:
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Óra", + "import": "Import", "insert": "Beilleszt", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Maradjak bejelentkezve", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Álló", "orientation.square": "Négyzetes", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "URL v\u00e1ltoztat\u00e1sa", "page.changeSlug.fromTitle": "L\u00e9trehoz\u00e1s c\u00edmb\u0151l", "page.changeStatus": "Állapot módosítása", @@ -417,7 +437,10 @@ "pagination.page": "Oldal", "password": "Jelsz\u00f3", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Előző", "preview": "Preview", "remove": "Eltávolítás", @@ -454,6 +477,8 @@ "template": "Sablon", "today": "Ma", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Kód", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Cím 1", "toolbar.button.heading.2": "Cím 2", "toolbar.button.heading.3": "Cím 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Dőlt szöveg", "toolbar.button.file": "Fájl", "toolbar.button.file.select": "Válassz egy fájlt", "toolbar.button.file.upload": "Fájl feltöltése", "toolbar.button.link": "Link", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Rendezett lista", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://pelda.hu", "user": "Felhasználó", - "user.blueprint": "Ehhez a szerepkörhöz további szekciókat és mezőket vehetsz fel a /site/blueprints/users/{role}.yml fájlban", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Email módosítása", "user.changeLanguage": "Nyelv módosítása", "user.changeName": "Felhasználó átnevezése", @@ -516,9 +545,10 @@ "view.account": "Fi\u00f3kod", "view.installation": "Telep\u00edt\u00e9s", + "view.languages": "Nyelvek", "view.resetPassword": "Reset password", - "view.settings": "Beállítások", "view.site": "Weboldal", + "view.system": "System", "view.users": "Felhaszn\u00e1l\u00f3k", "welcome": "Üdvözlünk", diff --git a/kirby/i18n/translations/id.json b/kirby/i18n/translations/id.json index 63e7031..87deab8 100644 --- a/kirby/i18n/translations/id.json +++ b/kirby/i18n/translations/id.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Tambah", + "author": "Author", "avatar": "Gambar profil", "back": "Kembali", "cancel": "Batal", @@ -9,6 +14,7 @@ "collapse": "Lipat", "collapse.all": "Lipat Semua", "copy": "Salin", + "copy.all": "Copy all", "create": "Buat", "date": "Tanggal", @@ -23,24 +29,28 @@ "days.tue": "Sel", "days.wed": "Rab", + "debugging": "Debugging", + "delete": "Hapus", "delete.all": "Hapus semua", - "dimensions": "Dimensi", - "disabled": "Dimatikan", - "discard": "Buang", - "download": "Unduh", - "duplicate": "Duplikasi", - "edit": "Sunting", - "expand": "Luaskan", - "expand.all": "Luaskan Semua", "dialog.files.empty": "Tidak ada berkas untuk dipilih", "dialog.pages.empty": "Tidak ada halaman untuk dipilih", "dialog.users.empty": "Tidak ada pengguna untuk dipilih", + "dimensions": "Dimensi", + "disabled": "Dimatikan", + "discard": "Buang", + "download": "Unduh", + "duplicate": "Duplikasi", + + "edit": "Sunting", + "email": "Surel", "email.placeholder": "surel@contoh.com", + "environment": "Environment", + "error.access.code": "Kode tidak valid", "error.access.login": "Upaya masuk tidak valid", "error.access.panel": "Anda tidak diizinkan mengakses panel", @@ -92,6 +102,7 @@ "error.language.code": "Masukkan kode bahasa yang valid", "error.language.duplicate": "Bahasa sudah ada", "error.language.name": "Masukkan nama bahasa yang valid", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "Ada kesalahan di blok {blockIndex} di tata letak {layoutIndex}", "error.layout.validation.settings": "Ada kesalahan di pengaturan tata letak {index}", @@ -100,6 +111,8 @@ "error.license.email": "Masukkan surel yang valid", "error.license.verification": "Lisensi tidak dapat diverifikasi", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Anda tidak diizinkan mengubah akhiran URL untuk \"{slug}\"", "error.page.changeStatus.incomplete": "Halaman memiliki kesalahan dan tidak dapat diterbitkan", "error.page.changeStatus.permission": "Status halaman ini tidak dapat diubah", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Pengguna tidak memiliki sandi", "error.user.password.wrong": "Kata sandi salah", "error.user.role.invalid": "Masukkan peran yang valid", + "error.user.undefined": "Pengguna tidak dapat ditemukan", "error.user.update.permission": "Anda tidak diizinkan memperbaharui pengguna \"{name}\"", "error.validation.accepted": "Mohon konfirmasi", @@ -208,6 +222,9 @@ "error.validation.time.between": "Masukkan waktu antara {min} dan {max}", "error.validation.url": "Masukkan URL yang valid", + "expand": "Luaskan", + "expand.all": "Luaskan Semua", + "field.required": "Bidang ini wajib", "field.blocks.changeType": "Ubah tipe", "field.blocks.code.name": "Kode", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Anda yakin menghapus blok yang dipilih?", "field.blocks.empty": "Belum ada blok", "field.blocks.fieldsets.label": "Pilih tipe blok …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Galeri", "field.blocks.gallery.images.empty": "Belum ada gambar", "field.blocks.gallery.images.label": "Gambar", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Pilih gambar", "field.blocks.image.ratio": "Rasio", "field.blocks.image.url": "URL Gambar", + "field.blocks.line.name": "Line", "field.blocks.list.name": "Daftar", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Teks", @@ -263,7 +282,7 @@ "field.structure.empty": "Belum ada entri", "field.users.empty": "Belum ada pengguna yang dipilih", - "file.blueprint": "Berkas ini belum memiliki cetak biru. Anda dapat mendefinisikannya di /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Anda yakin menghapus
{filename}?", "file.sort": "Ubah posisi", @@ -272,6 +291,7 @@ "hide": "Sembunyikan", "hour": "Jam", + "import": "Import", "insert": "Sisipkan", "insert.after": "Sisipkan setelah", "insert.before": "Sisipkan sebelum", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Kode atur ulang sandi", "login.code.placeholder.email": "000 000", "login.code.text.email": "Jika alamat surel terdaftar, kode yang diminta dikirim via surel", - "login.email.login.body": "Hai {user.nameOrEmail},\n\nAnda baru saja meminta kode masuk untuk Kirby Panel.\nKode masuk berikut valid selama {timeout} menit:\n\n{code}\n\nJika Anda tidak meminta kode masuk, abaikan surel ini atau hubungi admin apabila ada yang ingin ditanyakan.\nUntuk alasan keamanan, JANGAN teruskan surel ini.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Kode masuk Anda", - "login.email.password-reset.body": "Hai {user.nameOrEmail},\n\nAnda baru saja meminta kode atur ulang sandi untuk Kirby Panel.\nKode atur ulang sandi berikut valid selama {timeout} menit:\n\n{code}\n\nJika Anda tidak meminta kode atur ulang sandi, abaikan surel ini atau hubungi admin apabila ada yang ingin ditanyakan.\nUntuk alasan keamanan, JANGAN teruskan surel ini.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Kode atur ulang sandi Anda", "login.remember": "Biarkan tetap masuk", "login.reset": "Atur ulang sandi", @@ -385,7 +405,7 @@ "orientation.portrait": "Tegak", "orientation.square": "Persegi", - "page.blueprint": "Halaman ini belum memiliki cetak biru. Anda dapat mendefinisikannya di /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Ubah URL", "page.changeSlug.fromTitle": "Buat dari judul", "page.changeStatus": "Ubah status", @@ -417,7 +437,10 @@ "pagination.page": "Halaman", "password": "Sandi", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Piksel", + "plugins": "Plugins", "prev": "Sebelumnya", "preview": "Pratinjau", "remove": "Hapus", @@ -454,6 +477,8 @@ "template": "Templat", "today": "Hari ini", + "server": "Server", + "site.blueprint": "Situs ini belum memiliki cetak biru. Anda dapat mendefinisikannya di /site/blueprints/site.yml", "toolbar.button.code": "Kode", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Penajukan 1", "toolbar.button.heading.2": "Penajukan 2", "toolbar.button.heading.3": "Penajukan 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Miring", "toolbar.button.file": "Berkas", "toolbar.button.file.select": "Pilih berkas", "toolbar.button.file.upload": "Unggah berkas", "toolbar.button.link": "Tautan", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Coret", "toolbar.button.ol": "Daftar berurut", "toolbar.button.underline": "Garis bawah", @@ -497,7 +526,7 @@ "url.placeholder": "https://contoh.com", "user": "Pengguna", - "user.blueprint": "Anda dapat mendefinisikan bagian tambahan dan bidang formulir untuk peran pengguna ini di /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Ubah surel", "user.changeLanguage": "Ubah bahasa", "user.changeName": "Ubah nama pengguna ini", @@ -516,9 +545,10 @@ "view.account": "Akun Anda", "view.installation": "Pemasangan", + "view.languages": "Bahasa", "view.resetPassword": "Atur ulang sandi", - "view.settings": "Pengaturan", "view.site": "Situs", + "view.system": "System", "view.users": "Pengguna", "welcome": "Selamat datang", diff --git a/kirby/i18n/translations/is_IS.json b/kirby/i18n/translations/is_IS.json new file mode 100644 index 0000000..6490f4c --- /dev/null +++ b/kirby/i18n/translations/is_IS.json @@ -0,0 +1,557 @@ +{ + "account.changeName": "Breyta nafninu þínu", + "account.delete": "Eyða reikningnum þínum", + "account.delete.confirm": "Ertu alveg viss um að þú viljir endanlega eyða reikningnum þínum? Þú munt verða útskráð/ur án tafar. Ómögulegt verður að endurheimta reikninginn þinn.", + + "add": "Bæta við", + "author": "Höfundur", + "avatar": "Prófíl mynd", + "back": "Til baka", + "cancel": "Hætta við", + "change": "Breyta", + "close": "Loka", + "confirm": "Ok", + "collapse": "Collapse", + "collapse.all": "Collapse All", + "copy": "Afrita", + "copy.all": "Afrita allt", + "create": "Stofna", + + "date": "Dagsetning", + "date.select": "Veldu dagsetningu", + + "day": "Dagur", + "days.fri": "Fös", + "days.mon": "Mán", + "days.sat": "Lau", + "days.sun": "Sun", + "days.thu": "Fim", + "days.tue": "Þri", + "days.wed": "Mið", + + "debugging": "Aflúsun", + + "delete": "Eyða", + "delete.all": "Eyða hreint öllu", + + "dialog.files.empty": "Engar skrár til að velja úr", + "dialog.pages.empty": "Engar síður til að velja úr", + "dialog.users.empty": "Engir notendur til að velja úr", + + "dimensions": "Rýmd", + "disabled": "Óvirkt", + "discard": "Hunsa", + "download": "Hlaða niður", + "duplicate": "Klóna", + + "edit": "Breyta", + + "email": "Netfang", + "email.placeholder": "nafn@netfang.is", + + "environment": "Umhverfi", + + "error.access.code": "Ógildur kóði", + "error.access.login": "Ógild innskráning", + "error.access.panel": "Þú hefur ekkert leyfi til að nota panelinn", + "error.access.view": "Þú hefur ekkert leyfi til að nota þennan hluta panelsins", + + "error.avatar.create.fail": "Það gekk ekki að hlaða inn prófílmyndinni", + "error.avatar.delete.fail": "Ekki tókst að eyða prófílmyndinni", + "error.avatar.dimensions.invalid": "Vinsamlegast hafðu myndina ekki breiðari né hærri en 3000 punkta", + "error.avatar.mime.forbidden": "Snið myndarinnar þarf að vera af gerðinni JPEG eða PNG", + + "error.blueprint.notFound": "Ekki tókst að hlaða bláprentið: \"{name}\". Reyndu aftur?", + + "error.blocks.max.plural": "Ekki fleiri en {max} bálka", + "error.blocks.max.singular": "Ekki meira en einn bálkur", + "error.blocks.min.plural": "Minnst {min}. bálka", + "error.blocks.min.singular": "Allavegana einn bálkur takk", + "error.blocks.validation": "Það er villa í bálk {index}", + + "error.email.preset.notFound": "Netfangstillingarnar: \"{name}\" fundust ekki", + + "error.field.converter.invalid": "Ógildur umbreytari \"{converter}\"", + + "error.file.changeName.empty": "Nafn skal fylla út", + "error.file.changeName.permission": "Þú mátt ekkert breyta nafninu á skránni \"{filename}\"", + "error.file.duplicate": "Skrá með nafninu \"{filename}\" er nú þegar til", + "error.file.extension.forbidden": "Skrárendingin \"{extension}\" er ekki leyfð", + "error.file.extension.invalid": "Óleyfilegt skrársnið hér: {extension}", + "error.file.extension.missing": "Skrárendinguna fyrir \"{filename}\" vantar", + "error.file.maxheight": "Hæð myndarinnar má ekki vera meiri en {height} punktar", + "error.file.maxsize": "Skráinn er alltof stór", + "error.file.maxwidth": "Breydd myndarinnar má alls ekki vera meiri en {width} punktar", + "error.file.mime.differs": "Upphlaðna skráin þarf að vera sömu tegundar: \"{mime}\"", + "error.file.mime.forbidden": "Gagnasniðið \"{mime}\" er ekki leyft hér", + "error.file.mime.invalid": "Ógyllt gagnasnið: {mime}", + "error.file.mime.missing": "Gagnasnið skránnar \"{filename}\" er óþekkt", + "error.file.minheight": "Hæð myndarinnar þarf að vera minnst {height} punktar", + "error.file.minsize": "Skráin er of smá", + "error.file.minwidth": "Breidd myndarinnar þarf að vera minnst {width} punktar", + "error.file.name.missing": "Skrárnafnið má ekki skilja eftir tómt", + "error.file.notFound": "Skráin \"{filename}\" fannst ekki", + "error.file.orientation": "Snið myndarinnar þarf að vera \"{orientation}\"", + "error.file.type.forbidden": "Þú mátt ekkert hlaða inn {type} skrám", + "error.file.type.invalid": "Ógild skrártegund: {type}", + "error.file.undefined": "Skráin fannst ekki", + + "error.form.incomplete": "Vinsamlegast lagfærðu villurnar í forminu…", + "error.form.notSaved": "Ekki tókst að vista upplýsingar úr forminu", + + "error.language.code": "Gófúslega settu inn gildan kóða fyrir tungumál", + "error.language.duplicate": "Þetta tungumál er nú þegar skráð", + "error.language.name": "Gott og gyllt nafn fyrir tungumálið", + "error.language.notFound": "Tungumálið fannst ekkert", + + "error.layout.validation.block": "Það er villa í bálki {blockIndex} í rammanum {layoutIndex}", + "error.layout.validation.settings": "Hér er villa í sitllingum fyrir ramman {index}", + + "error.license.format": "Gildur leyfiskóði hér", + "error.license.email": "Almennilegt netfang hér", + "error.license.verification": "Ekki heppnaðist að staðfest leyfið", + + "error.offline": "Stjórnborðið er óvirkt eins og stendur.", + + "error.page.changeSlug.permission": "Þú hefur ekkert leyfi til þess að breyta slóðarforskeytinu fyrir \"{slug}\"", + "error.page.changeStatus.incomplete": "Það eru villur á síðunni og við getum ekki gefið hana út", + "error.page.changeStatus.permission": "Stöðu síðunnar var ekki hægt að breyta", + "error.page.changeStatus.toDraft.invalid": "Síðunn \"{slug}\" er ekki hægt að breyta í uppkast", + "error.page.changeTemplate.invalid": "Sniðmáti fyrir síðuna \"{slug}\" er ekki hægt að breyta", + "error.page.changeTemplate.permission": "Þú hefur engan veginn leyfi til að breyta sniðmáti fyrir síðuna \"{slug}\"", + "error.page.changeTitle.empty": "Titillinn getur ekki verið óskilgreindur", + "error.page.changeTitle.permission": "Þú mátt ekki breyta titlinum fyrir \"{slug}\"", + "error.page.create.permission": "Þú hefur ekki leyfi til að stofna \"{slug}\"", + "error.page.delete": "Síðunni \"{slug}\" er ekki hægt að eyða", + "error.page.delete.confirm": "Ritaðu titil síðunnar til að staðfesta", + "error.page.delete.hasChildren": "Síðan hefur undirsíður og er því ekki hægt að eyða", + "error.page.delete.permission": "Þú mátt ekkert eyða \"{slug}\"", + "error.page.draft.duplicate": "Uppkast með slóðinni \"{slug}\" er þegar til", + "error.page.duplicate": "Síða með slóðinni \"{slug}\" er þegar til", + "error.page.duplicate.permission": "Þú mátt ekki klóna \"{slug}\"", + "error.page.notFound": "Síðan \"{slug}\" fannst ekkert", + "error.page.num.invalid": "Veldu ákjósanlega raðtölu. Neikvæðar tölur bannaðar.", + "error.page.slug.invalid": "Veldu ákjósanlega vefslóð", + "error.page.slug.maxlength": "Vefslóð þarf að vera a.m.k. \"{length}\" stafir", + "error.page.sort.permission": "Ekki reyndist unnt að raða síðunni \"{slug}\"", + "error.page.status.invalid": "Ákjósanlega síðustöðu takk", + "error.page.undefined": "Síðan fannst ekkert", + "error.page.update.permission": "Þú mátt ekkert uppfæra síðuna \"{slug}\"", + + "error.section.files.max.plural": "Ekki fleiri en {max} skrár í \"{section}\" svæðið", + "error.section.files.max.singular": "Aðeins ein skrá í \"{section}\" svæðið", + "error.section.files.min.plural": "\"{section}\" svæðið krefst a.m.k. {min} skrá sem innihalds", + "error.section.files.min.singular": "\"{section}\" þarf minnst eina skrá til að það virki", + + "error.section.pages.max.plural": "Alls ekki fleiri en {max} síður í \"{section}\" svæðið", + "error.section.pages.max.singular": "Ekki fleiri en ein síða í \"{section}\" svæðið", + "error.section.pages.min.plural": "\"{section}\" svæðið krefst a.m.k {min}. síðna", + "error.section.pages.min.singular": "\"{section}\" krefst a.m.k. einnar síðu", + + "error.section.notLoaded": "Svæðið \"{name}\" var því miður ekki hægt að sækja", + "error.section.type.invalid": "Svæðiðsgerðin \"{type}\" er því miður ekki gild", + + "error.site.changeTitle.empty": "Ekki skilja titilinn eftir tóman", + "error.site.changeTitle.permission": "Þú mátt ekkert breyta titil vefsvæðisins", + "error.site.update.permission": "Þú mátt ekkert uppfæra vefsvæðið", + + "error.template.default.notFound": "Ekkert sjálfgefið sniðmát fannst", + + "error.user.changeEmail.permission": "Þú mátt ekkert breyta netfangi notandans \"{name}\"", + "error.user.changeLanguage.permission": "Þú hefur ekki leyfi til að breyta tungumáli notandans \"{name}\"", + "error.user.changeName.permission": "Þú mátt alls ekki breyta nafni notandans \"{name}\"", + "error.user.changePassword.permission": "Þér er harðbannað að breyta lykilorði notandans \"{name}\"", + "error.user.changeRole.lastAdmin": "Þetta er síðasti stjórinn og því má ekki breyta hlutverki", + "error.user.changeRole.permission": "Þú hefur ekki leyfi til að breyta hlutverki fyrir notandan \"{name}\"", + "error.user.changeRole.toAdmin": "Þú hefur ekkert leyfi til að gera notendur að stjórum", + "error.user.create.permission": "Þú mátt ekki stofna þennan notanda", + "error.user.delete": "Ekki reyndist unnt að eyða notandanum \"{name}\"", + "error.user.delete.lastAdmin": "Síðasta stjóranum er ekki hægt að eyða", + "error.user.delete.lastUser": "Síðasta notandanum er ekki hægt að eyða", + "error.user.delete.permission": "Þú mátt ekkert eyða notandanum \"{name}\"", + "error.user.duplicate": "Nú þegar finnst notandi með þetta netfang: \"{email}\"", + "error.user.email.invalid": "Vinsamlegast ákjósanlegt netfang", + "error.user.language.invalid": "Vinsamlegast ákjósanlegt tungumál", + "error.user.notFound": "Þessi notandi; \"{name}\" fannst ekki", + "error.user.password.invalid": "Veldu ákjósanlegt lykilorð. Minnst 8 stafa langt.", + "error.user.password.notSame": "Lykilorðin stemma ekki", + "error.user.password.undefined": "Þessi notandi hefur ekki lykilorð", + "error.user.password.wrong": "Rangt lykilorð", + "error.user.role.invalid": "Veldu ákjósanlegt hlutverk", + "error.user.undefined": "Notandinn fannst ekkert", + "error.user.update.permission": "Þú mátt ekkert breyta notandanum \"{name}\"", + + "error.validation.accepted": "Staðfestu", + "error.validation.alpha": "Aðeins stafir úr Enska stafrófinu, a-z", + "error.validation.alphanum": "Aðeins stafir úr Enska stafrófinu, a-z eða tölustafir 0-9", + "error.validation.between": "Gildi milli \"{min}\" og \"{max}\"", + "error.validation.boolean": "Staðfestu eða hafnaðu þessu", + "error.validation.contains": "Settu inni gildi er inniheldur \"{needle}\"", + "error.validation.date": "Ákjósanlega dagsetningu", + "error.validation.date.after": "Dagsetningu eftir {date}", + "error.validation.date.before": "Dagsetningu fyrir {date}", + "error.validation.date.between": "Dagsetningu milli {min} og {max}", + "error.validation.denied": "Hafnaðu", + "error.validation.different": "Gildið má ekki vera \"{other}\"", + "error.validation.email": "Ákjósanlegt netfang", + "error.validation.endswith": "Gildið verður að enda á \"{end}\"", + "error.validation.filename": "Ákjósanlegt skrárnafn", + "error.validation.in": "Vinsamlegast skráðu eitt af eftirfarandi: ({in})", + "error.validation.integer": "Skráðu heiltölu", + "error.validation.ip": "Skráðu ákjósanlega IP tölu", + "error.validation.less": "Skráðu gildi lægra en {max}", + "error.validation.match": "Gildið er ekki eftir væntingum", + "error.validation.max": "Skráð gildi sem er ekki hærra en {max}", + "error.validation.maxlength": "Veldu eitthvað styttra. (hámark {max} stafir)", + "error.validation.maxwords": "Ekki skrá fleiri en {max}. orð", + "error.validation.min": "Skráðu gildi ekki lægra en {min}", + "error.validation.minlength": "Hafðu þetta lengra en {min}. stafi", + "error.validation.minwords": "Lágmark {min}. orð", + "error.validation.more": "Eitthvað hærra en {min}", + "error.validation.notcontains": "Skráðu eitthvað sem inniheldur ekki \"{needle}\"", + "error.validation.notin": "Ekki skrá neitt af þessu: ({notIn})", + "error.validation.option": "Veldu ákjósanlegan kost", + "error.validation.num": "Skráðu ákjósanlega tölu", + "error.validation.required": "Skráðu eitthvað", + "error.validation.same": "Skráðu \"{other}\"", + "error.validation.size": "Gildið þarf að vera \"{size}\"", + "error.validation.startswith": "Þetta þarf að byrja á \"{start}\"", + "error.validation.time": "Ákjósanlegur tími", + "error.validation.time.after": "Veldu tíma eftir {time}", + "error.validation.time.before": "Veldu tíma fyrir{time}", + "error.validation.time.between": "Veldu tíma milli {min} og {max}", + "error.validation.url": "Ákjósanleg vefslóð", + + "expand": "Þenja út", + "expand.all": "Þenja allt út", + + "field.required": "Þetta svið er nauðsynlegt", + "field.blocks.changeType": "Breyta um bálkagerð", + "field.blocks.code.name": "Kóði", + "field.blocks.code.language": "Tungumal", + "field.blocks.code.placeholder": "Kóðinn þinn …", + "field.blocks.delete.confirm": "Ætlarðu virkilega að eyða þessum bálk?", + "field.blocks.delete.confirm.all": "Ertu nú alveg viss um að þú viljir eyða öllum þessum bálkum?", + "field.blocks.delete.confirm.selected": "Viltu virkilega eyða völdum bálkum?", + "field.blocks.empty": "Öngvir bálkar enn", + "field.blocks.fieldsets.label": "Veldu bálkagerð …", + "field.blocks.fieldsets.paste": "Notaðu 1{{ shortcut }}1 flýtilyklaaðgerðina til að setja blokkina hér.", + "field.blocks.gallery.name": "Myndasafn", + "field.blocks.gallery.images.empty": "Engar myndir enn", + "field.blocks.gallery.images.label": "Myndir", + "field.blocks.heading.level": "Stig", + "field.blocks.heading.name": "Fyrirsögn", + "field.blocks.heading.text": "Texti/Prósi", + "field.blocks.heading.placeholder": "Fyrirsögn …", + "field.blocks.image.alt": "ALT texti", + "field.blocks.image.caption": "Myndartexti", + "field.blocks.image.crop": "Kroppa", + "field.blocks.image.link": "Tengill", + "field.blocks.image.location": "Staðsetning", + "field.blocks.image.name": "Mynd", + "field.blocks.image.placeholder": "Veldu mynd", + "field.blocks.image.ratio": "Hlutfall", + "field.blocks.image.url": "Slóð myndar", + "field.blocks.line.name": "Lína", + "field.blocks.list.name": "Listi", + "field.blocks.markdown.name": "Markdown", + "field.blocks.markdown.label": "Texti", + "field.blocks.markdown.placeholder": "Markdown …", + "field.blocks.quote.name": "Tilvitnun", + "field.blocks.quote.text.label": "Innihald tilvitnunar", + "field.blocks.quote.text.placeholder": "Þessi tilvitnun …", + "field.blocks.quote.citation.label": "Heimild", + "field.blocks.quote.citation.placeholder": "eftir …", + "field.blocks.text.name": "Prósi", + "field.blocks.text.placeholder": "Þessi prósi …", + "field.blocks.video.caption": "Myndskeiðstexti", + "field.blocks.video.name": "Myndskeið", + "field.blocks.video.placeholder": "Vefslóð myndskeiðs (URL)", + "field.blocks.video.url.label": "Vefslóð", + "field.blocks.video.url.placeholder": "https://youtube.com/?v=", + + "field.files.empty": "Engar skrár valdar ennþá", + + "field.layout.delete": "Eyða ramma", + "field.layout.delete.confirm": "Ætlarðu virkilega að eyða þessum ramma?", + "field.layout.empty": "Nei. Engir rammar enn.", + "field.layout.select": "Veldu rammategund", + + "field.pages.empty": "Engar síður valdar ennþá", + "field.structure.delete.confirm": "Viltu virkilega eyða þessari röð?", + "field.structure.empty": "Engar færslur enn", + "field.users.empty": "Engir notendur valdir enn", + + "file.blueprint": "Þessi skrá hefur ekki skipan (e. blueprint) ennþá. Þú mátt skilgreina skipanina í /site/blueprints/{template}.yml", + "file.delete.confirm": "Ætlarðu virkilega að eyða
{filename}?", + "file.sort": "Breyta röðun", + + "files": "Skrár", + "files.empty": "Engar skrár enn", + + "hide": "Fela", + "hour": "Klukkustund", + "import": "Hlaða inn", + "insert": "Setja inn", + "insert.after": "Setja eftir", + "insert.before": "Setja fyrir", + "install": "Setja upp", + + "installation": "Uppsettning", + "installation.completed": "Panellinn er uppsettur", + "installation.disabled": "Paneluppsetning er sjálfgefið óvirk á vefþjónum á Veraldarvefnum. Reyndu frekar að setja Panelinn upp í lokuðu umhverfi eða virkjaðu panel.install möguleikan.", + "installation.issues.accounts": "/site/accounts mappan er annaðhvort ekki til eða er ekki skrifanleg.", + "installation.issues.content": "/content mappan er annaðhvort ekki til eða er ekki skrifanleg", + "installation.issues.curl": "CURL viðbótin er hér bráðnauðsynleg", + "installation.issues.headline": "Uppsetning Panelsins mistókst hrapalega", + "installation.issues.mbstring": "MB String er hér bráðnauðsynleg", + "installation.issues.media": "/media mappan er annaðhvort ekki til eða er ekki skrifanleg", + "installation.issues.php": "Notaðu PHP 7+", + "installation.issues.server": "Kirby krefst Apache, Nginx eða Caddy", + "installation.issues.sessions": "/site/sessions mappan er annaðhvort ekki til eða er ekki skrifanleg", + + "language": "Tungumál", + "language.code": "Kóði", + "language.convert": "Gera sjálfgefið", + "language.convert.confirm": "

Ertu viss um að þú viljir breyta {name} í sjálfgefið (lesist aðal) tungumál? Þessu verður ekki viðsnúið.

Ef {name} hefur innihald sem ekki hefur verið þýtt, þá verða engir möguleikar til þrautarvara og hluti vefsins gæti birtst tómur.

", + "language.create": "Bættu við nýju tungumáli", + "language.delete.confirm": "Ertu nú viss um að þú viljir eyða {name} og öllum tilheyrandi þýðingum? Þetta verður ekki tekið til baka!", + "language.deleted": "Tungumálinu hefur verið eytt", + "language.direction": "Lestursátt (hægri, vinstri)", + "language.direction.ltr": "Vinstra til hægri", + "language.direction.rtl": "Hægra til vinstri", + "language.locale": "PHP locale strengur", + "language.locale.warning": "Þú ert að nota sérsniðna locale uppsetningu. Vinsamlegast breyttu tungumálaskránni á slóðinni /site/languages", + "language.name": "Nafn tungumáls", + "language.updated": "Tungumálið hefur verið uppfært", + + "languages": "Tungumál", + "languages.default": "Aðal tungumál", + "languages.empty": "Það eru engin frekari tungumál skilgreind enn", + "languages.secondary": "Auka tungumál", + "languages.secondary.empty": "Það eru engin auka tungumál skilgreind enn", + + "license": "Leyfi", + "license.buy": "Kaupa leyfi", + "license.register": "Skr\u00E1 Kirby", + "license.register.help": "Þú fékkst sendan tölvupóst með leyfiskóðanum þegar þú keyptir leyfi. Vinsamlegast afritaðu hann og settu hann hingað til að skrá þig.", + "license.register.label": "Vinsamlegast settu inn leyfiskóðan", + "license.register.success": "Þakka þér fyrir að velja Kirby", + "license.unregistered": "Þetta er óskráð prufueintak af Kirby", + + "link": "Tengill", + "link.text": "Tengilstexti", + + "loading": "Hleð", + + "lock.unsaved": "Óvistað breytingar", + "lock.unsaved.empty": "Það eru öngvar óvistaðar breytingar", + "lock.isLocked": "Óvistaðar breytingar frá {email}", + "lock.file.isLocked": "{email} er að vinna í skránni og þú breytir henni ekki á meðan.", + "lock.page.isLocked": "{email} er að vinna í síðunni og þú breytir henni ekki á meðan.", + "lock.unlock": "Aflæsa", + "lock.isUnlocked": "Þær breytingar sem þú gerðir hafa verið yfirskrifaðar af öðrum notanda. Þú getur sótt þær breytingar og splæst þeim saman við þínar breytingar. Handvirkt.", + + "login": "Innskrá", + "login.code.label.login": "Innskráningarkóði", + "login.code.label.password-reset": "Kóði fyrir endurstillingu lykilorðs", + "login.code.placeholder.email": "000 000", + "login.code.text.email": "Ef netfangið (e. email) þitt er skráð þá bíður þín nýr tölvupóstur.", + "login.email.login.body": "Já halló {user.nameOrEmail},\n\nNýlega baðstu um innskráningarkóða fyrir bakendan á sorli.is.\nEftirfarandi kóði er virkur í {timeout} mínútur:\n\n{code}\n\nEf þú óskaðir ekki eftir þessu þá hunsaðu þennan tölvupóst eða talaðu við vefstjóran ef þú vilt fræðast nánar.\nAf öryggisástæðum vinsamlegast áframsendu þennan tölvupóst ALLS EKKI.", + "login.email.login.subject": "Innskráningarkóðinn þinn", + "login.email.password-reset.body": "Nei halló {user.nameOrEmail},\n\nNýverið baðstu um að lykilorði þínu væri endurstillt fyrir bakendan á sorli.is. \nEftirfarandi kóði er virkur í {timeout} mínútur:\n\n{code}\n\nEf þú óskaðir ekki eftir þessu þá hunsaðu þennan tölvupóst eða talaðu við vefstjóran ef þú vilt fræðast nánar.\nAf öryggisástæðum vinsamlegast áframsendu þennan tölvupóst ALLS EKKI.", + "login.email.password-reset.subject": "Kóðinn þinn fyrir endurstillingu lykilorðs", + "login.remember": "Vista innskráningu", + "login.reset": "Endurheimta lykilorð takk", + "login.toggleText.code.email": "Innskrá með netfangi", + "login.toggleText.code.email-password": "Innskrá með lykilorði", + "login.toggleText.password-reset.email": "Mannstu ekki lykilorðið?", + "login.toggleText.password-reset.email-password": "← Aftur í innskráningu", + + "logout": "Útskrá", + + "menu": "Valmynd", + "meridiem": "AM/PM", + "mime": "Miðilsgerð", + "minutes": "Mínútur", + + "month": "Mánuður", + "months.april": "Apríl", + "months.august": "Ágúst", + "months.december": "Desember", + "months.february": "Febrúar", + "months.january": "Janúar", + "months.july": "Júlí", + "months.june": "Júní", + "months.march": "Mars", + "months.may": "Maí", + "months.november": "Nóvember", + "months.october": "Október", + "months.september": "September", + + "more": "Meira", + "name": "Nafn", + "next": "Næst", + "no": "nei", + "off": "Af", + "on": "Á", + "open": "Opna", + "open.newWindow": "Opna í nýjum glugga", + "options": "Valmöguleikar", + "options.none": "Engir valmöguleikar", + + "orientation": "Snúningur", + "orientation.landscape": "Langsnið", + "orientation.portrait": "Skammsnið", + "orientation.square": "Ferningur", + + "page.blueprint": "Þessi síða hefur ekki skipan (e. blueprint) ennþá. Þú mátt skilgreina skipanina í /site/blueprints/{template}.yml", + "page.changeSlug": "Breyta vefslóð", + "page.changeSlug.fromTitle": "Slóð af titli", + "page.changeStatus": "Breyta stöðu", + "page.changeStatus.position": "Veldu ákjósanlega stöðu", + "page.changeStatus.select": "Veldu nýja stöðu", + "page.changeTemplate": "Breyta sniðmáti", + "page.delete.confirm": "Viltu virkilega farga {title}?", + "page.delete.confirm.subpages": "Þessi síða hefur undirsíður.
Þeim mun verða fargað líka.", + "page.delete.confirm.title": "Skráðu síðutitilinn til staðfestingar", + "page.draft.create": "Stofna uppkast", + "page.duplicate.appendix": "Afrita", + "page.duplicate.files": "Afrita skrár", + "page.duplicate.pages": "Afrita síður", + "page.sort": "Breyta röðun", + "page.status": "Staða", + "page.status.draft": "Uppkast", + "page.status.draft.description": "Þessi síða er uppkast og er aðeins sýnileg höfundum og stjórum eða gegnum falinn tengil.", + "page.status.listed": "Útgefin og listuð", + "page.status.listed.description": "Síðan er aðgengileg öllum og sýnleg í leiðarkerfi vefsins", + "page.status.unlisted": "Útgefin", + "page.status.unlisted.description": "Síðan er aðgengileg öllum en þó ekki sýnileg í leiðarkerfi vefsins", + + "pages": "Síður", + "pages.empty": "Engar síður enn", + "pages.status.draft": "Uppköst", + "pages.status.listed": "Útgefnar og listaðar", + "pages.status.unlisted": "Útgefnar", + + "pagination.page": "Síða", + + "password": "Lykilorð", + "paste": "Líma", + "paste.after": "Líma eftir", + "pixel": "Punkta", + "plugins": "Viðbætur", + "prev": "Fyrri", + "preview": "Forskoða", + "remove": "Fjarlægja", + "rename": "Endurnefna", + "replace": "Setja í stað", + "retry": "Reyndu aftur", + "revert": "Taka upp fyrri siði", + "revert.confirm": "Viltu virkilega eyða öllum óvistuðum breytingum?", + + "role": "Hlutverk", + "role.admin.description": "Stjórinn hefur öll réttindi", + "role.admin.title": "Stjóri", + "role.all": "Öll", + "role.empty": "Það eru engir notendur með þetta hlutverk", + "role.description.placeholder": "Engin lýsing", + "role.nobody.description": "Þetta hlutverk er til þrautarvara en hefur engin réttindi", + "role.nobody.title": "Enginn", + + "save": "Vista", + "search": "Leita", + "search.min": "Lágmark {min} stafir til að leita", + "search.all": "Sýna allt", + "search.results.none": "Engar niðurstöður", + + "section.required": "Þetta svæði er nauðsynlegt", + + "select": "Velja", + "settings": "Stillingar", + "show": "Sýna", + "size": "Stærð", + "slug": "Slögg", + "sort": "Raða", + "title": "Titill", + "template": "Sniðmát", + "today": "Núna", + + "server": "Vefþjónn", + + "site.blueprint": "Þessi vefur hefur ekki skipan (e. blueprint) ennþá. Þú mátt skilgreina skipanina í /site/blueprints/site.yml", + + "toolbar.button.code": "Kóðasnið", + "toolbar.button.bold": "Feitletrun", + "toolbar.button.email": "Netfang", + "toolbar.button.headings": "Fyrirsagnir", + "toolbar.button.heading.1": "Fyrirsögn 1", + "toolbar.button.heading.2": "Fyrirsögn 2", + "toolbar.button.heading.3": "Fyrirsögn 3", + "toolbar.button.heading.4": "Fyrirsögn 4", + "toolbar.button.heading.5": "Fyrirsögn 5", + "toolbar.button.heading.6": "Fyrirsögn 6", + "toolbar.button.italic": "Skáletrun", + "toolbar.button.file": "Skrár", + "toolbar.button.file.select": "Veldu skrá", + "toolbar.button.file.upload": "Hlaða inn skrá", + "toolbar.button.link": "Tengill", + "toolbar.button.paragraph": "Efnisgrein", + "toolbar.button.strike": "Gegnumstrika", + "toolbar.button.ol": "Raðaður listi", + "toolbar.button.underline": "Undirstrika", + "toolbar.button.ul": "Áherslumerktur listi", + + "translation.author": "Kirby Teymið", + "translation.direction": "ltr", + "translation.name": "Íslenska A137", + "translation.locale": "is_IS", + + "upload": "Hlaða inn", + "upload.error.cantMove": "Innhlöðnu skránni var ekki haggað", + "upload.error.cantWrite": "Það mistókst að skrifa skránna í geymslu", + "upload.error.default": "Ekki heppnaðist að hlaða inn skránni", + "upload.error.extension": "Innhleðsla stöðvuð vegna skrárendingar", + "upload.error.formSize": "Innhlaðna skráin er stærri en MAX_FILE_SIZE leyfilegt er.", + "upload.error.iniPostSize": "Innhlaðna skráin er stærri en því sem nemur í post_max_size stillingunni í php.ini", + "upload.error.iniSize": "Innhlaðna skráin er stærri en því sem nemur í upload_max_filesize stillingunni í php.ini", + "upload.error.noFile": "Engri skrá far hlaðið inn", + "upload.error.noFiles": "Engum skrám var hlaðið inn", + "upload.error.partial": "Innhlöðnu skránni var aðeins sótt að hluta", + "upload.error.tmpDir": "Vantar skruggumöppu", + "upload.errors": "Villa", + "upload.progress": "Hleð inn…", + + "url": "Slóð", + "url.placeholder": "https://hvitur.is", + + "user": "Notandi", + "user.blueprint": "Þér er óhætt að skilgreina fleiri svæði fyrir þetta notenda hlutverk í /site/blueprints/users/{role}.yml", + "user.changeEmail": "Breyta netfangi", + "user.changeLanguage": "Breyta tungumáli", + "user.changeName": "Endurnefna þennan notanda", + "user.changePassword": "Breyta lykilorð", + "user.changePassword.new": "Nýtt lykilorð", + "user.changePassword.new.confirm": "Staðfestu nýtt lykilorð…", + "user.changeRole": "Breyta hlutverki", + "user.changeRole.select": "Veldu nýtt hlutverk", + "user.create": "Bæta við nýjum notenda", + "user.delete": "Farga þessum notenda", + "user.delete.confirm": "Viltu virkilega eyða
{email}?", + + "users": "Notendur", + + "version": "Útgáfa", + + "view.account": "Notandareikningurinn þinn", + "view.installation": "Uppsetning", + "view.languages": "Tungumál", + "view.resetPassword": "Endurstilla lykilorð", + "view.site": "Vefsvæðið", + "view.system": "Kerfi", + "view.users": "Notendur", + + "welcome": "Komið þér fagnandi", + "year": "Ár", + "yes": "já" +} diff --git a/kirby/i18n/translations/it.json b/kirby/i18n/translations/it.json index f3bb130..5f2d416 100644 --- a/kirby/i18n/translations/it.json +++ b/kirby/i18n/translations/it.json @@ -1,5 +1,10 @@ { + "account.changeName": "Cambia il tuo nome", + "account.delete": "Elimina l'account", + "account.delete.confirm": "Vuoi davvero eliminare il tuo account? Verrai disconnesso immediatamente. Il tuo account non potrà essere recuperato.", + "add": "Aggiungi", + "author": "Autore", "avatar": "Immagine del profilo", "back": "Indietro", "cancel": "Annulla", @@ -9,6 +14,7 @@ "collapse": "Comprimi", "collapse.all": "Comprimi tutto", "copy": "Copia", + "copy.all": "Copia tutto", "create": "Crea", "date": "Data", @@ -23,24 +29,28 @@ "days.tue": "Ma", "days.wed": "Me", + "debugging": "Debugging", + "delete": "Elimina", "delete.all": "Elimina tutti", - "dimensions": "Dimensioni", - "disabled": "Disabilitato", - "discard": "Abbandona", - "download": "Scarica", - "duplicate": "Duplica", - "edit": "Modifica", - "expand": "Espandi", - "expand.all": "Espandi tutto", "dialog.files.empty": "Nessun file selezionabile", "dialog.pages.empty": "Nessuna pagina selezionabile", "dialog.users.empty": "Nessuno user selezionabile", + "dimensions": "Dimensioni", + "disabled": "Disabilitato", + "discard": "Abbandona", + "download": "Scarica", + "duplicate": "Duplica", + + "edit": "Modifica", + "email": "Email", "email.placeholder": "mail@esempio.com", + "environment": "Ambiente", + "error.access.code": "Codice non valido", "error.access.login": "Login Invalido", "error.access.panel": "Non ti è permesso accedere al pannello", @@ -67,7 +77,7 @@ "error.file.changeName.permission": "Non ti è permesso modificare il nome di \"{filename}\"", "error.file.duplicate": "Un file con il nome \"{filename}\" esiste già", "error.file.extension.forbidden": "L'estensione \"{extension}\" non è consentita", - "error.file.extension.invalid": "Invalid extension: {extension}", + "error.file.extension.invalid": "Estensione non valida: {extension}", "error.file.extension.missing": "Il file \"{filename}\" non ha estensione", "error.file.maxheight": "L'immagine non dev'essere più alta di {height} pixel", "error.file.maxsize": "Il file è troppo pesante", @@ -83,7 +93,7 @@ "error.file.notFound": "Il file non \u00e8 stato trovato", "error.file.orientation": "L'imaggine dev'essere orientata in \"{orientation}\"", "error.file.type.forbidden": "Non ti è permesso caricare file {type}", - "error.file.type.invalid": "Invalid file type: {type}", + "error.file.type.invalid": "Tipo di file non valido: {type}", "error.file.undefined": "Il file non \u00e8 stato trovato", "error.form.incomplete": "Correggi tutti gli errori nel form...", @@ -92,14 +102,17 @@ "error.language.code": "Inserisci un codice valido per la lingua", "error.language.duplicate": "La lingua esiste già", "error.language.name": "Inserisci un nome valido per la lingua", + "error.language.notFound": "La lingua non è stata trovata", - "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", - "error.layout.validation.settings": "There's an error in layout {index} settings", + "error.layout.validation.block": "C'è un errore nel blocco {blockIndex} nel layout {layoutIndex}", + "error.layout.validation.settings": "C'è un errore nelle impostazioni del layout {index}", "error.license.format": "Inserisci un codice di licenza valido", "error.license.email": "Inserisci un indirizzo email valido", "error.license.verification": "Non è stato possibile verificare la licenza", + "error.offline": "Il pannello di controllo è attualmente offline", + "error.page.changeSlug.permission": "Non ti è permesso cambiare l'URL di \"{slug}\"", "error.page.changeStatus.incomplete": "La pagina contiene errori e non può essere pubblicata", "error.page.changeStatus.permission": "Lo stato di questa pagina non può essere cambiato", @@ -118,7 +131,7 @@ "error.page.duplicate.permission": "Non ti è permesso duplicare \"{slug}\"", "error.page.notFound": "La pagina \"{slug}\" non è stata trovata", "error.page.num.invalid": "Inserisci un numero di ordinamento valido. I numeri non devono essere negativi", - "error.page.slug.invalid": "Please enter a valid URL appendix", + "error.page.slug.invalid": "Per favore inserisci un suffisso valido per l'URL", "error.page.slug.maxlength": "Lo \"slug\" dev'essere più corto di \"{length}\" caratteri", "error.page.sort.permission": "La pagina \"{slug}\" non può essere ordinata", "error.page.status.invalid": "Imposta uno stato valido per la pagina", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Per favore inserisci una password valida. Le password devono essere lunghe almeno 8 caratteri", "error.user.password.notSame": "Le password non corrispondono", "error.user.password.undefined": "L'utente non ha una password", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Password sbagliata", "error.user.role.invalid": "Inserisci un ruolo valido", + "error.user.undefined": "L'utente non è stato trovato", "error.user.update.permission": "Non ti è permesso aggiornare l'utente \"{name}\"", "error.validation.accepted": "Per favore conferma", @@ -208,6 +222,9 @@ "error.validation.time.between": "Inserisci un orario tra le {min} e le {max}", "error.validation.url": "Inserisci un URL valido", + "expand": "Espandi", + "expand.all": "Espandi tutto", + "field.required": "Il campo è obbligatorio", "field.blocks.changeType": "Cambia tipo", "field.blocks.code.name": "Codice", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Vuoi veramente eliminare i blocchi selezionati?", "field.blocks.empty": "Nessun blocco inserito", "field.blocks.fieldsets.label": "Seleziona il tipo di blocco …", + "field.blocks.fieldsets.paste": "Premi {{ shortcut }} per incollare/importare i blocchi dagli appunti", "field.blocks.gallery.name": "Galleria", "field.blocks.gallery.images.empty": "Nessuna immagine inserita", "field.blocks.gallery.images.label": "Immagini", @@ -233,7 +251,8 @@ "field.blocks.image.name": "Immagine", "field.blocks.image.placeholder": "Seleziona un'immagine", "field.blocks.image.ratio": "Rapporto", - "field.blocks.image.url": "Image URL", + "field.blocks.image.url": "URL immagine", + "field.blocks.line.name": "Linea", "field.blocks.list.name": "Lista", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Testo", @@ -263,7 +282,7 @@ "field.structure.empty": "Non ci sono ancora elementi.", "field.users.empty": "Nessun utente selezionato", - "file.blueprint": "Questo file non ha ancora un \"blueprint\". Puoi impostarne uno in /site/blueprints/{template}.yml", + "file.blueprint": "Questo file non ha ancora un blueprint. Puoi definire la sua configurazione in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Sei sicuro di voler eliminare questo file?", "file.sort": "Cambia posizione", @@ -272,6 +291,7 @@ "hide": "Nascondi", "hour": "Ora", + "import": "Importa", "insert": "Inserisci", "insert.after": "Inserisci dopo", "insert.before": "Inserisci prima", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Codice per reimpostare la password", "login.code.placeholder.email": "000 000", "login.code.text.email": "Qualora il tuo indirizzo email fosse registrato, il codice richiesto è stato inviato tramite email.", - "login.email.login.body": "Ciao {user.nameOrEmail},\n\nHai recentemente richiesto un codice di accesso per il pannello Kirby.\nIl seguente codice sarà valido per {timeout} minuti:\n\n{code}\n\nSe non hai richiesto un codice di accesso, per favore ignora questa email o contatta il tuo amministratore se hai domande. \nPer motivi di sicurezza, per favore NON inoltrare questa email.", + "login.email.login.body": "Ciao {user.nameOrEmail},\n\nHai recentemente richiesto un codice di login per il pannello di controllo di {site}.\nIl seguente codice di login sarà valido per {timeout} minuti:\n\n{code}\n\nSe non hai richiesto un codice di login, per favore ignora questa mail o contatta il tuo amministratore in caso di domande.\nPer sicurezza, per favore NON inoltrare questa email.", "login.email.login.subject": "Il tuo codice di accesso", - "login.email.password-reset.body": "Ciao {user.nameOrEmail},\n\nHai recentemente richiesto un codice per reimpostare la tua password per il pannello Kirby.\nIl seguente codice sarà valido per {timeout} minuti:\n\n{code}\n\nSe non hai richiesto questo codice, per favore ignora questa email o contatta il tuo amministratore se hai domande. \nPer motivi di sicurezza, per favore NON inoltrare questa email.", + "login.email.password-reset.body": "Ciao {user.nameOrEmail},\n\nHai recentemente richiesto di resettare la password per il pannello di controllo di {site}.\nIl seguente codice di reset della password sarà valido per {timeout} minuti:\n\n{code}\n\nSe non hai richiesto di resettare la password per favore ignora questa email o contatta il tuo amministratore in caso di domande.\nPer sicurezza, per favore NON inoltrare questa email.", "login.email.password-reset.subject": "Il tuo codice di reimpostazione della password", "login.remember": "Resta collegato", "login.reset": "Reimposta la password", @@ -376,7 +396,7 @@ "off": "off", "on": "on", "open": "Apri", - "open.newWindow": "Open in new window", + "open.newWindow": "Apri in una finestra nuova", "options": "Opzioni", "options.none": "Nessuna opzione", @@ -385,7 +405,7 @@ "orientation.portrait": "Verticale", "orientation.square": "Quadrato", - "page.blueprint": "Questa pagina non ha ancora un \"blueprint\". Puoi impostarne uno in /site/blueprints/{template}.yml", + "page.blueprint": "Questa pagina non ha ancora un blueprint. Puoi definire la sua configurazione in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Modifica URL", "page.changeSlug.fromTitle": "Crea in base al titolo", "page.changeStatus": "Cambia stato", @@ -417,7 +437,10 @@ "pagination.page": "Pagina", "password": "Password", + "paste": "Incolla", + "paste.after": "Incolla dopo", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Precedente", "preview": "Anteprima", "remove": "Rimuovi", @@ -454,6 +477,8 @@ "template": "Template", "today": "Oggi", + "server": "Server", + "site.blueprint": "Il sito non ha ancora un \"blueprint\". Puoi impostarne uno in /site/blueprints/site.yml", "toolbar.button.code": "Codice", @@ -463,14 +488,18 @@ "toolbar.button.heading.1": "Titolo 1", "toolbar.button.heading.2": "Titolo 2", "toolbar.button.heading.3": "Titolo 3", + "toolbar.button.heading.4": "Titolo 4", + "toolbar.button.heading.5": "Titolo 5", + "toolbar.button.heading.6": "Titolo 6", "toolbar.button.italic": "Corsivo", "toolbar.button.file": "File", "toolbar.button.file.select": "Seleziona un file", "toolbar.button.file.upload": "Carica un file", "toolbar.button.link": "Link", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Paragrafo", + "toolbar.button.strike": "Barrato", "toolbar.button.ol": "Elenco numerato", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Sottolinea", "toolbar.button.ul": "Elenco puntato", "translation.author": "Kirby Team, Roman Steiner, Manu Moreale", @@ -497,7 +526,7 @@ "url.placeholder": "https://esempio.com", "user": "Utente", - "user.blueprint": "Puoi definire sezioni e campi del form aggiuntivi per questo ruolo in /site/blueprints/users/{role}.yml", + "user.blueprint": "Puoi definire ulteriori sezioni e campi del form aggiuntivi per questo ruolo in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Modifica email", "user.changeLanguage": "Cambia lingua", "user.changeName": "Rinomina questo utente", @@ -516,12 +545,13 @@ "view.account": "Il tuo account", "view.installation": "Installazione", + "view.languages": "Lingue", "view.resetPassword": "Reimposta la password", - "view.settings": "Impostazioni", "view.site": "Sito", + "view.system": "Sistema", "view.users": "Utenti", "welcome": "Benvenuto", "year": "Anno", - "yes": "yes" + "yes": "sì" } diff --git a/kirby/i18n/translations/ko.json b/kirby/i18n/translations/ko.json index 83258df..0e5262d 100644 --- a/kirby/i18n/translations/ko.json +++ b/kirby/i18n/translations/ko.json @@ -1,6 +1,11 @@ { + "account.changeName": "이름 변경", + "account.delete": "계정 삭제", + "account.delete.confirm": "계정을 삭제할까요? 계정을 삭제한 뒤에는 복구할 수 없습니다.", + "add": "\ucd94\uac00", - "avatar": "\ud504\ub85c\ud544 \uc774\ubbf8\uc9c0", + "author": "저자", + "avatar": "프로필 이미지", "back": "복귀", "cancel": "\ucde8\uc18c", "change": "\ubcc0\uacbd", @@ -9,6 +14,7 @@ "collapse": "접기", "collapse.all": "모두 접기", "copy": "복사", + "copy.all": "모두 복사", "create": "등록", "date": "날짜", @@ -23,24 +29,28 @@ "days.tue": "\ud654", "days.wed": "\uc218", + "debugging": "디버깅", + "delete": "\uc0ad\uc81c", "delete.all": "모두 삭제", - "dimensions": "크기", - "disabled": "비활성화", - "discard": "무시", - "download": "다운로드", - "duplicate": "복제", - "edit": "\ud3b8\uc9d1", - "expand": "열기", - "expand.all": "모두 열기", "dialog.files.empty": "선택한 파일이 없습니다.", "dialog.pages.empty": "선택한 페이지가 없습니다.", "dialog.users.empty": "선택한 사용자가 없습니다.", + "dimensions": "크기", + "disabled": "비활성화", + "discard": "무시", + "download": "다운로드", + "duplicate": "복제", + + "edit": "\ud3b8\uc9d1", + "email": "\uc774\uba54\uc77c \uc8fc\uc18c", "email.placeholder": "mail@example.com", + "environment": "환경", + "error.access.code": "코드가 올바르지 않습니다.", "error.access.login": "로그인할 수 없습니다.", "error.access.panel": "패널에 접근할 권한이 없습니다.", @@ -76,7 +86,7 @@ "error.file.mime.forbidden": "이 MIME 형식({mime})은 업로드할 수 없습니다.", "error.file.mime.invalid": "MIME 형식({mime})이 올바르지 않습니다.", "error.file.mime.missing": "파일({filename})의 MIME 형식을 확인할 수 없습니다.", - "error.file.minheight": "{height}픽셀 이상으로 이미지의 높이를 설정하세요.", + "error.file.minheight": "이미지의 높이를 {height}픽셀 이상으로 설정하세요.", "error.file.minsize": "파일이 너무 작습니다.", "error.file.minwidth": "이미지의 너비를 {width}픽셀 이상으로 설정하세요.", "error.file.name.missing": "파일명을 입력하세요.", @@ -92,6 +102,7 @@ "error.language.code": "올바른 언어 코드를 입력하세요.", "error.language.duplicate": "이미 등록한 언어입니다.", "error.language.name": "올바른 언어명을 입력하세요.", + "error.language.notFound": "언어를 찾을 수 없습니다.", "error.layout.validation.block": "레이아웃({layoutIndex})의 블록({blockIndex})을 확인하세요.", "error.layout.validation.settings": "레이아웃({index})의 옵션을 확인하세요.", @@ -100,6 +111,8 @@ "error.license.email": "올바른 이메일 주소를 입력하세요.", "error.license.verification": "라이선스 키가 올바르지 않습니다.", + "error.offline": "패널이 오프라인 상태입니다.", + "error.page.changeSlug.permission": "고유 주소({slug})를 변경할 권한이 없습니다.", "error.page.changeStatus.incomplete": "페이지를 공개할 수 없습니다.", "error.page.changeStatus.permission": "페이지의 상태를 변경할 수 없습니다.", @@ -119,7 +132,7 @@ "error.page.notFound": "페이지({slug})가 없습니다.", "error.page.num.invalid": "올바른 정수를 입력하세요.", "error.page.slug.invalid": "올바른 URL을 입력하세요.", - "error.page.slug.maxlength": "{length}자 이하로 고유 주소를 입력하세요.", + "error.page.slug.maxlength": "고유 주소를 {length}자 이하로 입력하세요.", "error.page.sort.permission": "페이지({slug})를 정렬할 수 없습니다.", "error.page.status.invalid": "올바른 상태를 설정하세요.", "error.page.undefined": "\ud398\uc774\uc9c0\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.", @@ -165,6 +178,7 @@ "error.user.password.undefined": "암호가 설정되지 않았습니다.", "error.user.password.wrong": "암호가 올바르지 않습니다.", "error.user.role.invalid": "올바른 역할을 지정하세요.", + "error.user.undefined": "사용자가 없습니다.", "error.user.update.permission": "사용자({name})의 정보를 변경할 권한이 없습니다.", "error.validation.accepted": "확인하세요.", @@ -208,6 +222,9 @@ "error.validation.time.between": "{min}, {max} 사이의 시각을 입력하세요.", "error.validation.url": "올바른 URL을 입력하세요.", + "expand": "열기", + "expand.all": "모두 열기", + "field.required": "필드를 채우세요.", "field.blocks.changeType": "유형 변경", "field.blocks.code.name": "코드", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "선택한 블록을 삭제할까요?", "field.blocks.empty": "블록이 없습니다.", "field.blocks.fieldsets.label": "블록의 유형을 선택하세요.", + "field.blocks.fieldsets.paste": "단축키({{ shortcut }})로 클립보드에서 블록을 가져올 수 있습니다.", "field.blocks.gallery.name": "갤러리", "field.blocks.gallery.images.empty": "이미지가 없습니다.", "field.blocks.gallery.images.label": "이미지", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "이미지 선택", "field.blocks.image.ratio": "비율", "field.blocks.image.url": "이미지 URL", + "field.blocks.line.name": "가로줄", "field.blocks.list.name": "목록", "field.blocks.markdown.name": "마크다운", "field.blocks.markdown.label": "마크다운", @@ -263,7 +282,7 @@ "field.structure.empty": "항목이 없습니다.", "field.users.empty": "선택한 사용자가 없습니다.", - "file.blueprint": "블루프린트(/site/blueprints/{template}.yml)를 설정하세요.", + "file.blueprint": "블루프린트(/site/blueprints/files/{blueprint}.yml)를 설정하세요.", "file.delete.confirm": "파일({filename})을 삭제할까요?", "file.sort": "순서 변경", @@ -272,6 +291,7 @@ "hide": "숨기기", "hour": "시", + "import": "가져오기", "insert": "\uc0bd\uc785", "insert.after": "뒤에 삽입", "insert.before": "앞에 삽입", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "암호 초기화 코드", "login.code.placeholder.email": "000 000", "login.code.text.email": "입력한 이메일 주소로 코드를 전송했습니다.", - "login.email.login.body": "{user.nameOrEmail} 님,\n\nKirby 패널에서 요청한 로그인 코드는 다음과 같습니다. 로그인 코드는 {timeout}분 동안 유효합니다.\n\n{code}\n\n로그인 코드를 요청한 적이 없다면, 이 이메일을 무시하거나 관리자에게 문의하세요. 보안을 위해 이 이메일은 다른 사람과 공유하지 마세요.", + "login.email.login.body": "{user.nameOrEmail} 님,\n\n{site} 패널에서 요청한 로그인 코드는 다음과 같습니다. 로그인 코드는 {timeout}분 동안 유효합니다.\n\n{code}\n\n로그인 코드를 요청한 적이 없다면, 이 이메일을 무시하거나 관리자에게 문의하세요. 보안을 위해 이 이메일은 다른 사람과 공유하지 마세요.", "login.email.login.subject": "로그인 코드", - "login.email.password-reset.body": "{user.nameOrEmail} 님,\n\nKirby 패널에서 요청한 로그인 코드는 다음과 같습니다. 로그인 코드는 {timeout}분 동안 유효합니다.\n\n{code}\n\n로그인 코드를 요청한 적이 없다면, 이 이메일을 무시하거나 관리자에게 문의하세요. 보안을 위해 이 이메일은 다른 사람과 공유하지 마세요.", + "login.email.password-reset.body": "{user.nameOrEmail} 님,\n\n{site} 패널에서 요청한 암호 초기화 코드는 다음과 같습니다. 암호 초기화 코드는 {timeout}분 동안 유효합니다.\n\n{code}\n\n암호 초기화 코드를 요청한 적이 없다면, 이 이메일을 무시하거나 관리자에게 문의하세요. 보안을 위해 이 이메일은 다른 사람과 공유하지 마세요.", "login.email.password-reset.subject": "암호 초기화 코드", "login.remember": "로그인 유지", "login.reset": "암호 초기화", @@ -372,11 +392,11 @@ "more": "더 보기", "name": "이름", "next": "다음", - "no": "no", + "no": "네", "off": "끔", "on": "켬", "open": "열기", - "open.newWindow": "Open in new window", + "open.newWindow": "새 창에서 열기", "options": "옵션", "options.none": "옵션이 없습니다.", @@ -385,7 +405,7 @@ "orientation.portrait": "세로로 긴 사각형", "orientation.square": "정사각형", - "page.blueprint": "블루프린트(/site/blueprints/{template}.yml)를 설정하세요.", + "page.blueprint": "블루프린트(/site/blueprints/pages/{blueprint}.yml)를 설정하세요.", "page.changeSlug": "고유 주소 변경", "page.changeSlug.fromTitle": "제목에서 가져오기", "page.changeStatus": "상태 변경", @@ -417,7 +437,10 @@ "pagination.page": "페이지", "password": "\uc554\ud638", + "paste": "붙여넣기", + "paste.after": "뒤로 붙여넣기", "pixel": "픽셀", + "plugins": "플러그인", "prev": "이전", "preview": "미리 보기", "remove": "삭제", @@ -454,6 +477,8 @@ "template": "\ud15c\ud50c\ub9bf", "today": "오늘", + "server": "서버", + "site.blueprint": "블루프린트(/site/blueprints/site.yml)를 설정하세요.", "toolbar.button.code": "코드", @@ -463,18 +488,22 @@ "toolbar.button.heading.1": "제목 1", "toolbar.button.heading.2": "제목 2", "toolbar.button.heading.3": "제목 3", + "toolbar.button.heading.4": "제목 4", + "toolbar.button.heading.5": "제목 5", + "toolbar.button.heading.6": "제목 6", "toolbar.button.italic": "강조 2", "toolbar.button.file": "파일", "toolbar.button.file.select": "파일 선택", "toolbar.button.file.upload": "파일 업로드", "toolbar.button.link": "링크", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "문단", + "toolbar.button.strike": "취소선", "toolbar.button.ol": "숫자 목록", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "밑줄", "toolbar.button.ul": "기호 목록", "translation.author": "Kirby 팀", - "translation.direction": "LTR", + "translation.direction": "왼쪽에서 오른쪽", "translation.name": "한국어", "translation.locale": "ko_KR", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "사용자", - "user.blueprint": "블루프린트(/site/blueprints/users/{role}.yml)에 섹션과 필드를 추가할 수 있습니다.", + "user.blueprint": "블루프린트(/site/blueprints/users/{blueprint}.yml)에 섹션과 필드를 추가할 수 있습니다.", "user.changeEmail": "이메일 주소 변경", "user.changeLanguage": "언어 변경", "user.changeName": "사용자명 변경", @@ -516,12 +545,13 @@ "view.account": "계정", "view.installation": "\uc124\uce58", + "view.languages": "언어", "view.resetPassword": "암호 초기화", - "view.settings": "설정", "view.site": "사이트", + "view.system": "시스템", "view.users": "\uc0ac\uc6a9\uc790", "welcome": "반갑습니다.", "year": "년", - "yes": "yes" + "yes": "아니요" } diff --git a/kirby/i18n/translations/lt.json b/kirby/i18n/translations/lt.json index 77f8d61..9ca9123 100644 --- a/kirby/i18n/translations/lt.json +++ b/kirby/i18n/translations/lt.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Pridėti", + "author": "Author", "avatar": "Profilio nuotrauka", "back": "Atgal", "cancel": "Atšaukti", @@ -9,6 +14,7 @@ "collapse": "Sutraukti", "collapse.all": "Sutraukti viską", "copy": "Kopijuoti", + "copy.all": "Kopijuoti visus", "create": "Sukurti", "date": "Data", @@ -23,24 +29,28 @@ "days.tue": "Ant", "days.wed": "Tre", + "debugging": "Debugging", + "delete": "Pašalinti", "delete.all": "Pašalinti viską", - "dimensions": "Išmatavimai", - "disabled": "Išjungta", - "discard": "Atšaukti", - "download": "Parsisiųsti", - "duplicate": "Kopijuoti", - "edit": "Redaguoti", - "expand": "Išskleisti", - "expand.all": "Išskleisti viską", "dialog.files.empty": "Nėra failų pasirinkimui", "dialog.pages.empty": "Nėra puslapių pasirinkimui", "dialog.users.empty": "Nėra vartotojų pasirinkimui", + "dimensions": "Išmatavimai", + "disabled": "Išjungta", + "discard": "Atšaukti", + "download": "Parsisiųsti", + "duplicate": "Dublikuoti", + + "edit": "Redaguoti", + "email": "El. paštas", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Neteisinas kodas", "error.access.login": "Neteisingas prisijungimo vardas", "error.access.panel": "Neturite teisės prisijungti prie valdymo pulto", @@ -92,6 +102,7 @@ "error.language.code": "Prašome įrašyti teisingą kalbos kodą", "error.language.duplicate": "Tokia kalba jau yra", "error.language.name": "Prašome įrašyti teisingą kalbos pavadinimą", + "error.language.notFound": "Nepavyko rasti šios kalbos", "error.layout.validation.block": "Yra klaida bloke {blockIndex} išdėstyme {layoutIndex}", "error.layout.validation.settings": "Yra klaida išdėstymo {index} nustatymuose", @@ -100,6 +111,8 @@ "error.license.email": "Prašome įrašyti teisingą el. pašto adresą", "error.license.verification": "Nepavyko patikrinti licenzijos", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Neturite teisės pakeisti \"{slug}\" URL", "error.page.changeStatus.incomplete": "Puslapis turi klaidų ir negali būti paskelbtas", "error.page.changeStatus.permission": "Šiam puslapiui negalima pakeisti statuso", @@ -118,7 +131,7 @@ "error.page.duplicate.permission": "Neturite leidimo dubliuoti \"{slug}\"", "error.page.notFound": "Puslapis \"{slug}\" nerastas", "error.page.num.invalid": "Įrašykite teisingą eiliškumo numerį. Numeris negali būti neigiamas.", - "error.page.slug.invalid": "Please enter a valid URL appendix", + "error.page.slug.invalid": "Įrašykite teisingą URL priedą", "error.page.slug.maxlength": "url adreso maksimalus simbolių kiekis: \"{length}\"", "error.page.sort.permission": "Puslapiui \"{slug}\" negalima pakeisti eiliškumo", "error.page.status.invalid": "Nustatykite teisingą puslapio statusą", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Prašome įrašyti galiojantį slaptažodį. Slaptažodį turi sudaryti bent 8 simboliai.", "error.user.password.notSame": "Slaptažodžiai nesutampa", "error.user.password.undefined": "Vartotojas neturi slaptažodžio", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Neteisingas slaptažodis", "error.user.role.invalid": "Įrašykite teisingą rolę", + "error.user.undefined": "Vartotojas nerastas", "error.user.update.permission": "Neturite teisės keisti vartotojo \"{name}\"", "error.validation.accepted": "Prašome patvirtinti", @@ -208,6 +222,9 @@ "error.validation.time.between": "Įrašykite laiką tarp {min} ir {max}", "error.validation.url": "Prašome įrašyti teisingą URL", + "expand": "Išskleisti", + "expand.all": "Išskleisti viską", + "field.required": "Laukas privalomas", "field.blocks.changeType": "Pakeisti tipą", "field.blocks.code.name": "Kodas", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Ar tikrai norite pašalinti pasirinktus blokus?", "field.blocks.empty": "Dar nėra blokų", "field.blocks.fieldsets.label": "Pasirinkite bloko tipą ...", + "field.blocks.fieldsets.paste": "Spauskite {{ shortcut }} įterpti/importuoti nukopijuotus blokus", "field.blocks.gallery.name": "Galerija", "field.blocks.gallery.images.empty": "Dar nėra nuotraukų", "field.blocks.gallery.images.label": "Nuotraukos", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Pasirinkite nuotrauką", "field.blocks.image.ratio": "Proporcijos", "field.blocks.image.url": "Nuotraukos URL", + "field.blocks.line.name": "Linija", "field.blocks.list.name": "Sąrašas", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Tekstas", @@ -263,7 +282,7 @@ "field.structure.empty": "Dar nėra įrašų", "field.users.empty": "Dar nėra vartotojų", - "file.blueprint": "Šis failas dar neturi blueprint. Jūs galite nustatyti jį /site/blueprints/{template}.yml", + "file.blueprint": "Šis failas dar neturi blueprint. Galite nustatyti jį per /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Ar tikrai norite pašalinti
{filename}?", "file.sort": "Pakeisti poziciją", @@ -272,6 +291,7 @@ "hide": "Paslėpti", "hour": "Valanda", + "import": "Importuoti", "insert": "Įterpti", "insert.after": "Įterpti po", "insert.before": "Įterpti prieš", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Slaptažodžio atstatymo kodas", "login.code.placeholder.email": "000 000", "login.code.text.email": "Jei jūsų el. paštas yra užregistruotas, užklaistas kodas buvo išsiųstas el. paštu.", - "login.email.login.body": "Sveiki, {user.nameOrEmail},\n\nJūs ką tik užklausėte prisijungimo kodą svetainės valdymui.\nŠis kodas galios {timeout} minučių:\n\n{code}\n\nJei neprašėte šio kodo, galite ignoruoti šį laišką arba kreiptis į administratorių dėl patikslinimo.\nDėl saugumo, prašome nepersiųsti šio laiško kitiems.", + "login.email.login.body": "Sveiki, {user.nameOrEmail},\n\nNeseniai užklausėte prisijungimo kodo svetainėje {site}.\nŠis kodas galios {timeout} min.:\n\n{code}\n\nJei neprašėte šio kodo, tiesiog ignoruokite, arba susisiekite su administratoriumi.\nDėl saugumo, prašome NEPERSIŲSTI šio laiško.", "login.email.login.subject": "Jūsų prisijungimo kodas", - "login.email.password-reset.body": "Sveiki, {user.nameOrEmail},\n\njūs ką tik užklausėte slaptažodžio atstatymo kodą svetainės valdymui .\nŠis kodas galios {timeout} minučių:\n\n{code}\n\nJei neprašėte šio kodo, galite ignoruoti šį laišką arba kreiptis į administratorių dėl patikslinimo.\nDėl saugumo, prašome nepersiųsti šio laiško kitiems.", + "login.email.password-reset.body": "Sveiki, {user.nameOrEmail},\n\nNeseniai užklausėte naujo slaptažodžio kūrimo kodo svetainėje {site}.\nŠis kodas galios {timeout} min.:\n\n{code}\n\nJei neprašėte šio kodo, tiesiog ignoruokite, arba susisiekite su administratoriumi.\nDėl saugumo, prašome NEPERSIŲSTI šio laiško", "login.email.password-reset.subject": "Jūsų slaptažodžio atstatymo kodas ", "login.remember": "Likti prisijungus", "login.reset": "Sukurti naują slaptažodį", @@ -372,11 +392,11 @@ "more": "Daugiau", "name": "Pavadinimas", "next": "Toliau", - "no": "no", - "off": "off", - "on": "on", + "no": "ne", + "off": "ne", + "on": "taip", "open": "Atidaryti", - "open.newWindow": "Open in new window", + "open.newWindow": "Atidaryti naujame lange", "options": "Pasirinkimai", "options.none": "Nėra pasirinkimų", @@ -385,7 +405,7 @@ "orientation.portrait": "Portretas", "orientation.square": "Kvadratas", - "page.blueprint": "Šis puslapis dar neturi blueprint. Jūs galite nustatyti jį /site/blueprints/{template}.yml", + "page.blueprint": "Šis puslapis dar neturi blueprint. Galite jį nustatyti per /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Pakeisti URL", "page.changeSlug.fromTitle": "Sukurti URL pagal pavadinimą", "page.changeStatus": "Pakeisti statusą", @@ -417,7 +437,10 @@ "pagination.page": "Puslapis", "password": "Slaptažodis", + "paste": "Įterpti", + "paste.after": "Įterpti po", "pixel": "Pikselis", + "plugins": "Plugins", "prev": "Ankstesnis", "preview": "Peržiūra", "remove": "Pašalinti", @@ -454,6 +477,8 @@ "template": "Puslapio šablonas", "today": "Šiandien", + "server": "Server", + "site.blueprint": "Svetainė neturi blueprint. Jūs galite nustatyti jį /site/blueprints/site.yml", "toolbar.button.code": "Kodas", @@ -463,14 +488,18 @@ "toolbar.button.heading.1": "Heading 1", "toolbar.button.heading.2": "Heading 2", "toolbar.button.heading.3": "Heading 3", + "toolbar.button.heading.4": "Antrašte 4", + "toolbar.button.heading.5": "Antrašte 5", + "toolbar.button.heading.6": "Antrašte 6", "toolbar.button.italic": "Italic", "toolbar.button.file": "Failas", "toolbar.button.file.select": "Pasirinkite failą", "toolbar.button.file.upload": "Įkelti failą", "toolbar.button.link": "Nuoroda", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Paragrafas", + "toolbar.button.strike": "Perbraukimas", "toolbar.button.ol": "Sąrašas su skaičiais", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Pabraukimas", "toolbar.button.ul": "Sąrašas su taškais", "translation.author": "Roman U", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Vartotojas", - "user.blueprint": "Galite nustatyti papildomas sekcijas ir formos laukelius šiai vartotojo rolei faile /site/blueprints/users/{role}.yml", + "user.blueprint": "Galite nustatyti papildomas sekcijas ir formos laukelius šiam vartotojui per /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Keisti el. paštą", "user.changeLanguage": "Keisti kalbą", "user.changeName": "Pervadinti vartotoją", @@ -516,12 +545,13 @@ "view.account": "Jūsų paskyra", "view.installation": "Installation", + "view.languages": "Kalbos", "view.resetPassword": "Sukurti naują slaptažodį", - "view.settings": "Nustatymai", "view.site": "Svetainė", + "view.system": "System", "view.users": "Vartotojai", "welcome": "Sveiki", "year": "Metai", - "yes": "yes" + "yes": "taip" } diff --git a/kirby/i18n/translations/nb.json b/kirby/i18n/translations/nb.json index 1a7bc37..6f1f4d0 100644 --- a/kirby/i18n/translations/nb.json +++ b/kirby/i18n/translations/nb.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Legg til", + "author": "Author", "avatar": "Profilbilde", "back": "Tilbake", "cancel": "Avbryt", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Kopier", + "copy.all": "Copy all", "create": "Opprett", "date": "Dato", @@ -23,24 +29,28 @@ "days.tue": "Tir", "days.wed": "Ons", + "debugging": "Debugging", + "delete": "Slett", "delete.all": "Delete all", - "dimensions": "Dimensjoner", - "disabled": "Disabled", - "discard": "Forkast", - "download": "Download", - "duplicate": "Duplicate", - "edit": "Rediger", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "Dimensjoner", + "disabled": "Disabled", + "discard": "Forkast", + "download": "Download", + "duplicate": "Duplicate", + + "edit": "Rediger", + "email": "Epost", "email.placeholder": "epost@eksempel.no", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Ugyldig innlogging", "error.access.panel": "Du har ikke tilgang til panelet", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Vennligst skriv inn en gyldig e-postadresse", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Du kan ikke endre URLen for denne siden", "error.page.changeStatus.incomplete": "Siden har feil og kan ikke publiseres", "error.page.changeStatus.permission": "Sidens status kan ikke endres", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Brukeren har ikke et passord", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Vennligst skriv inn en gyldig rolle", + "error.user.undefined": "Brukeren kunne ikke bli funnet", "error.user.update.permission": "Du har ikke tillatelse til å oppdatere brukeren \"{name}\"", "error.validation.accepted": "Vennligst bekreft", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Vennligst skriv inn en gyldig URL", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Kode", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Ingen oppf\u00f8ringer enda", "field.users.empty": "Ingen bruker har blitt valgt", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Vil du virkelig slette denne filen?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Time", + "import": "Import", "insert": "Sett Inn", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Hold meg innlogget", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Portrett", "orientation.square": "Kvadrat", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Endre URL", "page.changeSlug.fromTitle": "Opprett fra tittel", "page.changeStatus": "Endre status", @@ -417,7 +437,10 @@ "pagination.page": "Side", "password": "Passord", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Piksel", + "plugins": "Plugins", "prev": "Forrige", "preview": "Preview", "remove": "Fjern", @@ -454,6 +477,8 @@ "template": "Mal", "today": "I dag", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Kode", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Overskrift 1", "toolbar.button.heading.2": "Overskrift 2", "toolbar.button.heading.3": "Overskrift 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Kursiv tekst", "toolbar.button.file": "Fil", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "Adresse", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Ordnet liste", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Bruker", - "user.blueprint": "Du kan definere flere seksjoner og skjemafelter for denne brukerrollen i /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Endre e-post", "user.changeLanguage": "Endre språk", "user.changeName": "Angi nytt navn for denne brukeren", @@ -516,9 +545,10 @@ "view.account": "Din konto", "view.installation": "Installasjon", + "view.languages": "Språk", "view.resetPassword": "Reset password", - "view.settings": "Innstillinger", "view.site": "Side", + "view.system": "System", "view.users": "Brukere", "welcome": "Velkommen", diff --git a/kirby/i18n/translations/nl.json b/kirby/i18n/translations/nl.json index 6cc7368..437b11e 100644 --- a/kirby/i18n/translations/nl.json +++ b/kirby/i18n/translations/nl.json @@ -1,5 +1,10 @@ { + "account.changeName": "Wijzig je naam", + "account.delete": "Verwijder je account", + "account.delete.confirm": "Wil je echt je account verwijderen? Je wordt direct uitgelogd. Uw account kan niet worden hersteld.", + "add": "Voeg toe", + "author": "Auteur", "avatar": "Avatar", "back": "Terug", "cancel": "Annuleren", @@ -9,6 +14,7 @@ "collapse": "Sluit", "collapse.all": "Sluit alles", "copy": "Kopiëren", + "copy.all": "Kopieer alles", "create": "Aanmaken", "date": "Datum", @@ -23,24 +29,28 @@ "days.tue": "Di", "days.wed": "Wo", + "debugging": "Foutopsporing", + "delete": "Verwijderen", "delete.all": "Verwijder alles", - "dimensions": "Dimensies", - "disabled": "Uitgeschakeld", - "discard": "Annuleren", - "download": "Download", - "duplicate": "Dupliceren", - "edit": "Wijzig", - "expand": "Open", - "expand.all": "Open alles", "dialog.files.empty": "Geen bestanden om te selecteren", "dialog.pages.empty": "Geen pagina's om te selecteren", "dialog.users.empty": "Geen gebruikers om te selecteren", + "dimensions": "Dimensies", + "disabled": "Uitgeschakeld", + "discard": "Annuleren", + "download": "Download", + "duplicate": "Dupliceren", + + "edit": "Wijzig", + "email": "E-mailadres", "email.placeholder": "mail@voorbeeld.nl", + "environment": "Omgeving", + "error.access.code": "Ongeldige code", "error.access.login": "Ongeldige login", "error.access.panel": "Je hebt geen toegang tot het Panel", @@ -92,6 +102,7 @@ "error.language.code": "Vul een geldige code voor deze taal in", "error.language.duplicate": "De taal bestaat al", "error.language.name": "Vul een geldige naam voor deze taal in", + "error.language.notFound": "De taal kan niet worden gevonden", "error.layout.validation.block": "Er is een fout gevonden in blok {blockIndex} in ontwerp {layoutIndex}", "error.layout.validation.settings": "Er is een fout gevonden in de instellingen van ontwerp {index} ", @@ -100,6 +111,8 @@ "error.license.email": "Gelieve een geldig emailadres in te voeren", "error.license.verification": "De licentie kon niet worden geverifieerd. ", + "error.offline": "Het Panel is momenteel offline", + "error.page.changeSlug.permission": "Je kunt de URL van deze pagina niet wijzigen", "error.page.changeStatus.incomplete": "Deze pagina bevat fouten en kan niet worden gepubliceerd", "error.page.changeStatus.permission": "De status van deze pagina kan niet worden gewijzigd", @@ -118,7 +131,7 @@ "error.page.duplicate.permission": "Je bent niet gemachtigd om \"{slug}\" te dupliceren", "error.page.notFound": "De pagina \"{slug}\" kan niet worden gevonden", "error.page.num.invalid": "Vul een geldig sorteer-cijfer in. Het cijfer mag niet negatief zijn", - "error.page.slug.invalid": "Please enter a valid URL appendix", + "error.page.slug.invalid": "Vul een geldig URL-achtervoegsel in", "error.page.slug.maxlength": "Slug lengte moet minder dan \"{length}\" tekens bevatten", "error.page.sort.permission": "De pagina \"{slug}\" kan niet worden gesorteerd", "error.page.status.invalid": "Zorg voor een geldige paginastatus", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Gelieve een geldig wachtwoord in te voeren. Wachtwoorden moeten minstens 8 karakters lang zijn.", "error.user.password.notSame": "De wachtwoorden komen niet overeen", "error.user.password.undefined": "De gebruiker heeft geen wachtwoord", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Fout wachtwoord", "error.user.role.invalid": "Gelieve een geldige rol in te voeren", + "error.user.undefined": "De gebruiker kan niet worden gevonden", "error.user.update.permission": "Je hebt geen rechten om gebruiker \"{name}\" te updaten", "error.validation.accepted": "Gelieve te bevestigen", @@ -208,6 +222,9 @@ "error.validation.time.between": "Voer een tijd in tussen {min} en {max}", "error.validation.url": "Vul een geldige URL in", + "expand": "Open", + "expand.all": "Open alles", + "field.required": "Dit veld is verplicht", "field.blocks.changeType": "Wijzig type", "field.blocks.code.name": "Code", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Wil je de geselecteerde blokken echt verwijderen?", "field.blocks.empty": "Nog geen blokken", "field.blocks.fieldsets.label": "Selecteer een bloktype ...", + "field.blocks.fieldsets.paste": "Druk op {{ shortcut }} om blokken van je klembord te plakken/importeren", "field.blocks.gallery.name": "Galerij", "field.blocks.gallery.images.empty": "Nog geen afbeeldingen", "field.blocks.gallery.images.label": "Afbeeldingen", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Selecteer een afbeelding", "field.blocks.image.ratio": "Verhouding", "field.blocks.image.url": "Afbeeldings-URL", + "field.blocks.line.name": "Lijn", "field.blocks.list.name": "Lijst", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Tekst", @@ -263,7 +282,7 @@ "field.structure.empty": "Nog geen items.", "field.users.empty": "Nog geen gebruikers geselecteerd", - "file.blueprint": "Dit bestand heeft nog geen ontwerp. Je kan het ontwerp hier plaatsen /site/blueprints/{template}.yml", + "file.blueprint": "Dit bestand heeft nog geen blauwdruk. U kunt de instellingen definiëren in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Wil je dit bestand
{filename} verwijderen?", "file.sort": "Verander positie", @@ -272,6 +291,7 @@ "hide": "Verberg", "hour": "Uur", + "import": "Importeer", "insert": "Toevoegen", "insert.after": "Voeg toe na", "insert.before": "Voeg toe voor", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Wachtwoord herstel code", "login.code.placeholder.email": "000 000", "login.code.text.email": "Als uw e-mailadres geregistreerd is, werd de gevraagde code per e-mail verzonden.", - "login.email.login.body": "Hallo {user.nameOrEmail},\n\nU heeft onlangs een inlogcode aangevraagd voor het Kirby Panel.\nDe volgende inlogcode is geldig voor {timeout} minuten:\n\n{code}\n\nIndien u geen inlogcode heeft aangevraagd, negeer dan alstublieft deze email of neem contact op met uw beheerder indien u vragen heeft.\nVoor de veiligheid, gelieve deze email NIET door te sturen.", + "login.email.login.body": "Hallo {user.nameOrEmail},\n\nJe hebt onlangs een inlogcode aangevraagd voor het Panel van {site}.\nDe volgende inlogcode is {timeout} minuten geldig:\n\n{code}\n\nAls je geen inlogcode hebt aangevraagd, mag je deze mail negeren of neem je contact op met uw beheerder.\nOm veiligheidsredenen verzoeken wij deze e-mail NIET door te sturen.", "login.email.login.subject": "Jouw log in code", - "login.email.password-reset.body": "Hallo {user.nameOrEmail},\n\nU heeft onlangs een wachtwoord reset code aangevraagd voor het Kirby Panel.\nDe volgende wachtwoord reset code is geldig voor {timeout} minuten:\n\n{code}\n\nAls u geen wachtwoord reset code heeft aangevraagd, negeer deze e-mail dan alstublieft of neem contact op met uw beheerder als u vragen heeft.\nVoor de veiligheid, gelieve deze email NIET door te sturen.", + "login.email.password-reset.body": "Hallo {user.nameOrEmail},\n\nJe hebt onlangs een paswoord herstel code aangevraagd voor het Panel van {site}.\nDe volgende paswoord herstel code is {timeout} minuten geldig:\n\n{code}\n\nAls je geen paswoord herstel code hebt aangevraagd, mag je deze mail negeren of neem je contact op met uw beheerder.\nOm veiligheidsredenen verzoeken wij deze e-mail NIET door te sturen.", "login.email.password-reset.subject": "Jouw wachtwoord herstel code", "login.remember": "Houd mij ingelogd", "login.reset": "Wachtwoord herstellen", @@ -372,11 +392,11 @@ "more": "Meer", "name": "Naam", "next": "Volgende", - "no": "no", + "no": "nee", "off": "uit", "on": "aan", "open": "Open", - "open.newWindow": "Open in new window", + "open.newWindow": "Openen in een nieuw scherm", "options": "Opties", "options.none": "Geen opties beschikbaar", @@ -385,7 +405,7 @@ "orientation.portrait": "Staand", "orientation.square": "Vierkant", - "page.blueprint": "Deze pagina heeft nog geen ontwerp. Je kan het ontwerp hier plaatsten /site/blueprints/{template}.yml", + "page.blueprint": "Deze pagina heeft nog geen blauwdruk. Je kan de instellingen definiëren in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Verander URL", "page.changeSlug.fromTitle": "Aanmaken op basis van titel", "page.changeStatus": "Wijzig status", @@ -417,7 +437,10 @@ "pagination.page": "Pagina", "password": "Wachtwoord", + "paste": "Plak", + "paste.after": "Plak achter", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Vorige", "preview": "Voorbeeld", "remove": "Verwijder", @@ -454,6 +477,8 @@ "template": "Template", "today": "Vandaag", + "server": "Server", + "site.blueprint": "Deze website heeft nog geen ontwerp. Je kan het ontwerp hier plaatsen/site/blueprints/site.yml", "toolbar.button.code": "Code", @@ -463,14 +488,18 @@ "toolbar.button.heading.1": "Koptekst 1", "toolbar.button.heading.2": "Koptekst 2", "toolbar.button.heading.3": "Koptekst 3", + "toolbar.button.heading.4": "Hoofding 4", + "toolbar.button.heading.5": "Hoofding 5", + "toolbar.button.heading.6": "Hoofding 6", "toolbar.button.italic": "Cursieve tekst", "toolbar.button.file": "Bestand", "toolbar.button.file.select": "Selecteer een bestand", "toolbar.button.file.upload": "Upload bestand", "toolbar.button.link": "Link", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Paragraaf", + "toolbar.button.strike": "Doorstreept", "toolbar.button.ol": "Genummerde lijst", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Onderlijn", "toolbar.button.ul": "Opsomming", "translation.author": "Het team van Kirby", @@ -497,7 +526,7 @@ "url.placeholder": "https://voorbeeld.nl", "user": "Gebruiker", - "user.blueprint": "Je kunt extra zones en formuliervelden voor deze rol toevoegen in /site/blueprints/users/{role}.yml", + "user.blueprint": "Je kan aanvullende secties en formuliervelden voor deze gebruikersrol definiëren in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Email veranderen", "user.changeLanguage": "Taal veranderen", "user.changeName": "Gebruiker hernoemen", @@ -516,12 +545,13 @@ "view.account": "Jouw account", "view.installation": "Installatie", + "view.languages": "Talen", "view.resetPassword": "Wachtwoord herstellen", - "view.settings": "Opties", "view.site": "Site", + "view.system": "Systeem", "view.users": "Gebruikers", "welcome": "Welkom", "year": "Jaar", - "yes": "yes" + "yes": "ja" } diff --git a/kirby/i18n/translations/pl.json b/kirby/i18n/translations/pl.json index 16196b2..59c6faa 100644 --- a/kirby/i18n/translations/pl.json +++ b/kirby/i18n/translations/pl.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Dodaj", + "author": "Author", "avatar": "Zdj\u0119cie profilowe", "back": "Wróć", "cancel": "Anuluj", @@ -9,6 +14,7 @@ "collapse": "Zwiń", "collapse.all": "Zwiń wszystkie", "copy": "Kopiuj", + "copy.all": "Copy all", "create": "Utwórz", "date": "Data", @@ -23,24 +29,28 @@ "days.tue": "Wt", "days.wed": "\u015ar", + "debugging": "Debugging", + "delete": "Usu\u0144", "delete.all": "Usuń wszystkie", - "dimensions": "Wymiary", - "disabled": "Wyłączone", - "discard": "Odrzu\u0107", - "download": "Pobierz", - "duplicate": "Zduplikuj", - "edit": "Edytuj", - "expand": "Rozwiń", - "expand.all": "Rozwiń wszystkie", "dialog.files.empty": "Brak plików do wyboru", "dialog.pages.empty": "Brak stron do wyboru", "dialog.users.empty": "Brak użytkowników do wyboru", + "dimensions": "Wymiary", + "disabled": "Wyłączone", + "discard": "Odrzu\u0107", + "download": "Pobierz", + "duplicate": "Zduplikuj", + + "edit": "Edytuj", + "email": "Email", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Nieprawidłowy kod", "error.access.login": "Nieprawidłowy login", "error.access.panel": "Nie masz uprawnień by dostać się do panelu", @@ -92,6 +102,7 @@ "error.language.code": "Wprowadź poprawny kod języka.", "error.language.duplicate": "Język już istnieje.", "error.language.name": "Wprowadź poprawną nazwę języka.", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "W bloku {blockIndex} w układzie {layoutIndex} jest błąd", "error.layout.validation.settings": "W ustawieniach układu {index} jest błąd", @@ -100,6 +111,8 @@ "error.license.email": "Wprowadź poprawny adres email", "error.license.verification": "Nie udało się zweryfikować licencji", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Nie możesz zmienić końcówki adresu URL w \"{slug}\"", "error.page.changeStatus.incomplete": "Strona zawiera błędy i nie można jej opublikować", "error.page.changeStatus.permission": "Status tej strony nie może zostać zmieniony", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Użytkownik nie ma hasła", "error.user.password.wrong": "Nieprawidłowe hasło", "error.user.role.invalid": "Wprowadź poprawną rolę", + "error.user.undefined": "Nie można znaleźć użytkownika", "error.user.update.permission": "Nie masz uprawnień, by zaktualizować użytkownika \"{name}\"", "error.validation.accepted": "Proszę potwierdzić", @@ -208,6 +222,9 @@ "error.validation.time.between": "Wprowadź czas między {min} a {max}", "error.validation.url": "Wprowadź poprawny adres URL", + "expand": "Rozwiń", + "expand.all": "Rozwiń wszystkie", + "field.required": "Pole jest wymagane", "field.blocks.changeType": "Zmień typ", "field.blocks.code.name": "Kod", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Czy na pewno chcesz usunąć wszystkie wybrane bloki?", "field.blocks.empty": "Nie ma jeszcze żadnych bloków", "field.blocks.fieldsets.label": "Wybierz typ bloku …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Galeria", "field.blocks.gallery.images.empty": "Nie ma jeszcze żadnych obrazków", "field.blocks.gallery.images.label": "Obrazki", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Wybierz obrazek", "field.blocks.image.ratio": "Proporcje", "field.blocks.image.url": "URL obrazka", + "field.blocks.line.name": "Line", "field.blocks.list.name": "Lista", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Tekst", @@ -263,7 +282,7 @@ "field.structure.empty": "Nie ma jeszcze \u017cadnych wpis\u00f3w.", "field.users.empty": "Nie wybrano jeszcze żadnych użytkowników", - "file.blueprint": "Ten plik nie ma jeszcze wzorca. Możesz go zdefiniować w /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Czy na pewno chcesz usunąć
{filename}?", "file.sort": "Zmień pozycję", @@ -272,6 +291,7 @@ "hide": "Ukryj", "hour": "Godzina", + "import": "Import", "insert": "Wstaw", "insert.after": "Wstaw po", "insert.before": "Wstaw przed", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Kod resetowania hasła", "login.code.placeholder.email": "000 000", "login.code.text.email": "Jeśli Twój adres email jest zarejestrowany, żądany kod został wysłany na Twoją skrzynkę.", - "login.email.login.body": "Witaj {user.nameOrEmail},\n\nNiedawno poprosiłeś/-aś o kod logowania do panelu Kirby.\nPoniższy kod resetowania hasła będzie ważny przez {timeout} minut:\n\n{code}\n\nJeżeli nie zażądałeś/-aś kodu logowania, zignoruj tę wiadomość e-mail lub skontaktuj się z administratorem, jeśli masz pytania.\nZe względów bezpieczeństwa NIE przesyłaj dalej tego emaila. ", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Twój kod logowania się", - "login.email.password-reset.body": "Witaj {user.nameOrEmail},\n\nNiedawno poprosiłeś/-aś o kod resetowania hasła do panelu Kirby.\nPoniższy kod resetowania hasła będzie ważny przez {timeout} minut:\n\n{code}\n\nJeżeli nie zażądałeś/-aś kodu resetowania hasła, zignoruj tę wiadomość email lub skontaktuj się z administratorem, jeśli masz pytania.\nZe względów bezpieczeństwa NIE przesyłaj dalej tego emaila.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Twój kod resetujący hasło", "login.remember": "Nie wylogowuj mnie", "login.reset": "Zresetuj hasło", @@ -385,7 +405,7 @@ "orientation.portrait": "Pionowa", "orientation.square": "Kwadrat", - "page.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Zmie\u0144 URL", "page.changeSlug.fromTitle": "Utw\u00f3rz na podstawie tytu\u0142u", "page.changeStatus": "Zmień status", @@ -417,7 +437,10 @@ "pagination.page": "Strona", "password": "Has\u0142o", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Piksel", + "plugins": "Plugins", "prev": "Poprzednie", "preview": "Podgląd", "remove": "Usuń", @@ -454,6 +477,8 @@ "template": "Szablon", "today": "Dzisiaj", + "server": "Server", + "site.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w /site/blueprints/site.yml", "toolbar.button.code": "Kod", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Nagłówek 1", "toolbar.button.heading.2": "Nagłówek 2", "toolbar.button.heading.3": "Nagłówek 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Kursywa", "toolbar.button.file": "Plik", "toolbar.button.file.select": "Wybierz plik", "toolbar.button.file.upload": "Prześlij plik", "toolbar.button.link": "Link", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Przekreślenie", "toolbar.button.ol": "Lista numerowana", "toolbar.button.underline": "Podkreślenie", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Użytkownik", - "user.blueprint": "Możesz zdefiniować dodatkowe sekcje i pola formularza dla tej roli użytkownika w /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Zmień email", "user.changeLanguage": "Zmień język", "user.changeName": "Zmień nazwę tego użytkownika", @@ -516,9 +545,10 @@ "view.account": "Twoje konto", "view.installation": "Instalacja", + "view.languages": "Języki", "view.resetPassword": "Zresetuj hasło", - "view.settings": "Ustawienia", "view.site": "Strona", + "view.system": "System", "view.users": "U\u017cytkownicy", "welcome": "Witaj", diff --git a/kirby/i18n/translations/pt_BR.json b/kirby/i18n/translations/pt_BR.json index 96fb1aa..fa96d2e 100644 --- a/kirby/i18n/translations/pt_BR.json +++ b/kirby/i18n/translations/pt_BR.json @@ -1,14 +1,20 @@ { + "account.changeName": "Mudar seu nome", + "account.delete": "Deletar sua conta", + "account.delete.confirm": "Deseja realmente deletar sua conta? Você sairá do site imediatamente. Sua conta não poderá ser recuperada. ", + "add": "Adicionar", + "author": "Autor", "avatar": "Foto do perfil", "back": "Voltar", "cancel": "Cancelar", "change": "Alterar", "close": "Fechar", "confirm": "Salvar", - "collapse": "Collapse", - "collapse.all": "Collapse All", + "collapse": "Colapsar", + "collapse.all": "Colapsar todos", "copy": "Copiar", + "copy.all": "Copiar todos", "create": "Criar", "date": "Data", @@ -23,84 +29,91 @@ "days.tue": "Ter", "days.wed": "Qua", - "delete": "Excluir", - "delete.all": "Delete all", - "dimensions": "Dimensões", - "disabled": "Disabled", - "discard": "Descartar", - "download": "Download", - "duplicate": "Duplicate", - "edit": "Editar", - "expand": "Expand", - "expand.all": "Expand All", + "debugging": "Depuração ", - "dialog.files.empty": "No files to select", - "dialog.pages.empty": "No pages to select", - "dialog.users.empty": "No users to select", + "delete": "Deletar", + "delete.all": "Deletar todos", + + "dialog.files.empty": "Nenhum arquivo para selecionar", + "dialog.pages.empty": "Nenhuma página para selecionar", + "dialog.users.empty": "Nenhum usuário para selecionar", + + "dimensions": "Dimensões", + "disabled": "Desativado", + "discard": "Descartar", + "download": "Baixar", + "duplicate": "Duplicar", + + "edit": "Editar", "email": "Email", "email.placeholder": "mail@exemplo.com", - "error.access.code": "Invalid code", - "error.access.login": "Login inválido", + "environment": "Ambiente", + + "error.access.code": "Código inválido", + "error.access.login": "Código de acesso inválido", "error.access.panel": "Você não tem permissão para acessar o painel", - "error.access.view": "You are not allowed to access this part of the panel", + "error.access.view": "Você não tem permissão para acessar esta parte do painel", "error.avatar.create.fail": "A foto de perfil não pôde ser enviada", - "error.avatar.delete.fail": "A foto do perfil não pôde ser deletada", + "error.avatar.delete.fail": "A foto de perfil não pôde ser deletada", "error.avatar.dimensions.invalid": "Por favor, use uma foto de perfil com largura e altura menores que 3000 pixels", "error.avatar.mime.forbidden": "A foto de perfil deve ser um arquivo JPEG ou PNG", - "error.blueprint.notFound": "O blueprint \"{name}\" não pôde ser carregado", + "error.blueprint.notFound": "A planta \"{name}\" não pôde ser carregada", - "error.blocks.max.plural": "You must not add more than {max} blocks", - "error.blocks.max.singular": "You must not add more than one block", - "error.blocks.min.plural": "You must add at least {min} blocks", - "error.blocks.min.singular": "You must add at least one block", - "error.blocks.validation": "There's an error in block {index}", + "error.blocks.max.plural": "Você não deve adicionar mais do que {max} blocos", + "error.blocks.max.singular": "Você não deve adicionar mais do que um bloco", + "error.blocks.min.plural": "Você deve adicionar pelo menos {min} blocos", + "error.blocks.min.singular": "Você deve adicionar pelo menos um bloco", + "error.blocks.validation": "Há um erro no bloco {index}", - "error.email.preset.notFound": "Preset de email \"{name}\" não encontrado", + "error.email.preset.notFound": "Pré-configuração de email \"{name}\" não foi encontrada", "error.field.converter.invalid": "Conversor \"{converter}\" inválido", - "error.file.changeName.empty": "The name must not be empty", + "error.file.changeName.empty": "O nome não deve ficar em branco", "error.file.changeName.permission": "Você não tem permissão para alterar o nome de \"{filename}\"", "error.file.duplicate": "Um arquivo com o nome \"{filename}\" já existe", "error.file.extension.forbidden": "Extensão \"{extension}\" não permitida", - "error.file.extension.invalid": "Invalid extension: {extension}", + "error.file.extension.invalid": "Extensão inválida: {extension}", "error.file.extension.missing": "Extensão de \"{filename}\" em falta", - "error.file.maxheight": "The height of the image must not exceed {height} pixels", - "error.file.maxsize": "The file is too large", - "error.file.maxwidth": "The width of the image must not exceed {width} pixels", + "error.file.maxheight": "A altura da imagem não pode exceder {height} pixels", + "error.file.maxsize": "O arquivo é grande demais", + "error.file.maxwidth": "A largura da imagem não pode exceder {width} pixels", "error.file.mime.differs": "O arquivo enviado precisa ser do tipo \"{mime}\"", "error.file.mime.forbidden": "Tipo de mídia \"{mime}\" não permitido", - "error.file.mime.invalid": "Invalid mime type: {mime}", + "error.file.mime.invalid": "Tipo mime inválido: {mime}", "error.file.mime.missing": "Tipo de mídia de \"{filename}\" não detectado", - "error.file.minheight": "The height of the image must be at least {height} pixels", - "error.file.minsize": "The file is too small", - "error.file.minwidth": "The width of the image must be at least {width} pixels", + "error.file.minheight": "A altura da imagem deve ser pelo menos {height} pixels", + "error.file.minsize": "O arquivo é pequeno demais", + "error.file.minwidth": "A largura da imagem deve ser pelo menos {width} pixels", "error.file.name.missing": "O nome do arquivo não pode ficar em branco", "error.file.notFound": "Arquivo \"{filename}\" não encontrado", - "error.file.orientation": "The orientation of the image must be \"{orientation}\"", + "error.file.orientation": "A orientação da imagem deve ser “{orientation}”", "error.file.type.forbidden": "Você não tem permissão para enviar arquivos {type}", - "error.file.type.invalid": "Invalid file type: {type}", + "error.file.type.invalid": "Tipo inválido de arquivo: {type}", "error.file.undefined": "Arquivo n\u00e3o encontrado", "error.form.incomplete": "Por favor, corrija os erros do formulário…", "error.form.notSaved": "O formulário não pôde ser salvo", - "error.language.code": "Please enter a valid code for the language", - "error.language.duplicate": "The language already exists", - "error.language.name": "Please enter a valid name for the language", + "error.language.code": "Por favor entre um código válido para o idioma", + "error.language.duplicate": "O idioma já existe", + "error.language.name": "Por favor entre um nome válido para o idioma", + "error.language.notFound": "O idioma não foi encontrado", - "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", - "error.layout.validation.settings": "There's an error in layout {index} settings", + "error.layout.validation.block": "Há um erro no bloco {blockIndex} no layout {layoutIndex}", + "error.layout.validation.settings": "Há um erro na configuração do layout {index}", - "error.license.format": "Please enter a valid license key", + "error.license.format": "Por favor entre uma chave de licensa válida ", "error.license.email": "Digite um endereço de email válido", - "error.license.verification": "The license could not be verified", + "error.license.verification": "A licensa não pôde ser verificada", - "error.page.changeSlug.permission": "Você não tem permissão para alterar a URL de \"{slug}\"", + "error.offline": "O painel está offline no momento", + + "error.page.changeSlug.permission": "Você não tem permissão para alterar o anexo de URL de \"{slug}\"", "error.page.changeStatus.incomplete": "A página possui erros e não pode ser salva", "error.page.changeStatus.permission": "O estado desta página não pode ser alterado", "error.page.changeStatus.toDraft.invalid": "A página \"{slug}\" não pode ser convertida para rascunho", @@ -109,17 +122,17 @@ "error.page.changeTitle.empty": "O título não pode ficar em branco", "error.page.changeTitle.permission": "Você não tem permissão para alterar o título de \"{slug}\"", "error.page.create.permission": "Você não tem permissão para criar \"{slug}\"", - "error.page.delete": "A página \"{slug}\" não pode ser excluída", + "error.page.delete": "A página \"{slug}\" não pode ser deletada", "error.page.delete.confirm": "Por favor, digite o título da página para confirmar", - "error.page.delete.hasChildren": "A página possui subpáginas e não pode ser excluída", - "error.page.delete.permission": "Você não tem permissão para excluir \"{slug}\"", - "error.page.draft.duplicate": "Um rascunho de página com a URL \"{slug}\" já existe", - "error.page.duplicate": "Uma página com a URL \"{slug}\" já existe", - "error.page.duplicate.permission": "You are not allowed to duplicate \"{slug}\"", - "error.page.notFound": "Página\"{slug}\" não encontrada", + "error.page.delete.hasChildren": "A página possui subpáginas e não pode ser deletada", + "error.page.delete.permission": "Você não tem permissão para deletar \"{slug}\"", + "error.page.draft.duplicate": "Uma página rascunho com um anexo de URL \"{slug}\" já existe", + "error.page.duplicate": "Uma página com o anexo de URL \"{slug}\" já existe", + "error.page.duplicate.permission": "Você não tem permissão para duplicar “{slug}”", + "error.page.notFound": "Página \"{slug}\" não encontrada", "error.page.num.invalid": "Digite um número de ordenação válido. Este número não pode ser negativo.", - "error.page.slug.invalid": "Please enter a valid URL appendix", - "error.page.slug.maxlength": "Slug length must be less than \"{length}\" characters", + "error.page.slug.invalid": "Por favor entre um anexo de URL válido ", + "error.page.slug.maxlength": "O slug deve ter menos de “{length}” caracteres", "error.page.sort.permission": "A página \"{slug}\" não pode ser ordenada", "error.page.status.invalid": "Por favor, defina um estado de página válido", "error.page.undefined": "P\u00e1gina n\u00e3o encontrada", @@ -127,13 +140,13 @@ "error.section.files.max.plural": "Você não pode adicionar mais do que {max} arquivos à seção \"{section}\"", "error.section.files.max.singular": "Você não pode adicionar mais do que um arquivo à seção \"{section}\"", - "error.section.files.min.plural": "The \"{section}\" section requires at least {min} files", - "error.section.files.min.singular": "The \"{section}\" section requires at least one file", + "error.section.files.min.plural": "A seção “{section}” precisa ter pelo menos {min} arquivos", + "error.section.files.min.singular": "A seção “{section}” precisa ter pelo menos um arquivo", - "error.section.pages.max.plural": "Você não pode adicionar mais do que {max} página à seção \"{section}\"", + "error.section.pages.max.plural": "Você não pode adicionar mais do que {max} páginas à seção \"{section}\"", "error.section.pages.max.singular": "Você não pode adicionar mais do que uma página à seção \"{section}\"", - "error.section.pages.min.plural": "The \"{section}\" section requires at least {min} pages", - "error.section.pages.min.singular": "The \"{section}\" section requires at least one page", + "error.section.pages.min.plural": "A seção “{section}” precisa ter pelo menos {min} páginas ", + "error.section.pages.min.singular": "A seção “{section}” precisa ter pelo menos uma página ", "error.section.notLoaded": "A seção \"{name}\" não pôde ser carregada", "error.section.type.invalid": "O tipo da seção \"{type}\" não é válido", @@ -150,12 +163,12 @@ "error.user.changePassword.permission": "Você não tem permissão para alterar a senha do usuário \"{name}\"", "error.user.changeRole.lastAdmin": "O papel do último administrador não pode ser alterado", "error.user.changeRole.permission": "Você não tem permissão para alterar o papel do usuário \"{name}\"", - "error.user.changeRole.toAdmin": "You are not allowed to promote someone to the admin role", + "error.user.changeRole.toAdmin": "Você não tem permissão para promover usuários ao papel de administrador ", "error.user.create.permission": "Você não tem permissão para criar este usuário", - "error.user.delete": "O usuário \"{name}\" não pode ser excluído", - "error.user.delete.lastAdmin": "O último administrador não pode ser excluído", - "error.user.delete.lastUser": "O último usuário não pode ser excluído", - "error.user.delete.permission": "Você não tem permissão para excluir o usuário \"{name}\"", + "error.user.delete": "O usuário \"{name}\" não pode ser deletado", + "error.user.delete.lastAdmin": "O último administrador não pode ser deletado", + "error.user.delete.lastUser": "O último usuário não pode ser deletado", + "error.user.delete.permission": "Você não tem permissão para deletar o usuário \"{name}\"", "error.user.duplicate": "Um usuário com o email \"{email}\" já existe", "error.user.email.invalid": "Digite um endereço de email válido", "error.user.language.invalid": "Digite um idioma válido", @@ -163,8 +176,9 @@ "error.user.password.invalid": "Digite uma senha válida. Sua senha deve ter pelo menos 8 caracteres.", "error.user.password.notSame": "As senhas não combinam", "error.user.password.undefined": "O usuário não possui uma senha", - "error.user.password.wrong": "Wrong password", + "error.user.password.wrong": "Senha errada", "error.user.role.invalid": "Digite um papel válido", + "error.user.undefined": "Usuário não encontrado", "error.user.update.permission": "Você não tem permissão para atualizar o usuário \"{name}\"", "error.validation.accepted": "Por favor, confirme", @@ -174,9 +188,9 @@ "error.validation.boolean": "Por favor, confirme ou rejeite", "error.validation.contains": "Digite um valor que contenha \"{needle}\"", "error.validation.date": "Escolha uma data válida", - "error.validation.date.after": "Please enter a date after {date}", - "error.validation.date.before": "Please enter a date before {date}", - "error.validation.date.between": "Please enter a date between {min} and {max}", + "error.validation.date.after": "Por favor entre uma data depois de {date}", + "error.validation.date.before": "Por favor entre uma data antes de {date}", + "error.validation.date.between": "Por favor entre uma data entre {min} e {max}", "error.validation.denied": "Por favor, cancele", "error.validation.different": "O valor deve ser diferente de \"{other}\"", "error.validation.email": "Digite um endereço de email válido", @@ -202,79 +216,85 @@ "error.validation.same": "Por favor, digite \"{other}\"", "error.validation.size": "O tamanho do valor deve ser \"{size}\"", "error.validation.startswith": "O valor deve começar com \"{start}\"", - "error.validation.time": "Digite uma hora válida", - "error.validation.time.after": "Please enter a time after {time}", - "error.validation.time.before": "Please enter a time before {time}", - "error.validation.time.between": "Please enter a time between {min} and {max}", + "error.validation.time": "Digite um horário válido", + "error.validation.time.after": "Por favor entre um horário depois de {time}", + "error.validation.time.before": "Por favor entre um horário antes de {time}", + "error.validation.time.between": "Por favor entre um horário entre {min} e {max}", "error.validation.url": "Digite uma URL válida", - "field.required": "The field is required", - "field.blocks.changeType": "Change type", + "expand": "Expandir", + "expand.all": "Expandir todos", + + "field.required": "Este campo é obrigatório ", + "field.blocks.changeType": "Mudar tipo", "field.blocks.code.name": "Código", "field.blocks.code.language": "Idioma", - "field.blocks.code.placeholder": "Your code …", - "field.blocks.delete.confirm": "Do you really want to delete this block?", - "field.blocks.delete.confirm.all": "Do you really want to delete all blocks?", - "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", - "field.blocks.empty": "No blocks yet", - "field.blocks.fieldsets.label": "Please select a block type …", - "field.blocks.gallery.name": "Gallery", - "field.blocks.gallery.images.empty": "No images yet", - "field.blocks.gallery.images.label": "Images", - "field.blocks.heading.level": "Level", - "field.blocks.heading.name": "Heading", - "field.blocks.heading.text": "Text", - "field.blocks.heading.placeholder": "Heading …", - "field.blocks.image.alt": "Alternative text", - "field.blocks.image.caption": "Caption", - "field.blocks.image.crop": "Crop", + "field.blocks.code.placeholder": "Seu código …", + "field.blocks.delete.confirm": "Deseja realmente deletar este bloco?", + "field.blocks.delete.confirm.all": "Deseja realmente deletar todos os blocos?", + "field.blocks.delete.confirm.selected": "Deseja realmente deletar os blocos selecionados?", + "field.blocks.empty": "Nenhum bloco", + "field.blocks.fieldsets.label": "Por favor selecione um tipo de bloco …", + "field.blocks.fieldsets.paste": "Digite {{ shortcut }} para colar/importar blocos da sua área de transferência ", + "field.blocks.gallery.name": "Galeria", + "field.blocks.gallery.images.empty": "Nenhuma imagem", + "field.blocks.gallery.images.label": "Imagens", + "field.blocks.heading.level": "Nível ", + "field.blocks.heading.name": "Título ", + "field.blocks.heading.text": "Texto", + "field.blocks.heading.placeholder": "Título …", + "field.blocks.image.alt": "Texto alternativo", + "field.blocks.image.caption": "Legenda", + "field.blocks.image.crop": "Cortar", "field.blocks.image.link": "Link", - "field.blocks.image.location": "Location", + "field.blocks.image.location": "Localização ", "field.blocks.image.name": "Imagem", - "field.blocks.image.placeholder": "Select an image", - "field.blocks.image.ratio": "Ratio", - "field.blocks.image.url": "Image URL", - "field.blocks.list.name": "List", + "field.blocks.image.placeholder": "Selecionar uma imagem", + "field.blocks.image.ratio": "Proporção ", + "field.blocks.image.url": "URL da imagem", + "field.blocks.line.name": "Linha", + "field.blocks.list.name": "Lista", "field.blocks.markdown.name": "Markdown", - "field.blocks.markdown.label": "Text", + "field.blocks.markdown.label": "Texto", "field.blocks.markdown.placeholder": "Markdown …", - "field.blocks.quote.name": "Quote", - "field.blocks.quote.text.label": "Text", - "field.blocks.quote.text.placeholder": "Quote …", - "field.blocks.quote.citation.label": "Citation", - "field.blocks.quote.citation.placeholder": "by …", - "field.blocks.text.name": "Text", - "field.blocks.text.placeholder": "Text …", - "field.blocks.video.caption": "Caption", - "field.blocks.video.name": "Video", - "field.blocks.video.placeholder": "Enter a video URL", - "field.blocks.video.url.label": "Video-URL", + "field.blocks.quote.name": "Citação ", + "field.blocks.quote.text.label": "Texto", + "field.blocks.quote.text.placeholder": "Citação …", + "field.blocks.quote.citation.label": "Citação ", + "field.blocks.quote.citation.placeholder": "de …", + "field.blocks.text.name": "Texto", + "field.blocks.text.placeholder": "Texto …", + "field.blocks.video.caption": "Legenda", + "field.blocks.video.name": "Vídeo ", + "field.blocks.video.placeholder": "Entre uma URL de vídeo ", + "field.blocks.video.url.label": "URL-Vídeo", "field.blocks.video.url.placeholder": "https://youtube.com/?v=", "field.files.empty": "Nenhum arquivo selecionado", - "field.layout.delete": "Delete layout", - "field.layout.delete.confirm": "Do you really want to delete this layout?", - "field.layout.empty": "No rows yet", - "field.layout.select": "Select a layout", + "field.layout.delete": "Deletar layout", + "field.layout.delete.confirm": "Deseja realmente deletar este layout?", + "field.layout.empty": "Nenhuma linha", + "field.layout.select": "Selecionar um layout", "field.pages.empty": "Nenhuma página selecionada", - "field.structure.delete.confirm": "Deseja realmente excluir este registro?", + "field.structure.delete.confirm": "Deseja realmente deletar esta linha?", "field.structure.empty": "Nenhum registro", "field.users.empty": "Nenhum usuário selecionado", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", - "file.delete.confirm": "Deseja realmente excluir
{filename}?", - "file.sort": "Change position", + "file.blueprint": "Este arquivo não tem planta. Você pode definir sua planta em /site/blueprints/files/{blueprint}.yml", + "file.delete.confirm": "Deseja realmente deletar
{filename}?", + "file.sort": "Mudar posição", "files": "Arquivos", "files.empty": "Nenhum arquivo", - "hide": "Hide", + "hide": "Ocultar", "hour": "Hora", + "import": "Importar", "insert": "Inserir", - "insert.after": "Insert after", - "insert.before": "Insert before", + "insert.after": "Inserir após", + "insert.before": "Inserir antes", "install": "Instalar", "installation": "Instalação", @@ -295,13 +315,13 @@ "language.convert": "Tornar padrão", "language.convert.confirm": "

Deseja realmente converter {name} para o idioma padrão? Esta ação não poderá ser revertida.

Se {name} tiver conteúdo não traduzido, partes do seu site poderão ficar sem conteúdo.

", "language.create": "Adicionar novo idioma", - "language.delete.confirm": "Deseja realmente excluir o idioma {name} incluíndo todas as traduções. Esta ação não poderá ser revertida!", - "language.deleted": "Idioma excluído", + "language.delete.confirm": "Deseja realmente deletar o idioma {name} incluíndo todas as traduções. Esta ação não poderá ser revertida!", + "language.deleted": "Idioma deletado", "language.direction": "Direção de leitura", "language.direction.ltr": "Esquerda para direita", "language.direction.rtl": "Direita para esquerda", "language.locale": "String de localização do PHP", - "language.locale.warning": "You are using a custom locale set up. Please modify it in the language file in /site/languages", + "language.locale.warning": "Você está usando uma configuração de local customizada. Por favor modifique a configuração no arquivo do idioma em /site/languages", "language.name": "Nome", "language.updated": "Idioma atualizado", @@ -314,39 +334,39 @@ "license": "Licen\u00e7a do Kirby ", "license.buy": "Comprar licença", "license.register": "Registrar", - "license.register.help": "Você recebeu o código da sua licença por email após a compra. Por favor, copie e cole-a para completar o registro.", + "license.register.help": "Você recebeu o código da sua licença por email ao efetuar sua compra. Por favor, copie e cole o código para completar seu registro.", "license.register.label": "Por favor, digite o código da sua licença", "license.register.success": "Obrigado por apoiar o Kirby", - "license.unregistered": "Esta é uma demonstração não registrada do Kirby", + "license.unregistered": "Esta é uma cópia de demonstração não registrada do Kirby", "link": "Link", "link.text": "Texto do link", "loading": "Carregando", - "lock.unsaved": "Unsaved changes", - "lock.unsaved.empty": "There are no more unsaved changes", - "lock.isLocked": "Unsaved changes by {email}", - "lock.file.isLocked": "The file is currently being edited by {email} and cannot be changed.", - "lock.page.isLocked": "The page is currently being edited by {email} and cannot be changed.", - "lock.unlock": "Unlock", - "lock.isUnlocked": "Your unsaved changes have been overwritten by another user. You can download your changes to merge them manually.", + "lock.unsaved": "Mudanças não salvas", + "lock.unsaved.empty": "Não há mais mudanças não salvas", + "lock.isLocked": "Mudanças não salvas por {email}", + "lock.file.isLocked": "Este arquivo está sendo editado no momento por {email}, e não pode ser mudado", + "lock.page.isLocked": "Esta página está sendo editada no momento por {email}, e não pode ser mudada", + "lock.unlock": "Destrancar", + "lock.isUnlocked": "Suas mudanças não salvas foram alteradas por outro usuário, e serão perdidas. Você pode baixar um arquivo com suas mudanças, para depois fundi-las manualmente. ", "login": "Entrar", - "login.code.label.login": "Login code", - "login.code.label.password-reset": "Password reset code", - "login.code.placeholder.email": "000 000", - "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", - "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", - "login.email.password-reset.subject": "Your password reset code", + "login.code.label.login": "Código de acesso", + "login.code.label.password-reset": "Código de redefinição de senha", + "login.code.placeholder.email": "000 0000", + "login.code.text.email": "Se seu endereço de email está registrado, o código requisitado será mandado por email.", + "login.email.login.body": "Oi, {user.nameOrEmail},\n\nVocê recentemente pediu um código de acesso ao painel administrativo do site {site}.\nO seguinte código será válido por {timeout} minutos:\n\n{code}\n\nSe você não pediu este código de acesso, por favor ignore esta mensagem, ou contate seu Administrador de Sistemas se você tiver dúvidas.\nPor questões de segurança, por favor NÃO compartilhe esta mensagem.", + "login.email.login.subject": "Seu código de acesso", + "login.email.password-reset.body": "Oi, {user.nameOrEmail},\n\nVocê recentemente pediu um código de redefinição de senha, para o painel administrativo do site {site}.\nO seguinte código de redefinição de senha será válido por {timeout} minutos:\n\n{code}\n\nSe você não pediu este código, por favor ignore esta mensagem, ou contate seu Administrador de Sistemas se você tiver dúvidas.\nPor questões de segurança, por favor NÃO compartilhe esta mensagem.", + "login.email.password-reset.subject": "Seu código de redefinição de senha", "login.remember": "Manter-me conectado", - "login.reset": "Reset password", - "login.toggleText.code.email": "Login via email", - "login.toggleText.code.email-password": "Login with password", - "login.toggleText.password-reset.email": "Forgot your password?", - "login.toggleText.password-reset.email-password": "← Back to login", + "login.reset": "Redefinir senha", + "login.toggleText.code.email": "Entrar com email", + "login.toggleText.code.email-password": "Entrar com senha", + "login.toggleText.password-reset.email": "Esqueceu sua senha?", + "login.toggleText.password-reset.email-password": "← Voltar à entrada", "logout": "Sair", @@ -372,37 +392,37 @@ "more": "Mais", "name": "Nome", "next": "Próximo", - "no": "no", - "off": "off", - "on": "on", + "no": "não", + "off": "não", + "on": "sim", "open": "Abrir", - "open.newWindow": "Open in new window", + "open.newWindow": "Abrir em nova janela", "options": "Opções", - "options.none": "No options", + "options.none": "Nenhuma opção", "orientation": "Orientação", "orientation.landscape": "Paisagem", "orientation.portrait": "Retrato", "orientation.square": "Quadrado", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "Esta página não tem planta. Você pode definir sua planta em /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Alterar URL", "page.changeSlug.fromTitle": "Criar a partir do t\u00edtulo", "page.changeStatus": "Alterar estado", "page.changeStatus.position": "Selecione uma posição", "page.changeStatus.select": "Selecione um novo estado", "page.changeTemplate": "Alterar tema", - "page.delete.confirm": "Deseja realmente excluir {title}?", + "page.delete.confirm": "Deseja realmente deletar {title}?", "page.delete.confirm.subpages": "Esta página possui subpáginas.
Todas as subpáginas serão excluídas também.", "page.delete.confirm.title": "Digite o título da página para confirmar", "page.draft.create": "Criar rascunho", "page.duplicate.appendix": "Copiar", - "page.duplicate.files": "Copy files", - "page.duplicate.pages": "Copy pages", - "page.sort": "Change position", + "page.duplicate.files": "Copiar arquivos", + "page.duplicate.pages": "Copiar páginas", + "page.sort": "Mudar posição", "page.status": "Estado", "page.status.draft": "Rascunho", - "page.status.draft.description": "The page is in draft mode and only visible for logged in editors or via secret link", + "page.status.draft.description": "A página é um rascunho, e visível somente por editores logados, ou através de um link secreto.", "page.status.listed": "Pública", "page.status.listed.description": "A página pública é visível para todos", "page.status.unlisted": "Não listadas", @@ -417,44 +437,49 @@ "pagination.page": "Página", "password": "Senha", + "paste": "Colar", + "paste.after": "Colar após", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Anterior", - "preview": "Preview", + "preview": "Visualizar", "remove": "Remover", "rename": "Renomear", "replace": "Substituir", "retry": "Tentar novamente", "revert": "Descartar", - "revert.confirm": "Do you really want to delete all unsaved changes?", + "revert.confirm": "Deseja realmente deletar todas as mudanças não salvas?", "role": "Papel", - "role.admin.description": "The admin has all rights", - "role.admin.title": "Admin", + "role.admin.description": "O administrador tem todos os direitos", + "role.admin.title": "Administrador", "role.all": "Todos", "role.empty": "Não há usuários com este papel", "role.description.placeholder": "Sem descrição", - "role.nobody.description": "This is a fallback role without any permissions", - "role.nobody.title": "Nobody", + "role.nobody.description": "Este é um papel atribuído por padrão, sem nenhuma permissão", + "role.nobody.title": "Ninguém", "save": "Salvar", "search": "Buscar", - "search.min": "Enter {min} characters to search", - "search.all": "Show all", - "search.results.none": "No results", + "search.min": "Digite {min} caracteres para fazer uma busca", + "search.all": "Mostrar todos", + "search.results.none": "Nenhum resultado", - "section.required": "The section is required", + "section.required": "Esta seção é obrigatória", "select": "Selecionar", "settings": "Configurações", - "show": "Show", + "show": "Mostrar", "size": "Tamanho", - "slug": "URL", + "slug": "Anexo de URL", "sort": "Ordenar", "title": "Título", "template": "Tema", "today": "Hoje", - "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", + "server": "Servidor", + + "site.blueprint": "Este site não tem planta. Você pode definir sua planta em /site/blueprints/site.yml", "toolbar.button.code": "Código", "toolbar.button.bold": "Negrito", @@ -463,41 +488,45 @@ "toolbar.button.heading.1": "Título 1", "toolbar.button.heading.2": "Título 2", "toolbar.button.heading.3": "Título 3", + "toolbar.button.heading.4": "Título 4", + "toolbar.button.heading.5": "Título 5", + "toolbar.button.heading.6": "Título 6", "toolbar.button.italic": "Itálico", "toolbar.button.file": "Arquivo", - "toolbar.button.file.select": "Select a file", - "toolbar.button.file.upload": "Upload a file", + "toolbar.button.file.select": "Selecionar arquivo", + "toolbar.button.file.upload": "Carregar arquivo", "toolbar.button.link": "Link", - "toolbar.button.strike": "Strike-through", + "toolbar.button.paragraph": "Parágrafo", + "toolbar.button.strike": "Riscado", "toolbar.button.ol": "Lista ordenada", - "toolbar.button.underline": "Underline", + "toolbar.button.underline": "Sublinhado", "toolbar.button.ul": "Lista não-ordenada", - "translation.author": "Kirby Team", + "translation.author": "Time Kirby", "translation.direction": "ltr", - "translation.name": "Português (Brasileiro)", + "translation.name": "Português do Brasil", "translation.locale": "pt_BR", "upload": "Enviar", - "upload.error.cantMove": "The uploaded file could not be moved", - "upload.error.cantWrite": "Failed to write file to disk", - "upload.error.default": "The file could not be uploaded", - "upload.error.extension": "File upload stopped by extension", - "upload.error.formSize": "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the form", - "upload.error.iniPostSize": "The uploaded file exceeds the post_max_size directive in php.ini", - "upload.error.iniSize": "The uploaded file exceeds the upload_max_filesize directive in php.ini", - "upload.error.noFile": "No file was uploaded", - "upload.error.noFiles": "No files were uploaded", - "upload.error.partial": "The uploaded file was only partially uploaded", - "upload.error.tmpDir": "Missing a temporary folder", + "upload.error.cantMove": "O arquivo carregado não pôde ser movido", + "upload.error.cantWrite": "Falha ao escrever o arquivo no disco", + "upload.error.default": "O arquivo não pode ser carregado", + "upload.error.extension": "O carregamento do arquivo foi interrompido por causa da extensão", + "upload.error.formSize": "O arquivo carregado excede a diretiva de MAX_FILE_SIZE especificada no formulário", + "upload.error.iniPostSize": "O arquivo carregado excede a diretiva post_max_size do php.ini", + "upload.error.iniSize": "O arquivo carregado excede a diretiva upload_max_size do php.ini", + "upload.error.noFile": "Nenhum arquivo foi carregado", + "upload.error.noFiles": "Nenhum arquivo foi carregado", + "upload.error.partial": "O arquivo foi só parcialmente carregado", + "upload.error.tmpDir": "Falta uma pasta temporária", "upload.errors": "Erro", "upload.progress": "Enviando…", "url": "Url", - "url.placeholder": "https://exemplo.com", + "url.placeholder": "https://example.com", "user": "Usuário", - "user.blueprint": "Você pode definir seções e campos de formulário adicionais para este papel de usuário em /site/blueprints/users/{role}.yml", + "user.blueprint": "Você pode definir seções e campos de formulário adicionais para este papel de usuário em /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Alterar email", "user.changeLanguage": "Alterar idioma", "user.changeName": "Renomear usuário", @@ -507,8 +536,8 @@ "user.changeRole": "Alterar papel", "user.changeRole.select": "Selecione um novo papel", "user.create": "Adicionar novo usuário", - "user.delete": "Excluir este usuário", - "user.delete.confirm": "Deseja realmente excluir
{email}?", + "user.delete": "Deletar este usuário", + "user.delete.confirm": "Deseja realmente deletar
{email}?", "users": "Usuários", @@ -516,12 +545,13 @@ "view.account": "Sua conta", "view.installation": "Instala\u00e7\u00e3o", - "view.resetPassword": "Reset password", - "view.settings": "Configurações", + "view.languages": "Idiomas", + "view.resetPassword": "Redefinir senha", "view.site": "Site", + "view.system": "Sistema", "view.users": "Usu\u00e1rios", "welcome": "Bem-vindo", "year": "Ano", - "yes": "yes" + "yes": "sim" } diff --git a/kirby/i18n/translations/pt_PT.json b/kirby/i18n/translations/pt_PT.json index a9c0972..80d75c3 100644 --- a/kirby/i18n/translations/pt_PT.json +++ b/kirby/i18n/translations/pt_PT.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Adicionar", + "author": "Author", "avatar": "Foto do perfil", "back": "Voltar", "cancel": "Cancelar", @@ -9,6 +14,7 @@ "collapse": "Collapse", "collapse.all": "Collapse All", "copy": "Copiar", + "copy.all": "Copy all", "create": "Criar", "date": "Data", @@ -23,24 +29,28 @@ "days.tue": "Ter", "days.wed": "Qua", + "debugging": "Debugging", + "delete": "Excluir", "delete.all": "Delete all", - "dimensions": "Dimensões", - "disabled": "Inativo", - "discard": "Descartar", - "download": "Descarregar", - "duplicate": "Duplicar", - "edit": "Editar", - "expand": "Expand", - "expand.all": "Expand All", "dialog.files.empty": "Sem arquivos para selecionar", "dialog.pages.empty": "Sem páginas para selecionar", "dialog.users.empty": "Sem utilizadores para selecionar", + "dimensions": "Dimensões", + "disabled": "Inativo", + "discard": "Descartar", + "download": "Descarregar", + "duplicate": "Duplicar", + + "edit": "Editar", + "email": "Email", "email.placeholder": "mail@exemplo.pt", + "environment": "Environment", + "error.access.code": "Invalid code", "error.access.login": "Login inválido", "error.access.panel": "Não tem permissões para aceder ao painel", @@ -92,6 +102,7 @@ "error.language.code": "Insira um código de idioma válido", "error.language.duplicate": "O idioma já existe", "error.language.name": "Insira um nome válido para o idioma", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Digite um endereço de email válido", "error.license.verification": "Não foi possível verificar a licença", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Não tem permissões para alterar a URL de \"{slug}\"", "error.page.changeStatus.incomplete": "A página possui erros e não pode ser guardada", "error.page.changeStatus.permission": "O estado desta página não pode ser alterado", @@ -165,6 +178,7 @@ "error.user.password.undefined": "O utilizador não possui uma palavra-passe", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Digite uma função válida", + "error.user.undefined": "Usuário não encontrado", "error.user.update.permission": "Não tem permissões para atualizar o utilizador \"{name}\"", "error.validation.accepted": "Por favor, confirme", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Digite uma URL válida", + "expand": "Expand", + "expand.all": "Expand All", + "field.required": "Este campo é necessário", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Código", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Gallery", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Images", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Nenhum registro", "field.users.empty": "Nenhum utilizador selecionado", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Deseja realmente excluir
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hora", + "import": "Import", "insert": "Inserir", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Manter-me conectado", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Retrato", "orientation.square": "Quadrado", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Alterar URL", "page.changeSlug.fromTitle": "Criar a partir do t\u00edtulo", "page.changeStatus": "Alterar estado", @@ -417,7 +437,10 @@ "pagination.page": "Página", "password": "Palavra-passe", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Anterior", "preview": "Preview", "remove": "Remover", @@ -454,6 +477,8 @@ "template": "Tema", "today": "Hoje", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Código", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Título 1", "toolbar.button.heading.2": "Título 2", "toolbar.button.heading.3": "Título 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Itálico", "toolbar.button.file": "Ficheiro", "toolbar.button.file.select": "Selecione o arquivo", "toolbar.button.file.upload": "Carregue o arquivo", "toolbar.button.link": "Link", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Lista ordenada", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://exemplo.pt", "user": "Utilizador", - "user.blueprint": "Pode definir seções e campos de formulário adicionais para esta função de utilizador em /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Alterar email", "user.changeLanguage": "Alterar idioma", "user.changeName": "Renomear este utilizador", @@ -516,9 +545,10 @@ "view.account": "A sua conta", "view.installation": "Instala\u00e7\u00e3o", + "view.languages": "Idiomas", "view.resetPassword": "Reset password", - "view.settings": "Configurações", "view.site": "Site", + "view.system": "System", "view.users": "Utilizadores", "welcome": "Bem-vindo", diff --git a/kirby/i18n/translations/ru.json b/kirby/i18n/translations/ru.json index 12d1f08..c43cceb 100644 --- a/kirby/i18n/translations/ru.json +++ b/kirby/i18n/translations/ru.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c", + "author": "Автор", "avatar": "\u0410\u0432\u0430\u0442\u0430\u0440 (\u0444\u043e\u0442\u043e)", "back": "Назад", "cancel": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c", @@ -9,6 +14,7 @@ "collapse": "Свернуть", "collapse.all": "Свернуть все", "copy": "Скопировать", + "copy.all": "Копировать все", "create": "Создать", "date": "Дата", @@ -23,24 +29,28 @@ "days.tue": "\u0412\u0442", "days.wed": "\u0421\u0440", + "debugging": "Отладка", + "delete": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c", "delete.all": "Удалить все", - "dimensions": "Размеры", - "disabled": "Отключено", - "discard": "\u0421\u0431\u0440\u043e\u0441", - "download": "Скачать", - "duplicate": "Дублировать", - "edit": "\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c", - "expand": "Развернуть", - "expand.all": "Развернуть все", "dialog.files.empty": "Нет файлов для выбора", "dialog.pages.empty": "Нет страниц для выбора", "dialog.users.empty": "Нет пользователей для выбора", + "dimensions": "Размеры", + "disabled": "Отключено", + "discard": "\u0421\u0431\u0440\u043e\u0441", + "download": "Скачать", + "duplicate": "Дублировать", + + "edit": "\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c", + "email": "Email", "email.placeholder": "mail@example.com", + "environment": "Среда", + "error.access.code": "Неверный код", "error.access.login": "Неправильный логин", "error.access.panel": "У вас нет права доступа к панели", @@ -51,7 +61,7 @@ "error.avatar.dimensions.invalid": "Пожалуйста, сделайте чтобы ширина или высота фотографии была меньше 3000 пикселей", "error.avatar.mime.forbidden": "Фотография профиля должна быть JPEG или PNG", - "error.blueprint.notFound": "Не удалось загрузить blueprint \"{name}\"", + "error.blueprint.notFound": "Не удалось загрузить разметку \"{name}\"", "error.blocks.max.plural": "Вы не можете добавить больше {max} блоков", "error.blocks.max.singular": "Вы не можете добавить больше одного блока", @@ -72,9 +82,9 @@ "error.file.maxheight": "Высота изображения не должна превышать {height} px", "error.file.maxsize": "Файл слишком большой", "error.file.maxwidth": "Ширина изображения не должна превышать {width} px", - "error.file.mime.differs": "Загруженный файл должен быть того же mime типа: \"{mime}\"", - "error.file.mime.forbidden": "Тип медиа \"{mime}\" не допустим", - "error.file.mime.invalid": "Неверный тип mime: {mime}", + "error.file.mime.differs": "Загружаемый файл должен иметь такое же расширение (тип): \"{mime}\"", + "error.file.mime.forbidden": "Расширение (тип) \"{mime}\" не допускается", + "error.file.mime.invalid": "Неверное расширение (тип): {mime}", "error.file.mime.missing": "Не удалось определить тип медиа для файла \"{filename}\"", "error.file.minheight": "Высота файла должна быть хотя бы {height} px", "error.file.minsize": "Файл слишком маленький", @@ -92,14 +102,17 @@ "error.language.code": "Пожалуйста, впишите правильный код языка", "error.language.duplicate": "Язык уже есть", "error.language.name": "Пожалуйста, впишите правильное название языка", + "error.language.notFound": "Не получилось найти этот язык", "error.layout.validation.block": "Ошибка в блоке {blockIndex} в макете {layoutIndex}", "error.layout.validation.settings": "Ошибка в настройках макета {index}", "error.license.format": "Пожалуйста, введите правильный лицензионный код", - "error.license.email": "Пожалуйста, введите правильный адрес эл. почты", + "error.license.email": "Пожалуйста, введите правильный Email", "error.license.verification": "Лицензия не подтверждена", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c URL \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b", "error.page.changeStatus.incomplete": "На странице есть ошибки и поэтому ее нельзя опубликовать", "error.page.changeStatus.permission": "Невозможно поменять статус для этой страницы", @@ -119,7 +132,7 @@ "error.page.notFound": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430", "error.page.num.invalid": "Пожалуйста, впишите правильное число сортировки. Число не может быть отрицательным.", "error.page.slug.invalid": "Пожалуйста, введите правильный URL", - "error.page.slug.maxlength": "Длина ссылки (ЧПУ) должна быть короче \"{length}\" символов", + "error.page.slug.maxlength": "Длина ссылки должна быть короче \"{length}\" символов", "error.page.sort.permission": "Невозможно сортировать страницу \"{slug}\"", "error.page.status.invalid": "Пожалуйста, установите верный статус страницы", "error.page.undefined": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430", @@ -156,7 +169,7 @@ "error.user.delete.lastAdmin": "\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430", "error.user.delete.lastUser": "Нельзя удалить единственного пользователя", "error.user.delete.permission": "У вас нет права удалить пользователя \"{name}\"", - "error.user.duplicate": "Пользователь с эл. почтой \"{email}\" уже есть", + "error.user.duplicate": "Пользователь с Email \"{email}\" уже есть", "error.user.email.invalid": "Пожалуйста, введите правильный адрес эл. почты", "error.user.language.invalid": "Введите правильный язык", "error.user.notFound": "\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", @@ -165,6 +178,7 @@ "error.user.password.undefined": "У пользователя нет пароля", "error.user.password.wrong": "Неверный пароль", "error.user.role.invalid": "Введите правильную роль", + "error.user.undefined": "Аккаунт не найден", "error.user.update.permission": "У вас нет права обновить пользователя \"{name}\"", "error.validation.accepted": "Пожалуйста, подтвердите", @@ -179,7 +193,7 @@ "error.validation.date.between": "Пожалуйста, укажите дату между {min} и {max}", "error.validation.denied": "Пожалуйста отмените", "error.validation.different": "Значение не может быть \"{other}\"", - "error.validation.email": "Пожалуйста, введите правильный адрес эл. почты", + "error.validation.email": "Пожалуйста, введите правильный Email", "error.validation.endswith": "Значение должно заканчиваться с \"{end}\"", "error.validation.filename": "Пожалуйста, введите правильное название файла", "error.validation.in": "Пожалуйста, введите одно из следующих: ({in})", @@ -208,6 +222,9 @@ "error.validation.time.between": "Пожалуйста, укажите время между {min} и {max}", "error.validation.url": "Пожалуйста, введите правильный URL", + "expand": "Развернуть", + "expand.all": "Развернуть все", + "field.required": "Поле обязательно", "field.blocks.changeType": "Изменить тип", "field.blocks.code.name": "Код", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Вы действительно хотите удалить эти блоки?", "field.blocks.empty": "Еще нет блоков", "field.blocks.fieldsets.label": "Пожалуйста, выберите тип блока…", + "field.blocks.fieldsets.paste": "Нажмите {{ shortcut }} чтобы вставить/импортировать блоки из буфера памяти", "field.blocks.gallery.name": "Галерея", "field.blocks.gallery.images.empty": "Еще нет изображений", "field.blocks.gallery.images.label": "Изображения", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Выберите изображение", "field.blocks.image.ratio": "Соотношение", "field.blocks.image.url": "URL изображения", + "field.blocks.line.name": "Линия", "field.blocks.list.name": "Список", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Текст", @@ -263,7 +282,7 @@ "field.structure.empty": "Еще нет записей", "field.users.empty": "Еще нет пользователей", - "file.blueprint": "Вы можете определить новые секции и поля формы для этого файла в /site/blueprints/{template}.yml", + "file.blueprint": "У файла пока нет разметки. Вы можете определить новые секции и поля разметки в /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Вы точно хотите удалить файл
{filename}?", "file.sort": "Изменить позицию", @@ -272,6 +291,7 @@ "hide": "Скрыть", "hour": "Час", + "import": "Импортировать", "insert": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c", "insert.after": "Вставить ниже", "insert.before": "Вставить выше", @@ -311,7 +331,7 @@ "languages.secondary": "Дополнительные языки", "languages.secondary.empty": "Еще нет дополнительных языков", - "license": "\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f Kirby", + "license": "Лицензия", "license.buy": "Купить лицензию", "license.register": "Зарегистрировать", "license.register.help": "После покупки вы получили по эл. почте код лицензии. Пожалуйста скопируйте и вставьте сюда чтобы зарегистрировать.", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Код для сброса пароля", "login.code.placeholder.email": "000 000", "login.code.text.email": "Если ваш Email уже зарегистрирован, запрашиваемый код был отправлен на него.", - "login.email.login.body": "Добрый день, {user.nameOrEmail}.\n\nНедавно вы запросили код для авторизации в Kirby Panel.\nЭтот код будет доступен {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали код для авторизации, пожалуйста, проигнорируйте это письмо или свяжитесь с вашим администратором, если у вас возникли вопросы.\nТакже исходя из соображений безопасности просим вас НЕ ПЕРЕСЫЛАТЬ это письмо.", + "login.email.login.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили код для входа в Панель управления {site}.\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали код для входа, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", "login.email.login.subject": "Ваш код для входа", - "login.email.password-reset.body": "Добрый день, {user.nameOrEmail}.\n\nНедавно вы запросили код для сброса пароля в Kirby Panel.\nЭтот код будет доступен {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали код для сброса пароля, пожалуйста, проигнорируйте это письмо или свяжитесь с вашим администратором, если у вас возникли вопросы.\nТакже исходя из соображений безопасности просим вас НЕ ПЕРЕСЫЛАТЬ это письмо.", + "login.email.password-reset.body": "Привет, {user.nameOrEmail}!\n\nНедавно вы запросили сброс пароля для входа в Панель управления {site}.\nСледующий код входа будет действителен в течение {timeout} минут:\n\n{code}\n\nЕсли вы не запрашивали сброс пароля, проигнорируйте это письмо или обратитесь к администратору, если у вас есть вопросы.\nВ целях безопасности НЕ ПЕРЕСЫЛАЙТЕ это письмо.", "login.email.password-reset.subject": "Ваш код для сброса пароля", "login.remember": "Сохранять вход активным", "login.reset": "Сбросить пароль", @@ -385,8 +405,8 @@ "orientation.portrait": "Портретная", "orientation.square": "Квадрат", - "page.blueprint": "Вы можете определить новые секции и поля формы для этой страницы в /site/blueprints/{template}.yml", - "page.changeSlug": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 (\u0427\u041f\u0423)", + "page.blueprint": "У страницы пока нет разметки. Вы можете определить новые секции и поля разметки в /site/blueprints/pages/{blueprint}.yml", + "page.changeSlug": "Изменить ссылку", "page.changeSlug.fromTitle": "Создать из названия", "page.changeStatus": "Изменить статус", "page.changeStatus.position": "Пожалуйста, выберите позицию", @@ -417,7 +437,10 @@ "pagination.page": "Страница", "password": "\u041f\u0430\u0440\u043e\u043b\u044c", + "paste": "Вставить", + "paste.after": "Вставить после", "pixel": "Пиксель", + "plugins": "Плагины", "prev": "Предыдущий", "preview": "Предпросмотр", "remove": "Удалить", @@ -448,26 +471,32 @@ "settings": "Настройка", "show": "Показать", "size": "Размер", - "slug": "Понятная ссылка (ЧПУ)", + "slug": "Понятная ссылка", "sort": "Сортировать", "title": "Название", "template": "\u0428\u0430\u0431\u043b\u043e\u043d", "today": "Сегодня", - "site.blueprint": "Вы можете определить новые секции и поля формы для этого сайта в /site/blueprints/site.yml", + "server": "Сервер", + + "site.blueprint": "У сайта пока нет разметки. Вы можете определить новые секции и поля разметки в /site/blueprints/site.yml", "toolbar.button.code": "Код", "toolbar.button.bold": "\u0416\u0438\u0440\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442", - "toolbar.button.email": "Эл. почта", + "toolbar.button.email": "Email", "toolbar.button.headings": "Заголовки", "toolbar.button.heading.1": "Заголовок 1", "toolbar.button.heading.2": "Заголовок 2", "toolbar.button.heading.3": "Заголовок 3", + "toolbar.button.heading.4": "Заголовок 4", + "toolbar.button.heading.5": "Заголовок 5", + "toolbar.button.heading.6": "Заголовок 6", "toolbar.button.italic": "Курсив", "toolbar.button.file": "Файл", "toolbar.button.file.select": "Выбрать файл", "toolbar.button.file.upload": "Закачать файл", "toolbar.button.link": "\u0421\u0441\u044b\u043b\u043a\u0430", + "toolbar.button.paragraph": "Параграф", "toolbar.button.strike": "Зачёркнутый", "toolbar.button.ol": "Нумерованный список", "toolbar.button.underline": "Подчёркнутый", @@ -485,7 +514,7 @@ "upload.error.extension": "Загрузка файла не удалась из за расширения", "upload.error.formSize": "Загруженный файл больше чем MAX_FILE_SIZE настройка в форме", "upload.error.iniPostSize": "Загружаемый файл больше чем post_max_size настройка в php.ini", - "upload.error.iniSize": "Загруженный файл больше чем upload_max_filesize настройка в php.ini", + "upload.error.iniSize": "Загруженный файл больше чем настройка upload_max_filesize в php.ini", "upload.error.noFile": "Файл не был загружен", "upload.error.noFiles": "Файлы не были загружены", "upload.error.partial": "Файл загружен только частично", @@ -497,8 +526,8 @@ "url.placeholder": "https://example.com", "user": "Пользователь", - "user.blueprint": "Вы можете определить новые секции и поля формы для этой роли пользователя в /site/blueprints/users/{role}.yml", - "user.changeEmail": "Поменять эл. почту", + "user.blueprint": "Вы можете определить новые секции и поля разметки для пользователя в /site/blueprints/users/{blueprint}.yml", + "user.changeEmail": "Поменять Email", "user.changeLanguage": "Поменять язык", "user.changeName": "Переназвать этого пользователя", "user.changePassword": "Поменять пароль", @@ -512,13 +541,14 @@ "users": "Пользователи", - "version": "\u0412\u0435\u0440\u0441\u0438\u044f Kirby", + "version": "Версия", "view.account": "\u0412\u0430\u0448 \u0430\u043a\u043a\u0430\u0443\u043d\u0442", "view.installation": "\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430", + "view.languages": "Языки", "view.resetPassword": "Сбросить пароль", - "view.settings": "Настройка", "view.site": "Сайт", + "view.system": "Система", "view.users": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438", "welcome": "Добро пожаловать", diff --git a/kirby/i18n/translations/sk.json b/kirby/i18n/translations/sk.json index b08251d..bf202c0 100644 --- a/kirby/i18n/translations/sk.json +++ b/kirby/i18n/translations/sk.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "Pridať", + "author": "Author", "avatar": "Profilový obrázok", "back": "Späť", "cancel": "Zrušiť", @@ -9,6 +14,7 @@ "collapse": "Zabaliť", "collapse.all": "Zabaliť všetky", "copy": "Kopírovať", + "copy.all": "Copy all", "create": "Vytvoriť", "date": "Dátum", @@ -23,24 +29,28 @@ "days.tue": "Uto", "days.wed": "Str", + "debugging": "Debugging", + "delete": "Zmazať", "delete.all": "Zmazať všetky", - "dimensions": "Rozmery", - "disabled": "Disabled", - "discard": "Zahodiť", - "download": "Stiahnuť", - "duplicate": "Duplikovať", - "edit": "Upraviť", - "expand": "Rozbaliť", - "expand.all": "Rozbaliť všetky", "dialog.files.empty": "No files to select", "dialog.pages.empty": "No pages to select", "dialog.users.empty": "No users to select", + "dimensions": "Rozmery", + "disabled": "Disabled", + "discard": "Zahodiť", + "download": "Stiahnuť", + "duplicate": "Duplikovať", + + "edit": "Upraviť", + "email": "E-mail", "email.placeholder": "mail@example.com", + "environment": "Environment", + "error.access.code": "Neplatný kód", "error.access.login": "Neplatné prihlásenie", "error.access.panel": "Nemáte povolenie na prístup do Panel-u", @@ -92,6 +102,7 @@ "error.language.code": "Please enter a valid code for the language", "error.language.duplicate": "The language already exists", "error.language.name": "Please enter a valid name for the language", + "error.language.notFound": "The language could not be found", "error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}", "error.layout.validation.settings": "There's an error in layout {index} settings", @@ -100,6 +111,8 @@ "error.license.email": "Prosím, zadajte platnú e-mailovú adresu", "error.license.verification": "The license could not be verified", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Nemáte povolenie na zmenu URL príponu pre \"{slug}\"", "error.page.changeStatus.incomplete": "Stránka obsahuje chyby a nemôže byť zverejnená", "error.page.changeStatus.permission": "Status tejto stránky nemôže byť zmenený", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Užívateľ nemá heslo", "error.user.password.wrong": "Wrong password", "error.user.role.invalid": "Prosím, zadajte platnú rolu", + "error.user.undefined": "Užívateľa sa nepodarilo nájsť", "error.user.update.permission": "Nemáte povolenie na aktualizáciu užívateľa \"{name}\"", "error.validation.accepted": "Prosím, potvrďte", @@ -208,6 +222,9 @@ "error.validation.time.between": "Please enter a time between {min} and {max}", "error.validation.url": "Prosím, zadajte platnú URL", + "expand": "Rozbaliť", + "expand.all": "Rozbaliť všetky", + "field.required": "The field is required", "field.blocks.changeType": "Change type", "field.blocks.code.name": "Kód", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Naozaj chcete zmazať vybrané bloky?", "field.blocks.empty": "No blocks yet", "field.blocks.fieldsets.label": "Please select a block type …", + "field.blocks.fieldsets.paste": "Press {{ shortcut }} to paste/import blocks from your clipboard", "field.blocks.gallery.name": "Galéria", "field.blocks.gallery.images.empty": "No images yet", "field.blocks.gallery.images.label": "Obrázky", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Select an image", "field.blocks.image.ratio": "Ratio", "field.blocks.image.url": "Image URL", + "field.blocks.line.name": "Line", "field.blocks.list.name": "List", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Zatiaľ žiadne údaje", "field.users.empty": "Žiadni užívatelia zatiaľ neboli zvolení", - "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "file.blueprint": "This file has no blueprint yet. You can define the setup in /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Ste si istý, že chcete zmazať
{filename}?", "file.sort": "Change position", @@ -272,6 +291,7 @@ "hide": "Hide", "hour": "Hodina", + "import": "Import", "insert": "Vložiť", "insert.after": "Insert after", "insert.before": "Insert before", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Password reset code", "login.code.placeholder.email": "000 000", "login.code.text.email": "If your email address is registered, the requested code was sent via email.", - "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Kirby Panel.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.login.subject": "Your login code", - "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Kirby Panel.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", + "login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.", "login.email.password-reset.subject": "Your password reset code", "login.remember": "Ponechať ma prihláseného", "login.reset": "Reset password", @@ -385,7 +405,7 @@ "orientation.portrait": "Portrét", "orientation.square": "Štvorec", - "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/{template}.yml", + "page.blueprint": "This page has no blueprint yet. You can define the setup in /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Zmeniť URL", "page.changeSlug.fromTitle": "Vytvoriť z titulku", "page.changeStatus": "Zmeniť status", @@ -417,7 +437,10 @@ "pagination.page": "Stránka", "password": "Heslo", + "paste": "Paste", + "paste.after": "Paste after", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Predchádzajúci", "preview": "Preview", "remove": "Odstrániť", @@ -454,6 +477,8 @@ "template": "Šablóna", "today": "Dnes", + "server": "Server", + "site.blueprint": "The site has no blueprint yet. You can define the setup in /site/blueprints/site.yml", "toolbar.button.code": "Kód", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Nadpis 1", "toolbar.button.heading.2": "Nadpis 2", "toolbar.button.heading.3": "Nadpis 3", + "toolbar.button.heading.4": "Heading 4", + "toolbar.button.heading.5": "Heading 5", + "toolbar.button.heading.6": "Heading 6", "toolbar.button.italic": "Kurzíva", "toolbar.button.file": "Súbor", "toolbar.button.file.select": "Select a file", "toolbar.button.file.upload": "Upload a file", "toolbar.button.link": "Odkaz", + "toolbar.button.paragraph": "Paragraph", "toolbar.button.strike": "Strike-through", "toolbar.button.ol": "Číslovaný zoznam", "toolbar.button.underline": "Underline", @@ -497,7 +526,7 @@ "url.placeholder": "https://example.com", "user": "Užívateľ", - "user.blueprint": "Ďalšie sekcie a formulárové polia pre túto užívateľskú rolu môžete definovať v rámci /site/blueprints/users/{role}.yml", + "user.blueprint": "You can define additional sections and form fields for this user role in /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Zmeniť e-mail", "user.changeLanguage": "Zmeniť jazyk", "user.changeName": "Premenovať tohto užívateľa", @@ -516,9 +545,10 @@ "view.account": "Váš účet", "view.installation": "Inštalácia", + "view.languages": "Jazyky", "view.resetPassword": "Reset password", - "view.settings": "Nastavenia", "view.site": "Portál", + "view.system": "System", "view.users": "Užívatelia", "welcome": "Vitajte", diff --git a/kirby/i18n/translations/sv_SE.json b/kirby/i18n/translations/sv_SE.json index 69ce3f2..4210640 100644 --- a/kirby/i18n/translations/sv_SE.json +++ b/kirby/i18n/translations/sv_SE.json @@ -1,5 +1,10 @@ { + "account.changeName": "Change your name", + "account.delete": "Delete your account", + "account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.", + "add": "L\u00e4gg till", + "author": "Author", "avatar": "Profilbild", "back": "Tillbaka", "cancel": "Avbryt", @@ -9,6 +14,7 @@ "collapse": "Kollapsa", "collapse.all": "Kollapsa alla", "copy": "Kopiera", + "copy.all": "Kopiera alla", "create": "Skapa", "date": "Datum", @@ -23,24 +29,28 @@ "days.tue": "Tis", "days.wed": "Ons", + "debugging": "Debugging", + "delete": "Radera", "delete.all": "Radera allt", - "dimensions": "Dimensioner", - "disabled": "Inaktiverad", - "discard": "Kassera", - "download": "Ladda ner", - "duplicate": "Duplicera", - "edit": "Redigera", - "expand": "Expandera", - "expand.all": "Expandera alla", "dialog.files.empty": "Inga filer att välja", "dialog.pages.empty": "Inga sidor att välja", "dialog.users.empty": "Inga användare att välja", + "dimensions": "Dimensioner", + "disabled": "Inaktiverad", + "discard": "Kassera", + "download": "Ladda ner", + "duplicate": "Duplicera", + + "edit": "Redigera", + "email": "E-postadress", "email.placeholder": "namn@exempel.se", + "environment": "Environment", + "error.access.code": "Ogiltig kod", "error.access.login": "Ogiltig inloggning", "error.access.panel": "Du saknar behörighet att nå panelen", @@ -92,6 +102,7 @@ "error.language.code": "Ange en giltig kod för språket", "error.language.duplicate": "Språket finns redan", "error.language.name": "Ange ett giltigt namn för språket", + "error.language.notFound": "Språket hittades inte", "error.layout.validation.block": "Det finns ett fel i block {blockIndex} i layout {layoutIndex}", "error.layout.validation.settings": "Det finns ett fel i inställningarna för layout {index}", @@ -100,6 +111,8 @@ "error.license.email": "Ange en giltig e-postadress", "error.license.verification": "Licensen kunde inte verifieras", + "error.offline": "The Panel is currently offline", + "error.page.changeSlug.permission": "Du har inte behörighet att ändra URL-appendixen för \"{slug}\"", "error.page.changeStatus.incomplete": "Sidan innehåller fel och kan inte publiceras", "error.page.changeStatus.permission": "Statusen för denna sida kan inte ändras", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Användaren har inget lösenord", "error.user.password.wrong": "Fel lösenord", "error.user.role.invalid": "Ange en giltig roll", + "error.user.undefined": "Användaren kan inte hittas", "error.user.update.permission": "Du har inte behörighet att uppdatera användaren \"{name}\"", "error.validation.accepted": "Vänligen bekräfta", @@ -208,6 +222,9 @@ "error.validation.time.between": "Ange en tid mellan {min} och {max}", "error.validation.url": "Ange en giltig URL", + "expand": "Expandera", + "expand.all": "Expandera alla", + "field.required": "Fältet krävs", "field.blocks.changeType": "Ändra typ", "field.blocks.code.name": "Kod", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Vill du verkligen radera de valda blocken?", "field.blocks.empty": "Inga block än", "field.blocks.fieldsets.label": "Välj en typ av block …", + "field.blocks.fieldsets.paste": "Tryck på {{ shortcut }} för att klistra in/importera block från ditt urklipp", "field.blocks.gallery.name": "Galleri", "field.blocks.gallery.images.empty": "Inga bilder än", "field.blocks.gallery.images.label": "Bilder", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Välj en bild", "field.blocks.image.ratio": "Bildförhållande", "field.blocks.image.url": "Bild-URL", + "field.blocks.line.name": "Linje", "field.blocks.list.name": "Punktlista", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Text", @@ -263,7 +282,7 @@ "field.structure.empty": "Inga poster än", "field.users.empty": "Inga användare valda än", - "file.blueprint": "Denna fil har ingen blueprint än. Du kan skapa en i /site/blueprints/{template}.yml", + "file.blueprint": "Denna fil har ingen blueprint än. Du kan skapa en i /site/blueprints/files/{blueprint}.yml", "file.delete.confirm": "Vill du verkligen radera
{filename}?", "file.sort": "Ändra position", @@ -272,6 +291,7 @@ "hide": "Göm", "hour": "Timme", + "import": "Importera", "insert": "Infoga", "insert.after": "Infoga efter", "insert.before": "Infoga före", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Kod för återställning av lösenord", "login.code.placeholder.email": "000 000", "login.code.text.email": "Om din e-postadress är registrerad skickades den begärda koden via e-post.", - "login.email.login.body": "Hej {user.nameOrEmail},\n\nDu begärde nyligen en inloggningskod för Kirby-panelen.\nFöljande kod är giltig i {timeout} minuter:\n\n{code}\n\nOm du inte har begärt en inloggningskod kan du ignorera det här e-postmeddelandet eller kontakta din administratör om du har frågor.\nAv säkerhetsskäl ska du INTE vidarebefordra detta e-postmeddelande.", + "login.email.login.body": "Hej {user.nameOrEmail}.\n\nDu begärde nyligen en inloggningskod till panelen för {site}.\nFöljande kod är giltig i {timeout} minuter:\n\n{code}\n\nOm du inte har begärt någon inloggningskod, ignorera detta e-postmeddelande eller kontakta din administratör om du har frågor.\nAv säkerhetsskäl, vidarebefordra INTE detta e-postmeddelande.", "login.email.login.subject": "Din inloggningskod", - "login.email.password-reset.body": "Hej {user.nameOrEmail},\n\nDu begärde nyligen en kod för återställning av lösenordet för Kirby-panelen.\nFöljande kod är giltig i {timeout} minuter:\n\n{code}\n\nOm du inte har begärt en återställning av lösenordet, ignorera detta e-postmeddelande eller kontakta din administratör om du har frågor.\nAv säkerhetsskäl ska du INTE vidarebefordra detta e-postmeddelande.", + "login.email.password-reset.body": "Hej {user.nameOrEmail}.\n\nDu begärde nyligen en kod för återställning av ditt lösenord till panelen för {site}.\nFöljande kod är giltig i {timeout} minuter:\n\n{code}\n\nOm du inte har begärt en återställning av ditt lösenord, ignorera detta e-postmeddelande eller kontakta din administratör om du har frågor.\nAv säkerhetsskäl, vidarebefordra INTE detta e-postmeddelande.", "login.email.password-reset.subject": "Din kod för återställning av lösenord", "login.remember": "Håll mig inloggad", "login.reset": "Återställ lösenord", @@ -385,7 +405,7 @@ "orientation.portrait": "Stående", "orientation.square": "Kvadrat", - "page.blueprint": "Denna sida har ingen blueprint än. Du kan skapa en i /site/blueprints/{template}.yml", + "page.blueprint": "Denna sida har ingen blueprint än. Du kan skapa en i /site/blueprints/pages/{blueprint}.yml", "page.changeSlug": "Ändra URL", "page.changeSlug.fromTitle": "Skapa utifr\u00e5n titel", "page.changeStatus": "Ändra status", @@ -417,7 +437,10 @@ "pagination.page": "Sida", "password": "L\u00f6senord", + "paste": "Klistra in", + "paste.after": "Klistra in efter", "pixel": "Pixel", + "plugins": "Plugins", "prev": "Föregående", "preview": "Förhandsgranska", "remove": "Ta bort", @@ -454,6 +477,8 @@ "template": "Mall", "today": "Idag", + "server": "Server", + "site.blueprint": "Webbplatsen har ingen blueprint än. Du kan skapa en i /site/blueprints/site.yml", "toolbar.button.code": "Kod", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Rubrik 1", "toolbar.button.heading.2": "Rubrik 2", "toolbar.button.heading.3": "Rubrik 3", + "toolbar.button.heading.4": "Rubrik 4", + "toolbar.button.heading.5": "Rubrik 5", + "toolbar.button.heading.6": "Rubrik 6", "toolbar.button.italic": "Kursiv", "toolbar.button.file": "Fil", "toolbar.button.file.select": "Välj en fil", "toolbar.button.file.upload": "Ladda upp en fil", "toolbar.button.link": "L\u00e4nk", + "toolbar.button.paragraph": "Stycke", "toolbar.button.strike": "Genomstruken", "toolbar.button.ol": "Sorterad lista", "toolbar.button.underline": "Understruken", @@ -497,7 +526,7 @@ "url.placeholder": "https://exempel.se", "user": "Användare", - "user.blueprint": "Du kan ange ytterligare sektioner och fält för denna användarroll i /site/blueprints/users/{role}.yml", + "user.blueprint": "Du kan skapa ytterligare sektioner och fält för den här användarrollen i /site/blueprints/users/{blueprint}.yml", "user.changeEmail": "Ändra e-postadress", "user.changeLanguage": "Ändra språk", "user.changeName": "Byt namn på denna användare", @@ -516,9 +545,10 @@ "view.account": "Ditt konto", "view.installation": "Installation", + "view.languages": "Språk", "view.resetPassword": "Återställ lösenord", - "view.settings": "Inställningar", "view.site": "Webbplats", + "view.system": "System", "view.users": "Anv\u00e4ndare", "welcome": "Välkommen", diff --git a/kirby/i18n/translations/tr.json b/kirby/i18n/translations/tr.json index d93718f..d054588 100644 --- a/kirby/i18n/translations/tr.json +++ b/kirby/i18n/translations/tr.json @@ -1,5 +1,10 @@ { + "account.changeName": "İsminizi değiştirin", + "account.delete": "Hesabınızı silin", + "account.delete.confirm": "Hesabınızı gerçekten silmek istiyor musunuz? Oturumunuz hemen sonlandırılacaktır. Hesabınız daha sonra geri alınamaz.", + "add": "Ekle", + "author": "Yazar", "avatar": "Profil resmi", "back": "Geri", "cancel": "\u0130ptal", @@ -9,6 +14,7 @@ "collapse": "Daralt", "collapse.all": "Tümünü daralt", "copy": "Kopyala", + "copy.all": "Tümünü kopyala", "create": "Oluştur", "date": "Tarih", @@ -23,24 +29,28 @@ "days.tue": "Sal", "days.wed": "\u00c7ar", + "debugging": "Hata ayıklama", + "delete": "Sil", "delete.all": "Tümünü sil", - "dimensions": "Boyutlar", - "disabled": "Devredışı", - "discard": "Vazge\u00e7", - "download": "İndir", - "duplicate": "Kopyala", - "edit": "D\u00fczenle", - "expand": "Genişlet", - "expand.all": "Tümünü genişlet", "dialog.files.empty": "Seçilecek dosya yok", "dialog.pages.empty": "Seçilecek sayfa yok", "dialog.users.empty": "Seçilecek kullanıcı yok", + "dimensions": "Boyutlar", + "disabled": "Devredışı", + "discard": "Vazge\u00e7", + "download": "İndir", + "duplicate": "Kopyala", + + "edit": "D\u00fczenle", + "email": "E-Posta", "email.placeholder": "eposta@ornek.com", + "environment": "Ortam", + "error.access.code": "Geçersiz kod", "error.access.login": "Geçersiz giriş", "error.access.panel": "Panel'e erişim izniniz yok", @@ -92,6 +102,7 @@ "error.language.code": "Lütfen dil için geçerli bir kod girin", "error.language.duplicate": "Bu dil zaten var", "error.language.name": "Lütfen dil için geçerli bir isim girin", + "error.language.notFound": "Dil bulunamadı", "error.layout.validation.block": "{layoutIndex}. düzenin {blockIndex}. bloğunda bir hata var", "error.layout.validation.settings": "{index}. düzen ayarlarında bir hata var", @@ -100,6 +111,8 @@ "error.license.email": "Lütfen geçerli bir e-posta adresi girin", "error.license.verification": "Lisans doğrulanamadı", + "error.offline": "Panel şu anda çevrimdışı", + "error.page.changeSlug.permission": "\"{slug}\" uzantısına sahip bu sayfanın adresini değiştirilemez", "error.page.changeStatus.incomplete": "Sayfada hatalar var ve yayınlanamadı", "error.page.changeStatus.permission": "Bu sayfanın durumu değiştirilemez", @@ -165,6 +178,7 @@ "error.user.password.undefined": "Bu kullanıcının şifresi yok", "error.user.password.wrong": "Yanlış şifre", "error.user.role.invalid": "Lütfen geçerli bir rol girin", + "error.user.undefined": "Kullanıcı bulunamadı", "error.user.update.permission": "\"{name}\" kullanıcısını güncellemenize izin verilmiyor", "error.validation.accepted": "Lütfen onaylayın", @@ -208,6 +222,9 @@ "error.validation.time.between": "Lütfen {min} ile {max} arasında bir tarih girin", "error.validation.url": "Lütfen geçerli bir adres girin", + "expand": "Genişlet", + "expand.all": "Tümünü genişlet", + "field.required": "Alan gereklidir", "field.blocks.changeType": "Türü değiştir", "field.blocks.code.name": "Kod", @@ -218,6 +235,7 @@ "field.blocks.delete.confirm.selected": "Seçilen blokları gerçekten silmek istiyor musunuz?", "field.blocks.empty": "Henüz blok yok", "field.blocks.fieldsets.label": "Lütfen bir blok türü seçiniz …", + "field.blocks.fieldsets.paste": "Panonuzdan blokları yapıştırmak veya içe aktarmak için {{ shortcut }}'e basın", "field.blocks.gallery.name": "Galeri", "field.blocks.gallery.images.empty": "Henüz görsel yok", "field.blocks.gallery.images.label": "Görseller", @@ -234,6 +252,7 @@ "field.blocks.image.placeholder": "Bir görsel seçin", "field.blocks.image.ratio": "Oran", "field.blocks.image.url": "Görsel URL", + "field.blocks.line.name": "Çizgi", "field.blocks.list.name": "Liste", "field.blocks.markdown.name": "Markdown", "field.blocks.markdown.label": "Metin", @@ -263,7 +282,7 @@ "field.structure.empty": "Hen\u00fcz bir girdi yok", "field.users.empty": "Henüz kullanıcı seçilmedi", - "file.blueprint": "Bu dosyanın henüz bir planı yok. Kurulumu /site/blueprints/file/{template}.yml'de tanımlayabilirsiniz.", + "file.blueprint": "Bu dosyanın henüz bir planı yok. Kurulumu /site/blueprints/files/{blueprint}.yml dosyasında tanımlayabilirsiniz.", "file.delete.confirm": "{filename} dosyasını silmek istediğinizden emin misiniz?", "file.sort": "Pozisyon değiştir", @@ -272,6 +291,7 @@ "hide": "Gizle", "hour": "Saat", + "import": "İçe aktar", "insert": "Ekle", "insert.after": "Sonrasına ekle", "insert.before": "Öncesine ekle", @@ -337,9 +357,9 @@ "login.code.label.password-reset": "Şifre sıfırlama kodu", "login.code.placeholder.email": "000 000", "login.code.text.email": "E-posta adresiniz kayıtlıysa, istenen kod e-posta yoluyla gönderilmiştir.", - "login.email.login.body": "Merhaba {user.nameOrEmail},\n\nKısa süre önce Kirby Panel'i için bir giriş kodu istediniz.\nAşağıdaki giriş kodu {timeout} dakika boyunca geçerli olacaktır:\n\n{code}\n\nBir giriş kodu istemediyseniz, lütfen bu e-postayı dikkate almayın veya sorularınız varsa yöneticinize başvurun.\nGüvenlik için lütfen bu e-postayı İLETMEYİN.", + "login.email.login.body": "Merhaba {user.nameOrEmail},\n\nKısa süre önce {site} Panel'i için bir giriş kodu istediniz.\nAşağıdaki giriş kodu {timeout} dakika boyunca geçerli olacaktır:\n\n{code}\n\nBir giriş kodu istemediyseniz, lütfen bu e-postayı dikkate almayın veya sorularınız varsa yöneticinize başvurun.\nGüvenliğiniz için lütfen bu e-postayı İLETMEYİN.", "login.email.login.subject": "Giriş kodunuz", - "login.email.password-reset.body": "Merhaba {user.nameOrEmail},\n\nKısa süre önce Kirby Panel'i için bir şifre sıfırlama kodu istediniz.\nAşağıdaki şifre sıfırlama kodu {timeout} dakika boyunca geçerli olacaktır:\n\n{code}\n\nŞifre sıfırlama kodu istemediyseniz, lütfen bu e-postayı dikkate almayın veya sorularınız varsa yöneticinizle iletişime geçin.\nGüvenlik için lütfen bu e-postayı İLETMEYİN.", + "login.email.password-reset.body": "Merhaba {user.nameOrEmail},\n\nKısa süre önce {site} Panel'i için bir şifre sıfırlama kodu istediniz.\nAşağıdaki şifre sıfırlama kodu {timeout} dakika boyunca geçerli olacaktır:\n\n{code}\n\nŞifre sıfırlama kodu istemediyseniz, lütfen bu e-postayı dikkate almayın veya sorularınız varsa yöneticinizle iletişime geçin.\nGüvenliğiniz için lütfen bu e-postayı İLETMEYİN.", "login.email.password-reset.subject": "Şifre sıfırlama kodunuz", "login.remember": "Oturumumu açık tut", "login.reset": "Şifreyi sıfırla", @@ -385,7 +405,7 @@ "orientation.portrait": "Dikey", "orientation.square": "Kare", - "page.blueprint": "Bu sayfanın henüz bir planı yok. Kurulumu /site/blueprints/{template}.yml'de tanımlayabilirsiniz.", + "page.blueprint": "Bu dosyanın henüz bir planı yok. Kurulumu /site/blueprints/pages/{blueprint}.yml dosyasında tanımlayabilirsiniz.", "page.changeSlug": "Web Adresini Değiştir", "page.changeSlug.fromTitle": "Ba\u015fl\u0131ktan olu\u015ftur", "page.changeStatus": "Durumu değiştir", @@ -417,7 +437,10 @@ "pagination.page": "Sayfa", "password": "\u015eifre", + "paste": "Yapıştır", + "paste.after": "Sonrasına yapıştır", "pixel": "Piksel", + "plugins": "Eklentiler", "prev": "Önceki", "preview": "Önizle", "remove": "Kaldır", @@ -454,6 +477,8 @@ "template": "\u015eablon", "today": "Bugün", + "server": "Sunucu", + "site.blueprint": "Sitenin henüz bir planı yok. Kurulumu /site/blueprints/site.yml'de tanımlayabilirsiniz.", "toolbar.button.code": "Kod", @@ -463,11 +488,15 @@ "toolbar.button.heading.1": "Başlık 1", "toolbar.button.heading.2": "Başlık 2", "toolbar.button.heading.3": "Başlık 3", + "toolbar.button.heading.4": "Başlık 4", + "toolbar.button.heading.5": "Başlık 5", + "toolbar.button.heading.6": "Başlık 6", "toolbar.button.italic": "Eğik Yazı", "toolbar.button.file": "Dosya", "toolbar.button.file.select": "Bir dosya seçin", "toolbar.button.file.upload": "Bir dosya yükleyin", "toolbar.button.link": "Ba\u011flant\u0131", + "toolbar.button.paragraph": "Paragraf", "toolbar.button.strike": "Üstü çizili", "toolbar.button.ol": "Sıralı liste", "toolbar.button.underline": "Altı çizili", @@ -497,7 +526,7 @@ "url.placeholder": "https://ornek.com", "user": "Kullanıcı", - "user.blueprint": "Bu kullanıcı rolü için /site/blueprints/users/{role}.yml içinde ek bölümler ve form alanları tanımlayabilirsiniz", + "user.blueprint": "Bu kullanıcı rolü için /site/blueprints/users/{blueprint}.yml içinde ek bölümler ve form alanları tanımlayabilirsiniz", "user.changeEmail": "E-postayı değiştir", "user.changeLanguage": "Dili değiştir", "user.changeName": "Kullanıcıyı yeniden adlandır", @@ -516,9 +545,10 @@ "view.account": "Hesap Bilgilerin", "view.installation": "Kurulum", + "view.languages": "Diller", "view.resetPassword": "Şifreyi sıfırla", - "view.settings": "Ayarlar", "view.site": "Site", + "view.system": "Sistem", "view.users": "Kullan\u0131c\u0131lar", "welcome": "Hoşgeldiniz", diff --git a/kirby/panel/.eslintrc.js b/kirby/panel/.eslintrc.js new file mode 100644 index 0000000..a24be1f --- /dev/null +++ b/kirby/panel/.eslintrc.js @@ -0,0 +1,30 @@ +module.exports = { + extends: [ + "eslint:recommended", + "plugin:cypress/recommended", + "plugin:vue/recommended" + ], + rules: { + "vue/component-definition-name-casing": "off", + "vue/require-default-prop": "off", + "vue/attributes-order": "error", + "vue/require-prop-types": "error", + "vue/max-attributes-per-line": [ + "error", + { + "singleline": 3, + "multiline": { + "max": 1, + "allowFirstLine": false + } + } + ], + "vue/html-closing-bracket-newline": [ + "error", + { + "singleline": "never", + "multiline": "always" + } + ] + } +} \ No newline at end of file diff --git a/kirby/panel/dist/css/app.css b/kirby/panel/dist/css/app.css deleted file mode 100644 index 4ed4ee8..0000000 --- a/kirby/panel/dist/css/app.css +++ /dev/null @@ -1 +0,0 @@ -*,:after,:before{margin:0;padding:0;box-sizing:border-box}:root{--color-backdrop:rgba(0,0,0,0.6);--color-background:#efefef;--color-border:#ccc;--color-focus:#4271ae;--color-focus-light:#7e9abf;--color-focus-outline:rgba(66,113,174,0.25);--color-negative:#c82829;--color-negative-light:#d16464;--color-negative-outline:rgba(200,40,41,0.25);--color-notice:#f4861f;--color-notice-light:#de935f;--color-positive:#5d800d;--color-positive-light:#a7bd68;--color-positive-outline:rgba(93,128,13,0.25);--color-text:#111;--color-text-light:#777;--font-family-mono:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;--font-family-sans:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;--font-size-tiny:0.75rem;--font-size-small:0.875rem;--font-size-medium:1rem;--font-size-large:1.25rem;--font-size-huge:1.5rem;--font-size-monster:1.875rem;--box-shadow-dropdown:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);--box-shadow-item:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);--box-shadow-focus:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)}noscript{padding:1.5rem;display:flex;align-items:center;justify-content:center;height:100vh;text-align:center}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background:#efefef}body,html{color:#111;overflow:hidden;height:100%}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:600}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.k-panel{position:absolute;top:0;right:0;bottom:0;left:0;background:#efefef}.k-panel:focus{outline:0}.k-panel[data-loading]{animation:LoadingCursor .5s}.k-panel-header{position:absolute;top:0;left:0;right:0;z-index:300}.k-panel .k-form-buttons{position:fixed;bottom:0;left:0;right:0;z-index:300}.k-panel-view{position:absolute;top:0;right:0;bottom:0;left:0;padding-bottom:6rem;overflow-y:scroll;-webkit-overflow-scrolling:touch;transform:translateZ(0)}.k-panel[data-topbar] .k-panel-view{top:2.5rem}.k-panel[data-dragging],.k-panel[data-loading]:after{-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-offline-warning{position:fixed;content:" ";top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(17,17,17,.7);content:"offline";display:flex;align-items:center;justify-content:center;color:#fff}@keyframes LoadingCursor{to{cursor:progress}}@keyframes Spin{to{transform:rotate(1turn)}}.k-offscreen{-webkit-clip-path:inset(100%);clip-path:inset(100%);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.k-icons{position:absolute;width:0;height:0}.k-fatal{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:flex;z-index:700;align-items:center;justify-content:center;padding:1.5rem}.k-fatal-box{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;padding:.75rem 1.5rem 1.5rem;box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);border-radius:.25rem}.k-fatal-box .k-headline{margin-bottom:.75rem}.k-fatal-iframe{border:0;width:100%;flex-grow:1;border:2px solid #ccc}[data-invalid]{border:1px solid rgba(200,40,41,.25);box-shadow:0 0 3px 2px rgba(200,40,41,.25)}[data-invalid]:focus-within{border:1px solid #c82829!important;box-shadow:0 0 0 2px rgba(200,40,41,.25)!important}.k-dialog{position:relative;background:#efefef;width:100%;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);border-radius:1px;line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;display:flex;flex-direction:column}@media screen and (min-width:20rem){.k-dialog[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.k-dialog[data-size=large]{width:40rem}}.k-dialog-notification{padding:.75rem 1.5rem;background:#111;width:100%;line-height:1.25rem;color:#fff;display:flex;flex-shrink:0;align-items:center}.k-dialog-notification[data-theme=error]{background:#d16464;color:#000}.k-dialog-notification[data-theme=success]{background:#a7bd68;color:#000}.k-dialog-notification p{flex-grow:1;word-wrap:break-word;overflow:hidden}.k-dialog-notification .k-button{display:flex;margin-left:1rem}.k-dialog-body{padding:1.5rem;overflow-y:auto;overflow-x:hidden}.k-dialog-body .k-fieldset{padding-bottom:.5rem}.k-dialog-footer{border-top:1px solid #ddd;padding:0;border-bottom-left-radius:1px;border-bottom-right-radius:1px;line-height:1;flex-shrink:0}.k-dialog-footer .k-button-group{display:flex;margin:0;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}.k-dialog-footer .k-button-group .k-button:first-child{text-align:left;padding-left:1.5rem}.k-dialog-footer .k-button-group .k-button:last-child{text-align:right;padding-right:1.5rem}.k-dialog-pagination{margin-bottom:-1.5rem;display:flex;justify-content:center;align-items:center}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:1px}.k-error-details{background:#fff;display:block;overflow:auto;padding:1rem;font-size:.875rem;line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:#d16464;margin-bottom:.25rem}.k-error-details dd{overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis}.k-error-details dd:not(:last-of-type){margin-bottom:1.5em}.k-error-details li:not(:last-child){border-bottom:1px solid #efefef;padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}.k-page-remove-warning{margin:1.5rem 0}.k-page-remove-warning .k-box{font-size:1rem;line-height:1.5em;padding-top:.75rem;padding-bottom:.75rem}.k-page-rename-dialog .k-form .k-field+.k-field{margin-top:2.25rem}.k-pages-dialog-navbar{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem;padding-right:38px}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{flex-grow:1;text-align:center}.k-pages-dialog .k-list-item{cursor:pointer}.k-pages-dialog .k-list-item .k-button[data-theme=disabled],.k-pages-dialog .k-list-item .k-button[disabled]{opacity:.25}.k-pages-dialog .k-list-item .k-button[data-theme=disabled]:hover{opacity:1}.k-users-dialog .k-list-item{cursor:pointer}.k-drawer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:400;display:flex;align-items:stretch;justify-content:flex-end;background:rgba(0,0,0,.2)}.k-drawer-box{position:relative;flex-basis:50rem;display:flex;flex-direction:column;background:#efefef;box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.k-drawer-header{flex-shrink:0;height:2.5rem;padding-left:1.5rem;display:flex;align-items:center;line-height:1;justify-content:space-between;background:#fff;font-size:.875rem}.k-drawer-title{padding:0 .75rem}.k-drawer-breadcrumb,.k-drawer-title{display:flex;flex-grow:1;align-items:center;min-width:0;margin-left:-.75rem;font-size:.875rem;font-weight:400}.k-drawer-breadcrumb li:not(:last-child) .k-button:after{position:absolute;display:inline-flex;right:-.75rem;width:1.5rem;justify-content:center;align-items:center;content:"›";color:#999;height:2.5rem}.k-drawer-breadcrumb .k-icon,.k-drawer-title .k-icon{width:1rem;color:#999;margin-right:.5rem}.k-drawer-breadcrumb .k-button{display:inline-flex;align-items:center;height:2.5rem;padding:0 .75rem}.k-drawer-breadcrumb .k-button-text{opacity:1}.k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-left:0}.k-drawer-tabs{display:flex;align-items:center;line-height:1;margin-right:.75rem}.k-drawer-tab.k-button{height:2.5rem;padding:0 .75rem;display:flex;align-items:center;font-size:.75rem}.k-drawer-tab.k-button[aria-current]:after{position:absolute;bottom:-1px;left:.75rem;right:.75rem;content:"";background:#000;height:2px}.k-drawer-options{padding-right:.75rem}.k-drawer-option.k-button{width:2.5rem;height:2.5rem;color:#999;line-height:1}.k-drawer-option.k-button:focus,.k-drawer-option.k-button:hover{color:#000}.k-drawer-body{padding:1.5rem;flex-grow:1;overflow-y:auto;background:#efefef}.k-drawer[data-nested]{background:none}.k-calendar-input{padding:.5rem;background:#111;color:#efefef;border-radius:1px}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{flex-grow:1;display:flex;align-items:center;justify-content:center}[dir=ltr] .k-calendar-selects{direction:ltr}[dir=rtl] .k-calendar-selects{direction:rtl}.k-calendar-selects .k-select-input{padding:0 .5rem;font-weight:400;font-size:.875rem}.k-calendar-selects .k-select-input:focus-within{color:#7e9abf!important}.k-calendar-input th{padding:.5rem 0;color:#999;font-size:.75rem;font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin:0 auto;color:#fff;line-height:1.75rem;display:flex;justify-content:center;border-radius:50%;border:2px solid transparent}.k-calendar-day .k-button .k-button-text{opacity:1}.k-calendar-table .k-button:hover{color:#fff}.k-calendar-day:hover .k-button:not([data-disabled]){border-color:hsla(0,0%,100%,.25)}.k-calendar-day[aria-current=date] .k-button{color:#cca000;font-weight:500}.k-calendar-day[aria-selected=date] .k-button{border-color:#7e9abf;color:#7e9abf}.k-calendar-day[data-between]{background:#333}.k-calendar-day[data-first]{border-top-left-radius:100%;border-bottom-left-radius:100%}.k-calendar-day[data-last]{border-top-right-radius:100%;border-bottom-right-radius:100%}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{color:#7e9abf;font-size:.75rem;padding:1rem}.k-calendar-today .k-button-text{opacity:1}.k-counter{font-size:.75rem;color:#111;font-weight:600}.k-counter[data-invalid]{box-shadow:none;border:0;color:#c82829}.k-counter-rules{color:#777;font-weight:400}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-form-submitter{display:none}.k-form-buttons[data-theme=changes]{background:#de935f}.k-form-buttons[data-theme=lock]{background:#d16464}.k-form-buttons[data-theme=unlock]{background:#7e9abf}.k-form-buttons .k-view{display:flex;justify-content:space-between;align-items:center}.k-form-button.k-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;display:flex;padding:0 1rem;align-items:center}.k-form-button:first-child{margin-left:-1rem}.k-form-button:last-child{margin-right:-1rem}.k-form-lock-info{display:flex;font-size:.875rem;align-items:center;line-height:1.5em;padding:.625rem 0;margin-right:3rem}.k-form-lock-info>.k-icon{margin-right:.5rem}.k-form-lock-buttons{display:flex;flex-shrink:0}.k-form-lock-loader{animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:flex}.k-form-indicator-icon{color:#de935f}.k-form-indicator-info{font-size:.875rem;font-weight:600;padding:.75rem 1rem .25rem;line-height:1.25em;width:15rem}.k-field-label{font-weight:600;display:block;padding:0 0 .75rem;flex-grow:1;line-height:1.25rem}.k-field-label abbr{text-decoration:none;color:#999;padding-left:.25rem}.k-field-header{position:relative;display:flex;align-items:baseline}.k-field-options{position:absolute;top:calc(-.5rem - 1px)}[dir=ltr] .k-field-options{right:0}[dir=rtl] .k-field-options{left:0}.k-field-options.k-button-group .k-dropdown{height:auto}.k-field-options.k-button-group .k-field-options-button.k-button{padding:.75rem;display:flex}.k-field[data-disabled]{cursor:not-allowed}.k-field[data-disabled] *{pointer-events:none}.k-field[data-disabled] .k-text[data-theme=help] *{pointer-events:auto}.k-field:focus-within>.k-field-header>.k-field-counter{display:block}.k-field-help{padding-top:.5rem}.k-fieldset{border:0}.k-fieldset .k-grid{grid-row-gap:2.25rem}@media screen and (min-width:30em){.k-fieldset .k-grid{grid-column-gap:1.5rem}}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid{grid-template-columns:repeat(1,1fr)}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid .k-column,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid .k-column{grid-column-start:auto}.k-input{display:flex;align-items:center;line-height:1;border:0;outline:0;background:none}.k-input-element{flex-grow:1}.k-input-icon{display:flex;justify-content:center;align-items:center;line-height:0}.k-input[data-disabled]{pointer-events:none}[data-disabled] .k-input-icon{color:#777}.k-input[data-theme=field]{line-height:1;border:1px solid #ccc;background:#fff}.k-input[data-theme=field]:focus-within{border:1px solid #4271ae;box-shadow:0 0 0 2px rgba(66,113,174,.25)}.k-input[data-theme=field][data-disabled]{background:#efefef}.k-input[data-theme=field] .k-input-icon{width:2.25rem}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before,.k-input[data-theme=field] .k-input-icon{align-self:stretch;display:flex;align-items:center;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{padding:0 .5rem}.k-input[data-theme=field] .k-input-before{color:#555;padding-right:0}.k-input[data-theme=field] .k-input-after{color:#555;padding-left:0}.k-input[data-theme=field] .k-input-icon>.k-dropdown{width:100%;height:100%}.k-input[data-theme=field] .k-input-icon-button{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.k-input[data-theme=field] .k-number-input,.k-input[data-theme=field] .k-select-input,.k-input[data-theme=field] .k-text-input{padding:.5rem;line-height:1.25rem}.k-input[data-theme=field] .k-date-input .k-select-input,.k-input[data-theme=field] .k-time-input .k-select-input{padding-left:0;padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=ltr] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-left:.5rem}[dir=rtl] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=rtl] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-right:.5rem}.k-input[data-theme=field] .k-date-input .k-select-input:focus-within,.k-input[data-theme=field] .k-time-input .k-select-input:focus-within{color:#4271ae;font-weight:600}.k-input[data-theme=field] .k-time-input .k-time-input-meridiem{padding-left:.5rem}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=checkboxes] .k-radio-input li,.k-input[data-theme=field][data-type=radio] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{min-width:0;overflow-wrap:break-word}.k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{grid-template-columns:repeat(var(--columns),1fr)}}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:.625rem;left:.5rem;margin-top:0}.k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,.k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-left:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px;margin-right:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=radio] .k-radio-input{grid-template-columns:repeat(var(--columns),1fr)}}.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-right:1px solid #efefef;border-bottom:1px solid #efefef}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;flex-grow:1;min-height:2.25rem;line-height:1.25rem;padding:.5rem .5rem}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:.625rem;left:.5rem;margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:.875rem;color:#777;line-height:1.25rem;padding-top:.125rem}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:2.25rem;height:2.25rem;display:flex;align-items:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:.5rem}.k-input[data-theme=field][data-type=select]{position:relative}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}[dir=ltr] .k-input[data-theme=field][data-type=select] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=select] .k-input-icon{left:0}.k-input[data-theme=field][data-type=tags] .k-tags-input{padding:.25rem .25rem 0 .25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:.875rem;padding:0 .25rem;height:1.75rem;line-height:1;margin-bottom:.25rem}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content{top:calc(100% + .5rem + 2px)}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content[data-dropup]{top:calc(100% + .5rem + 2px);bottom:auto;margin-bottom:0}.k-input[data-theme=field][data-type=multiselect]{position:relative}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem;margin-bottom:.25rem;height:1.75rem;font-size:.875rem}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;right:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem .5rem;line-height:1.5rem}.k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:.25rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:.5rem}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 .5rem 0 .75rem;line-height:2.25rem}.k-login-code-form .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:#fff;border-radius:1px;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-upload input{position:absolute;top:0}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:.875rem}.k-upload-list-filename{color:#777}.k-upload-error-list li{padding:.75rem;background:#fff;border-radius:1px}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:#c82829;font-weight:600}.k-upload-error-message{color:#777}.k-writer-toolbar{position:absolute;display:flex;background:#000;height:30px;transform:translateX(-50%) translateY(-.75rem);z-index:801;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);color:#fff;border-radius:.25rem}.k-writer-toolbar-button.k-button{display:flex;align-items:center;justify-content:center;height:30px;width:30px;font-size:.875rem!important;color:currentColor;line-height:1}.k-writer-toolbar-button.k-button:hover{background:hsla(0,0%,100%,.15)}.k-writer-toolbar-button.k-writer-toolbar-button-active{color:#b1c2d8}.k-writer-toolbar-button.k-writer-toolbar-nodes{width:auto;padding:0 .75rem}.k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-left:1px solid #555}.k-writer-toolbar-button.k-writer-toolbar-nodes:after{content:"";margin-left:.5rem;border-top:4px solid #fff;border-left:4px solid transparent;border-right:4px solid transparent}.k-writer-toolbar .k-dropdown-content{color:#000;background:#fff;margin-top:.5rem}.k-writer{position:relative;width:100%}.k-writer .ProseMirror{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;white-space:pre-wrap;font-variant-ligatures:none;line-height:inherit}.k-writer .ProseMirror:focus{outline:0}.k-writer .ProseMirror *{caret-color:currentColor}.k-writer .ProseMirror a{color:#4271ae;text-decoration:underline}.k-writer .ProseMirror>:last-child{margin-bottom:0}.k-writer .ProseMirror h1,.k-writer .ProseMirror h2,.k-writer .ProseMirror h3,.k-writer .ProseMirror ol,.k-writer .ProseMirror p,.k-writer .ProseMirror ul{margin-bottom:.75rem}.k-writer .ProseMirror h1{font-size:1.875rem;line-height:1.25em}.k-writer .ProseMirror h2{font-size:1.5rem;line-height:1.25em}.k-writer .ProseMirror h3{font-size:1.25rem;line-height:1.25em}.k-writer .ProseMirror h1 strong,.k-writer .ProseMirror h2 strong,.k-writer .ProseMirror h3 strong{font-weight:700}.k-writer .ProseMirror strong{font-weight:600}.k-writer .ProseMirror code{position:relative;font-size:.925em;display:inline-block;line-height:1.325;padding:.05em .325em;background:#ddd;border-radius:.25rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-writer .ProseMirror ol,.k-writer .ProseMirror ul{padding-left:1rem}.k-writer .ProseMirror ul>li{list-style:disc}.k-writer .ProseMirror ul ul>li{list-style:circle}.k-writer .ProseMirror ul ul ul>li{list-style:square}.k-writer .ProseMirror ol>li{list-style:decimal}.k-writer .ProseMirror li>ol,.k-writer .ProseMirror li>p,.k-writer .ProseMirror li>ul{margin:0}.k-writer-code pre{-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-size:.875rem;line-height:2em;overflow-x:auto;overflow-y:hidden;white-space:pre}.k-writer-code code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-writer[data-placeholder][data-empty]:before{content:attr(data-placeholder);position:absolute;line-height:inherit;color:#999;pointer-events:none}.k-checkbox-input{position:relative;cursor:pointer}.k-checkbox-input-native{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;opacity:0}.k-checkbox-input-label{display:block;padding-left:1.75rem}.k-checkbox-input-icon{position:absolute;left:0;width:1rem;height:1rem;border:2px solid #999}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:#fff}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:#111;background:#111}[data-disabled] .k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:#777;background:#777}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:#4271ae}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:#4271ae}.k-datetime-input{display:flex}.k-datetime-input .k-time-input{padding-left:.5rem}.k-text-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-text-input::-moz-placeholder{color:#999}.k-text-input::placeholder{color:#999}.k-text-input:focus{outline:0}.k-text-input:invalid{box-shadow:none;outline:0}.k-list-input .ProseMirror{line-height:1.5em}.k-list-input .ProseMirror ol>li::marker{font-size:.875rem;color:#999}.k-multiselect-input{display:flex;flex-wrap:wrap;position:relative;font-size:.875rem;min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:#4271ae}.k-multiselect-input .k-dropdown-content{width:100%}.k-multiselect-search{margin-top:0!important;color:#fff;background:#111;border-bottom:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-search>.k-button-text{flex:1;opacity:1!important}.k-multiselect-search input{width:100%;color:#fff;background:none;border:none;outline:none;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:275px;overflow-y:auto;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:#a7bd68}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:#7e9abf;font-weight:700}.k-multiselect-value{color:#999;margin-left:.25rem}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}.k-multiselect-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-multiselect-more{width:100%;padding:.75rem;color:hsla(0,0%,100%,.8);text-align:center;border-top:1px dashed hsla(0,0%,100%,.2)}.k-multiselect-more:hover{color:#fff}.k-number-input{width:100%;border:0;background:none;font:inherit;color:inherit}.k-number-input::-moz-placeholder{color:$color-light-grey}.k-number-input::placeholder{color:$color-light-grey}.k-number-input:focus{outline:0}.k-number-input:invalid{box-shadow:none;outline:0}.k-radio-input li{position:relative;line-height:1.5rem;padding-left:1.75rem}.k-radio-input input{position:absolute;width:0;height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.k-radio-input label{cursor:pointer;align-items:center}.k-radio-input label:before{position:absolute;top:.175em;left:0;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid #999;box-shadow:inset 0 0 0 2px #fff}.k-radio-input input:checked+label:before{border-color:#111;background:#111}[data-disabled] .k-radio-input input:checked+label:before{border-color:#777;background:#777}.k-radio-input input:focus+label:before{border-color:#4271ae}.k-radio-input input:focus:checked+label:before{background:#4271ae}.k-radio-input-text{display:block}.k-range-input{display:flex;align-items:center}.k-range-input-native{--min:0;--max:100;--value:0;--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--position:calc(8px + var(--ratio)*(100% - 16px));-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:16px;background:transparent;font-size:.875rem;line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:linear-gradient(#111,#111) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native::-moz-range-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-ms-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc}.k-range-input-native::-moz-range-progress{height:4px;background:#111}.k-range-input-native::-ms-fill-lower{height:4px;background:#111}.k-range-input-native::-webkit-slider-thumb{margin-top:-6px;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #111;border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #111;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{margin-top:0;box-sizing:border-box;width:16px;height:16px;background:#efefef;border:4px solid #111;border-radius:50%;cursor:pointer}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:none}.k-range-input-native:focus::-webkit-slider-runnable-track{border:none;border-radius:4px;width:100%;height:4px;background:#ccc;background:linear-gradient(#4271ae,#4271ae) 0/var(--position) 100% no-repeat #ccc}.k-range-input-native:focus::-moz-range-progress{height:4px;background:#4271ae}.k-range-input-native:focus::-ms-fill-lower{height:4px;background:#4271ae}.k-range-input-native:focus::-webkit-slider-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-moz-range-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-native:focus::-ms-thumb{background:#efefef;border:4px solid #4271ae}.k-range-input-tooltip{position:relative;max-width:20%;display:flex;align-items:center;color:#fff;font-size:.75rem;line-height:1;text-align:center;border-radius:1px;background:#111;margin-left:1rem;padding:0 .25rem;white-space:nowrap}.k-range-input-tooltip:after{position:absolute;top:50%;left:-5px;width:0;height:0;transform:translateY(-50%);border-top:5px solid transparent;border-right:5px solid #111;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}[data-disabled] .k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(#777,#777) 0/var(--position) 100% no-repeat #ccc}[data-disabled] .k-range-input-native::-moz-range-progress{height:4px;background:#777}[data-disabled] .k-range-input-native::-ms-fill-lower{height:4px;background:#777}[data-disabled] .k-range-input-native::-webkit-slider-thumb{border:4px solid #777}[data-disabled] .k-range-input-native::-moz-range-thumb{border:4px solid #777}[data-disabled] .k-range-input-native::-ms-thumb{border:4px solid #777}[data-disabled] .k-range-input-tooltip{background:#777}[data-disabled] .k-range-input-tooltip:after{border-right:5px solid #777}.k-select-input{position:relative;display:block;cursor:pointer;overflow:hidden}.k-select-input-native{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;font:inherit;z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.k-select-input-native[disabled]{cursor:default}.k-select-input-native{font-weight:400}.k-tags-input{display:flex;flex-wrap:wrap}.k-tags-input .k-sortable-ghost{background:#4271ae}.k-tags-input-element{flex-grow:1;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:none}.k-tags-input-element input:focus{outline:0}.k-tags-input[data-layout=list] .k-tag{width:100%;margin-right:0!important}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:none;font:inherit;line-height:1.5em;color:inherit}.k-textarea-input-native::-moz-placeholder{color:#999}.k-textarea-input-native::placeholder{color:#999}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{box-shadow:none;outline:0}.k-textarea-input-native[data-size=small]{min-height:7.5rem}.k-textarea-input-native[data-size=medium]{min-height:15rem}.k-textarea-input-native[data-size=large]{min-height:30rem}.k-textarea-input-native[data-size=huge]{min-height:45rem}.k-textarea-input-native[data-font=monospace]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:sticky;top:0;right:0;left:0;z-index:1;box-shadow:0 2px 5px rgba(0,0,0,.05);border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-toggle-input{display:flex;align-items:center}.k-toggle-input-native{position:relative;height:16px;width:32px;border-radius:16px;border:2px solid #999;box-shadow:inset 0 0 0 2px #fff,inset -16px 0 0 2px #fff;background-color:#999;outline:0;transition:all .1s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;flex-shrink:0}.k-toggle-input-native:checked{border-color:#111;box-shadow:inset 0 0 0 2px #fff,inset 16px 0 0 2px #fff;background-color:#111}.k-toggle-input-native[disabled]{border-color:#ccc;box-shadow:inset 0 0 0 2px #efefef,inset -16px 0 0 2px #efefef;background-color:#ccc}.k-toggle-input-native[disabled]:checked{box-shadow:inset 0 0 0 2px #efefef,inset 16px 0 0 2px #efefef}.k-toggle-input-native:focus:checked{border:2px solid #4271ae;background-color:#4271ae}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;flex-grow:1}.k-blocks-field{position:relative}.k-files-field[data-disabled] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}.k-headline-field .k-headline[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:#4271ae;font-weight:400;padding-right:.25rem}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.k-layout-column{position:relative;height:100%;display:flex;flex-direction:column;background:#fff;min-height:6rem}.k-layout-column:focus{outline:0}.k-layout-column .k-blocks{background:none;box-shadow:none;padding:0;height:100%;background:#fff}.k-layout-column .k-blocks-list{display:flex;flex-direction:column;height:100%}.k-layout-column .k-blocks .k-block-container:last-of-type{flex-grow:1}.k-layout-column .k-blocks .k-empty{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center;border:0;opacity:0;transition:opacity .3s}.k-layout-column .k-blocks .k-empty:hover{opacity:1}.k-layout-column .k-blocks .k-empty .k-icon{border-right:0}.k-layout{position:relative;padding-right:2rem;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}[data-disabled] .k-layout{padding-right:0}.k-layout:not(:last-of-type){margin-bottom:1px}.k-layout:focus{outline:0}.k-layout-toolbar{position:absolute;right:0;top:0;bottom:0;width:2rem;display:flex;flex-direction:column;font-size:.875rem;background:#f7f7f7;border-left:1px solid #efefef;color:#999}.k-layout-toolbar:hover{color:#000}.k-layout-toolbar-button{width:2rem;height:2rem}.k-layout-toolbar .k-sort-handle{margin-top:auto;color:currentColor}.k-layout-columns.k-grid{grid-gap:1px;background:#ddd}.k-layout:not(:first-child) .k-layout-columns.k-grid{border-top:0}.k-layouts .k-sortable-ghost{position:relative;box-shadow:0 5px 10px rgba(17,17,17,.25);outline:2px solid #4271ae;cursor:grabbing;cursor:-webkit-grabbing;z-index:1}.k-layout-selector.k-dialog{background:#313740;color:#fff}.k-layout-selector .k-headline{margin-bottom:1.5rem;line-height:1;margin-top:-.25rem}.k-layout-selector ul{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1.5rem}.k-layout-selector-option .k-grid{height:5rem;grid-gap:2px;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);cursor:pointer}.k-layout-selector-option:hover{outline:2px solid #c6d49d;outline-offset:2px}.k-layout-selector-option:last-child{margin-bottom:0}.k-layout-selector-option .k-column{display:flex;background:hsla(0,0%,100%,.2);justify-content:center;font-size:.75rem;align-items:center}.k-layout-add-button{display:flex;align-items:center;width:100%;color:#999;justify-content:center;padding:.75rem 0}.k-layout-add-button:hover{color:#000}.k-line-field{position:relative;border:0;height:3rem;width:auto}.k-line-field:after{position:absolute;content:"";top:50%;margin-top:-1px;left:0;right:0;height:1px;background:#ccc}.k-list-field .k-list-input{padding:.375rem .5rem .375rem .75rem}.k-pages-field[data-disabled] *{pointer-events:all!important}.k-structure-table{position:relative;table-layout:fixed;width:100%;background:#fff;font-size:.875rem;border-spacing:0;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-structure-table td,.k-structure-table th{border-bottom:1px solid #efefef;line-height:1.25em;overflow:hidden;text-overflow:ellipsis}[dir=ltr] .k-structure-table td,[dir=ltr] .k-structure-table th{border-right:1px solid #efefef}[dir=rtl] .k-structure-table td,[dir=rtl] .k-structure-table th{border-left:1px solid #efefef}.k-structure-table td:last-child{overflow:visible}.k-structure-table th{position:sticky;top:0;right:0;left:0;width:100%;background:#fff;font-weight:400;z-index:1;color:#777;padding:0 .75rem;height:38px}[dir=ltr] .k-structure-table th{text-align:left}[dir=rtl] .k-structure-table th{text-align:right}.k-structure-table td:last-child,.k-structure-table th:last-child{width:38px}[dir=ltr] .k-structure-table td:last-child,[dir=ltr] .k-structure-table th:last-child{border-right:0}[dir=rtl] .k-structure-table td:last-child,[dir=rtl] .k-structure-table th:last-child{border-left:0}.k-structure-table tr:last-child td{border-bottom:0}.k-structure-table tbody tr:hover td{background:hsla(0,0%,93.7%,.25)}@media screen and (max-width:65em){.k-structure-table td,.k-structure-table th{display:none}.k-structure-table td:first-child,.k-structure-table td:last-child,.k-structure-table td:nth-child(2),.k-structure-table th:first-child,.k-structure-table th:last-child,.k-structure-table th:nth-child(2){display:table-cell}}.k-structure-table .k-structure-table-column[data-align=center]{text-align:center}[dir=ltr] .k-structure-table .k-structure-table-column[data-align=right]{text-align:right}[dir=rtl] .k-structure-table .k-structure-table-column[data-align=right]{text-align:left}.k-structure-table .k-structure-table-column[data-align=right]>.k-input{flex-direction:column;align-items:flex-end}.k-structure-table .k-structure-table-column[data-width="1/2"]{width:50%}.k-structure-table .k-structure-table-column[data-width="1/3"]{width:33.33%}.k-structure-table .k-structure-table-column[data-width="1/4"]{width:25%}.k-structure-table .k-structure-table-column[data-width="1/5"]{width:20%}.k-structure-table .k-structure-table-column[data-width="1/6"]{width:16.66%}.k-structure-table .k-structure-table-column[data-width="1/8"]{width:12.5%}.k-structure-table .k-structure-table-column[data-width="1/9"]{width:11.11%}.k-structure-table .k-structure-table-column[data-width="2/3"]{width:66.66%}.k-structure-table .k-structure-table-column[data-width="3/4"]{width:75%}.k-structure-table .k-structure-table-index{width:38px;height:38px;text-align:center}.k-structure-table .k-structure-table-index-number{font-size:.75rem;color:#999;padding-top:.15rem}.k-structure-table .k-sort-handle{width:38px;height:38px;display:none}.k-structure-table[data-sortable] tr:hover .k-structure-table-index-number{display:none}.k-structure-table[data-sortable] tr:hover .k-sort-handle{display:flex!important}.k-structure-table .k-structure-table-options{position:relative;width:38px;text-align:center;height:38px}.k-structure-table .k-structure-table-options-button{width:38px;height:38px}.k-structure-table .k-structure-table-text{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.k-structure-table .k-sortable-ghost{background:#fff;box-shadow:0 5px 10px rgba(17,17,17,.25);outline:2px solid #4271ae;margin-bottom:2px;cursor:grabbing;cursor:-webkit-grabbing}[data-disabled] .k-structure-table{background:#efefef}[data-disabled] .k-structure-table td,[data-disabled] .k-structure-table th{background:#efefef;border-bottom:1px solid #ccc}[dir=ltr] [data-disabled] .k-structure-table td,[dir=ltr] [data-disabled] .k-structure-table th{border-right:1px solid #ccc}[dir=rtl] [data-disabled] .k-structure-table td,[dir=rtl] [data-disabled] .k-structure-table th{border-left:1px solid #ccc}[data-disabled] .k-structure-table td:last-child{overflow:hidden;text-overflow:ellipsis}.k-sortable-row-fallback{opacity:0!important}.k-structure-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;height:100vh}.k-structure-form{position:relative;z-index:3;border-radius:1px;margin-bottom:1px;box-shadow:0 0 0 3px rgba(17,17,17,.05);border:1px solid #ccc;background:#efefef}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid #ccc;display:flex;justify-content:space-between}.k-structure-form-buttons .k-pagination{display:none}@media screen and (min-width:65em){.k-structure-form-buttons .k-pagination{display:flex}}.k-structure-form-buttons .k-pagination>.k-button,.k-structure-form-buttons .k-pagination>span{padding:.875rem 1rem!important}.k-structure-form-cancel-button,.k-structure-form-submit-button{padding:.875rem 1.5rem;line-height:1rem;display:flex}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled] *{pointer-events:all!important}.k-writer-field-input{line-height:1.5em;padding:.375rem .5rem}.k-toolbar{background:#fff;border-bottom:1px solid #efefef;height:38px}.k-toolbar-wrapper{position:absolute;top:0;right:0;left:0;max-width:100%}.k-toolbar-buttons{display:flex}.k-toolbar-divider{width:1px;background:#efefef}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:hsla(0,0%,93.7%,.5)}.k-date-field-preview{padding:0 .75rem}.k-url-field-preview{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis}.k-url-field-preview a{color:#4271ae;text-decoration:underline;transition:color .3s;white-space:nowrap;max-width:100%}.k-url-field-preview a:hover{color:#000}.k-files-field-preview{display:grid;grid-gap:.5rem;grid-template-columns:repeat(auto-fill,1.525rem);padding:0 .75rem}.k-files-field-preview li{line-height:0}.k-files-field-preview li .k-icon{height:100%}.k-list-field-preview{padding:.325rem .75rem;line-height:1.5em}.k-list-field-preview ol,.k-list-field-preview ul{margin-left:1rem}.k-list-field-preview ul>li{list-style:disc}.k-list-field-preview ol ul>li,.k-list-field-preview ul ul>li{list-style:circle}.k-list-field-preview ol>li{list-style:decimal}.k-list-field-preview ol>li::marker{color:#999;font-size:.75rem}.k-pages-field-preview{padding:0 .25rem 0 .75rem;display:flex}.k-pages-field-preview li{line-height:0;margin-right:.5rem}.k-pages-field-preview .k-link{display:flex;align-items:stretch;background:#efefef;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-pages-field-preview-image{width:1.525rem;height:1.525rem;color:#999!important}.k-pages-field-preview figcaption{flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-time-field-preview{padding:0 .75rem}.k-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{flex-direction:row-reverse}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .75rem 0 .25rem}.k-users-field-preview,[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding:0 .25rem 0 .75rem}.k-users-field-preview{display:flex}.k-users-field-preview li{line-height:0;margin-right:.5rem}.k-users-field-preview .k-link{display:flex;align-items:stretch;background:#efefef;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-users-field-preview-avatar{width:1.525rem;height:1.525rem;color:#999!important}.k-users-field-preview-avatar.k-image{display:block}.k-users-field-preview figcaption{flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid #ccc;border-left:0;border-radius:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-writer-field-preview{padding:.325rem .75rem;line-height:1.5em}.k-writer-field-preview p:not(:last-child){margin-bottom:1.5em}.k-aspect-ratio{position:relative;display:block;overflow:hidden;padding-bottom:100%}.k-aspect-ratio>*{position:absolute;top:0;left:0;bottom:0;right:0;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}.k-aspect-ratio[data-cover]>*{-o-object-fit:cover;object-fit:cover}.k-bar{display:flex;align-items:center;justify-content:space-between;line-height:1}.k-bar-slot{flex-grow:1}.k-bar-slot[data-position=center]{text-align:center}[dir=ltr] .k-bar-slot[data-position=right]{text-align:right}[dir=rtl] .k-bar-slot[data-position=right]{text-align:left}.k-box{word-wrap:break-word;font-size:.875rem}.k-box:not([data-theme=none]){background:#d9d9d9;border-radius:1px;padding:.375rem .75rem;line-height:1.25rem;border-left:2px solid #999;padding:.5rem 1.5rem}.k-box[data-theme=code]{background:#111;border:1px solid #000;color:#efefef;font-family:Input,Menlo,monospace;font-size:.875rem;line-height:1.5}.k-box[data-theme=button]{padding:0}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:flex;align-items:center;line-height:2rem;text-align:left}.k-box[data-theme=positive]{background:#dbe4c1;border:0;border-left:2px solid #a7bd68;padding:.5rem 1.5rem}.k-box[data-theme=negative]{background:#eec6c6;border:0;border-left:2px solid #d16464;padding:.5rem 1.5rem}.k-box[data-theme=notice]{background:#f4dac9;border:0;border-left:2px solid #de935f;padding:.5rem 1.5rem}.k-box[data-theme=info]{background:#d3dde9;border:0;border-left:2px solid #7e9abf;padding:.5rem 1.5rem}.k-box[data-theme=empty]{text-align:center;border-left:0;padding:3rem 1.5rem;display:flex;justify-content:center;align-items:center;flex-direction:column;background:#efefef;border-radius:1px;color:#777;border:1px dashed #ccc}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:#999}.k-box[data-theme=empty] p{color:#777}.k-card{position:relative;border-radius:1px;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-card,.k-card a{min-width:0;background:#fff}.k-card:focus-within{box-shadow:0 0 0 2px #4271ae}.k-card a:focus{outline:0}.k-card .k-sort-handle{position:absolute;top:.75rem;width:2rem;height:2rem;border-radius:1px;background:#fff;opacity:0;color:#111;z-index:1;will-change:opacity;transition:opacity .3s}[dir=ltr] .k-card .k-sort-handle{right:.75rem}[dir=rtl] .k-card .k-sort-handle{left:.75rem}.k-cards:hover .k-sort-handle{opacity:.25}.k-card:hover .k-sort-handle{opacity:1}.k-card.k-sortable-ghost{outline:2px solid #4271ae;border-radius:0}.k-card-icon,.k-card-image{border-top-left-radius:1px;border-top-right-radius:1px;overflow:hidden}.k-card-icon{position:relative;display:block}.k-card-icon .k-icon{position:absolute;top:0;right:0;bottom:0;left:0}.k-card-icon .k-icon-emoji{font-size:3rem}.k-card-icon .k-icon svg{width:3rem;height:3rem}.k-card-content{line-height:1.25rem;border-bottom-left-radius:1px;border-bottom-right-radius:1px;min-height:2.25rem;padding:.5rem .75rem;overflow-wrap:break-word;word-wrap:break-word}.k-card-text{display:block;font-weight:400;text-overflow:ellipsis;font-size:.875rem}.k-card-text[data-noinfo]:after{content:" ";height:1em;width:5rem;display:inline-block}.k-card-info{color:#777;display:block;font-size:.875rem;text-overflow:ellipsis;overflow:hidden}[dir=ltr] .k-card-info{margin-right:4rem}[dir=rtl] .k-card-info{margin-left:4rem}.k-card-options{position:absolute;bottom:0}[dir=ltr] .k-card-options{right:0}[dir=rtl] .k-card-options{left:0}.k-card-options>.k-button{position:relative;float:left;height:2.25rem;padding:0 .75rem;line-height:1}.k-card-options-dropdown{top:2.25rem}.k-cards{display:grid;grid-gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(12rem,100%),1fr))}@media screen and (min-width:30em){.k-cards[data-size=tiny]{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(10rem,100%),1fr))}.k-cards[data-size=small]{grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(16rem,100%),1fr))}.k-cards[data-size=medium]{grid-template-columns:repeat(auto-fill,minmax(24rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(24rem,100%),1fr))}.k-cards[data-size=huge],.k-cards[data-size=large]{grid-template-columns:1fr}}@media screen and (min-width:65em){.k-cards[data-size=large]{grid-template-columns:repeat(auto-fill,minmax(32rem,1fr));grid-template-columns:repeat(auto-fill,minmax(min(32rem,100%),1fr))}}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:flex;justify-content:space-between;margin-right:-.75rem;margin-left:-.75rem}.k-collection-pagination{line-height:1.25rem;flex-shrink:0;min-height:2.75rem}.k-collection-pagination .k-pagination .k-button{padding:.5rem .75rem;line-height:1.125rem}.k-column{min-width:0;grid-column-start:span 12}.k-column[data-sticky]>div{position:sticky;top:4vh;z-index:2}@media screen and (min-width:65em){.k-column[data-width="1/1"],.k-column[data-width="2/2"],.k-column[data-width="3/3"],.k-column[data-width="4/4"],.k-column[data-width="6/6"],.k-column[data-width="12/12"]{grid-column-start:span 12}.k-column[data-width="11/12"]{grid-column-start:span 11}.k-column[data-width="5/6"],.k-column[data-width="10/12"]{grid-column-start:span 10}.k-column[data-width="3/4"],.k-column[data-width="9/12"]{grid-column-start:span 9}.k-column[data-width="2/3"],.k-column[data-width="4/6"],.k-column[data-width="8/12"]{grid-column-start:span 8}.k-column[data-width="7/12"]{grid-column-start:span 7}.k-column[data-width="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"],.k-column[data-width="6/12"]{grid-column-start:span 6}.k-column[data-width="5/12"]{grid-column-start:span 5}.k-column[data-width="1/3"],.k-column[data-width="2/6"],.k-column[data-width="4/12"]{grid-column-start:span 4}.k-column[data-width="1/4"],.k-column[data-width="3/12"]{grid-column-start:span 3}.k-column[data-width="1/6"],.k-column[data-width="2/12"]{grid-column-start:span 2}.k-column[data-width="1/12"]{grid-column-start:span 1}}.k-column[data-disabled]{cursor:not-allowed;opacity:.4}.k-column[data-disabled] *{pointer-events:none}.k-column[data-disabled] .k-text[data-theme=help] *{pointer-events:auto}.k-dropzone{position:relative}.k-dropzone:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:none;pointer-events:none;z-index:1}.k-dropzone[data-over]:after{display:block;outline:1px solid #4271ae;box-shadow:0 0 0 3px rgba(66,113,174,.25)}.k-empty{display:flex;align-items:stretch;border-radius:1px;color:#777;border:1px dashed #ccc}button.k-empty{width:100%}button.k-empty:focus{outline:none}.k-empty p{font-size:.875rem;color:#777}.k-empty>.k-icon{color:#999}.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;justify-content:center;flex-direction:column}.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list]{min-height:38px}.k-empty[data-layout=list]>.k-icon{width:36px;min-height:36px;border-right:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list]>p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:#2b2b2b}.k-file-preview-layout{display:grid}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:30em){.k-file-preview-layout{grid-template-columns:50% auto}}@media screen and (min-width:65em){.k-file-preview-layout{display:flex;align-items:center}}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}@media screen and (min-width:65em){.k-file-preview-image{width:33.33%}}@media screen and (min-width:90em){.k-file-preview-image{width:25%}}.k-file-preview-image .k-image span{overflow:hidden;padding-bottom:66.66%}@media screen and (min-width:30em)and (max-width:65em){.k-file-preview-image .k-image span{position:absolute;top:0;left:0;bottom:0;right:0;padding-bottom:0!important}}@media screen and (min-width:65em){.k-file-preview-image .k-image span{padding-bottom:100%}}.k-file-preview-placeholder{display:block;padding-bottom:100%}.k-file-preview-image img{padding:3rem}.k-file-preview-image-link{display:block;outline:0}.k-file-preview-image-link.k-link[data-tabbed]{box-shadow:none;outline:2px solid #4271ae;outline-offset:-2px}.k-file-preview-icon{position:relative;display:block;padding-bottom:100%;overflow:hidden;color:hsla(0,0%,100%,.5)}.k-file-preview-icon svg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(4)}.k-file-preview-details{padding:1.5rem;flex-grow:1}@media screen and (min-width:65em){.k-file-preview-details{padding:3rem}}.k-file-preview-details ul{line-height:1.5em;max-width:50rem;display:grid;grid-gap:1.5rem 3rem;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.k-file-preview-details h3{font-size:.875rem;font-weight:500;color:#999}.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:hsla(0,0%,100%,.75);font-size:.875rem}.k-file-preview-details p a{display:block;width:100%;overflow:hidden;text-overflow:ellipsis}.k-grid{--columns:12;display:grid;grid-column-gap:0;grid-row-gap:0;grid-template-columns:1fr}@media screen and (min-width:30em){.k-grid[data-gutter=small]{grid-column-gap:1rem;grid-row-gap:1rem}.k-grid[data-gutter=huge],.k-grid[data-gutter=large],.k-grid[data-gutter=medium]{grid-column-gap:1.5rem;grid-row-gap:1.5rem}}@media screen and (min-width:65em){.k-grid{grid-template-columns:repeat(var(--columns),1fr)}.k-grid[data-gutter=large]{grid-column-gap:3rem}.k-grid[data-gutter=huge]{grid-column-gap:4.5rem}}@media screen and (min-width:90em){.k-grid[data-gutter=large]{grid-column-gap:4.5rem}.k-grid[data-gutter=huge]{grid-column-gap:6rem}}@media screen and (min-width:120em){.k-grid[data-gutter=large]{grid-column-gap:6rem}.k-grid[data-gutter=huge]{grid-column-gap:7.5rem}}.k-header{border-bottom:1px solid #ccc;margin-bottom:2rem;padding-top:4vh}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem;word-wrap:break-word}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}.k-header .k-headline-editable .k-icon{color:#999;opacity:0;transition:opacity .3s;display:inline-block}[dir=ltr] .k-header .k-headline-editable .k-icon{margin-left:.5rem}[dir=rtl] .k-header .k-headline-editable .k-icon{margin-right:.5rem}.k-header .k-headline-editable:hover .k-icon{opacity:1}.k-list .k-list-item:not(:last-child){margin-bottom:2px}.k-list-item{position:relative;display:flex;align-items:center;background:#fff;border-radius:1px;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}[data-disabled] .k-list-item{background:#efefef}.k-list-item .k-sort-handle{position:absolute;left:-1.5rem;width:1.5rem;height:38px;opacity:0}.k-list:hover .k-sort-handle{opacity:.25}.k-list-item:hover .k-sort-handle{opacity:1}.k-list-item.k-sortable-ghost{position:relative;outline:2px solid #4271ae;z-index:1;box-shadow:0 5px 10px rgba(17,17,17,.25)}.k-list-item.k-sortable-fallback{opacity:.25!important;overflow:hidden}.k-list-item-image{width:38px;height:38px;overflow:hidden;flex-shrink:0;line-height:0}.k-list-item-image .k-image{width:38px;height:38px;-o-object-fit:contain;object-fit:contain}.k-list-item-image .k-icon{width:38px;height:38px}.k-list-item-image .k-icon svg{opacity:.5}.k-list-item-content{display:flex;align-items:center;flex-grow:1;flex-shrink:1;overflow:hidden;outline:none}.k-list-item-content[data-tabbed]{outline:none;box-shadow:0 0 0 2px currentColor}.k-list-item-text{display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:baseline;width:100%;line-height:1.25rem;padding:.5rem .75rem}.k-list-item-text em{font-style:normal;margin-right:1rem;flex-grow:1;font-size:.875rem;color:#111}.k-list-item-text em,.k-list-item-text small{min-width:0;overflow:hidden;text-overflow:ellipsis}.k-list-item-text small{color:#999;font-size:.75rem;font-variant-numeric:tabular-nums;color:#777;display:none}@media screen and (min-width:30em){.k-list-item-text small{display:block}}.k-list-item-status{height:auto!important}.k-list-item-options{position:relative;flex-shrink:0}.k-list-item-options .k-dropdown-content{top:38px}.k-list-item-options>.k-button{height:38px;padding:0 12px}.k-list-item-options>.k-button>.k-button-icon{height:38px}.k-overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:700;transform:translateZ(0)}.k-overlay[data-centered]{display:flex;align-items:center;justify-content:center}.k-overlay[data-dimmed]{background:rgba(0,0,0,.6)}.k-overlay-loader{color:#fff}.k-tabs{position:relative;background:#e9e9e9;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc}.k-tabs nav{display:flex;justify-content:center;margin-left:-1px;margin-right:-1px}.k-tab-button.k-button{position:relative;z-index:1;display:inline-flex;justify-content:center;align-items:center;padding:.625rem .75rem;font-size:.75rem;text-transform:uppercase;text-align:center;font-weight:500;border-left:1px solid transparent;border-right:1px solid #ccc;flex-grow:1;flex-shrink:1;flex-direction:column;max-width:15rem}@media screen and (min-width:30em){.k-tab-button.k-button{flex-direction:row}}@media screen and (min-width:30em){.k-tab-button.k-button .k-icon{margin-right:.5rem}}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;max-width:10rem;text-overflow:ellipsis}[dir=ltr] .k-tab-button.k-button>.k-button-text{padding-left:0}[dir=rtl] .k-tab-button.k-button>.k-button-text{padding-right:0}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:.75rem;padding-top:0}}.k-tab-button:last-child{border-right:1px solid transparent}.k-tab-button[aria-current]{position:relative;background:#efefef;border-right:1px solid #ccc;pointer-events:none}.k-tab-button[aria-current]:first-child{border-left:1px solid #ccc}.k-tab-button[aria-current]:after,.k-tab-button[aria-current]:before{position:absolute;content:""}.k-tab-button[aria-current]:before{left:-1px;right:-1px;height:2px;top:-1px;background:#000}.k-tab-button[aria-current]:after{left:0;right:0;height:1px;bottom:-1px;background:#efefef}.k-tabs-dropdown{top:100%;right:0}[dir=ltr] .k-tabs-badge{padding-left:.25rem}[dir=rtl] .k-tabs-badge{padding-right:.25rem}.k-tabs[data-theme=notice] .k-tabs-badge{color:#f4861f}.k-view{padding-left:1.5rem;padding-right:1.5rem;margin:0 auto;max-width:100rem}@media screen and (min-width:30em){.k-view{padding-left:3rem;padding-right:3rem}}@media screen and (min-width:90em){.k-view{padding-left:6rem;padding-right:6rem}}.k-view[data-align=center]{height:calc(100vh - 6rem);display:flex;align-items:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{flex-basis:22.5rem}.k-headline{font-size:1rem;font-weight:600;line-height:1.5em}.k-headline[data-size=small]{font-size:.875rem}.k-headline[data-size=large]{font-size:1.25rem;font-weight:400}@media screen and (min-width:65em){.k-headline[data-size=large]{font-size:1.5rem}}.k-headline[data-size=huge]{font-size:1.5rem;line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{font-size:1.875rem}}.k-headline[data-theme=negative]{color:#c82829}.k-headline[data-theme=positive]{color:#5d800d}.k-headline abbr{color:#999;padding-left:.25rem;text-decoration:none}.k-icon{position:relative;line-height:0;display:flex;align-items:center;justify-content:center;flex-shrink:0}.k-icon svg{width:1rem;height:1rem;-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{background:#111;color:#fff}.k-icon[data-back=white]{background:#fff;color:#111}.k-icon[data-back=pattern]{background:#2b2b2b url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==");color:#fff}[data-disabled] .k-icon[data-back=black]{background-color:#777}[data-disabled] .k-icon[data-back=pattern]{background:#848484 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}[data-disabled] .k-icon[data-back=pattern] svg{opacity:1}.k-icon[data-size=medium] svg{width:2rem;height:2rem}.k-icon[data-size=large] svg{width:3rem;height:3rem}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:1rem}@media not all,only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.k-icon-emoji{font-size:1.25rem}}.k-image span{position:relative;display:block;line-height:0;padding-bottom:100%}.k-image img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.k-image-error{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:.9em}.k-image-error svg *{fill:hsla(0,0%,100%,.3)}.k-image[data-cover] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:#111}.k-image[data-back=white] span{background:#fff;color:#111}.k-image[data-back=white] .k-image-error{background:#111;color:#fff}.k-image[data-back=pattern] span{background:#2b2b2b url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGZpbGw9InJnYmEoMCwgMCwgMCwgMC4yKSIgZD0iTTAgMGgxMHYxMEgwem0xMCAxMGgxMHYxMEgxMHoiLz48L3BhdHRlcm4+PHJlY3QgZmlsbD0idXJsKCNhKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==")}.k-loader{z-index:1}.k-loader svg{animation:Spin .9s linear infinite}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem;background:#ccc;overflow:hidden;border:none}.k-progress::-webkit-progress-bar{border:none;background:#ccc;height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:inherit;background:#4271ae;-webkit-transition:width .3s;transition:width .3s}.k-progress::-moz-progress-bar{border-radius:inherit;background:#4271ae;-moz-transition:width .3s;transition:width .3s}.k-sort-handle{cursor:move;cursor:grab;cursor:-webkit-grab;color:#111;justify-content:center;align-items:center;line-height:0;width:2rem;height:2rem;display:flex;will-change:opacity,color;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem}.k-sort-handle:active{cursor:grabbing;cursor:-webkit-grabbing}.k-status-icon svg{width:14px;height:14px}.k-status-icon-listed .k-icon{color:#a7bd68}.k-status-icon-unlisted .k-icon{color:#7e9abf}.k-status-icon-draft .k-icon{color:#d16464}.k-status-icon[data-disabled]{opacity:1!important}.k-status-icon[data-disabled] .k-icon{color:#ccc;opacity:.5}.k-text{line-height:1.5em}.k-text ol,.k-text ul{margin-left:1rem}.k-text li{list-style:inherit}.k-text>ol,.k-text>ul,.k-text p{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-align=center]{text-align:center}.k-text[data-align=right]{text-align:right}.k-text[data-size=tiny]{font-size:.75rem}.k-text[data-size=small]{font-size:.875rem}.k-text[data-size=medium]{font-size:1rem}.k-text[data-size=large]{font-size:1.25rem}.k-text[data-theme=help]{font-size:.875rem;color:#777;line-height:1.25rem}.k-dialog-body .k-text{word-wrap:break-word}.k-user-info{display:flex;align-items:center;line-height:1;font-size:.875rem}.k-user-info .k-icon,.k-user-info .k-image{width:1.5rem;margin-right:.75rem}.k-user-info .k-icon{height:1.5rem;background:#000;color:#fff}button{line-height:inherit;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;color:currentColor;background:none;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button{display:inline-block;position:relative;font-size:.875rem;transition:color .3s}.k-button,.k-button:focus,.k-button:hover{outline:none}.k-button[data-tabbed]{outline:none;box-shadow:0 0 0 2px currentColor}.k-button *{vertical-align:middle}.k-button[data-responsive] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive] .k-button-text{display:inline}}.k-button[data-theme=positive]{color:#5d800d}.k-button[data-theme=negative]{color:#c82829}.k-button-icon{display:inline-flex;align-items:center;line-height:0}[dir=ltr] .k-button-icon~.k-button-text{padding-left:.5rem}[dir=rtl] .k-button-icon~.k-button-text{padding-right:.5rem}.k-button-text{opacity:.75}.k-button:focus .k-button-text,.k-button:hover .k-button-text{opacity:1}.k-button-text b,.k-button-text span{vertical-align:baseline}.k-button[data-disabled]{opacity:.5;cursor:default}.k-card-options>.k-button[data-disabled]{display:inline-flex}.k-button[data-disabled]:focus .k-button-text,.k-button[data-disabled]:hover .k-button-text{opacity:.75}.k-button-group{font-size:0;margin-left:-.75rem;margin-right:-.75rem}.k-button-group>.k-dropdown{height:3rem;display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:1rem .75rem;line-height:1rem}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 .75rem}.k-dropdown{position:relative}.k-dropdown-content{position:absolute;top:100%;background:#111;color:#fff;z-index:800;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);border-radius:1px;text-align:left;margin-bottom:6rem}[dir=ltr] .k-dropdown-content{left:0}[dir=rtl] .k-dropdown-content{right:0}[dir=ltr] .k-dropdown-content[data-align=right]{left:auto;right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0;right:auto}.k-dropdown-content>.k-dropdown-item:first-child{margin-top:.5rem}.k-dropdown-content>.k-dropdown-item:last-child{margin-bottom:.5rem}.k-dropdown-content[data-dropup]{top:auto;bottom:100%;margin-bottom:.5rem}.k-dropdown-content hr{position:relative;padding:.5rem 0;border:0}.k-dropdown-content hr:after{position:absolute;top:.5rem;left:1rem;right:1rem;content:"";height:1px;background:currentColor;opacity:.2}.k-dropdown-item{white-space:nowrap;line-height:1;display:flex;width:100%;align-items:center;font-size:.875rem;padding:6px 16px}.k-dropdown-item:focus{outline:none;box-shadow:0 0 0 2px currentColor}.k-dropdown-item .k-button-figure{text-align:center;padding-right:.5rem}.k-link{outline:none}.k-link[data-tabbed]{outline:none;box-shadow:0 0 0 2px currentColor}.k-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;direction:ltr}.k-pagination .k-button{padding:1rem}.k-pagination-details{white-space:nowrap}.k-pagination>span{font-size:.875rem}.k-pagination[data-align=center]{text-align:center}.k-pagination[data-align=right]{text-align:right}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;left:50%;transform:translateX(-50%);background:#000}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{display:flex;align-items:center;justify-content:space-between}.k-pagination-settings .k-button{line-height:1}.k-pagination-settings label{display:flex;border-right:1px solid hsla(0,0%,100%,.35);align-items:center;padding:.625rem 1rem;font-size:.75rem}.k-pagination-settings label span{margin-right:.5rem}.k-prev-next{direction:ltr}.k-search{max-width:30rem;margin:0 auto;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}@media screen and (min-width:65em){.k-search{margin:2.5rem auto}}.k-search-input{background:#efefef;display:flex}.k-search-types{flex-shrink:0;display:flex}.k-search-types>.k-button{padding:0 0 0 1rem;font-size:1rem;line-height:1;height:2.5rem}.k-search-types>.k-button .k-icon{height:2.5rem}.k-search-types>.k-button .k-button-text{opacity:1;font-weight:500}.k-search-input input{background:none;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:3rem;line-height:1}.k-search-close .k-icon-loader{animation:Spin 2s linear infinite}.k-search input:focus{outline:0}.k-search-results{padding:.5rem 1rem 1rem;background:#efefef}.k-search li{background:#fff;display:flex;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-search li:not(:last-child){margin-bottom:.25rem}.k-search li[data-selected]{outline:2px solid #4271ae}.k-search li .k-link{display:flex;align-items:center;flex-grow:1}.k-search-item-image,.k-search-item-image>*{height:50px;width:50px}.k-search-item-info{padding:.5rem .75rem;line-height:1.125}.k-search li strong{display:block;font-size:.875rem;font-weight:400}.k-search-empty,.k-search li small{font-size:.75rem;color:#777}.k-search-empty{text-align:center}.k-tag{position:relative;font-size:.875rem;line-height:1;cursor:pointer;background-color:#111;color:#efefef;border-radius:1px;display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:#4271ae;border-color:#4271ae;color:#fff}.k-tag-text{padding:0 .75rem}.k-tag-toggle{color:hsla(0,0%,100%,.7);width:2rem;height:100%;display:flex;align-items:center;justify-content:center;border-left:1px solid hsla(0,0%,100%,.15)}.k-tag-toggle:hover{background:hsla(0,0%,100%,.2);color:#fff}[data-disabled] .k-tag{background-color:#777}[data-disabled] .k-tag .k-tag-toggle{display:none}.k-topbar{position:relative;color:#fff;flex-shrink:0;height:2.5rem;line-height:1;background:#111}.k-topbar-wrapper{position:relative;display:flex;align-items:center;margin-left:-.75rem;margin-right:-.75rem}.k-topbar-loader{position:absolute;top:0;right:0;bottom:0;height:2.5rem;width:2.5rem;padding:.75rem;background:#111;z-index:1;display:flex;align-items:center;justify-content:center}.k-topbar-loader svg{height:18px;width:18px;animation:Spin .9s linear infinite}.k-topbar-menu{flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar-menu-button{display:flex;align-items:center}.k-topbar-menu-button .k-button-text{opacity:1}.k-topbar-button,.k-topbar-signals-button{padding:.75rem;line-height:1;font-size:.875rem}.k-topbar-signals .k-button .k-button-text{opacity:1}.k-topbar-button .k-button-text{display:flex;opacity:1}.k-topbar-view-button{flex-shrink:0;display:flex;align-items:center}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}.k-topbar-crumbs{flex-grow:1;display:flex;overflow-y:hidden}.k-topbar-crumbs a{position:relative;font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:none;padding-top:.75rem;padding-bottom:.75rem;line-height:1;transition:opacity .3s;outline:none}.k-topbar-crumbs a:before{content:"/";padding:0 .5rem;opacity:.25}.k-topbar-crumbs a:focus,.k-topbar-crumbs a:hover{opacity:1}.k-topbar-crumbs a[data-tabbed]{outline:none;box-shadow:0 0 0 2px currentColor}.k-topbar-crumbs a:not(:last-child){max-width:15vw}.k-topbar-breadcrumb-menu{flex-shrink:0}@media screen and (min-width:30em){.k-topbar-crumbs a{display:block}.k-topbar-breadcrumb-menu{display:none}}.k-topbar-signals{position:absolute;top:0;background:#111;height:2.5rem;display:flex;align-items:center}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals:before{position:absolute;content:"";top:0;bottom:0;width:.5rem}[dir=ltr] .k-topbar-signals:before{left:-.5rem;background:-webkit-linear-gradient(left,rgba(17,17,17,0),#111)}[dir=rtl] .k-topbar-signals:before{right:-.5rem;background:-webkit-linear-gradient(right,rgba(17,17,17,0),#111)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:600;line-height:1;display:flex}.k-topbar .k-button[data-theme=positive]{color:#a7bd68}.k-topbar .k-button[data-theme=negative]{color:#d16464}.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}@media screen and (min-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:inline}}.k-topbar .k-button[data-theme] .k-button-text{opacity:1}.k-topbar .k-dropdown-content{color:#111;background:#fff}.k-topbar .k-dropdown-content hr:after{opacity:.1}.k-topbar-menu [aria-current] .k-link{color:#4271ae;font-weight:500}.k-registration{display:inline-block;margin-right:1rem;display:flex;align-items:center}.k-registration p{color:#d16464;font-size:.875rem;margin-right:1rem;font-weight:600;display:none}@media screen and (min-width:90em){.k-registration p{display:block}}.k-registration .k-button{color:#fff}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:flex;align-items:baseline;z-index:1}.k-section-header .k-headline{line-height:1.25rem;padding-bottom:.75rem;min-height:2rem}.k-section-header .k-button-group{position:absolute;top:-.875rem}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-info-section-headline{margin-bottom:.5rem}.k-files-section[data-processing],.k-pages-section[data-processing]{pointer-events:none}.k-fields-issue-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}[data-locked] .k-fields-section{opacity:.2;pointer-events:none}.k-browser-view .k-error-view-content{text-align:left}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:#c82829;display:inline-block}.k-error-view-content p:not(:last-child){margin-bottom:.75rem}.k-installation-view .k-button{display:block;margin-top:1.5rem}.k-installation-view .k-headline{margin-bottom:.75rem}.k-installation-issues{line-height:1.5em;font-size:.875rem}.k-installation-issues li{position:relative;padding:1.5rem;background:#fff}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}[dir=ltr] .k-installation-issues .k-icon{left:1.5rem}[dir=rtl] .k-installation-issues .k-icon{right:1.5rem}.k-installation-issues .k-icon svg *{fill:#c82829}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:#c82829}.k-installation-view .k-button[type=submit]{padding:1rem}[dir=ltr] .k-installation-view .k-button[type=submit]{margin-left:-1rem}[dir=rtl] .k-installation-view .k-button[type=submit]{margin-right:-1rem}.k-login-fields{position:relative}.k-login-toggler{position:absolute;top:0;right:0;z-index:1;text-decoration:underline;font-size:.875rem}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:flex;align-items:center;justify-content:flex-end;padding:1.5rem 0}.k-login-button{padding:.5rem 1rem;font-weight:500;transition:opacity .3s}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-back-button,.k-login-checkbox{display:flex;align-items:center;flex-grow:1}[dir=ltr] .k-login-back-button{margin-left:-1rem}[dir=rtl] .k-login-back-button{margin-right:-1rem}.k-login-checkbox{padding:.5rem 0;font-size:.875rem;cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}.k-login-alert{padding:.5rem .75rem;display:flex;justify-content:space-between;align-items:center;min-height:38px;margin-bottom:2rem;background:#c82829;color:#fff;font-size:.875rem;border-radius:1px;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);cursor:pointer}.k-password-reset-view .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:#fff;border-radius:1px;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.k-settings-view section{margin-bottom:3rem}.k-settings-view .k-header{margin-bottom:1.5rem}.k-settings-view header{margin-bottom:.5rem;display:flex;justify-content:space-between}.k-system-info-box{background:#fff;padding:.75rem;display:flex}.k-system-info-box li{flex-shrink:0;flex-grow:1;flex-basis:0}.k-system-info-box dt{font-size:.875rem;color:#777;margin-bottom:.25rem}.k-system-unregistered{color:#c82829}.k-languages-section{margin-bottom:2rem}.k-user-profile{background:#fff}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:flex;align-items:center;line-height:0}.k-user-profile .k-button-group{overflow:hidden}[dir=ltr] .k-user-profile .k-button-group{margin-left:.75rem}[dir=rtl] .k-user-profile .k-button-group{margin-right:.75rem}.k-user-profile .k-button-group .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-profile .k-button-group .k-button[disabled]{opacity:1}.k-user-profile .k-dropdown-content{margin-top:.5rem;left:50%;transform:translateX(-50%)}.k-user-view-image .k-image{display:block;width:4rem;height:4rem;line-height:0}.k-user-view-image .k-button-text{opacity:1}.k-user-view-image .k-icon{width:4rem;height:4rem;background:#111;color:#999}.k-user-name-placeholder{color:#999;transition:color .3s}.k-header[data-editable] .k-user-name-placeholder:hover{color:#111}.k-block-container{position:relative;padding:.75rem;border-bottom:1px dashed rgba(0,0,0,.1);background:#fff}.k-block-container:last-of-type{border-bottom:0}.k-block-container:focus{outline:0}.k-block-container[data-batched]{z-index:2;border-bottom-color:transparent}.k-block-container[data-batched]:after{position:absolute;content:"";top:0;right:0;bottom:0;left:0;background:rgba(203,215,229,.375);mix-blend-mode:multiply;border:1px solid #4271ae}.k-block-container[data-selected]{z-index:2;box-shadow:0 0 0 1px #4271ae,0 0 0 3px rgba(66,113,174,.25);border-bottom-color:transparent}.k-block-container .k-block-options{position:absolute;top:0;right:.75rem;margin-top:calc(-1.75rem + 2px);display:none}.k-block-container[data-last-in-batch] .k-block-options,.k-block-container[data-selected] .k-block-options{display:block}.k-block-container[data-hidden] .k-block{opacity:.25}.k-drawer-options .k-button[data-disabled]{vertical-align:middle;display:inline-grid}[data-disabled] .k-block-container{background:#efefef}.k-blocks{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border-radius:.25rem}[data-disabled] .k-blocks{background:#efefef}.k-blocks[data-alt] .k-block-container>*{pointer-events:none}.k-blocks[data-empty]{padding:0;background:none;box-shadow:none}.k-blocks .k-sortable-ghost{outline:2px solid #4271ae;box-shadow:0 5px 10px rgba(17,17,17,.25);cursor:grabbing;cursor:-webkit-grabbing}.k-blocks-empty.k-empty{cursor:pointer;display:flex;align-items:center}.k-blocks-list>.k-blocks-empty:not(:only-child){display:none}.k-block-figure{cursor:pointer}.k-block-figure iframe{border:0;pointer-events:none;background:#000}.k-block-figure figcaption{padding-top:.5rem;color:#777;font-size:.875rem;text-align:center}.k-block-figure-empty.k-button{display:flex;width:100%;height:6rem;border-radius:.125rem;align-items:center;justify-content:center;color:#777;background:#efefef}.k-block-options{display:flex;align-items:center;background:#fff;z-index:800;box-shadow:-2px 0 5px rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06),0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);color:#000;border-radius:.25rem}.k-block-options-button{width:30px;height:30px;line-height:1;display:inline-flex;align-items:center;justify-content:center;border-right:1px solid #efefef}.k-block-options-button:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.k-block-options-button:last-child{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.k-block-options-button:last-of-type{border-right:0}.k-block-options-button[aria-current]{color:#4271ae}.k-block-options-button:hover{background:#f7f7f7}.k-block-options .k-dropdown-content{margin-top:.5rem}.k-block-selector.k-dialog{background:#313740;color:#fff}.k-block-selector .k-headline{margin-bottom:1rem}.k-block-selector details:not(:last-of-type){margin-bottom:1.5rem}.k-block-selector summary{font-size:.75rem;cursor:pointer;color:#ccc}.k-block-selector details:only-child summary{pointer-events:none}.k-block-selector summary:focus{outline:0}.k-block-selector summary:focus-visible{color:#a7bd68}.k-block-types{display:grid;grid-gap:2px;margin-top:.75rem;grid-template-columns:repeat(1,1fr)}.k-block-types .k-button{display:flex;align-items:top;background:rgba(0,0,0,.5);width:100%;text-align:left;padding:0 .75rem 0 0;line-height:1.5em}.k-block-types .k-button:focus{outline:2px solid #c6d49d}.k-block-types .k-button .k-button-text{padding:.5rem 0 .5rem .5rem}.k-block-types .k-button .k-icon{width:38px;height:38px}.k-block-title{display:flex;align-items:center;min-width:0;padding-right:.75rem;font-size:.875rem;line-height:1}.k-block-icon{width:1rem;color:#999}.k-block-icon,.k-block-name{margin-right:.5rem}.k-block-label{color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-block-type-code-editor{position:relative;font-size:.875rem;line-height:1.5em;background:#000;border-radius:.25rem;padding:.5rem .75rem 3rem;color:#fff;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-block-type-code-editor .k-editor{white-space:pre-wrap;line-height:1.75em}.k-block-type-code-editor-language{font-size:.875rem;position:absolute;right:0;bottom:0}.k-block-type-code-editor-language .k-icon{position:absolute;top:0;left:0;height:1.5rem;display:flex;width:2rem;z-index:0}.k-block-type-code-editor-language .k-select-input{position:relative;padding:.325rem .75rem .5rem 2rem;z-index:1;font-size:.75rem}.k-block-type-default .k-block-title{line-height:1.5em}.k-block-type-gallery ul{display:grid;grid-gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(6rem,1fr));line-height:0;align-items:center;justify-content:center;cursor:pointer}.k-block-type-gallery li:empty{padding-bottom:100%;background:#efefef}.k-block-type-gallery li{display:flex;position:relative;align-items:center;justify-content:center}.k-block-type-gallery li img{flex-grow:1;max-width:100%}.k-block-type-heading-input{font-weight:600;line-height:1.25em}.k-block-type-heading-input[data-level=h1]{font-size:1.875rem;line-height:1.125em}.k-block-type-heading-input[data-level=h2]{font-size:1.5rem}.k-block-type-heading-input[data-level=h3]{font-size:1.25rem}.k-block-type-heading-input[data-level=h4]{font-size:1.125rem}.k-block-type-heading-input[data-level=h5]{line-height:1.5em;font-size:1rem}.k-block-type-heading-input[data-level=h6]{line-height:1.5em;font-size:.875rem}.k-block-type-heading-input .ProseMirror strong{font-weight:700}.k-block-type-image .k-block-figure-container{display:block;text-align:center;line-height:0}.k-block-type-image-auto{max-width:100%;max-height:30rem}.k-block-type-markdown-input{position:relative;font-size:.875rem;line-height:1.5em;background:#efefef;border-radius:.25rem;padding:.5rem .5rem 0;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.k-block-type-quote-editor{padding-left:1rem;border-left:2px solid #000}.k-block-type-quote-text{font-size:1.25rem;margin-bottom:.25rem;line-height:1.25em}.k-block-type-quote-citation{font-style:italic;font-size:.875rem;color:#777}.k-block-type-table-preview{cursor:pointer;width:100%;border:1px solid #ddd;border-spacing:0;border-radius:.125rem;overflow:hidden;table-layout:fixed}.k-block-type-table-preview td,.k-block-type-table-preview th{text-align:left;line-height:1.5em;padding:.5rem .75rem;font-size:.875rem;border-bottom:1px solid #ddd}.k-block-type-table-preview th{background:#f7f7f7;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:.75rem}.k-block-type-table-preview tr:last-child td{border-bottom:0}.k-block-type-table-preview [data-align=left]{text-align:left}.k-block-type-table-preview [data-align=right]{text-align:right}.k-block-type-table-preview [data-align=center]{text-align:center}.k-block-type-table-preview-empty{color:#777;font-size:.875rem}.k-block-type-text-input{font-size:1rem;line-height:1.5em} \ No newline at end of file diff --git a/kirby/panel/dist/css/style.css b/kirby/panel/dist/css/style.css new file mode 100644 index 0000000..f3126a3 --- /dev/null +++ b/kirby/panel/dist/css/style.css @@ -0,0 +1 @@ +:root{--color-backdrop:rgba(0, 0, 0, .6);--color-black:#000;--color-dark:#313740;--color-light:var(--color-gray-200);--color-white:#fff;--color-gray-100:#f7f7f7;--color-gray-200:#efefef;--color-gray-300:#ddd;--color-gray-400:#ccc;--color-gray-500:#999;--color-gray-600:#777;--color-gray-700:#555;--color-gray-800:#333;--color-gray-900:#111;--color-gray:var(--color-gray-600);--color-red-200:#edc1c1;--color-red-300:#e3a0a0;--color-red-400:#d16464;--color-red-600:#c82829;--color-red:var(--color-red-600);--color-orange-200:#f2d4bf;--color-orange-300:#ebbe9e;--color-orange-400:#de935f;--color-orange-600:#f4861f;--color-orange:var(--color-orange-600);--color-yellow-200:#f9e8c7;--color-yellow-300:#f7e2b8;--color-yellow-400:#f0c674;--color-yellow-600:#cca000;--color-yellow:var(--color-yellow-600);--color-green-200:#dce5c2;--color-green-300:#c6d49d;--color-green-400:#a7bd68;--color-green-600:#5d800d;--color-green:var(--color-green-600);--color-aqua-200:#d0e5e2;--color-aqua-300:#bbd9d5;--color-aqua-400:#8abeb7;--color-aqua-600:#398e93;--color-aqua:var(--color-aqua-600);--color-blue-200:#cbd7e5;--color-blue-300:#b1c2d8;--color-blue-400:#7e9abf;--color-blue-600:#4271ae;--color-blue:var(--color-blue-600);--color-purple-200:#e0d4e4;--color-purple-300:#d4c3d9;--color-purple-400:#b294bb;--color-purple-600:#9c48b9;--color-purple:var(--color-purple-600);--container:80rem;--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--font-mono:"SFMono-Regular", Consolas, Liberation Mono, Menlo, Courier, monospace;--font-normal:400;--font-bold:600;--leading-none:1;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--rounded-xs:1px;--rounded-sm:.125rem;--rounded:.25rem;--shadow:0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--shadow-md:0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--shadow-lg:0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--shadow-xl:0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);--shadow-outline:currentColor 0 0 0 2px;--shadow-inset:inset 0 2px 4px 0 rgba(0, 0, 0, .06);--spacing-0:0;--spacing-px:1px;--spacing-2px:2px;--spacing-1:.25rem;--spacing-2:.5rem;--spacing-3:.75rem;--spacing-4:1rem;--spacing-5:1.25rem;--spacing-6:1.5rem;--spacing-8:2rem;--spacing-10:2.5rem;--spacing-12:3rem;--spacing-16:4rem;--spacing-20:5rem;--spacing-24:6rem;--spacing-36:9rem;--text-xs:.75rem;--text-sm:.875rem;--text-base:1rem;--text-lg:1.125rem;--text-xl:1.25rem;--text-2xl:1.5rem;--text-3xl:1.75rem;--text-4xl:2.5rem;--text-5xl:3rem;--text-6xl:4rem;--color-background:var(--color-light);--color-border:var(--color-gray-400);--color-focus:var(--color-blue-600);--color-focus-light:var(--color-blue-400);--color-focus-outline:rgba(113, 143, 183, .25);--color-negative:var(--color-red-600);--color-negative-light:var(--color-red-400);--color-negative-outline:rgba(212, 110, 110, .25);--color-notice:var(--color-orange-600);--color-notice-light:var(--color-orange-400);--color-positive:var(--color-green-600);--color-positive-light:var(--color-green-400);--color-positive-outline:rgba(128, 149, 65, .25);--color-text:var(--color-gray-900);--color-text-light:var(--color-gray-600);--z-offline:1200;--z-fatal:1100;--z-loader:1000;--z-notification:900;--z-dialog:800;--z-navigation:700;--z-dropdown:600;--z-drawer:500;--z-dropzone:400;--z-toolbar:300;--z-content:200;--z-background:100;--bg-pattern:repeating-conic-gradient(rgba(0,0,0, 0) 0% 25%, rgba(0,0,0, .2) 0% 50%) 50% / 20px 20px;--shadow-sticky:rgba(0, 0, 0, .05) 0 2px 5px;--shadow-dropdown:var(--shadow-lg);--shadow-item:var(--shadow);--field-input-padding:.5rem;--field-input-height:2.25rem;--field-input-line-height:1.25rem;--field-input-font-size:var(--text-base);--field-input-color-before:var(--color-gray-700);--field-input-color-after:var(--color-gray-700);--field-input-border:1px solid var(--color-border);--field-input-focus-border:1px solid var(--color-focus);--field-input-focus-outline:2px solid var(--color-focus-outline);--field-input-invalid-border:1px solid var(--color-negative-outline);--field-input-invalid-outline:0;--field-input-invalid-focus-border:1px solid var(--color-negative);--field-input-invalid-focus-outline:2px solid var(--color-negative-outline);--field-input-background:var(--color-white);--field-input-disabled-color:var(--color-gray-500);--field-input-disabled-background:var(--color-white);--field-input-disabled-border:1px solid var(--color-gray-300);--font-family-sans:var(--font-sans);--font-family-mono:var(--font-mono);--font-size-tiny:var(--text-xs);--font-size-small:var(--text-sm);--font-size-medium:var(--text-base);--font-size-large:var(--text-xl);--font-size-huge:var(--text-2xl);--font-size-monster:var(--text-3xl);--box-shadow-dropdown:var(--shadow-dropdown);--box-shadow-item:var(--shadow);--box-shadow-focus:var(--shadow-xl)}*,:after,:before{margin:0;padding:0;box-sizing:border-box}noscript{padding:1.5rem;display:flex;align-items:center;justify-content:center;height:100vh;text-align:center}html{font-family:var(--font-sans);background:var(--color-background)}body,html{color:var(--color-gray-900);height:100%;overflow:hidden}a{color:inherit;text-decoration:none}li{list-style:none}b,strong{font-weight:var(--font-bold)}@keyframes LoadingCursor{to{cursor:progress}}@keyframes Spin{to{transform:rotate(360deg)}}.k-dialog{position:relative;background:var(--color-background);width:100%;box-shadow:var(--shadow-lg);border-radius:var(--rounded-xs);line-height:1;max-height:calc(100vh - 3rem);margin:1.5rem;display:flex;flex-direction:column}@media screen and (min-width:20rem){.k-dialog[data-size=small]{width:20rem}}@media screen and (min-width:22rem){.k-dialog[data-size=default]{width:22rem}}@media screen and (min-width:30rem){.k-dialog[data-size=medium]{width:30rem}}@media screen and (min-width:40rem){.k-dialog[data-size=large]{width:40rem}}.k-dialog-notification{padding:.75rem 1.5rem;background:var(--color-gray-900);width:100%;line-height:1.25rem;color:var(--color-white);display:flex;flex-shrink:0;align-items:center}.k-dialog-notification[data-theme]{background:var(--theme-light);color:var(--color-black)}.k-dialog-notification p{flex-grow:1;word-wrap:break-word;overflow:hidden}[dir=ltr] .k-dialog-notification .k-button{margin-left:1rem}[dir=rtl] .k-dialog-notification .k-button{margin-right:1rem}.k-dialog-notification .k-button{display:flex}.k-dialog-body{padding:1.5rem}.k-dialog-body .k-fieldset{padding-bottom:.5rem}[dir=ltr] .k-dialog-footer,[dir=rtl] .k-dialog-footer{border-bottom-right-radius:var(--rounded-xs);border-bottom-left-radius:var(--rounded-xs)}.k-dialog-footer{padding:0;border-top:1px solid var(--color-gray-300);line-height:1;flex-shrink:0}.k-dialog-footer .k-button-group{display:flex;margin:0;justify-content:space-between}.k-dialog-footer .k-button-group .k-button{padding:.75rem 1rem;line-height:1.25rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{text-align:left}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{text-align:right}[dir=ltr] .k-dialog-footer .k-button-group .k-button:first-child{padding-left:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:first-child{padding-right:1.5rem}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{text-align:right}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{text-align:left}[dir=ltr] .k-dialog-footer .k-button-group .k-button:last-child{padding-right:1.5rem}[dir=rtl] .k-dialog-footer .k-button-group .k-button:last-child{padding-left:1.5rem}.k-dialog-pagination{margin-bottom:-1.5rem;display:flex;justify-content:center;align-items:center}.k-dialog-search{margin-bottom:.75rem}.k-dialog-search.k-input{background:rgba(0,0,0,.075);padding:0 1rem;height:36px;border-radius:var(--rounded-xs)}.k-error-details{background:var(--color-white);display:block;overflow:auto;padding:1rem;font-size:var(--text-sm);line-height:1.25em;margin-top:.75rem}.k-error-details dt{color:var(--color-negative-light);margin-bottom:.25rem}.k-error-details dd{overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis}.k-error-details dd:not(:last-of-type){margin-bottom:1.5em}.k-error-details li:not(:last-child){border-bottom:1px solid var(--color-background);padding-bottom:.25rem;margin-bottom:.25rem}.k-files-dialog .k-list-item{cursor:pointer}[dir=ltr] .k-pages-dialog-navbar{padding-right:38px}[dir=rtl] .k-pages-dialog-navbar{padding-left:38px}.k-pages-dialog-navbar{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.k-pages-dialog-navbar .k-button{width:38px}.k-pages-dialog-navbar .k-button[disabled]{opacity:0}.k-pages-dialog-navbar .k-headline{flex-grow:1;text-align:center}.k-pages-dialog .k-list-item{cursor:pointer}.k-pages-dialog .k-list-item .k-button[data-theme=disabled],.k-pages-dialog .k-list-item .k-button[disabled]{opacity:.25}.k-pages-dialog .k-list-item .k-button[data-theme=disabled]:hover{opacity:1}.k-users-dialog .k-list-item{cursor:pointer}.k-drawer{--drawer-header-height:2.5rem;--drawer-header-padding:1.5rem;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-toolbar);display:flex;align-items:stretch;justify-content:flex-end;background:rgba(0,0,0,.2)}.k-drawer-box{position:relative;flex-basis:50rem;display:flex;flex-direction:column;background:var(--color-background);box-shadow:var(--shadow-xl)}[dir=ltr] .k-drawer-header{padding-left:var(--drawer-header-padding)}[dir=rtl] .k-drawer-header{padding-right:var(--drawer-header-padding)}.k-drawer-header{flex-shrink:0;height:var(--drawer-header-height);display:flex;align-items:center;line-height:1;justify-content:space-between;background:var(--color-white);font-size:var(--text-sm)}.k-drawer-title{padding:0 .75rem}[dir=ltr] .k-drawer-breadcrumb,[dir=ltr] .k-drawer-title{margin-left:-.75rem}[dir=rtl] .k-drawer-breadcrumb,[dir=rtl] .k-drawer-title{margin-right:-.75rem}.k-drawer-breadcrumb,.k-drawer-title{display:flex;flex-grow:1;align-items:center;min-width:0;font-size:var(--text-sm);font-weight:var(--font-normal)}[dir=ltr] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{right:-.75rem}[dir=rtl] .k-drawer-breadcrumb li:not(:last-child) .k-button:after{left:-.75rem}.k-drawer-breadcrumb li:not(:last-child) .k-button:after{position:absolute;width:1.5rem;display:inline-flex;justify-content:center;align-items:center;content:"\203a";color:var(--color-gray-500);height:var(--drawer-header-height)}[dir=ltr] .k-drawer-breadcrumb .k-icon,[dir=ltr] .k-drawer-title .k-icon{margin-right:.5rem}[dir=rtl] .k-drawer-breadcrumb .k-icon,[dir=rtl] .k-drawer-title .k-icon{margin-left:.5rem}.k-drawer-breadcrumb .k-icon,.k-drawer-title .k-icon{width:1rem;color:var(--color-gray-500)}.k-drawer-breadcrumb .k-button{display:inline-flex;align-items:center;height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem}.k-drawer-breadcrumb .k-button-text{opacity:1}[dir=ltr] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-left:0}[dir=rtl] .k-drawer-breadcrumb .k-button .k-button-icon~.k-button-text{padding-right:0}[dir=ltr] .k-drawer-tabs{margin-right:.75rem}[dir=rtl] .k-drawer-tabs{margin-left:.75rem}.k-drawer-tabs{display:flex;align-items:center;line-height:1}.k-drawer-tab.k-button{height:var(--drawer-header-height);padding-left:.75rem;padding-right:.75rem;display:flex;align-items:center;font-size:var(--text-xs)}.k-drawer-tab.k-button[aria-current]:after{position:absolute;bottom:-1px;left:.75rem;right:.75rem;content:"";background:var(--color-black);height:2px}[dir=ltr] .k-drawer-options{padding-right:.75rem}[dir=rtl] .k-drawer-options{padding-left:.75rem}.k-drawer-option.k-button{width:var(--drawer-header-height);height:var(--drawer-header-height);color:var(--color-gray-500);line-height:1}.k-drawer-option.k-button:focus,.k-drawer-option.k-button:hover{color:var(--color-black)}.k-drawer-body{padding:1.5rem;flex-grow:1;background:var(--color-background)}.k-drawer[data-nested]{background:0 0}.k-calendar-input{--cell-padding:.25rem .5rem;padding:.5rem;background:var(--color-gray-900);color:var(--color-light);border-radius:var(--rounded-xs)}.k-calendar-table{table-layout:fixed;width:100%;min-width:15rem;padding-top:.5rem}.k-calendar-input>nav{display:flex;direction:ltr}.k-calendar-input>nav .k-button{padding:.5rem}.k-calendar-selects{flex-grow:1;display:flex;align-items:center;justify-content:center}[dir=ltr] .k-calendar-selects{direction:ltr}[dir=rtl] .k-calendar-selects{direction:rtl}.k-calendar-selects .k-select-input{padding:0 .5rem;font-weight:var(--font-normal);font-size:var(--text-sm)}.k-calendar-selects .k-select-input:focus-within{color:var(--color-focus-light)!important}.k-calendar-input th{padding:.5rem 0;color:var(--color-gray-500);font-size:var(--text-xs);font-weight:400;text-align:center}.k-calendar-day .k-button{width:2rem;height:2rem;margin-left:auto;margin-right:auto;color:var(--color-white);line-height:1.75rem;display:flex;justify-content:center;border-radius:50%;border:2px solid transparent}.k-calendar-day .k-button .k-button-text{opacity:1}.k-calendar-table .k-button:hover{color:var(--color-white)}.k-calendar-day:hover .k-button:not([data-disabled]){border-color:#ffffff40}.k-calendar-day[aria-current=date] .k-button{color:var(--color-yellow-500);font-weight:500}.k-calendar-day[aria-selected=date] .k-button{border-color:var(--color-focus-light);color:var(--color-focus-light)}.k-calendar-day[data-between]{background:#333}[dir=ltr] .k-calendar-day[data-first]{border-top-left-radius:100%}[dir=rtl] .k-calendar-day[data-first]{border-top-right-radius:100%}[dir=ltr] .k-calendar-day[data-first]{border-bottom-left-radius:100%}[dir=rtl] .k-calendar-day[data-first]{border-bottom-right-radius:100%}[dir=ltr] .k-calendar-day[data-last]{border-top-right-radius:100%}[dir=rtl] .k-calendar-day[data-last]{border-top-left-radius:100%}[dir=ltr] .k-calendar-day[data-last]{border-bottom-right-radius:100%}[dir=rtl] .k-calendar-day[data-last]{border-bottom-left-radius:100%}.k-calendar-today{text-align:center;padding-top:.5rem}.k-calendar-today .k-button{color:var(--color-focus-light);font-size:var(--text-xs);padding:1rem}.k-calendar-today .k-button-text{opacity:1}.k-counter{font-size:var(--text-xs);color:var(--color-gray-900);font-weight:var(--font-bold)}.k-counter[data-invalid]{box-shadow:none;border:0;color:var(--color-negative)}[dir=ltr] .k-counter-rules{padding-left:.5rem}[dir=rtl] .k-counter-rules{padding-right:.5rem}.k-counter-rules{color:var(--color-gray-600);font-weight:var(--font-normal)}.k-form-submitter{display:none}.k-form-buttons[data-theme]{background:var(--theme-light)}.k-form-buttons .k-view{display:flex;justify-content:space-between;align-items:center}.k-form-button.k-button{font-weight:500;white-space:nowrap;line-height:1;height:2.5rem;display:flex;padding:0 1rem;align-items:center}[dir=ltr] .k-form-button:first-child{margin-left:-1rem}[dir=rtl] .k-form-button:first-child{margin-right:-1rem}[dir=ltr] .k-form-button:last-child{margin-right:-1rem}[dir=rtl] .k-form-button:last-child{margin-left:-1rem}[dir=ltr] .k-form-lock-info{margin-right:3rem}[dir=rtl] .k-form-lock-info{margin-left:3rem}.k-form-lock-info{display:flex;font-size:var(--text-sm);align-items:center;line-height:1.5em;padding:.625rem 0}[dir=ltr] .k-form-lock-info>.k-icon{margin-right:.5rem}[dir=rtl] .k-form-lock-info>.k-icon{margin-left:.5rem}.k-form-lock-buttons{display:flex;flex-shrink:0}.k-form-lock-loader{animation:Spin 4s linear infinite}.k-form-lock-loader .k-icon-loader{display:flex}.k-form-indicator-toggle{color:var(--color-notice-light)}.k-form-indicator-info{font-size:var(--text-sm);font-weight:var(--font-bold);padding:.75rem 1rem .25rem;line-height:1.25em;width:15rem}.k-field-label{font-weight:var(--font-bold);display:block;padding:0 0 .75rem;flex-grow:1;line-height:1.25rem}[dir=ltr] .k-field-label abbr{padding-left:.25rem}[dir=rtl] .k-field-label abbr{padding-right:.25rem}.k-field-label abbr{text-decoration:none;color:var(--color-gray-500)}.k-field-header{position:relative;display:flex;align-items:baseline}[dir=ltr] .k-field-options{right:0}[dir=rtl] .k-field-options{left:0}.k-field-options{position:absolute;top:calc(-.5rem - 1px)}.k-field-options.k-button-group .k-dropdown{height:auto}.k-field-options.k-button-group .k-field-options-button.k-button{padding:.75rem;display:flex}.k-field[data-disabled]{cursor:not-allowed}.k-field[data-disabled] *{pointer-events:none}.k-field[data-disabled] .k-text[data-theme=help] *{pointer-events:initial}.k-field:focus-within>.k-field-header>.k-field-counter{display:block}.k-field-help{padding-top:.5rem}.k-fieldset{border:0}.k-fieldset .k-grid{grid-row-gap:2.25rem}@media screen and (min-width:30em){.k-fieldset .k-grid{grid-column-gap:1.5rem}}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid{grid-template-columns:repeat(1,1fr)}.k-sections>.k-column[data-width="1/3"] .k-fieldset .k-grid .k-column,.k-sections>.k-column[data-width="1/4"] .k-fieldset .k-grid .k-column{grid-column-start:initial}.k-input{display:flex;align-items:center;line-height:1;border:0;outline:0;background:0 0}.k-input-element{flex-grow:1}.k-input-icon{display:flex;justify-content:center;align-items:center;line-height:0}.k-input[data-disabled]{pointer-events:none}[data-disabled] .k-input-icon{color:var(--color-gray-600)}.k-input[data-theme=field]{line-height:1;border:var(--field-input-border);background:var(--field-input-background)}.k-input[data-theme=field]:focus-within{border:var(--field-input-focus-border);box-shadow:var(--color-focus-outline) 0 0 0 2px}.k-input[data-theme=field][data-disabled]{background:var(--color-background)}.k-input[data-theme=field] .k-input-icon{width:var(--field-input-height);align-self:stretch;display:flex;align-items:center;flex-shrink:0}.k-input[data-theme=field] .k-input-after,.k-input[data-theme=field] .k-input-before{align-self:stretch;display:flex;align-items:center;flex-shrink:0;padding:0 var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field] .k-input-before{padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-input-after,[dir=rtl] .k-input[data-theme=field] .k-input-before{padding-left:0}.k-input[data-theme=field] .k-input-before{color:var(--field-input-color-before)}[dir=rtl] .k-input[data-theme=field] .k-input-after{padding-right:0}.k-input[data-theme=field] .k-input-after{color:var(--field-input-color-after)}.k-input[data-theme=field] .k-input-icon>.k-dropdown{width:100%;height:100%}.k-input[data-theme=field] .k-input-icon-button{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.k-input[data-theme=field] .k-number-input,.k-input[data-theme=field] .k-select-input,.k-input[data-theme=field] .k-text-input{padding:var(--field-input-padding);line-height:var(--field-input-line-height)}.k-input[data-theme=field] .k-date-input .k-select-input,.k-input[data-theme=field] .k-time-input .k-select-input{padding-left:0;padding-right:0}[dir=ltr] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=ltr] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field] .k-date-input .k-select-input:first-child,[dir=rtl] .k-input[data-theme=field] .k-time-input .k-select-input:first-child{padding-right:var(--field-input-padding)}.k-input[data-theme=field] .k-date-input .k-select-input:focus-within,.k-input[data-theme=field] .k-time-input .k-select-input:focus-within{color:var(--color-focus);font-weight:var(--font-bold)}[dir=ltr] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field].k-time-input .k-time-input-meridiem{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=checkboxes] .k-radio-input li,.k-input[data-theme=field][data-type=radio] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{min-width:0;overflow-wrap:break-word}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{margin-left:-1px}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input li,.k-input[data-theme=field][data-type=radio] .k-radio-input li{border-bottom:1px solid var(--color-background)}.k-input[data-theme=field][data-type=checkboxes] .k-checkboxes-input label{display:block;line-height:var(--field-input-line-height);padding:var(--field-input-padding) var(--field-input-padding)}[dir=ltr] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input label:before{right:var(--field-input-padding)}.k-input[data-theme=field][data-type=checkboxes] .k-checkbox-input-icon{top:calc((var(--field-input-height) - var(--field-input-font-size))/2);margin-top:0}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-before{border-right:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-before{border-left:1px solid var(--color-background)}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input li,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-after,[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-input-element+.k-input-icon{border-right:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-input-element{overflow:hidden}[dir=ltr] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-right:-1px}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input{margin-left:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input{display:grid;grid-template-columns:1fr;margin-bottom:-1px}@media screen and (min-width:65em){.k-input[data-theme=field][data-type=radio] .k-radio-input{grid-template-columns:repeat(var(--columns),1fr)}}[dir=rtl] .k-input[data-theme=field][data-type=radio] .k-radio-input li{border-left:1px solid var(--color-background)}.k-input[data-theme=field][data-type=radio] .k-radio-input label{display:block;flex-grow:1;min-height:var(--field-input-height);line-height:var(--field-input-line-height);padding:calc((var(--field-input-height) - var(--field-input-line-height))/2) var(--field-input-padding)}.k-input[data-theme=field][data-type=radio] .k-radio-input label:before{top:calc((var(--field-input-height) - 1rem)/2);margin-top:-1px}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-radio-input-info{display:block;font-size:var(--text-sm);color:var(--color-gray-600);line-height:var(--field-input-line-height);padding-top:calc(var(--field-input-line-height)/10)}.k-input[data-theme=field][data-type=radio] .k-radio-input .k-icon{width:var(--field-input-height);height:var(--field-input-height);display:flex;align-items:center;justify-content:center}.k-input[data-theme=field][data-type=range] .k-range-input{padding:var(--field-input-padding)}.k-input[data-theme=field][data-type=multiselect],.k-input[data-theme=field][data-type=select]{position:relative}[dir=ltr] .k-input[data-theme=field][data-type=select] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=select] .k-input-icon{left:0}.k-input[data-theme=field][data-type=select] .k-input-icon{position:absolute;top:0;bottom:0}.k-input[data-theme=field][data-type=tags] .k-tags-input{padding:.25rem .25rem 0}[dir=ltr] .k-input[data-theme=field][data-type=tags] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=tags] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=tags] .k-tag{margin-bottom:.25rem;height:auto;min-height:1.75rem;font-size:var(--text-sm)}.k-input[data-theme=field][data-type=tags] .k-tags-input input{font-size:var(--text-sm);padding:0 .25rem;height:1.75rem;line-height:1;margin-bottom:.25rem}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content{top:calc(100% + .5rem + 2px)}.k-input[data-theme=field][data-type=tags] .k-tags-input .k-dropdown-content[data-dropup]{top:calc(100% + .5rem + 2px);bottom:initial;margin-bottom:initial}.k-input[data-theme=field][data-type=multiselect] .k-multiselect-input{padding:.25rem 2rem 0 .25rem;min-height:2.25rem}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-right:.25rem}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-tag{margin-left:.25rem}.k-input[data-theme=field][data-type=multiselect] .k-tag{margin-bottom:.25rem;height:1.75rem;font-size:var(--text-sm)}[dir=ltr] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{right:0}[dir=rtl] .k-input[data-theme=field][data-type=multiselect] .k-input-icon{left:0}.k-input[data-theme=field][data-type=multiselect] .k-input-icon{position:absolute;top:0;bottom:0;pointer-events:none}.k-input[data-theme=field][data-type=textarea] .k-textarea-input-native{padding:.25rem var(--field-input-padding);line-height:1.5rem}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-right:calc(var(--field-input-padding)/2)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-input-before{padding-left:calc(var(--field-input-padding)/2)}[dir=ltr] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-left:var(--field-input-padding)}[dir=rtl] .k-input[data-theme=field][data-type=toggle] .k-toggle-input{padding-right:var(--field-input-padding)}.k-input[data-theme=field][data-type=toggle] .k-toggle-input-label{padding:0 var(--field-input-padding) 0 .75rem;line-height:var(--field-input-height)}.k-login-code-form .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}[dir=ltr] .k-upload input{left:-3000px}[dir=rtl] .k-upload input{right:-3000px}.k-upload input{position:absolute;top:0}.k-upload-dialog .k-headline{margin-bottom:.75rem}.k-upload-error-list,.k-upload-list{line-height:1.5em;font-size:var(--text-sm)}.k-upload-list-filename{color:var(--color-gray-600)}.k-upload-error-list li{padding:.75rem;background:var(--color-white);border-radius:var(--rounded-xs)}.k-upload-error-list li:not(:last-child){margin-bottom:2px}.k-upload-error-filename{color:var(--color-negative);font-weight:var(--font-bold)}.k-upload-error-message{color:var(--color-gray-600)}.k-writer-toolbar{position:absolute;display:flex;background:var(--color-black);height:30px;transform:translate(-50%) translateY(-.75rem);z-index:calc(var(--z-dropdown) + 1);box-shadow:var(--shadow);color:var(--color-white);border-radius:var(--rounded)}.k-writer-toolbar-button.k-button{display:flex;align-items:center;justify-content:center;height:30px;width:30px;font-size:var(--text-sm)!important;color:currentColor;line-height:1}.k-writer-toolbar-button.k-button:hover{background:rgba(255,255,255,.15)}.k-writer-toolbar-button.k-writer-toolbar-button-active{color:var(--color-blue-300)}.k-writer-toolbar-button.k-writer-toolbar-nodes{width:auto;padding:0 .75rem}[dir=ltr] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-left:1px solid var(--color-gray-700)}[dir=rtl] .k-writer-toolbar .k-dropdown+.k-writer-toolbar-button{border-right:1px solid var(--color-gray-700)}[dir=ltr] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-left:.5rem}[dir=rtl] .k-writer-toolbar-button.k-writer-toolbar-nodes:after{margin-right:.5rem}.k-writer-toolbar-button.k-writer-toolbar-nodes:after{content:"";border-top:4px solid var(--color-white);border-left:4px solid transparent;border-right:4px solid transparent}.k-writer-toolbar .k-dropdown-content{color:var(--color-black);background:var(--color-white);margin-top:.5rem}.k-writer-toolbar .k-dropdown-content .k-dropdown-item[aria-current]{color:var(--color-focus);font-weight:500}.k-writer{position:relative;width:100%;grid-template-areas:"content";display:grid}.k-writer .ProseMirror{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;white-space:pre-wrap;font-variant-ligatures:none;line-height:inherit;grid-area:content}.k-writer .ProseMirror:focus{outline:0}.k-writer .ProseMirror *{caret-color:currentColor}.k-writer .ProseMirror a{color:var(--color-focus);text-decoration:underline}.k-writer .ProseMirror>:last-child{margin-bottom:0}.k-writer .ProseMirror h1,.k-writer .ProseMirror h2,.k-writer .ProseMirror h3,.k-writer .ProseMirror ol,.k-writer .ProseMirror p,.k-writer .ProseMirror ul{margin-bottom:.75rem}.k-writer .ProseMirror h1{font-size:var(--text-3xl);line-height:1.25em}.k-writer .ProseMirror h2{font-size:var(--text-2xl);line-height:1.25em}.k-writer .ProseMirror h3{font-size:var(--text-xl);line-height:1.25em}.k-writer .ProseMirror h1 strong,.k-writer .ProseMirror h2 strong,.k-writer .ProseMirror h3 strong{font-weight:700}.k-writer .ProseMirror strong{font-weight:600}.k-writer .ProseMirror code{position:relative;font-size:.925em;display:inline-block;line-height:1.325;padding:.05em .325em;background:var(--color-gray-300);border-radius:var(--rounded)}[dir=ltr] .k-writer .ProseMirror ol,[dir=ltr] .k-writer .ProseMirror ul{padding-left:1rem}[dir=rtl] .k-writer .ProseMirror ol,[dir=rtl] .k-writer .ProseMirror ul{padding-right:1rem}.k-writer .ProseMirror ul>li{list-style:disc}.k-writer .ProseMirror ul ul>li{list-style:circle}.k-writer .ProseMirror ul ul ul>li{list-style:square}.k-writer .ProseMirror ol>li{list-style:decimal}.k-writer .ProseMirror li>ol,.k-writer .ProseMirror li>p,.k-writer .ProseMirror li>ul{margin:0}.k-writer-code pre{-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-size:var(--text-sm);line-height:2em;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;white-space:pre}.k-writer .ProseMirror code,.k-writer-code code{font-family:var(--font-mono)}.k-writer[data-placeholder][data-empty]:before{grid-area:content;content:attr(data-placeholder);line-height:inherit;color:var(--color-gray-500);pointer-events:none;white-space:pre-wrap;word-wrap:break-word}.k-login-alert{padding:.5rem .75rem;display:flex;justify-content:space-between;align-items:center;min-height:38px;margin-bottom:2rem;background:var(--color-negative);color:var(--color-white);font-size:var(--text-sm);border-radius:var(--rounded-xs);box-shadow:var(--shadow-lg);cursor:pointer}.k-checkbox-input{position:relative;cursor:pointer}.k-checkbox-input-native{position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;opacity:0}[dir=ltr] .k-checkbox-input-label{padding-left:1.75rem}[dir=rtl] .k-checkbox-input-label{padding-right:1.75rem}.k-checkbox-input-label{display:block}[dir=ltr] .k-checkbox-input-icon{left:0}[dir=rtl] .k-checkbox-input-icon{right:0}.k-checkbox-input-icon{position:absolute;width:1rem;height:1rem;border:2px solid var(--color-gray-500)}.k-checkbox-input-icon svg{position:absolute;width:12px;height:12px;display:none}.k-checkbox-input-icon path{stroke:var(--color-white)}.k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled] .k-checkbox-input-native:checked+.k-checkbox-input-icon{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-checkbox-input-native:checked+.k-checkbox-input-icon svg{display:block}.k-checkbox-input-native:focus+.k-checkbox-input-icon{border-color:var(--color-blue-600)}.k-checkbox-input-native:focus:checked+.k-checkbox-input-icon{background:var(--color-focus)}.k-datetime-input{display:flex}[dir=ltr] .k-datetime-input .k-time-input{padding-left:var(--field-input-padding)}[dir=rtl] .k-datetime-input .k-time-input{padding-right:var(--field-input-padding)}.k-text-input{width:100%;border:0;background:0 0;font:inherit;color:inherit}.k-text-input::-moz-placeholder{color:var(--color-gray-500)}.k-text-input::placeholder{color:var(--color-gray-500)}.k-text-input:focus{outline:0}.k-text-input:invalid{box-shadow:none;outline:0}.k-list-input .ProseMirror{line-height:1.5em}.k-list-input .ProseMirror ol>li::marker{font-size:var(--text-sm);color:var(--color-gray-500)}.k-multiselect-input{display:flex;flex-wrap:wrap;position:relative;font-size:var(--text-sm);min-height:2.25rem;line-height:1}.k-multiselect-input .k-sortable-ghost{background:var(--color-focus)}.k-multiselect-input .k-dropdown-content,.k-multiselect-input[data-layout=list] .k-tag{width:100%}.k-multiselect-search{margin-top:0!important;color:var(--color-white);background:var(--color-gray-900);border-bottom:1px dashed rgba(255,255,255,.2)}.k-multiselect-search>.k-button-text{flex:1;opacity:1!important}.k-multiselect-search input{width:100%;color:var(--color-white);background:0 0;border:0;outline:0;padding:.25rem 0;font:inherit}.k-multiselect-options{position:relative;max-height:275px;padding:.5rem 0}.k-multiselect-option{position:relative}.k-multiselect-option.selected{color:var(--color-positive-light)}.k-multiselect-option.disabled:not(.selected) .k-icon{opacity:0}.k-multiselect-option b{color:var(--color-focus-light);font-weight:700}[dir=ltr] .k-multiselect-value{margin-left:.25rem}[dir=rtl] .k-multiselect-value{margin-right:.25rem}.k-multiselect-value{color:var(--color-gray-500)}.k-multiselect-value:before{content:" ("}.k-multiselect-value:after{content:")"}[dir=ltr] .k-multiselect-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-multiselect-input[data-layout=list] .k-tag{margin-left:0!important}.k-multiselect-more{width:100%;padding:.75rem;color:#fffc;text-align:center;border-top:1px dashed rgba(255,255,255,.2)}.k-multiselect-more:hover{color:var(--color-white)}.k-number-input{width:100%;border:0;background:0 0;font:inherit;color:inherit}.k-number-input::-moz-placeholder{color:var(--color-gray-500)}.k-number-input::placeholder{color:var(--color-gray-500)}.k-number-input:focus{outline:0}.k-number-input:invalid{box-shadow:none;outline:0}[dir=ltr] .k-radio-input li{padding-left:1.75rem}[dir=rtl] .k-radio-input li{padding-right:1.75rem}.k-radio-input li{position:relative;line-height:1.5rem}.k-radio-input input{position:absolute;width:0;height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.k-radio-input label{cursor:pointer;align-items:center}[dir=ltr] .k-radio-input label:before{left:0}[dir=rtl] .k-radio-input label:before{right:0}.k-radio-input label:before{position:absolute;top:.175em;content:"";width:1rem;height:1rem;border-radius:50%;border:2px solid var(--color-gray-500);box-shadow:var(--color-white) 0 0 0 2px inset}.k-radio-input input:checked+label:before{border-color:var(--color-gray-900);background:var(--color-gray-900)}[data-disabled] .k-radio-input input:checked+label:before{border-color:var(--color-gray-600);background:var(--color-gray-600)}.k-radio-input input:focus+label:before{border-color:var(--color-blue-600)}.k-radio-input input:focus:checked+label:before{background:var(--color-focus)}.k-radio-input-text{display:block}.k-range-input{--range-thumb-size:16px;--range-thumb-border:4px solid var(--color-gray-900);--range-thumb-border-disabled:4px solid var(--color-gray-600);--range-thumb-background:var(--color-background);--range-thumb-focus-border:4px solid var(--color-focus);--range-thumb-focus-background:var(--color-background);--range-track-height:4px;--range-track-background:var(--color-border);--range-track-color:var(--color-gray-900);--range-track-color-disabled:var(--color-gray-600);--range-track-focus-color:var(--color-focus);display:flex;align-items:center}.k-range-input-native{--min:0;--max:100;--value:0;--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min)) / var(--range));--position:calc(.5 * var(--range-thumb-size) + var(--ratio) * calc(100% - var(--range-thumb-size)));-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:var(--range-thumb-size);background:0 0;font-size:var(--text-sm);line-height:1}.k-range-input-native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.k-range-input-native::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-moz-range-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-ms-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background)}.k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color),var(--range-track-color)) 0/var(--position) 100% no-repeat var(--range-track-background)}.k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color)}.k-range-input-native::-webkit-slider-thumb{margin-top:calc(.5*(var(--range-track-height) - var(--range-thumb-size)));box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-moz-range-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer}.k-range-input-native::-ms-thumb{box-sizing:border-box;width:var(--range-thumb-size);height:var(--range-thumb-size);background:var(--range-thumb-background);border:var(--range-thumb-border);border-radius:50%;cursor:pointer;margin-top:0}.k-range-input-native::-ms-tooltip{display:none}.k-range-input-native:focus{outline:0}.k-range-input-native:focus::-webkit-slider-runnable-track{border:0;border-radius:var(--range-track-height);width:100%;height:var(--range-track-height);background:var(--range-track-background);background:linear-gradient(var(--range-track-focus-color),var(--range-track-focus-color)) 0/var(--position) 100% no-repeat var(--range-track-background)}.k-range-input-native:focus::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-focus-color)}.k-range-input-native:focus::-webkit-slider-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-moz-range-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}.k-range-input-native:focus::-ms-thumb{background:var(--range-thumb-focus-background);border:var(--range-thumb-focus-border)}[dir=ltr] .k-range-input-tooltip{margin-left:1rem}[dir=rtl] .k-range-input-tooltip{margin-right:1rem}.k-range-input-tooltip{position:relative;max-width:20%;display:flex;align-items:center;color:var(--color-white);font-size:var(--text-xs);line-height:1;text-align:center;border-radius:var(--rounded-xs);background:var(--color-gray-900);padding:0 .25rem;white-space:nowrap}[dir=ltr] .k-range-input-tooltip:after{left:-5px}[dir=rtl] .k-range-input-tooltip:after{right:-5px}[dir=ltr] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-900)}[dir=rtl] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-900)}.k-range-input-tooltip:after{position:absolute;top:50%;width:0;height:0;transform:translateY(-50%);border-top:5px solid transparent;border-bottom:5px solid transparent;content:""}.k-range-input-tooltip>*{padding:4px}[data-disabled] .k-range-input-native::-webkit-slider-runnable-track{background:linear-gradient(var(--range-track-color-disabled),var(--range-track-color-disabled)) 0/var(--position) 100% no-repeat var(--range-track-background)}[data-disabled] .k-range-input-native::-moz-range-progress{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled] .k-range-input-native::-ms-fill-lower{height:var(--range-track-height);background:var(--range-track-color-disabled)}[data-disabled] .k-range-input-native::-webkit-slider-thumb{border:var(--range-thumb-border-disabled)}[data-disabled] .k-range-input-native::-moz-range-thumb{border:var(--range-thumb-border-disabled)}[data-disabled] .k-range-input-native::-ms-thumb{border:var(--range-thumb-border-disabled)}[data-disabled] .k-range-input-tooltip{background:var(--color-gray-600)}[dir=ltr] [data-disabled] .k-range-input-tooltip:after{border-right:5px solid var(--color-gray-600)}[dir=rtl] [data-disabled] .k-range-input-tooltip:after{border-left:5px solid var(--color-gray-600)}.k-select-input{position:relative;display:block;cursor:pointer;overflow:hidden}.k-select-input-native{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;font:inherit;z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:var(--font-normal)}.k-select-input-native[disabled]{cursor:default}.k-tags-input{display:flex;flex-wrap:wrap}.k-tags-input .k-sortable-ghost{background:var(--color-focus)}.k-tags-input-element{flex-grow:1;flex-basis:0;min-width:0}.k-tags-input:focus-within .k-tags-input-element{flex-basis:4rem}.k-tags-input-element input{font:inherit;border:0;width:100%;background:0 0}.k-tags-input-element input:focus{outline:0}[dir=ltr] .k-tags-input[data-layout=list] .k-tag{margin-right:0!important}[dir=rtl] .k-tags-input[data-layout=list] .k-tag{margin-left:0!important}.k-tags-input[data-layout=list] .k-tag{width:100%}.k-textarea-input[data-size=small]{--size:7.5rem}.k-textarea-input[data-size=medium]{--size:15rem}.k-textarea-input[data-size=large]{--size:30rem}.k-textarea-input[data-size=huge]{--size:45rem}.k-textarea-input-wrapper{position:relative}.k-textarea-input-native{resize:none;border:0;width:100%;background:0 0;font:inherit;line-height:1.5em;color:inherit;min-height:var(--size)}.k-textarea-input-native::-moz-placeholder{color:var(--color-gray-500)}.k-textarea-input-native::placeholder{color:var(--color-gray-500)}.k-textarea-input-native:focus{outline:0}.k-textarea-input-native:invalid{box-shadow:none;outline:0}.k-textarea-input-native[data-font=monospace]{font-family:var(--font-mono)}.k-toolbar{margin-bottom:.25rem;color:#aaa}.k-textarea-input:focus-within .k-toolbar{position:sticky;top:0;left:0;right:0;z-index:1;box-shadow:#0000000d 0 2px 5px;border-bottom:1px solid rgba(0,0,0,.1);color:#000}.k-toggle-input{--toggle-background:var(--color-white);--toggle-color:var(--color-gray-500);--toggle-active-color:var(--color-gray-900);--toggle-focus-color:var(--color-focus);--toggle-height:16px;display:flex;align-items:center}.k-toggle-input-native{position:relative;height:var(--toggle-height);width:calc(var(--toggle-height)*2);border-radius:var(--toggle-height);border:2px solid var(--toggle-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--toggle-background);background-color:var(--toggle-color);outline:0;transition:all ease-in-out .1s;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;flex-shrink:0}.k-toggle-input-native:checked{border-color:var(--toggle-active-color);box-shadow:inset 0 0 0 2px var(--toggle-background),inset var(--toggle-height) 0 0 2px var(--toggle-background);background-color:var(--toggle-active-color)}.k-toggle-input-native[disabled]{border-color:var(--color-border);box-shadow:inset 0 0 0 2px var(--color-background),inset calc(var(--toggle-height)*-1) 0 0 2px var(--color-background);background-color:var(--color-border)}.k-toggle-input-native[disabled]:checked{box-shadow:inset 0 0 0 2px var(--color-background),inset var(--toggle-height) 0 0 2px var(--color-background)}.k-toggle-input-native:focus:checked{border:2px solid var(--color-focus);background-color:var(--toggle-focus-color)}.k-toggle-input-native::-ms-check{opacity:0}.k-toggle-input-label{cursor:pointer;flex-grow:1}.k-blocks-field{position:relative}.k-files-field[data-disabled] *{pointer-events:all!important}body{counter-reset:headline-counter}.k-headline-field{position:relative;padding-top:1.5rem}.k-fieldset>.k-grid .k-column:first-child .k-headline-field{padding-top:0}[dir=ltr] .k-headline-field .k-headline[data-numbered]:before{padding-right:.25rem}[dir=rtl] .k-headline-field .k-headline[data-numbered]:before{padding-left:.25rem}.k-headline-field .k-headline[data-numbered]:before{counter-increment:headline-counter;content:counter(headline-counter,decimal-leading-zero);color:var(--color-focus);font-weight:400}.k-info-field .k-headline{padding-bottom:.75rem;line-height:1.25rem}.k-layout-column{position:relative;height:100%;display:flex;flex-direction:column;background:var(--color-white);min-height:6rem}.k-layout-column:focus{outline:0}.k-layout-column .k-blocks{background:0 0;box-shadow:none;padding:0;height:100%;background:var(--color-white);min-height:4rem}.k-layout-column .k-blocks[data-empty=true]{min-height:6rem}.k-layout-column .k-blocks-list{display:flex;flex-direction:column;height:100%}.k-layout-column .k-blocks .k-block-container:last-of-type{flex-grow:1}.k-layout-column .k-blocks-empty{position:absolute;top:0;right:0;bottom:0;left:0;justify-content:center;opacity:0;transition:opacity .3s;border:0}.k-layout-column .k-blocks-empty:hover{opacity:1}[dir=ltr] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-right:0}[dir=rtl] .k-layout-column .k-blocks-empty.k-empty .k-icon{border-left:0}.k-layout-column .k-blocks-empty.k-empty .k-icon{width:1rem}[dir=ltr] .k-layout{padding-right:var(--layout-toolbar-width)}[dir=rtl] .k-layout{padding-left:var(--layout-toolbar-width)}.k-layout{--layout-border-color:var(--color-gray-300);--layout-toolbar-width:2rem;position:relative;background:#fff;box-shadow:var(--shadow)}[dir=ltr] [data-disabled] .k-layout{padding-right:0}[dir=rtl] [data-disabled] .k-layout{padding-left:0}.k-layout:not(:last-of-type){margin-bottom:1px}.k-layout:focus{outline:0}[dir=ltr] .k-layout-toolbar{right:0}[dir=rtl] .k-layout-toolbar{left:0}[dir=ltr] .k-layout-toolbar{border-left:1px solid var(--color-light)}[dir=rtl] .k-layout-toolbar{border-right:1px solid var(--color-light)}.k-layout-toolbar{position:absolute;top:0;bottom:0;width:var(--layout-toolbar-width);display:flex;flex-direction:column;font-size:var(--text-sm);background:var(--color-gray-100);color:var(--color-gray-500)}.k-layout-toolbar:hover{color:var(--color-black)}.k-layout-toolbar-button{width:var(--layout-toolbar-width);height:var(--layout-toolbar-width)}.k-layout-toolbar .k-sort-handle{margin-top:auto;color:currentColor}.k-layout-columns.k-grid{grid-gap:1px;background:var(--layout-border-color);background:var(--color-gray-300)}.k-layout:not(:first-child) .k-layout-columns.k-grid{border-top:0}.k-layouts .k-sortable-ghost{position:relative;box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);cursor:grabbing;cursor:-webkit-grabbing;z-index:1}.k-layout-selector.k-dialog{background:#313740;color:var(--color-white)}.k-layout-selector .k-headline{line-height:1;margin-top:-.25rem;margin-bottom:1.5rem}.k-layout-selector ul{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1.5rem}.k-layout-selector-option .k-grid{height:5rem;grid-gap:2px;box-shadow:var(--shadow);cursor:pointer}.k-layout-selector-option:hover{outline:2px solid var(--color-green-300);outline-offset:2px}.k-layout-selector-option:last-child{margin-bottom:0}.k-layout-selector-option .k-column{display:flex;background:rgba(255,255,255,.2);justify-content:center;font-size:var(--text-xs);align-items:center}.k-layout-add-button{display:flex;align-items:center;width:100%;color:var(--color-gray-500);justify-content:center;padding:.75rem 0}.k-layout-add-button:hover{color:var(--color-black)}.k-line-field{position:relative;border:0;height:3rem;width:auto}.k-line-field:after{position:absolute;content:"";top:50%;margin-top:-1px;left:0;right:0;height:1px;background:var(--color-border)}.k-list-field .k-list-input{padding:.375rem .5rem .375rem .75rem}.k-pages-field[data-disabled] *{pointer-events:all!important}.k-structure-field{--item-height:38px}.k-structure-table{position:relative;table-layout:fixed;width:100%;background:#fff;font-size:var(--text-sm);border-spacing:0;box-shadow:var(--shadow)}[dir=ltr] .k-structure-table td,[dir=ltr] .k-structure-table th{border-right:1px solid var(--color-background)}[dir=rtl] .k-structure-table td,[dir=rtl] .k-structure-table th{border-left:1px solid var(--color-background)}.k-structure-table td,.k-structure-table th{line-height:1.25em;overflow:hidden;text-overflow:ellipsis}.k-structure-table th,.k-structure-table tr:not(:last-child) td{border-bottom:1px solid var(--color-background)}.k-structure-table td:last-child{overflow:visible}[dir=ltr] .k-structure-table th{text-align:left}[dir=rtl] .k-structure-table th{text-align:right}.k-structure-table th{position:sticky;top:0;left:0;right:0;width:100%;height:var(--item-height);padding:0 .75rem;background:#fff;color:var(--color-gray-600);font-weight:400;z-index:1}[dir=ltr] .k-structure-table td:last-child,[dir=ltr] .k-structure-table th:last-child{border-right:0}[dir=rtl] .k-structure-table td:last-child,[dir=rtl] .k-structure-table th:last-child{border-left:0}.k-structure-table td:last-child,.k-structure-table th:last-child{width:var(--item-height)}.k-structure-table tbody tr:hover td{background:rgba(239,239,239,.25)}@media screen and (max-width:65em){.k-structure-table td,.k-structure-table th{display:none}.k-structure-table td:first-child,.k-structure-table td:last-child,.k-structure-table td:nth-child(2),.k-structure-table th:first-child,.k-structure-table th:last-child,.k-structure-table th:nth-child(2){display:table-cell}}.k-structure-table .k-structure-table-column[data-align]{text-align:var(--align)}.k-structure-table .k-structure-table-column[data-align=right]>.k-input{flex-direction:column;align-items:flex-end}.k-structure-table .k-sort-handle,.k-structure-table .k-structure-table-index,.k-structure-table .k-structure-table-options,.k-structure-table .k-structure-table-options-button{width:var(--item-height);height:var(--item-height)}.k-structure-table .k-structure-table-index{text-align:center}.k-structure-table .k-structure-table-index-number{font-size:var(--text-xs);color:var(--color-gray-500);padding-top:.15rem}.k-structure-table .k-sort-handle,.k-structure-table[data-sortable] tr:hover .k-structure-table-index-number{display:none}.k-structure-table[data-sortable] tr:hover .k-sort-handle{display:flex!important}.k-structure-table .k-structure-table-options{position:relative;text-align:center}.k-structure-table .k-structure-table-text{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.k-structure-table .k-sortable-ghost{background:var(--color-white);box-shadow:#11111140 0 5px 10px;outline:2px solid var(--color-focus);margin-bottom:2px;cursor:grabbing;cursor:-webkit-grabbing}[data-disabled] .k-structure-table{background:var(--color-background)}[dir=ltr] [data-disabled] .k-structure-table td,[dir=ltr] [data-disabled] .k-structure-table th{border-right:1px solid var(--color-border)}[dir=rtl] [data-disabled] .k-structure-table td,[dir=rtl] [data-disabled] .k-structure-table th{border-left:1px solid var(--color-border)}[data-disabled] .k-structure-table td,[data-disabled] .k-structure-table th{background:var(--color-background);border-bottom:1px solid var(--color-border)}[data-disabled] .k-structure-table td:last-child{overflow:hidden;text-overflow:ellipsis}.k-structure-table .k-sortable-row-fallback{opacity:0!important}.k-structure-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;height:100vh}.k-structure-form{position:relative;z-index:3;border-radius:var(--rounded-xs);margin-bottom:1px;box-shadow:#1111110d 0 0 0 3px;border:1px solid var(--color-border);background:var(--color-background)}.k-structure-form-fields{padding:1.5rem 1.5rem 2rem}.k-structure-form-buttons{border-top:1px solid var(--color-border);display:flex;justify-content:space-between}.k-structure-form-buttons .k-pagination{display:none}@media screen and (min-width:65em){.k-structure-form-buttons .k-pagination{display:flex}}.k-structure-form-buttons .k-pagination>.k-button,.k-structure-form-buttons .k-pagination>span{padding:.875rem 1rem!important}.k-structure-form-cancel-button,.k-structure-form-submit-button{padding:.875rem 1.5rem;line-height:1rem;display:flex}.k-field-counter{display:none}.k-text-field:focus-within .k-field-counter{display:block}.k-users-field[data-disabled] *{pointer-events:all!important}.k-writer-field-input{line-height:1.5em;padding:.375rem .5rem}.k-toolbar{background:var(--color-white);border-bottom:1px solid var(--color-background);height:38px}.k-toolbar-wrapper{position:absolute;top:0;left:0;right:0;max-width:100%}.k-toolbar-buttons{display:flex}.k-toolbar-divider{width:1px;background:var(--color-background)}.k-toolbar-button{width:36px;height:36px}.k-toolbar-button:hover{background:rgba(239,239,239,.5)}.k-date-field-preview{padding:0 .75rem}.k-url-field-preview{padding:0 .75rem;overflow:hidden;text-overflow:ellipsis}.k-url-field-preview a{color:var(--color-focus);text-decoration:underline;transition:color .3s;white-space:nowrap;max-width:100%}.k-url-field-preview a:hover{color:var(--color-black)}.k-files-field-preview{display:grid;grid-gap:.5rem;grid-template-columns:repeat(auto-fill,1.525rem);padding:0 .75rem}.k-files-field-preview li{line-height:0}.k-files-field-preview li .k-icon{--size:.85rem;height:100%}.k-list-field-preview{padding:.325rem .75rem;line-height:1.5em}[dir=ltr] .k-list-field-preview ol,[dir=ltr] .k-list-field-preview ul{margin-left:1rem}[dir=rtl] .k-list-field-preview ol,[dir=rtl] .k-list-field-preview ul{margin-right:1rem}.k-list-field-preview ul>li{list-style:disc}.k-list-field-preview ol ul>li,.k-list-field-preview ul ul>li{list-style:circle}.k-list-field-preview ol>li{list-style:decimal}.k-list-field-preview ol>li::marker{color:var(--color-gray-500);font-size:var(--text-xs)}.k-pages-field-preview{padding:0 .25rem 0 .75rem;display:flex}[dir=ltr] .k-pages-field-preview li{margin-right:.5rem}[dir=rtl] .k-pages-field-preview li{margin-left:.5rem}.k-pages-field-preview li{line-height:0}.k-pages-field-preview .k-link{display:flex;align-items:stretch;background:var(--color-background);box-shadow:var(--shadow)}.k-pages-field-preview-image{width:1.525rem;height:1.525rem}.k-pages-field-preview-image .k-icon{--size:.85rem}[dir=ltr] .k-pages-field-preview figcaption{border-left:0}[dir=rtl] .k-pages-field-preview figcaption{border-right:0}.k-pages-field-preview figcaption{flex-grow:1;line-height:1.5em;padding:0 .5rem;border:1px solid var(--color-border);border-radius:var(--rounded-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-time-field-preview{padding:0 .75rem}.k-toggle-field-preview label{padding:0 .25rem 0 .75rem;display:flex;height:38px;cursor:pointer;overflow:hidden;white-space:nowrap}[dir=ltr] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input-label,[dir=rtl] .k-toggle-field-preview .k-toggle-input-label{padding-right:.5rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input-label{padding-left:.5rem}[dir=ltr] .k-toggle-field-preview .k-toggle-input{padding-left:.75rem;padding-right:.25rem}.k-toggle-field-preview .k-toggle-input{padding-top:0;padding-bottom:0}[dir=ltr] [data-align=right] .k-toggle-field-preview .k-toggle-input,[dir=rtl] .k-toggle-field-preview .k-toggle-input{padding-left:.25rem;padding-right:.75rem}[dir=rtl] [data-align=right] .k-toggle-field-preview .k-toggle-input{padding-right:.25rem;padding-left:.75rem}[data-align=right] .k-toggle-field-preview .k-toggle-input{flex-direction:row-reverse}.k-users-field-preview{padding:0 .25rem 0 .75rem;display:flex}[dir=ltr] .k-users-field-preview li{margin-right:.5rem}[dir=rtl] .k-users-field-preview li{margin-left:.5rem}.k-users-field-preview li{line-height:0}.k-users-field-preview .k-link{display:flex;align-items:stretch;background:var(--color-background);box-shadow:var(--shadow)}.k-users-field-preview-avatar{width:1.525rem;height:1.525rem;color:var(--color-gray-500)!important}.k-users-field-preview-avatar.k-image{display:block}[dir=ltr] .k-users-field-preview figcaption{border-left:0}[dir=rtl] .k-users-field-preview figcaption{border-right:0}.k-users-field-preview figcaption{flex-grow:1;line-height:1.5em;padding-left:.5rem;padding-right:.5rem;border:1px solid var(--color-border);border-radius:var(--rounded-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-writer-field-preview{padding:.325rem .75rem;line-height:1.5em}.k-writer-field-preview p:not(:last-child){margin-bottom:1.5em}.k-aspect-ratio{position:relative;display:block;overflow:hidden;padding-bottom:100%}.k-aspect-ratio>*{position:absolute!important;top:0;right:0;bottom:0;left:0;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}.k-aspect-ratio[data-cover]>*{-o-object-fit:cover;object-fit:cover}.k-bar{display:flex;align-items:center;justify-content:space-between;line-height:1}.k-bar-slot{flex-grow:1}.k-bar-slot[data-position=center]{text-align:center}[dir=ltr] .k-bar-slot[data-position=right]{text-align:right}[dir=rtl] .k-bar-slot[data-position=right]{text-align:left}.k-box{word-wrap:break-word;font-size:var(--text-sm)}[dir=ltr] .k-box:not([data-theme=none]){border-left:2px solid var(--color-gray-500)}[dir=rtl] .k-box:not([data-theme=none]){border-right:2px solid var(--color-gray-500)}.k-box:not([data-theme=none]){background:var(--color-gray-300);border-radius:var(--rounded-xs);line-height:1.25rem;padding:.5rem 1.5rem}.k-box[data-theme=code]{background:var(--color-gray-900);border:1px solid var(--color-black);color:var(--color-light);font-family:"Input","Menlo",monospace;font-size:var(--text-sm);line-height:1.5}.k-box[data-theme=button]{padding:0}[dir=ltr] .k-box[data-theme=button] .k-button{text-align:left}[dir=rtl] .k-box[data-theme=button] .k-button{text-align:right}.k-box[data-theme=button] .k-button{padding:0 .75rem;height:2.25rem;width:100%;display:flex;align-items:center;line-height:2rem}[dir=ltr] .k-box[data-theme=info],[dir=ltr] .k-box[data-theme=negative],[dir=ltr] .k-box[data-theme=notice],[dir=ltr] .k-box[data-theme=positive]{border-left-color:var(--theme-light)}[dir=rtl] .k-box[data-theme=info],[dir=rtl] .k-box[data-theme=negative],[dir=rtl] .k-box[data-theme=notice],[dir=rtl] .k-box[data-theme=positive]{border-right-color:var(--theme-light)}.k-box[data-theme=info],.k-box[data-theme=negative],.k-box[data-theme=notice],.k-box[data-theme=positive]{border:0;background:var(--theme-bg)}[dir=ltr] .k-box[data-theme=empty]{border-left:0}[dir=rtl] .k-box[data-theme=empty]{border-right:0}.k-box[data-theme=empty]{text-align:center;padding:3rem 1.5rem;display:flex;justify-content:center;align-items:center;flex-direction:column;background:var(--color-background);border:1px dashed var(--color-border)}.k-box[data-theme=empty] .k-icon{margin-bottom:.5rem;color:var(--color-gray-500)}.k-box[data-theme=empty],.k-box[data-theme=empty] p{color:var(--color-gray-600)}.k-collection-help{padding:.5rem .75rem}.k-collection-footer{display:flex;justify-content:space-between;margin-left:-.75rem;margin-right:-.75rem}.k-collection-pagination{line-height:1.25rem;flex-shrink:0;min-height:2.75rem}.k-collection-pagination .k-pagination .k-button{padding:.5rem .75rem;line-height:1.125rem}.k-column{min-width:0;grid-column-start:span 12}.k-column[data-sticky]>div{position:sticky;top:4vh;z-index:2}@media screen and (min-width:65em){.k-column[data-width="1/1"],.k-column[data-width="12/12"],.k-column[data-width="2/2"],.k-column[data-width="3/3"],.k-column[data-width="4/4"],.k-column[data-width="6/6"]{grid-column-start:span 12}.k-column[data-width="11/12"]{grid-column-start:span 11}.k-column[data-width="10/12"],.k-column[data-width="5/6"]{grid-column-start:span 10}.k-column[data-width="3/4"],.k-column[data-width="9/12"]{grid-column-start:span 9}.k-column[data-width="2/3"],.k-column[data-width="4/6"],.k-column[data-width="8/12"]{grid-column-start:span 8}.k-column[data-width="7/12"]{grid-column-start:span 7}.k-column[data-width="1/2"],.k-column[data-width="2/4"],.k-column[data-width="3/6"],.k-column[data-width="6/12"]{grid-column-start:span 6}.k-column[data-width="5/12"]{grid-column-start:span 5}.k-column[data-width="1/3"],.k-column[data-width="2/6"],.k-column[data-width="4/12"]{grid-column-start:span 4}.k-column[data-width="1/4"],.k-column[data-width="3/12"]{grid-column-start:span 3}.k-column[data-width="1/6"],.k-column[data-width="2/12"]{grid-column-start:span 2}.k-column[data-width="1/12"]{grid-column-start:span 1}}.k-column[data-disabled]{cursor:not-allowed;opacity:.4}.k-column[data-disabled] *{pointer-events:none}.k-column[data-disabled] .k-text[data-theme=help] *{pointer-events:initial}.k-dropzone{position:relative}.k-dropzone:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:none;pointer-events:none;z-index:1}.k-dropzone[data-over]:after{display:block;outline:1px solid var(--color-focus);box-shadow:var(--color-focus-outline) 0 0 0 3px}.k-empty{display:flex;align-items:stretch;border-radius:var(--rounded-xs);color:var(--color-gray-600);border:1px dashed var(--color-border)}button.k-empty{width:100%}button.k-empty:focus{outline:0}.k-empty p{font-size:var(--text-sm);color:var(--color-gray-600)}.k-empty>.k-icon{color:var(--color-gray-500)}.k-empty[data-layout=cardlets],.k-empty[data-layout=cards]{text-align:center;padding:1.5rem;justify-content:center;flex-direction:column}.k-empty[data-layout=cardlets] .k-icon,.k-empty[data-layout=cards] .k-icon{margin-bottom:1rem}.k-empty[data-layout=cardlets] .k-icon svg,.k-empty[data-layout=cards] .k-icon svg{width:2rem;height:2rem}.k-empty[data-layout=list]{min-height:38px}[dir=ltr] .k-empty[data-layout=list]>.k-icon{border-right:1px solid rgba(0,0,0,.05)}[dir=rtl] .k-empty[data-layout=list]>.k-icon{border-left:1px solid rgba(0,0,0,.05)}.k-empty[data-layout=list]>.k-icon{width:36px;min-height:36px}.k-empty[data-layout=list]>p{line-height:1.25rem;padding:.5rem .75rem}.k-file-preview{background:var(--color-gray-800)}.k-file-preview-layout{display:grid;grid-template-columns:50% auto}.k-file-preview-layout>*{min-width:0}.k-file-preview-image{position:relative;display:flex;align-items:center;justify-content:center;background:var(--bg-pattern)}.k-file-preview-image-link{display:block;width:100%;padding:min(4vw,3rem);outline:0}.k-file-preview-image-link[data-tabbed]{box-shadow:none;outline:2px solid var(--color-focus);outline-offset:-2px}.k-file-preview-details{padding:1.5rem;flex-grow:1}.k-file-preview-details ul{line-height:1.5em;max-width:50rem;display:grid;grid-gap:1.5rem 3rem;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.k-file-preview-details h3{font-size:var(--text-sm);font-weight:500;color:var(--color-gray-500)}.k-file-preview-details a,.k-file-preview-details p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ffffffbf;font-size:var(--text-sm)}@media screen and (min-width:30em){.k-file-preview-details ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}@media screen and (max-width:65em){.k-file-preview-layout{padding:0!important}}@media screen and (min-width:65em){.k-file-preview-layout{grid-template-columns:33.333% auto;align-items:center}.k-file-preview-details{padding:3rem}}@media screen and (min-width:90em){.k-file-preview-layout{grid-template-columns:25% auto}}.k-grid{--columns:12;display:grid;grid-column-gap:0;grid-row-gap:0;grid-template-columns:1fr}@media screen and (min-width:30em){.k-grid[data-gutter=small]{grid-column-gap:1rem;grid-row-gap:1rem}.k-grid[data-gutter=huge],.k-grid[data-gutter=large],.k-grid[data-gutter=medium]{grid-column-gap:1.5rem;grid-row-gap:1.5rem}}@media screen and (min-width:65em){.k-grid{grid-template-columns:repeat(var(--columns),1fr)}.k-grid[data-gutter=large]{grid-column-gap:3rem}.k-grid[data-gutter=huge]{grid-column-gap:4.5rem}}@media screen and (min-width:90em){.k-grid[data-gutter=large]{grid-column-gap:4.5rem}.k-grid[data-gutter=huge]{grid-column-gap:6rem}}@media screen and (min-width:120em){.k-grid[data-gutter=large]{grid-column-gap:6rem}.k-grid[data-gutter=huge]{grid-column-gap:7.5rem}}.k-header{padding-top:4vh;margin-bottom:2rem;border-bottom:1px solid var(--color-border)}.k-header .k-headline{min-height:1.25em;margin-bottom:.5rem;word-wrap:break-word}.k-header .k-header-buttons{margin-top:-.5rem;height:3.25rem}.k-header .k-headline-editable{cursor:pointer}[dir=ltr] .k-header .k-headline-editable .k-icon{margin-left:.5rem}[dir=rtl] .k-header .k-headline-editable .k-icon{margin-right:.5rem}.k-header .k-headline-editable .k-icon{color:var(--color-gray-500);opacity:0;transition:opacity .3s;display:inline-block}.k-header .k-headline-editable:hover .k-icon{opacity:1}.k-panel-inside{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column}.k-panel-inside:focus{outline:0}.k-panel-header{z-index:var(--z-navigation);flex-shrink:0}.k-panel-view{flex-grow:1;padding-bottom:6rem}.k-item{position:relative;background:var(--color-white);border-radius:var(--rounded-sm);box-shadow:var(--shadow);display:grid;grid-template-columns:auto;line-height:1}.k-item a:focus,.k-item:focus{outline:0}.k-item:focus-within{box-shadow:var(--shadow-outline)}.k-item-sort-handle.k-sort-handle{position:absolute;opacity:0;width:1.25rem;height:1.5rem;z-index:2;border-radius:1px}.k-item:hover .k-item-sort-handle{opacity:1}.k-item-figure{grid-area:figure}.k-item-content{grid-area:content;overflow:hidden}.k-item-info,.k-item-title{font-size:var(--text-sm);font-weight:400;text-overflow:ellipsis;white-space:nowrap;line-height:1.125rem;overflow:hidden}.k-item-info{grid-area:info;color:var(--color-gray-500)}.k-item-title-link.k-link[data-tabbed]{box-shadow:none}.k-item-title-link:after{position:absolute;content:"";top:0;right:0;bottom:0;left:0;z-index:1}.k-item-footer{grid-area:footer;display:flex;justify-content:space-between;align-items:center;min-width:0}[dir=ltr] .k-item-label{margin-right:.5rem}[dir=rtl] .k-item-label{margin-left:.5rem}.k-item-buttons{position:relative;display:flex;justify-content:flex-end;flex-shrink:0;flex-grow:1}.k-item-buttons>.k-button,.k-item-buttons>.k-dropdown{position:relative;width:38px;height:38px;display:flex!important;align-items:center;justify-content:center;line-height:1}.k-item-buttons>.k-button{z-index:1}.k-item-buttons>.k-dropdown{z-index:var(--z-dropdown)}.k-list-item{display:flex;align-items:center;height:38px}[dir=ltr] .k-list-item .k-item-sort-handle{left:-1.5rem}[dir=rtl] .k-list-item .k-item-sort-handle{right:-1.5rem}.k-list-item .k-item-sort-handle{width:1.5rem}[dir=ltr] .k-list-item .k-item-figure{border-top-left-radius:var(--rounded-sm)}[dir=rtl] .k-list-item .k-item-figure{border-top-right-radius:var(--rounded-sm)}[dir=ltr] .k-list-item .k-item-figure{border-bottom-left-radius:var(--rounded-sm)}[dir=rtl] .k-list-item .k-item-figure{border-bottom-right-radius:var(--rounded-sm)}.k-list-item .k-item-figure{width:38px}[dir=ltr] .k-list-item .k-item-content{margin-left:.75rem}[dir=rtl] .k-list-item .k-item-content{margin-right:.75rem}.k-list-item .k-item-content{display:flex;flex-grow:1;flex-shrink:2;justify-content:space-between;align-items:center}.k-list-item .k-item-info,.k-list-item .k-item-title{flex-grow:1;line-height:1.5rem}[dir=ltr] .k-list-item .k-item-title{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-title{margin-left:.5rem}.k-list-item .k-item-title{flex-shrink:1}[dir=ltr] .k-list-item .k-item-info{text-align:right}[dir=rtl] .k-list-item .k-item-info{text-align:left}[dir=ltr] .k-list-item .k-item-info{margin-right:.5rem}[dir=rtl] .k-list-item .k-item-info{margin-left:.5rem}.k-list-item .k-item-info{flex-shrink:2;justify-self:end}.k-list-item .k-item-buttons,.k-list-item .k-item-footer{flex-shrink:0}.k-item:not(.k-list-item) .k-item-sort-handle{margin:.25rem;background:var(--color-background);box-shadow:var(--shadow-md)}[dir=ltr] .k-item:not(.k-list-item) .k-item-label{margin-left:-2px}[dir=rtl] .k-item:not(.k-list-item) .k-item-label{margin-right:-2px}.k-item:not(.k-list-item) .k-item-content{padding:.625rem .75rem}.k-cardlets-item{height:6rem;grid-template-rows:auto 38px;grid-template-areas:"content" "footer"}.k-cardlets-item[data-has-figure]{grid-template-columns:6rem auto;grid-template-areas:"figure content" "figure footer"}[dir=ltr] .k-cardlets-item .k-item-figure{border-top-left-radius:var(--rounded-sm)}[dir=rtl] .k-cardlets-item .k-item-figure{border-top-right-radius:var(--rounded-sm)}[dir=ltr] .k-cardlets-item .k-item-figure{border-bottom-left-radius:var(--rounded-sm)}[dir=rtl] .k-cardlets-item .k-item-figure{border-bottom-right-radius:var(--rounded-sm)}.k-cardlets-item .k-item-footer{padding-top:.5rem;padding-bottom:.5rem}.k-cards-item{grid-template-rows:auto auto auto;grid-template-areas:"figure" "content" "footer"}[dir=ltr] .k-cards-item .k-item-figure,[dir=rtl] .k-cards-item .k-item-figure{border-top-right-radius:var(--rounded-sm);border-top-left-radius:var(--rounded-sm)}.k-cards-item .k-item-content{overflow:hidden;align-self:center}.k-cards-item[data-has-info] .k-item-content{align-self:flex-start}.k-cards-item .k-item-info,.k-cards-item .k-item-title{white-space:normal}.k-cards-item .k-item-info{padding-top:.125rem}[dir=ltr] .k-cards-item .k-item-footer{padding-left:.7rem}[dir=rtl] .k-cards-item .k-item-footer{padding-right:.7rem}.k-cards-item .k-item-footer{width:auto}.k-cards-item:not([data-has-label]){grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"figure figure" "content footer"}[dir=ltr] .k-cards-item:not([data-has-label]) .k-item-footer{padding-left:0}[dir=rtl] .k-cards-item:not([data-has-label]) .k-item-footer{padding-right:0}.k-cards-item:not([data-has-label]) .k-item-footer{align-items:flex-end}.k-item-figure{overflow:hidden;flex-shrink:0}.k-cards-items{--min:13rem;--max:1fr;--gap:1.5rem;--column-gap:var(--gap);--row-gap:var(--gap);display:grid;grid-column-gap:var(--column-gap);grid-row-gap:var(--row-gap);grid-template-columns:repeat(auto-fill,minmax(var(--min),var(--max)))}@media screen and (min-width:30em){.k-cards-items[data-size=tiny]{--min:10rem}.k-cards-items[data-size=small]{--min:16rem}.k-cards-items[data-size=medium]{--min:24rem}.k-cards-items[data-size=huge],.k-cards-items[data-size=large],.k-column[data-width="1/4"] .k-cards-items,.k-column[data-width="1/5"] .k-cards-items,.k-column[data-width="1/6"] .k-cards-items{--min:1fr}}@media screen and (min-width:65em){.k-cards-items[data-size=large]{--min:32rem}}.k-cardlets-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));grid-gap:.5rem}.k-list-items .k-list-item:not(:last-child){margin-bottom:2px}.k-overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:var(--z-dialog);transform:translate(0)}.k-overlay[data-centered]{display:flex;align-items:center;justify-content:center}.k-overlay[data-dimmed]{background:var(--color-backdrop)}.k-overlay-loader{color:var(--color-white)}.k-panel[data-loading]{animation:LoadingCursor .5s}.k-panel[data-dragging],.k-panel[data-loading]:after{-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tabs{position:relative;background:#e9e9e9;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);border-right:1px solid var(--color-border)}.k-tabs nav{display:flex;justify-content:center;margin-left:-1px;margin-right:-1px}[dir=ltr] .k-tab-button.k-button{border-left:1px solid transparent}[dir=rtl] .k-tab-button.k-button{border-right:1px solid transparent}[dir=ltr] .k-tab-button.k-button{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button.k-button{border-left:1px solid var(--color-border)}.k-tab-button.k-button{position:relative;z-index:1;display:inline-flex;justify-content:center;align-items:center;padding:.625rem .75rem;font-size:var(--text-xs);text-transform:uppercase;text-align:center;font-weight:500;flex-grow:1;flex-shrink:1;flex-direction:column;max-width:15rem}@media screen and (min-width:30em){.k-tab-button.k-button{flex-direction:row}[dir=ltr] .k-tab-button.k-button .k-icon{margin-right:.5rem}[dir=rtl] .k-tab-button.k-button .k-icon{margin-left:.5rem}}[dir=ltr] .k-tab-button.k-button>.k-button-text{padding-left:0}[dir=rtl] .k-tab-button.k-button>.k-button-text{padding-right:0}.k-tab-button.k-button>.k-button-text{padding-top:.375rem;font-size:10px;overflow:hidden;max-width:10rem;text-overflow:ellipsis;opacity:1}@media screen and (min-width:30em){.k-tab-button.k-button>.k-button-text{font-size:var(--text-xs);padding-top:0}}[dir=ltr] .k-tab-button:last-child{border-right:1px solid transparent}[dir=rtl] .k-tab-button:last-child{border-left:1px solid transparent}[dir=ltr] .k-tab-button[aria-current]{border-right:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]{border-left:1px solid var(--color-border)}.k-tab-button[aria-current]{position:relative;background:var(--color-background);pointer-events:none}[dir=ltr] .k-tab-button[aria-current]:first-child{border-left:1px solid var(--color-border)}[dir=rtl] .k-tab-button[aria-current]:first-child{border-right:1px solid var(--color-border)}.k-tab-button[aria-current]:after,.k-tab-button[aria-current]:before{position:absolute;content:""}.k-tab-button[aria-current]:before{left:-1px;right:-1px;top:-1px;height:2px;background:var(--color-black)}.k-tab-button[aria-current]:after{left:0;right:0;bottom:-1px;height:1px;background:var(--color-background)}[dir=ltr] .k-tabs-dropdown{right:0}[dir=rtl] .k-tabs-dropdown{left:0}.k-tabs-dropdown{top:100%}[dir=ltr] .k-tabs-badge{right:2px}[dir=rtl] .k-tabs-badge{left:2px}.k-tabs-badge{position:absolute;top:3px;font-variant-numeric:tabular-nums;line-height:1.5;padding:0 .25rem;border-radius:2px;font-size:10px;box-shadow:var(--shadow-md)}.k-tabs[data-theme=notice] .k-tabs-badge{background:var(--theme-light);color:var(--color-black)}.k-view{padding-left:1.5rem;padding-right:1.5rem;margin:0 auto;max-width:100rem}@media screen and (min-width:30em){.k-view{padding-left:3rem;padding-right:3rem}}@media screen and (min-width:90em){.k-view{padding-left:6rem;padding-right:6rem}}.k-view[data-align=center]{height:100vh;display:flex;align-items:center;justify-content:center;padding:0 3rem;overflow:auto}.k-view[data-align=center]>*{flex-basis:22.5rem}.k-fatal{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--color-backdrop);display:flex;z-index:var(--z-fatal);align-items:center;justify-content:center;padding:1.5rem}.k-fatal-box{width:100%;height:100%;display:flex;flex-direction:column;color:var(--color-black);background:var(--color-red-400);box-shadow:var(--shadow-xl);border-radius:var(--rounded)}.k-fatal-box .k-headline{line-height:1;font-size:var(--text-sm);padding:.75rem}.k-fatal-box .k-button{padding:.75rem}.k-fatal-iframe{border:0;width:100%;flex-grow:1;background:var(--color-white)}.k-headline{--size:var(--text-base);font-size:var(--size);font-weight:var(--font-bold);line-height:1.5em}.k-headline[data-size=small]{--size:var(--text-sm)}.k-headline[data-size=large]{--size:var(--text-xl);font-weight:var(--font-normal)}@media screen and (min-width:65em){.k-headline[data-size=large]{--size:var(--text-2xl)}}.k-headline[data-size=huge]{--size:var(--text-2xl);line-height:1.15em}@media screen and (min-width:65em){.k-headline[data-size=huge]{--size:var(--text-3xl)}}.k-headline[data-theme]{color:var(--theme)}[dir=ltr] .k-headline abbr{padding-left:.25rem}[dir=rtl] .k-headline abbr{padding-right:.25rem}.k-headline abbr{color:var(--color-gray-500);text-decoration:none}.k-icon{--size:1rem;position:relative;line-height:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:var(--size)}.k-icon[data-size=medium]{--size:2rem}.k-icon[data-size=large]{--size:3rem}.k-icon svg{width:var(--size);height:var(--size);-moz-transform:scale(1)}.k-icon svg *{fill:currentColor}.k-icon[data-back=black]{color:var(--color-white)}.k-icon[data-back=white]{color:var(--color-gray-900)}.k-icon[data-back=pattern]{color:var(--color-white)}[data-disabled] .k-icon[data-back=pattern] svg{opacity:1}.k-icon-emoji{display:block;line-height:1;font-style:normal;font-size:var(--size)}@media only screen and (-webkit-min-device-pixel-ratio:2),not all,only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.k-icon-emoji{font-size:1.25em}}.k-icons{position:absolute;width:0;height:0}.k-image span{position:relative;display:block;line-height:0;padding-bottom:100%}.k-image img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}[dir=ltr] .k-image-error{left:50%}[dir=rtl] .k-image-error{right:50%}.k-image-error{position:absolute;top:50%;transform:translate(-50%,-50%);color:var(--color-white);font-size:.9em}.k-image-error svg *{fill:#ffffff4d}.k-image[data-cover] img{-o-object-fit:cover;object-fit:cover}.k-image[data-back=black] span{background:var(--color-gray-900)}.k-image[data-back=white] span{background:var(--color-white);color:var(--color-gray-900)}.k-image[data-back=white] .k-image-error{background:var(--color-gray-900);color:var(--color-white)}.k-image[data-back=pattern] span{background:var(--color-gray-800) var(--bg-pattern)}.k-loader{z-index:1}.k-loader-icon{animation:Spin .9s linear infinite}.k-offline-warning{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-offline);background:var(--color-backdrop);display:flex;align-items:center;justify-content:center;line-height:1}.k-offline-warning p{display:flex;align-items:center;gap:.5rem;background:var(--color-white);box-shadow:var(--shadow);padding:.75rem;border-radius:var(--rounded)}.k-offline-warning p .k-icon{color:var(--color-red-400)}.k-progress{-webkit-appearance:none;width:100%;height:.5rem;border-radius:5rem;background:var(--color-border);overflow:hidden;border:0}.k-progress::-webkit-progress-bar{border:0;background:var(--color-border);height:.5rem;border-radius:20px}.k-progress::-webkit-progress-value{border-radius:inherit;background:var(--color-focus);-webkit-transition:width .3s;transition:width .3s}.k-progress::-moz-progress-bar{border-radius:inherit;background:var(--color-focus);-moz-transition:width .3s;transition:width .3s}[dir=ltr] .k-registration,[dir=ltr] .k-registration p{margin-right:1rem}[dir=rtl] .k-registration,[dir=rtl] .k-registration p{margin-left:1rem}.k-registration{display:flex;align-items:center}.k-registration p{color:var(--color-negative-light);font-size:var(--text-sm);font-weight:600}@media screen and (max-width:90em){.k-registration p{display:none}}.k-registration .k-button{color:var(--color-white)}.k-sort-handle{cursor:move;cursor:grab;cursor:-webkit-grab;color:var(--color-gray-900);justify-content:center;align-items:center;line-height:0;width:2rem;height:2rem;display:flex;will-change:opacity,color;transition:opacity .3s;z-index:1}.k-sort-handle svg{width:1rem;height:1rem}.k-sort-handle:active{cursor:grabbing;cursor:-webkit-grabbing}.k-status-icon svg{width:14px;height:14px}.k-status-icon .k-icon{color:var(--theme-light)}.k-status-icon .k-button-text{color:var(--color-black)}.k-status-icon[data-disabled]{opacity:1!important}.k-status-icon[data-disabled] .k-icon{color:var(--color-gray-400);opacity:.5}.k-text{line-height:1.5em}[dir=ltr] .k-text ol,[dir=ltr] .k-text ul{margin-left:1rem}[dir=rtl] .k-text ol,[dir=rtl] .k-text ul{margin-right:1rem}.k-text li{list-style:inherit}.k-text p,.k-text>ol,.k-text>ul{margin-bottom:1.5em}.k-text a{text-decoration:underline}.k-text>:last-child{margin-bottom:0}.k-text[data-size=tiny]{font-size:var(--text-xs)}.k-text[data-size=small]{font-size:var(--text-sm)}.k-text[data-size=medium]{font-size:var(--text-base)}.k-text[data-size=large]{font-size:var(--text-xl)}.k-text[data-align]{text-align:var(--align)}.k-text[data-theme=help]{font-size:var(--text-sm);color:var(--color-gray-600);line-height:1.25rem}.k-dialog-body .k-text{word-wrap:break-word}.k-user-info{display:flex;align-items:center;line-height:1;font-size:var(--text-sm)}[dir=ltr] .k-user-info .k-image{margin-right:.75rem}[dir=rtl] .k-user-info .k-image{margin-left:.75rem}.k-user-info .k-image{width:1.5rem}[dir=ltr] .k-user-info .k-icon{margin-right:.75rem}[dir=rtl] .k-user-info .k-icon{margin-left:.75rem}.k-user-info .k-icon{width:1.5rem;height:1.5rem;background:var(--color-black);color:var(--color-white)}.k-breadcrumb{padding-left:.5rem;padding-right:.5rem}.k-breadcrumb-dropdown{height:2.5rem;width:2.5rem;display:flex;align-items:center;justify-content:center}.k-breadcrumb ol{display:none;align-items:center}@media screen and (min-width:30em){.k-breadcrumb ol{display:flex}.k-breadcrumb-dropdown{display:none}}.k-breadcrumb li,.k-breadcrumb-link{display:flex;align-items:center;min-width:0}.k-breadcrumb-link{font-size:var(--text-sm);align-self:stretch;padding-top:.625rem;padding-bottom:.625rem;line-height:1.25rem}.k-breadcrumb li{flex-shrink:3}.k-breadcrumb li:last-child{flex-shrink:1}.k-breadcrumb li:not(:last-child):after{content:"/";padding-left:.5rem;padding-right:.5rem;opacity:.5;flex-shrink:0}.k-breadcrumb li:not(:first-child):not(:last-child){max-width:15vw}[dir=ltr] .k-breadcrumb-icon{margin-right:.5rem}[dir=rtl] .k-breadcrumb-icon{margin-left:.5rem}.k-breadcrumb-link-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}button{line-height:inherit;border:0;font-family:var(--font-sans);font-size:1rem;color:currentColor;background:0 0;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}.k-button{display:inline-block;position:relative;font-size:var(--text-sm);transition:color .3s;outline:0}.k-button:focus,.k-button:hover{outline:0}.k-button *{vertical-align:middle}.k-button[data-responsive] .k-button-text{display:none}@media screen and (min-width:30em){.k-button[data-responsive] .k-button-text{display:inline}}.k-button[data-theme]{color:var(--theme)}.k-button-icon{display:inline-flex;align-items:center;line-height:0}[dir=ltr] .k-button-icon~.k-button-text{padding-left:.5rem}[dir=rtl] .k-button-icon~.k-button-text{padding-right:.5rem}.k-button-text{opacity:.75}.k-button:focus .k-button-text,.k-button:hover .k-button-text{opacity:1}.k-button-text b,.k-button-text span{vertical-align:baseline}.k-button[data-disabled]{opacity:.5;pointer-events:none;cursor:default}.k-card-options>.k-button[data-disabled]{display:inline-flex}.k-button-group{--padding-x:.75rem;--padding-y:1rem;--line-height:1rem;font-size:0;margin:0 calc(var(--padding-x)*-1)}.k-button-group>.k-dropdown{height:calc(var(--line-height) + (var(--padding-y)*2));display:inline-block}.k-button-group>.k-button,.k-button-group>.k-dropdown>.k-button{padding:var(--padding-y) var(--padding-x);line-height:var(--line-height)}.k-button-group .k-dropdown-content{top:calc(100% + 1px);margin:0 var(--padding-x)}.k-dropdown{position:relative}[dir=ltr] .k-dropdown-content{text-align:left}[dir=rtl] .k-dropdown-content{text-align:right}.k-dropdown-content{position:absolute;top:100%;background:var(--color-black);color:var(--color-white);z-index:var(--z-dropdown);box-shadow:var(--shadow-lg);border-radius:var(--rounded-xs);margin-bottom:6rem}[dir=ltr] .k-dropdown-content[data-align=left]{left:0}[dir=ltr] .k-dropdown-content[data-align=right],[dir=rtl] .k-dropdown-content[data-align=left]{right:0}[dir=rtl] .k-dropdown-content[data-align=right]{left:0}.k-dropdown-content>.k-dropdown-item:first-child{margin-top:.5rem}.k-dropdown-content>.k-dropdown-item:last-child{margin-bottom:.5rem}.k-dropdown-content[data-dropup]{top:auto;bottom:100%;margin-bottom:.5rem}.k-dropdown-content hr{border-color:currentColor;opacity:.2;margin:.5rem 1rem}.k-dropdown-content[data-theme=light]{background:var(--color-white);color:var(--color-black)}.k-dropdown-item{white-space:nowrap;line-height:1;display:flex;width:100%;align-items:center;font-size:var(--text-sm);padding:6px 16px}.k-dropdown-item:focus{outline:0;box-shadow:var(--shadow-outline)}[dir=ltr] .k-dropdown-item .k-button-figure{padding-right:.5rem}[dir=rtl] .k-dropdown-item .k-button-figure{padding-left:.5rem}.k-dropdown-item .k-button-figure{text-align:center}.k-link{outline:0}.k-options-dropdown,.k-options-dropdown-toggle{display:flex;justify-content:center;align-items:center;height:38px}.k-options-dropdown-toggle{min-width:38px;padding:0 .75rem}.k-pagination{-webkit-user-select:none;-moz-user-select:none;user-select:none;direction:ltr}.k-pagination .k-button{padding:1rem}.k-pagination-details{white-space:nowrap}.k-pagination>span{font-size:var(--text-sm)}.k-pagination[data-align]{text-align:var(--align)}[dir=ltr] .k-dropdown-content.k-pagination-selector{left:50%}[dir=rtl] .k-dropdown-content.k-pagination-selector{right:50%}.k-dropdown-content.k-pagination-selector{position:absolute;top:100%;transform:translate(-50%);background:var(--color-black)}[dir=ltr] .k-dropdown-content.k-pagination-selector{direction:ltr}[dir=rtl] .k-dropdown-content.k-pagination-selector{direction:rtl}.k-pagination-settings{display:flex;align-items:center;justify-content:space-between}.k-pagination-settings .k-button{line-height:1}[dir=ltr] .k-pagination-settings label{border-right:1px solid rgba(255,255,255,.35)}[dir=rtl] .k-pagination-settings label{border-left:1px solid rgba(255,255,255,.35)}.k-pagination-settings label{display:flex;align-items:center;padding:.625rem 1rem;font-size:var(--text-xs)}[dir=ltr] .k-pagination-settings label span{margin-right:.5rem}[dir=rtl] .k-pagination-settings label span{margin-left:.5rem}.k-prev-next{direction:ltr}.k-search{max-width:30rem;margin:2.5rem auto;box-shadow:var(--shadow-lg)}.k-search-input{background:var(--color-light);display:flex}.k-search-types{flex-shrink:0;display:flex}[dir=ltr] .k-search-types>.k-button{padding-left:1rem}[dir=rtl] .k-search-types>.k-button{padding-right:1rem}.k-search-types>.k-button{font-size:var(--text-base);line-height:1;height:2.5rem}.k-search-types>.k-button .k-icon{height:2.5rem}.k-search-types>.k-button .k-button-text{opacity:1;font-weight:500}.k-search-input input{background:0 0;flex-grow:1;font:inherit;padding:.75rem;border:0;height:2.5rem}.k-search-close{width:3rem;line-height:1}.k-search-close .k-icon-loader{animation:Spin 2s linear infinite}.k-search input:focus{outline:0}.k-search-results{padding:.5rem 1rem 1rem;background:var(--color-light)}.k-search .k-item:not(:last-child){margin-bottom:.25rem}.k-search .k-item[data-selected]{outline:2px solid var(--color-focus)}.k-search .k-item-info,.k-search-empty{font-size:var(--text-xs)}.k-search-empty{text-align:center;color:var(--color-gray-600)}.k-tag{position:relative;font-size:var(--text-sm);line-height:1;cursor:pointer;background-color:var(--color-gray-900);color:var(--color-light);border-radius:var(--rounded-sm);display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.k-tag:focus{outline:0;background-color:var(--color-focus);color:#fff}.k-tag-text{padding:.3rem .75rem .375rem;line-height:var(--leading-tight)}[dir=ltr] .k-tag-toggle{border-left:1px solid rgba(255,255,255,.15)}[dir=rtl] .k-tag-toggle{border-right:1px solid rgba(255,255,255,.15)}.k-tag-toggle{color:#ffffffb3;width:1.75rem;height:100%;display:flex;flex-shrink:0;align-items:center;justify-content:center}.k-tag-toggle:hover{background:rgba(255,255,255,.2);color:#fff}[data-disabled] .k-tag{background-color:var(--color-gray-600)}[data-disabled] .k-tag .k-tag-toggle{display:none}.k-topbar{--bg:var(--color-gray-900);position:relative;color:var(--color-white);flex-shrink:0;height:2.5rem;line-height:1;background:var(--bg)}.k-topbar-wrapper{position:relative;display:flex;align-items:center;margin-left:-.75rem;margin-right:-.75rem}[dir=ltr] .k-topbar-wrapper:after{left:100%}[dir=rtl] .k-topbar-wrapper:after{right:100%}.k-topbar-wrapper:after{position:absolute;content:"";height:2.5rem;background:var(--bg);width:3rem}.k-topbar-menu{flex-shrink:0}.k-topbar-menu ul{padding:.5rem 0}.k-topbar .k-button[data-theme]{color:var(--theme-light)}.k-topbar .k-button-text{opacity:1}.k-topbar-menu-button{display:flex;align-items:center}.k-topbar-menu .k-link[aria-current]{color:var(--color-focus);font-weight:500}.k-topbar-button{padding:.75rem;line-height:1;font-size:var(--text-sm)}.k-topbar-button .k-button-text{display:flex}[dir=ltr] .k-topbar-view-button{padding-right:0}[dir=rtl] .k-topbar-view-button{padding-left:0}.k-topbar-view-button{flex-shrink:0;display:flex;align-items:center}[dir=ltr] .k-topbar-view-button .k-icon{margin-right:.5rem}[dir=rtl] .k-topbar-view-button .k-icon{margin-left:.5rem}[dir=ltr] .k-topbar-signals{right:0}[dir=rtl] .k-topbar-signals{left:0}.k-topbar-signals{position:absolute;top:0;background:var(--bg);height:2.5rem;display:flex;align-items:center}.k-topbar-signals:before{position:absolute;content:"";top:-.5rem;bottom:0;width:.5rem;background:-webkit-linear-gradient(inline-start,rgba(17,17,17,0),#111)}.k-topbar-signals .k-button{line-height:1}.k-topbar-notification{font-weight:var(--font-bold);line-height:1;display:flex}@media screen and (max-width:30em){.k-topbar .k-button[data-theme=negative] .k-button-text{display:none}}.k-section,.k-sections{padding-bottom:3rem}.k-section-header{position:relative;display:flex;align-items:baseline;z-index:1}.k-section-header .k-headline{line-height:1.25rem;padding-bottom:.75rem;min-height:2rem}[dir=ltr] .k-section-header .k-button-group{right:0}[dir=rtl] .k-section-header .k-button-group{left:0}.k-section-header .k-button-group{position:absolute;top:-.875rem}.k-info-section-headline{margin-bottom:.5rem}.k-pages-section[data-processing]{pointer-events:none}.k-files-section[data-processing]{pointer-events:none}.k-fields-issue-headline{margin-bottom:.5rem}.k-fields-section input[type=submit]{display:none}[data-locked] .k-fields-section{opacity:.2;pointer-events:none}.k-user-profile{background:var(--color-white)}.k-user-profile>.k-view{padding-top:3rem;padding-bottom:3rem;display:flex;align-items:center;line-height:0}[dir=ltr] .k-user-profile .k-button-group{margin-left:.75rem}[dir=rtl] .k-user-profile .k-button-group{margin-right:.75rem}.k-user-profile .k-button-group{overflow:hidden}.k-user-profile .k-button-group .k-button{display:block;padding-top:.25rem;padding-bottom:.25rem;overflow:hidden;white-space:nowrap}.k-user-view-image .k-icon,.k-user-view-image .k-image{width:5rem;height:5rem;line-height:0}.k-user-view-image[data-disabled]{opacity:1}.k-user-view-image .k-image{display:block}.k-user-view-image .k-button-text{opacity:1}.k-user-name-placeholder{color:var(--color-gray-500);transition:color .3s}.k-header[data-editable] .k-user-name-placeholder:hover{color:var(--color-gray-900)}.k-error-view{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}.k-error-view-content{line-height:1.5em;max-width:25rem;text-align:center}.k-error-view-icon{color:var(--color-negative);display:inline-block}.k-error-view-content p:not(:last-child){margin-bottom:.75rem}.k-installation-view .k-button{display:block;margin-top:1.5rem}.k-installation-view .k-headline{margin-bottom:.75rem}.k-installation-issues{line-height:1.5em;font-size:var(--text-sm)}[dir=ltr] .k-installation-issues li{padding-left:3.5rem}[dir=rtl] .k-installation-issues li{padding-right:3.5rem}.k-installation-issues li{position:relative;padding:1.5rem;background:var(--color-white)}[dir=ltr] .k-installation-issues .k-icon{left:1.5rem}[dir=rtl] .k-installation-issues .k-icon{right:1.5rem}.k-installation-issues .k-icon{position:absolute;top:calc(1.5rem + 2px)}.k-installation-issues .k-icon svg *{fill:var(--color-negative)}.k-installation-issues li:not(:last-child){margin-bottom:2px}.k-installation-issues li code{font:inherit;color:var(--color-negative)}[dir=ltr] .k-installation-view .k-button[type=submit]{margin-left:-1rem}[dir=rtl] .k-installation-view .k-button[type=submit]{margin-right:-1rem}.k-installation-view .k-button[type=submit]{padding:1rem}.k-languages-view .k-header{margin-bottom:1.5rem}.k-languages-view-section-header{margin-bottom:.5rem}.k-languages-view-section{margin-bottom:3rem}.k-login-fields{position:relative}[dir=ltr] .k-login-toggler{right:0}[dir=rtl] .k-login-toggler{left:0}.k-login-toggler{position:absolute;top:0;z-index:1;text-decoration:underline;font-size:.875rem}.k-login-form label abbr{visibility:hidden}.k-login-buttons{display:flex;align-items:center;justify-content:flex-end;padding:1.5rem 0}[dir=ltr] .k-login-button{margin-right:-1rem}[dir=rtl] .k-login-button{margin-left:-1rem}.k-login-button{padding:.5rem 1rem;font-weight:500;transition:opacity .3s}.k-login-button span{opacity:1}.k-login-button[disabled]{opacity:.25}.k-login-back-button,.k-login-checkbox{display:flex;align-items:center;flex-grow:1}[dir=ltr] .k-login-back-button{margin-left:-1rem}[dir=rtl] .k-login-back-button{margin-right:-1rem}.k-login-checkbox{padding:.5rem 0;font-size:var(--text-sm);cursor:pointer}.k-login-checkbox .k-checkbox-text{opacity:.75;transition:opacity .3s}.k-login-checkbox:focus span,.k-login-checkbox:hover span{opacity:1}.k-password-reset-view .k-user-info{height:38px;margin-bottom:2.25rem;padding:.5rem;background:var(--color-white);border-radius:var(--rounded-xs);box-shadow:var(--shadow)}.k-system-view .k-header{margin-bottom:1.5rem}.k-system-view-section-header{margin-bottom:.5rem}.k-system-view-section{margin-bottom:3rem}.k-system-info-box{display:grid;grid-gap:1px;font-size:var(--text-sm)}@media screen and (min-width:45rem){.k-system-info-box{grid-template-columns:repeat(var(--columns),1fr)}}.k-system-info-box li,.k-system-plugins td,.k-system-plugins th{padding:.75rem;background:var(--color-white)}.k-system-info-box dt{font-size:var(--text-sm);color:var(--color-gray-600);margin-bottom:.25rem}.k-system-warning{color:var(--color-negative);font-weight:var(--font-bold);display:inline-flex}.k-system-warning .k-button-text{opacity:1}.k-system-plugins{width:100%;font-variant-numeric:tabular-nums;table-layout:fixed;border-spacing:1px}.k-system-plugins td,.k-system-plugins th{text-align:left;font-weight:var(--font-normal);font-size:var(--text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.k-system-plugins .desk{display:none}@media screen and (min-width:45rem){.k-system-plugins .desk{display:table-cell}}.k-system-plugins th{color:var(--color-gray-600)}.k-block-type-code-editor{position:relative;font-size:var(--text-sm);line-height:1.5em;background:#000;border-radius:var(--rounded);padding:.5rem .75rem 3rem;color:#fff;font-family:var(--font-mono)}.k-block-type-code-editor .k-editor{white-space:pre-wrap;line-height:1.75em}[dir=ltr] .k-block-type-code-editor-language{right:0}[dir=ltr] .k-block-type-code-editor-language .k-icon,[dir=rtl] .k-block-type-code-editor-language{left:0}.k-block-type-code-editor-language{font-size:var(--text-sm);position:absolute;bottom:0}[dir=rtl] .k-block-type-code-editor-language .k-icon{right:0}.k-block-type-code-editor-language .k-icon{position:absolute;top:0;height:1.5rem;display:flex;width:2rem;z-index:0}.k-block-type-code-editor-language .k-select-input{position:relative;padding:.325rem .75rem .5rem 2rem;z-index:1;font-size:var(--text-xs)}.k-block-type-default .k-block-title{line-height:1.5em}.k-block-type-gallery ul{display:grid;grid-gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(6rem,1fr));line-height:0;align-items:center;justify-content:center;cursor:pointer}.k-block-type-gallery li:empty{padding-bottom:100%;background:var(--color-background)}.k-block-type-gallery li{display:flex;position:relative;align-items:center;justify-content:center}.k-block-type-gallery li img{flex-grow:1;max-width:100%}.k-block-type-heading-input{line-height:1.25em;font-weight:var(--font-bold)}.k-block-type-heading-input[data-level=h1]{font-size:var(--text-3xl);line-height:1.125em}.k-block-type-heading-input[data-level=h2]{font-size:var(--text-2xl)}.k-block-type-heading-input[data-level=h3]{font-size:var(--text-xl)}.k-block-type-heading-input[data-level=h4]{font-size:var(--text-lg)}.k-block-type-heading-input[data-level=h5]{line-height:1.5em;font-size:var(--text-base)}.k-block-type-heading-input[data-level=h6]{line-height:1.5em;font-size:var(--text-sm)}.k-block-type-heading-input .ProseMirror strong{font-weight:700}.k-block-type-image .k-block-figure-container{display:block;text-align:center;line-height:0}.k-block-type-image-auto{max-width:100%;max-height:30rem}.k-block-type-line hr{margin-top:.75rem;margin-bottom:.75rem;border:0;border-top:2px solid var(--color-gray-400)}.k-block-type-markdown-input{position:relative;font-size:var(--text-sm);line-height:1.5em;background:var(--color-background);border-radius:var(--rounded);padding:.5rem .5rem 0;font-family:var(--font-mono)}[dir=ltr] .k-block-type-quote-editor{padding-left:1rem}[dir=rtl] .k-block-type-quote-editor{padding-right:1rem}[dir=ltr] .k-block-type-quote-editor{border-left:2px solid var(--color-black)}[dir=rtl] .k-block-type-quote-editor{border-right:2px solid var(--color-black)}.k-block-type-quote-text{font-size:var(--text-xl);margin-bottom:.25rem;line-height:1.25em}.k-block-type-quote-citation{font-style:italic;font-size:var(--text-sm);color:var(--color-gray-600)}.k-block-type-table-preview{cursor:pointer;width:100%;border:1px solid var(--color-gray-300);border-spacing:0;border-radius:var(--rounded-sm);overflow:hidden;table-layout:fixed}[dir=ltr] .k-block-type-table-preview td,[dir=ltr] .k-block-type-table-preview th{text-align:left}[dir=rtl] .k-block-type-table-preview td,[dir=rtl] .k-block-type-table-preview th{text-align:right}.k-block-type-table-preview td{font-size:var(--text-sm)}.k-block-type-table-preview td,.k-block-type-table-preview th{line-height:1.5em;padding:.5rem .75rem}.k-block-type-table-preview th,.k-block-type-table-preview tr:not(:last-child) td{border-bottom:1px solid var(--color-gray-300)}.k-block-type-table-preview th{background:var(--color-gray-100);font-family:var(--font-mono);font-size:var(--text-xs)}.k-block-type-table-preview-empty{color:var(--color-gray-600);font-size:var(--text-sm)}.k-block-type-table-preview [data-align]{text-align:var(--align)}.k-block-type-text-input{font-size:var(--text-base);line-height:1.5em;height:100%}.k-block-container-type-text,.k-block-type-text,.k-block-type-text .k-writer .ProseMirror{height:100%}.k-block-container{position:relative;padding:.75rem;background:var(--color-white)}.k-block-container:not(:last-of-type){border-bottom:1px dashed rgba(0,0,0,.1)}.k-block-container:focus{outline:0}.k-block-container[data-batched],.k-block-container[data-selected]{z-index:2;border-bottom-color:transparent}.k-block-container[data-batched]:after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";background:rgba(238,242,246,.375);mix-blend-mode:multiply;border:1px solid var(--color-focus)}.k-block-container[data-selected]{box-shadow:var(--color-focus) 0 0 0 1px,var(--color-focus-outline) 0 0 0 3px}[dir=ltr] .k-block-container .k-block-options{right:.75rem}[dir=rtl] .k-block-container .k-block-options{left:.75rem}.k-block-container .k-block-options{display:none;position:absolute;top:0;margin-top:calc(-1.75rem + 2px)}.k-block-container[data-last-in-batch] .k-block-options,.k-block-container[data-selected] .k-block-options{display:flex}.k-block-container[data-hidden] .k-block{opacity:.25}.k-drawer-options .k-button[data-disabled]{vertical-align:middle;display:inline-grid}[data-disabled] .k-block-container{background:var(--color-background)}.k-block-importer.k-dialog{background:#313740;color:var(--color-white)}.k-block-importer .k-dialog-body{padding:0}.k-block-importer label{display:block;padding:var(--spacing-6) var(--spacing-6) 0;color:var(--color-gray-400)}.k-block-importer label kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}.k-block-importer textarea{width:100%;height:20rem;background:0 0;font:inherit;color:var(--color-white);border:0;padding:var(--spacing-6);resize:none}.k-block-importer textarea:focus{outline:0}.k-blocks{background:var(--color-white);box-shadow:var(--shadow)}[data-disabled] .k-blocks{background:var(--color-background)}.k-blocks[data-multi-select-key] .k-block-container>*{pointer-events:none}.k-blocks[data-empty]{padding:0;background:0 0;box-shadow:none}.k-blocks .k-sortable-ghost{outline:2px solid var(--color-focus);box-shadow:#11111140 0 5px 10px;cursor:grabbing;cursor:-webkit-grabbing}.k-blocks-list>.k-blocks-empty{display:flex;align-items:center}.k-blocks-list>.k-blocks-empty:not(:only-child){display:none}.k-block-figure{cursor:pointer}.k-block-figure iframe{border:0;pointer-events:none;background:var(--color-black)}.k-block-figure figcaption{padding-top:.5rem;color:var(--color-gray-600);font-size:var(--text-sm);text-align:center}.k-block-figure-empty.k-button{display:flex;width:100%;height:6rem;border-radius:var(--rounded-sm);align-items:center;justify-content:center;color:var(--color-gray-600);background:var(--color-background)}.k-block-options{display:flex;align-items:center;background:var(--color-white);z-index:var(--z-dropdown);box-shadow:#0000001a -2px 0 5px,var(--shadow),var(--shadow-xl);color:var(--color-black);border-radius:var(--rounded)}[dir=ltr] .k-block-options-button{border-right:1px solid var(--color-background)}[dir=rtl] .k-block-options-button{border-left:1px solid var(--color-background)}.k-block-options-button{--block-options-button-size:30px;width:var(--block-options-button-size);height:var(--block-options-button-size);line-height:1;display:inline-flex;align-items:center;justify-content:center}[dir=ltr] .k-block-options-button:first-child{border-top-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-top-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:first-child{border-bottom-left-radius:var(--rounded)}[dir=rtl] .k-block-options-button:first-child{border-bottom-right-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-top-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-top-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-child{border-bottom-right-radius:var(--rounded)}[dir=rtl] .k-block-options-button:last-child{border-bottom-left-radius:var(--rounded)}[dir=ltr] .k-block-options-button:last-of-type{border-right:0}[dir=rtl] .k-block-options-button:last-of-type{border-left:0}.k-block-options-button[aria-current]{color:var(--color-focus)}.k-block-options-button:hover{background:var(--color-gray-100)}.k-block-options .k-dropdown-content{margin-top:.5rem}.k-block-selector.k-dialog{background:var(--color-dark);color:var(--color-white)}.k-block-selector .k-headline{margin-bottom:1rem}.k-block-selector details:not(:last-of-type){margin-bottom:1.5rem}.k-block-selector summary{font-size:var(--text-xs);cursor:pointer;color:var(--color-gray-400)}.k-block-selector details:only-of-type summary{pointer-events:none}.k-block-selector summary:focus{outline:0}.k-block-selector summary:focus-visible{color:var(--color-green-400)}.k-block-types{display:grid;grid-gap:2px;margin-top:.75rem;grid-template-columns:repeat(1,1fr)}[dir=ltr] .k-block-types .k-button{text-align:left}[dir=rtl] .k-block-types .k-button{text-align:right}.k-block-types .k-button{display:flex;align-items:flex-start;background:rgba(0,0,0,.5);width:100%;padding:0 .75rem 0 0;line-height:1.5em}.k-block-types .k-button:focus{outline:2px solid var(--color-green-300)}.k-block-types .k-button .k-button-text{padding:.5rem 0 .5rem .5rem}.k-block-types .k-button .k-icon{width:38px;height:38px}.k-clipboard-hint{padding-top:1.5rem;font-size:var(--text-xs);color:var(--color-gray-400)}.k-clipboard-hint kbd{background:rgba(0,0,0,.5);font-family:var(--font-mono);letter-spacing:.1em;padding:.25rem;border-radius:var(--rounded);margin:0 .25rem}[dir=ltr] .k-block-title{padding-right:.75rem}[dir=rtl] .k-block-title{padding-left:.75rem}.k-block-title{display:flex;align-items:center;min-width:0;font-size:var(--text-sm);line-height:1}[dir=ltr] .k-block-icon{margin-right:.5rem}[dir=rtl] .k-block-icon{margin-left:.5rem}.k-block-icon{width:1rem;color:var(--color-gray-500)}[dir=ltr] .k-block-name{margin-right:.5rem}[dir=rtl] .k-block-name{margin-left:.5rem}.k-block-label{color:var(--color-gray-600);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-align=left]{--align:start}[data-align=center]{--align:center}[data-align=right]{--align:end}[data-invalid]{border:1px solid var(--color-negative-outline);box-shadow:var(--color-negative-outline) 0 0 3px 2px}[data-invalid]:focus-within{border:var(--field-input-invalid-focus-border)!important;box-shadow:var(--color-negative-outline) 0 0 0 2px!important}[data-tabbed]{box-shadow:var(--shadow-outline)}[data-theme=positive],[data-theme=success]{--theme:var(--color-positive);--theme-light:var(--color-positive-light);--theme-bg:var(--color-green-300)}[data-theme=error],[data-theme=negative]{--theme:var(--color-negative);--theme-light:var(--color-negative-light);--theme-bg:var(--color-red-300)}[data-theme=notice]{--theme:var(--color-notice);--theme-light:var(--color-notice-light);--theme-bg:var(--color-orange-300)}[data-theme=info]{--theme:var(--color-focus);--theme-light:var(--color-focus-light);--theme-bg:var(--color-blue-200)}.scroll-x,.scroll-x-auto,.scroll-y,.scroll-y-auto{-webkit-overflow-scrolling:touch;transform:translate(0)}.scroll-x,.scroll-x-auto{overflow-x:scroll;overflow-y:hidden}.scroll-x-auto{overflow-x:auto}.scroll-y,.scroll-y-auto{overflow-x:hidden;overflow-y:scroll}.scroll-y-auto{overflow-y:auto}.k-offscreen,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0} diff --git a/kirby/panel/dist/img/icons.svg b/kirby/panel/dist/img/icons.svg old mode 100644 new mode 100755 index 34bb1f0..e536a03 --- a/kirby/panel/dist/img/icons.svg +++ b/kirby/panel/dist/img/icons.svg @@ -27,6 +27,9 @@ + + + @@ -130,9 +133,21 @@ + + + + + + + + + + + + @@ -224,21 +239,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -251,10 +356,21 @@ + + + + + + + + + + + @@ -303,30 +419,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -350,6 +522,14 @@ + + + + + + + + @@ -357,21 +537,58 @@ + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,8 +597,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kirby/panel/dist/js/app.js b/kirby/panel/dist/js/app.js deleted file mode 100644 index 6ff15a9..0000000 --- a/kirby/panel/dist/js/app.js +++ /dev/null @@ -1 +0,0 @@ -(function(t){function e(e){for(var i,r,o=e[0],l=e[1],c=e[2],d=0,p=[];d{this.$events.$emit(t)})),!1!==Object.prototype.hasOwnProperty.call(t,"emit")&&!1===t.emit||this.$emit("success")}}},f={mixins:[m],data(){return{registration:{license:null,email:null}}},computed:{fields(){return{license:{label:this.$t("license.register.label"),type:"text",required:!0,counter:!1,placeholder:"K3-",help:this.$t("license.register.help")},email:{label:this.$t("email"),type:"email",required:!0,counter:!1}}}},methods:{async submit(){try{await this.$api.system.register(this.registration),this.$store.dispatch("system/register",this.registration.license),this.success({message:this.$t("license.register.success")})}catch(t){this.$refs.dialog.error(t.message)}}}},g=f,b=Object(c["a"])(g,p,h,!1,null,null,null),k=b.exports;const v=window.panel||{},$={assets:"@/assets",api:"/api",site:Object({NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_DEV_SERVER,url:"/",debug:!0,translation:"en",search:{limit:10}};var y,_,w,x,O={...$,...v},C=t=>{const e=async({endpoint:e,query:s,limit:i,fields:n,map:a})=>{const r=await t.$api.get(e,{q:s,limit:i||10,select:["id",...n,"panelIcon","panelImage"]});return r.data.map(t=>({id:t.id,icon:{...t.panelIcon,back:"black",color:"#fff"},image:{...t.panelImage,back:"pattern",cover:!0},...a(t)}))};return{pages:{label:t.$t("pages"),icon:"page",search:async s=>e({...s,endpoint:"site/search",fields:["title"],map:e=>({title:e.title,link:t.$api.pages.link(e.id),info:e.id})})},files:{label:t.$t("files"),icon:"image",search:async s=>e({...s,endpoint:"files/search",fields:["filename","parent"],map:e=>({title:e.filename,link:t.$api.files.link(t.$api.pages.url(e.parent.id),e.filename),info:e.id})})},users:{label:t.$t("users"),icon:"users",search:async s=>e({...s,endpoint:"users/search",fields:["name","email"],map:e=>({title:e.name||e.email,link:t.$api.users.link(e.id),info:e.email,icon:{back:"black",type:"user"}})})}}},S={name:"App",components:{"k-icons":d,"k-registration":k},data(){return{offline:!1,dragging:!1,debug:O.debug}},computed:{inside(){return!(this.$route.meta.outside||!this.$store.state.user.current)},defaultTranslation(){return!!this.$store.state.languages.current&&this.$store.state.languages.current===this.$store.state.languages.default},fatal(){return this.$store.state.fatal},searchType(){return"users"===this.$store.state.view?"users":"pages"},searchTypes(){return C(this)},translation(){return!!this.$store.state.languages.current&&this.$store.state.languages.current.code}},watch:{fatal(t){null!==t&&this.$nextTick(()=>{try{let e=this.$refs.fatal.contentWindow.document;e.open(),e.write(t),e.close()}catch(e){console.error(e)}})}},created(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline),this.$events.$on("drop",this.drop)},destroyed(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline),this.$events.$off("drop",this.drop)},methods:{drop(){this.$store.dispatch("drag",null)},isOnline(){this.offline=!1},isOffline(){!1===this.$store.state.system.info.isLocal&&(this.offline=!0)}}},E=S,j=(s("5c0b"),Object(c["a"])(E,i,n,!1,null,null,null)),T=j.exports,L=t=>({async login(e){const s={long:e.remember||!1,email:e.email,password:e.password};return await t.post("auth/login",s)},async logout(){return t.post("auth/logout")},async user(e){return t.get("auth",e)},async verifyCode(e){return await t.post("auth/code",{code:e})}}),I=s("a026"),A=t=>({breadcrumb(e,s){let i=null,n=[];switch(s){case"UserFile":n.push({label:e.parent.username,link:t.users.link(e.parent.id)}),i="users/"+e.parent.id;break;case"SiteFile":i="site";break;case"PageFile":n=e.parents.map(e=>({label:e.title,link:t.pages.link(e.id)})),i=t.pages.url(e.parent.id);break}return n.push({label:e.filename,link:this.link(i,e.filename)}),n},async changeName(e,s,i){return t.patch(e+"/files/"+s+"/name",{name:i})},async delete(e,s){return t.delete(e+"/files/"+s)},async get(e,s,i){let n=await t.get(e+"/files/"+s,i);return!0===Array.isArray(n.content)&&(n.content={}),n},link(t,e,s){return"/"+this.url(t,e,s)},async options(e,s,i,n=!0){const a=await t.get(this.url(e,s),{select:"options"}),r=a.options;let o=[];return"list"===i&&(o.push({click:"download",icon:"open",text:I["a"].i18n.translate("open")}),o.push("-")),o.push({click:"rename",icon:"title",text:I["a"].i18n.translate("rename"),disabled:!r.changeName}),o.push({click:"replace",icon:"upload",text:I["a"].i18n.translate("replace"),disabled:!r.replace}),"list"===i&&(o.push("-"),o.push({click:"sort",icon:"sort",text:I["a"].i18n.translate("file.sort"),disabled:!(r.update&&n)})),o.push("-"),o.push({click:"remove",icon:"trash",text:I["a"].i18n.translate("delete"),disabled:!r.delete}),o},async update(e,s,i){return t.patch(e+"/files/"+s,i)},url(t,e,s){let i=t+"/files/"+e;return s&&(i+="/"+s),i}}),B=t=>({async create(e){return await t.post("languages",e)},async delete(e){return t.delete("languages/"+e)},async get(e){return await t.get("languages/"+e)},async list(){return await t.get("languages")},async update(e,s){return t.patch("languages/"+e,s)}}),M=t=>({async blueprint(e){return t.get("pages/"+this.id(e)+"/blueprint")},async blueprints(e,s){return t.get("pages/"+this.id(e)+"/blueprints",{section:s})},breadcrumb(t,e=!0){var s=t.parents.map(t=>({label:t.title,link:this.link(t.id)}));return!0===e&&s.push({label:t.title,link:this.link(t.id)}),s},async changeSlug(e,s){return t.patch("pages/"+this.id(e)+"/slug",{slug:s})},async changeStatus(e,s,i){return t.patch("pages/"+this.id(e)+"/status",{status:s,position:i})},async changeTemplate(e,s){return t.patch("pages/"+this.id(e)+"/template",{template:s})},async changeTitle(e,s){return t.patch("pages/"+this.id(e)+"/title",{title:s})},async children(e,s){return t.post("pages/"+this.id(e)+"/children/search",s)},async create(e,s){return null===e||"/"===e?t.post("site/children",s):t.post("pages/"+this.id(e)+"/children",s)},async delete(e,s){return t.delete("pages/"+this.id(e),s)},async duplicate(e,s,i){return t.post("pages/"+this.id(e)+"/duplicate",{slug:s,children:i.children||!1,files:i.files||!1})},async get(e,s){let i=await t.get("pages/"+this.id(e),s);return!0===Array.isArray(i.content)&&(i.content={}),i},id(t){return t.replace(/\//g,"+")},async files(e,s){return t.post("pages/"+this.id(e)+"/files/search",s)},link(t){return"/"+this.url(t)},async options(e,s="view",i=!0){const n=await t.get(this.url(e),{select:"options"}),a=n.options;let r=[];return"list"===s&&(r.push({click:"preview",icon:"open",text:I["a"].i18n.translate("open"),disabled:!1===a.preview}),r.push("-")),r.push({click:"rename",icon:"title",text:I["a"].i18n.translate("rename"),disabled:!a.changeTitle}),r.push({click:"duplicate",icon:"copy",text:I["a"].i18n.translate("duplicate"),disabled:!a.duplicate}),r.push("-"),r.push({click:"url",icon:"url",text:I["a"].i18n.translate("page.changeSlug"),disabled:!a.changeSlug}),r.push({click:"status",icon:"preview",text:I["a"].i18n.translate("page.changeStatus"),disabled:!a.changeStatus}),"list"===s&&r.push({click:"sort",icon:"sort",text:I["a"].i18n.translate("page.sort"),disabled:!(a.sort&&i)}),r.push({click:"template",icon:"template",text:I["a"].i18n.translate("page.changeTemplate"),disabled:!a.changeTemplate}),r.push("-"),r.push({click:"remove",icon:"trash",text:I["a"].i18n.translate("delete"),disabled:!a.delete}),r},async preview(t){const e=await this.get(this.id(t),{select:"previewUrl"});return e.previewUrl},async search(e,s){return e?t.post("pages/"+this.id(e)+"/children/search?select=id,title,hasChildren",s):t.post("site/children/search?select=id,title,hasChildren",s)},async update(e,s){return t.patch("pages/"+this.id(e),s)},url(t,e){let s=null===t?"pages":"pages/"+t.replace(/\//g,"+");return e&&(s+="/"+e),s}}),D=t=>({running:0,async request(e,s,i=!1){s=Object.assign(s||{},{credentials:"same-origin",cache:"no-store",headers:{"x-requested-with":"xmlhttprequest","content-type":"application/json",...s.headers}}),t.methodOverwrite&&"GET"!==s.method&&"POST"!==s.method&&(s.headers["x-http-method-override"]=s.method,s.method="POST"),s=t.onPrepare(s);const n=e+"/"+JSON.stringify(s);t.onStart(n,i),this.running++;const a=await fetch([t.endpoint,e].join(t.endpoint.endsWith("/")||e.startsWith("/")?"":"/"),s),r=await a.text();try{let e;try{e=JSON.parse(r)}catch(o){return void t.onParserError(r)}if(a.status<200||a.status>299)throw e;if(e.status&&"error"===e.status)throw e;let s=e;return e.data&&e.type&&"model"===e.type&&(s=e.data),this.running--,t.onComplete(n),t.onSuccess(e),s}catch(o){throw this.running--,t.onComplete(n),t.onError(o),o}},async get(t,e,s,i=!1){return e&&(t+="?"+Object.keys(e).filter(t=>void 0!==e[t]&&null!==e[t]).map(t=>t+"="+e[t]).join("&")),this.request(t,Object.assign(s||{},{method:"GET"}),i)},async post(t,e,s,i="POST",n=!1){return this.request(t,Object.assign(s||{},{method:i,body:JSON.stringify(e)}),n)},async patch(t,e,s,i=!1){return this.post(t,e,s,"PATCH",i)},async delete(t,e,s,i=!1){return this.post(t,e,s,"DELETE",i)}}),N=t=>({async list(e){return t.get("roles",e)},async get(e){return t.get("roles/"+e)},async options(t){const e=await this.list(t);return e.data.map(t=>({info:t.description||`(${I["a"].i18n.translate("role.description.placeholder")})`,text:t.title,value:t.name}))}}),P=t=>({async get(e={view:"panel"}){return t.get("system",e)},async install(e){const s=await t.post("system/install",e);return s.user},async register(e){return t.post("system/register",e)}}),R=t=>({async blueprint(){return t.get("site/blueprint")},async blueprints(){return t.get("site/blueprints")},async changeTitle(e){return t.patch("site/title",{title:e})},async children(e){return t.post("site/children/search",e)},async get(e={view:"panel"}){return t.get("site",e)},async options(){const e=await t.get("site",{select:"options"}),s=e.options;let i=[];return i.push({click:"rename",icon:"title",text:I["a"].i18n.translate("rename"),disabled:!s.changeTitle}),i},async update(e){return t.post("site",e)}}),q=t=>({async list(){return t.get("translations")},async get(e){return t.get("translations/"+e)},async options(){const t=await this.list(),e=t.data.map(t=>({value:t.id,text:t.name}));return e}}),F=t=>({async blueprint(e){return t.get("users/"+e+"/blueprint")},async blueprints(e,s){return t.get("users/"+e+"/blueprints",{section:s})},breadcrumb(t){return[{link:"/users/"+t.id,label:t.username}]},async changeEmail(e,s){return t.patch("users/"+e+"/email",{email:s})},async changeLanguage(e,s){return t.patch("users/"+e+"/language",{language:s})},async changeName(e,s){return t.patch("users/"+e+"/name",{name:s})},async changePassword(e,s){return t.patch("users/"+e+"/password",{password:s})},async changeRole(e,s){return t.patch("users/"+e+"/role",{role:s})},async create(e){return t.post("users",e)},async delete(e){return t.delete("users/"+e)},async deleteAvatar(e){return t.delete("users/"+e+"/avatar")},link(t,e){return"/"+this.url(t,e)},async list(e){return t.post(this.url(null,"search"),e)},async get(e,s){return t.get("users/"+e,s)},async options(e){const s=await t.get(this.url(e),{select:"options"}),i=s.options;let n=[];return n.push({click:"rename",icon:"title",text:I["a"].i18n.translate("user.changeName"),disabled:!i.changeName}),n.push({click:"email",icon:"email",text:I["a"].i18n.translate("user.changeEmail"),disabled:!i.changeEmail}),n.push({click:"role",icon:"bolt",text:I["a"].i18n.translate("user.changeRole"),disabled:!i.changeRole}),n.push({click:"password",icon:"key",text:I["a"].i18n.translate("user.changePassword"),disabled:!i.changePassword}),n.push({click:"language",icon:"globe",text:I["a"].i18n.translate("user.changeLanguage"),disabled:!i.changeLanguage}),n.push({click:"remove",icon:"trash",text:I["a"].i18n.translate("user.delete"),disabled:!i.delete}),n},async roles(e){const s=await t.get(this.url(e,"roles"));return s.data.map(t=>({info:t.description||`(${I["a"].i18n.translate("role.description.placeholder")})`,text:t.title,value:t.name}))},async search(e){return t.post("users/search",e)},async update(e,s){return t.patch("users/"+e,s)},url(t,e){let s=t?"users/"+t:"users";return e&&(s+="/"+e),s}}),U=(t={})=>{const e={endpoint:"/api",methodOverwrite:!0,onPrepare(t){return t},onStart(){},onComplete(){},onSuccess(){},onError(t){throw window.console.log(t.message),t}},s={...e,...t.config||{}};let i={...s,...D(s),...t};return i.auth=L(i),i.files=A(i),i.languages=B(i),i.pages=M(i),i.roles=N(i),i.system=P(i),i.site=R(i),i.translations=q(i),i.users=F(i),i.files.rename=i.files.changeName,i.pages.slug=i.pages.changeSlug,i.pages.status=i.pages.changeStatus,i.pages.template=i.pages.changeTemplate,i.pages.title=i.pages.changeTitle,i.site.title=i.site.changeTitle,i.system.info=i.system.get,i},H={install(t,e){t.prototype.$api=t.$api=U({config:{endpoint:O.api,onComplete:s=>{t.$api.requests=t.$api.requests.filter(t=>t!==s),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:t=>{O.debug&&window.console.error(t),403!==t.code||"Unauthenticated"!==t.message&&"access.panel"!==t.key||e.dispatch("user/logout",!0)},onParserError:t=>{throw e.dispatch("fatal",t),new Error("The JSON response from the API could not be parsed")},onPrepare:t=>(e.state.languages.current&&(t.headers["x-language"]=e.state.languages.current.code),t.headers["x-csrf"]=window.panel.csrf,t),onStart:(s,i=!1)=>{!1===i&&e.dispatch("isLoading",!0),t.$api.requests.push(s)},onSuccess:()=>{clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},z={install(t){t.filter("t",(function(t){return t}))}},K={install(t){t.prototype.$events=new t({data(){return{entered:null}},created(){window.addEventListener("online",this.online),window.addEventListener("offline",this.offline),window.addEventListener("dragenter",this.dragenter,!1),window.addEventListener("dragover",this.prevent,!1),window.addEventListener("dragexit",this.prevent,!1),window.addEventListener("dragleave",this.dragleave,!1),window.addEventListener("drop",this.drop,!1),window.addEventListener("keydown",this.keydown,!1),window.addEventListener("keyup",this.keyup,!1),document.addEventListener("click",this.click,!1)},destroyed(){window.removeEventListener("online",this.online),window.removeEventListener("offline",this.offline),window.removeEventListener("dragenter",this.dragenter,!1),window.removeEventListener("dragover",this.prevent,!1),window.removeEventListener("dragexit",this.prevent,!1),window.removeEventListener("dragleave",this.dragleave,!1),window.removeEventListener("drop",this.drop,!1),window.removeEventListener("keydown",this.keydown,!1),window.removeEventListener("keyup",this.keyup,!1),document.removeEventListener("click",this.click,!1)},methods:{click(t){this.$emit("click",t)},drop(t){this.prevent(t),this.$emit("drop",t)},dragenter(t){this.entered=t.target,this.prevent(t),this.$emit("dragenter",t)},dragleave(t){this.prevent(t),this.entered===t.target&&this.$emit("dragleave",t)},keydown(t){let e=["keydown"];(t.metaKey||t.ctrlKey)&&e.push("cmd"),!0===t.altKey&&e.push("alt"),!0===t.shiftKey&&e.push("shift");let s=this.$helper.string.lcfirst(t.key);const i={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};i[s]&&(s=i[s]),!1===["alt","control","shift","meta"].includes(s)&&e.push(s),this.$emit(e.join("."),t),this.$emit("keydown",t)},keyup(t){this.$emit("keyup",t)},online(t){this.$emit("online",t)},offline(t){this.$emit("offline",t)},prevent(t){t.stopPropagation(),t.preventDefault()}}})}},G=s("1dce"),W=s.n(G),Y=function(t){if(void 0!==t)return JSON.parse(JSON.stringify(t))},V=(t,e)=>{var s=null;return function(){var i=this,n=arguments;clearTimeout(s),s=setTimeout((function(){t.apply(i,n)}),e)}},J=t=>void 0!==I["a"].options.components[t],Z=t=>!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain"))),X=(t,e)=>{t=String(t);let s="";e=(e||2)-t.length;while(s.length{const e=String(t).split("/");if(2!==e.length)return"100%";const s=Number(e[0]),i=Number(e[1]);let n=100;return 0!==s&&0!==i&&(n=100/s*i),n+"%"},tt=(s("86c7"),(t,e=[],s="")=>{const i="-";return s="a-z0-9"+s,t=t.trim().toLowerCase(),e.forEach(e=>{e&&Object.keys(e).forEach(s=>{const i="/"!==s.substr(0,1),n=s.substring(1,s.length-1),a=i?s:n;t=t.replace(new RegExp(RegExp.escape(a),"g"),e[s])})}),t=t.replace("/[^\t\n\r -~]/",""),t=t.replace(new RegExp("[^"+s+"]","ig"),i),t=t.replace(new RegExp("["+RegExp.escape(i)+"]{2,}","g"),i),t=t.replace("/",i),t=t.replace(new RegExp("^[^"+s+"]+","g"),""),t=t.replace(new RegExp("[^"+s+"]+$","g"),""),t}),et=t=>{t=t||{};var e=t.desc?-1:1,s=-e,i=/^0/,n=/\s+/g,a=/^\s+|\s+$/g,r=/[^\x00-\x80]/,o=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,c=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=t.insensitive?function(t){return d(""+t).replace(a,"")}:function(t){return(""+t).replace(a,"")};function d(t){return t.toLocaleLowerCase?t.toLocaleLowerCase():t.toLowerCase()}function p(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function h(t,e){return(!t.match(i)||1===e)&&parseFloat(t)||t.replace(n," ").replace(a,"")||0}return function(t,i){var n=u(t),a=u(i);if(!n&&!a)return 0;if(!n&&a)return s;if(n&&!a)return e;var l=p(n),d=p(a),m=parseInt(n.match(o),16)||1!==l.length&&Date.parse(n),f=parseInt(a.match(o),16)||m&&a.match(c)&&Date.parse(a)||null;if(f){if(mf)return e}for(var g=l.length,b=d.length,k=0,v=Math.max(g,b);k0)return e;if(_<0)return s;if(k===v-1)return 0}else{if($y)return e}}return 0}},st={camelToKebab(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},escapeHTML(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=/]/g,t=>e[t])},hasEmoji(t){if("string"!==typeof t)return!1;const e=t.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/i);return null!==e&&null!==e.length},lcfirst(t){const e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)},random(t){let e="";const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=s.length;for(var n=0;n]+)>)/gi,"")},template(t,e={}){const s="{{[ ]{0,}",i="[ ]{0,}}}";return Object.keys(e).forEach(n=>{t=t.replace(new RegExp(`${s}${n}${i}`,"gi"),e[n]||"…"),!0===Array.isArray(e[n])&&(t=t.replace(new RegExp(`${s}${n}.count${i}|${s}${n}.length${i}`,"gi"),e[n].length||0))}),t.replace(/{{.*}}/gi,"…")},ucfirst(t){const e=String(t);return e.charAt(0).toUpperCase()+e.substr(1)},ucwords(t){const e=String(t);return e.split(/ /g).map(t=>this.ucfirst(t)).join(" ")}},it=(t,e)=>{const s={url:"/",field:"file",method:"POST",accept:"text",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},i=Object.assign(s,e),n=new FormData;n.append(i.field,t,t.name),i.attributes&&Object.keys(i.attributes).forEach(t=>{n.append(t,i.attributes[t])});const a=new XMLHttpRequest,r=e=>{if(!e.lengthComputable||!i.progress)return;let s=Math.max(0,Math.min(100,e.loaded/e.total*100));i.progress(a,t,Math.ceil(s))};a.upload.addEventListener("loadstart",r),a.upload.addEventListener("progress",r),a.addEventListener("load",e=>{let s=null;try{s=JSON.parse(e.target.response)}catch(n){s={status:"error",message:"The file could not be uploaded"}}s.status&&"error"===s.status?i.error(a,t,s):(i.success(a,t,s),i.progress(a,t,100))}),a.addEventListener("error",e=>{const s=JSON.parse(e.target.response);i.error(a,t,s),i.progress(a,t,100)}),a.open("POST",i.url,!0),i.headers&&Object.keys(i.headers).forEach(t=>{const e=i.headers[t];a.setRequestHeader(t,e)}),a.send(n)},nt=function(){var t,e,s="";for(t=0;t<32;t++)e=16*Math.random()|0,8!=t&&12!=t&&16!=t&&20!=t||(s+="-"),s+=(12==t?4:16==t?3&e|8:e).toString(16);return s},at={datetime(t,e,s,i,n="day"){let a=t.$library.dayjs.utc(e);return a.isValid()||(a=t.$library.dayjs.utc(e,"HH:mm:ss")),s?!e||!a.isValid()||(s=t.$library.dayjs.utc(s),a.isSame(s,n)||a[i](s,n)):e&&a.isValid()}},rt={install(t){Array.prototype.sortBy=function(e){const s=t.prototype.$helper.sort(),i=e.split(" "),n=i[0],a=i[1]||"asc";return this.sort((t,e)=>{const i=String(t[n]).toLowerCase(),r=String(e[n]).toLowerCase();return"desc"===a?s(r,i):s(i,r)})},t.prototype.$helper={clone:Y,isComponent:J,isUploadEvent:Z,debounce:V,pad:X,ratio:Q,slug:tt,sort:et,string:st,upload:it,uuid:nt,validate:at},t.prototype.$esc=st.escapeHTML}},ot=(s("64e4"),{}),lt=Object(c["a"])(ot,y,_,!1,null,null,null),ct=(lt.exports,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay",attrs:{autofocus:t.autofocus,centered:!0},on:{ready:function(e){return t.$emit("ready")}}},[s("div",{ref:"dialog",staticClass:"k-dialog",class:t.$vnode.data.staticClass,attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?s("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[s("p",[t._v(t._s(t.notification.message))]),s("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),s("div",{staticClass:"k-dialog-body"},[t._t("default")],2),t.$slots["footer"]||t.cancelButton||t.submitButton?s("footer",{staticClass:"k-dialog-footer"},[t._t("footer",[s("k-button-group",[s("span",[t.cancelButton?s("k-button",{staticClass:"k-dialog-button-cancel",attrs:{icon:"cancel"},on:{click:t.cancel}},[t._v(" "+t._s(t.cancelButtonLabel)+" ")]):t._e()],1),s("span",[t.submitButtonConfig?s("k-button",{staticClass:"k-dialog-button-submit",attrs:{icon:t.icon,theme:t.theme},on:{click:t.submit}},[t._v(" "+t._s(t.submitButtonLabel)+" ")]):t._e()],1)])])],2):t._e()])])}),ut=[],dt={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data(){return{notification:null}},computed:{cancelButtonLabel(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig(){return void 0!==this.$attrs["button"]?this.$attrs["button"]:void 0===this.submitButton||this.submitButton},submitButtonLabel(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},created(){this.$events.$on("keydown.esc",this.close,!1)},destroyed(){this.$events.$off("keydown.esc",this.close,!1)},mounted(){this.visible&&this.$nextTick(this.open)},methods:{open(){this.$store.dispatch("dialog",!0),this.notification=null,this.$refs.overlay.open(),this.$emit("open"),this.$events.$on("keydown.esc",this.close)},close(){this.notification=null,this.$refs.overlay&&this.$refs.overlay.close(),this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",!1)},cancel(){this.$emit("cancel"),this.close()},focus(){if(this.$refs.dialog&&this.$refs.dialog.querySelector){const t=this.$refs.dialog.querySelector(".k-dialog-button-cancel");t&&"function"===typeof t.focus&&t.focus()}},error(t){this.notification={message:t,type:"error"}},submit(){this.$emit("submit")},success(t){this.notification={message:t,type:"success"}}}},pt=dt,ht=(s("a5f3"),Object(c["a"])(pt,ct,ut,!1,null,null,null)),mt=ht.exports,ft=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.notification?s("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{"cancel-button":!1,visible:!0},on:{close:t.exit,submit:function(e){return t.$refs.dialog.close()}}},[s("k-text",[t._v(t._s(t.notification.message))]),t.notification.details&&Object.keys(t.notification.details).length?s("dl",{staticClass:"k-error-details"},[t._l(t.notification.details,(function(e,i){return[s("dt",{key:"detail-label-"+i},[t._v(" "+t._s(e.label)+" ")]),s("dd",{key:"detail-message-"+i},["object"===typeof e.message?[s("ul",t._l(e.message,(function(e,i){return s("li",{key:i},[t._v(" "+t._s(e)+" ")])})),0)]:[t._v(" "+t._s(e.message)+" ")]],2)]}))],2):t._e()],1):t._e()},gt=[],bt={mixins:[m],computed:{notification(){let t=this.$store.state.notification;return"error"===t.type?t:null}},methods:{enter(){this.$nextTick(()=>{this.$el&&this.$el.querySelector&&this.$el.querySelector(".k-dialog-footer .k-button").focus()})},exit(){this.$store.dispatch("notification/close")}}},kt=bt,vt=(s("7737"),Object(c["a"])(kt,ft,gt,!1,null,null,null)),$t=vt.exports,yt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("file.delete.confirm",{filename:t.$esc(t.filename)})},on:{submit:t.submit}})},_t=[],wt={mixins:[m],data(){return{id:null,parent:null,filename:null}},methods:{async open(t,e){try{const s=await this.$api.files.get(t,e);this.id=s.id,this.filename=s.filename,this.parent=t,this.$refs.dialog.open()}catch(s){this.$store.dispatch("notification/error",s)}},async submit(){try{await this.$api.files.delete(this.parent,this.filename),this.$store.dispatch("content/remove","files/"+this.id),this.$store.dispatch("notification/success",":)"),this.$events.$emit("file.delete",this.id),this.$emit("success"),this.$refs.dialog.close()}catch(t){this.$refs.dialog.error(t.message)}}}},xt=wt,Ot=Object(c["a"])(xt,yt,_t,!1,null,null,null),Ct=Ot.exports,St=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{input:function(e){t.file.name=t.sluggify(t.file.name)},submit:t.submit},model:{value:t.file,callback:function(e){t.file=e},expression:"file"}})},Et=[],jt={mixins:[m],data(){return{parent:null,file:{id:null,name:null,filename:null,extension:null}}},computed:{fields(){return{name:{label:this.$t("name"),type:"text",required:!0,icon:"title",after:"."+this.file.extension,preselect:!0}}},slugs(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system(){return this.$store.state.system.info}},methods:{async open(t,e){try{this.file=await this.$api.files.get(t,e,{select:["id","filename","name","extension"]}),this.parent=t,this.$refs.dialog.open()}catch(s){this.$store.dispatch("notification/error",s)}},sluggify(t){return this.$helper.slug(t,[this.slugs,this.system.ascii],"@._-")},async submit(){if(this.file.name=this.file.name.trim(),0!==this.file.name.length)try{const t=await this.$api.files.changeName(this.parent,this.file.filename,this.file.name);this.$store.dispatch("content/move",["files/"+this.file.id,"files/"+t.id]),this.$store.dispatch("notification/success",":)"),this.$emit("success",t),this.$events.$emit("file.changeName",t),this.$refs.dialog.close()}catch(t){this.$refs.dialog.error(t.message)}else this.$refs.dialog.error(this.$t("error.file.changeName.empty"))}}},Tt=jt,Lt=Object(c["a"])(Tt,St,Et,!1,null,null,null),It=Lt.exports,At=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})},Bt=[],Mt={mixins:[m],data(){return{file:{id:null},form:{position:null},siblings:[],api:null}},computed:{fields(){return{position:{name:"position",label:this.$t("file.sort"),type:"select",empty:!1,options:this.sortingOptions}}},sortingOptions(){let t=[],e=0;return this.siblings.forEach(s=>{if(s.id===this.file.id||s.num<1)return!1;e++,t.push({value:e,text:e}),t.push({value:s.id,text:s.filename,disabled:!0})}),t.push({value:e+1,text:e+1}),t}},methods:{async open(t,e,s){try{this.file=e;const i=await this.$api.post(t+"/files/search");this.siblings=i.data,this.form.position=this.siblings.findIndex(t=>t.id===e.id)+1,this.api=s,this.$refs.dialog.open()}catch(i){this.$store.dispatch("notification/error",i)}},async submit(){try{const t=this.siblings.findIndex(t=>t.id===this.file.id),e=this.form.position-1,s=this.$helper.clone(this.siblings);s.splice(t,1),s.splice(e,0,this.file),await this.$api.patch(this.api+"/files/sort",{files:s.map(t=>t.id),index:0}),this.success({message:":)",event:"file.sort"})}catch(t){this.$refs.dialog.error(t.message)}}}},Dt=Mt,Nt=Object(c["a"])(Dt,At,Bt,!1,null,null,null),Pt=Nt.exports,Rt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,html:!1,theme:"negative"}})]:[t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.models.length?[s("k-list",t._l(t.models,(function(e){return s("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(s){return t.toggle(e)}}},[t.isSelected(e)?s("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):s("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)})),1),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"image"}},[t._v(" "+t._s(t.$t("dialog.files.empty"))+" ")])]],2)},qt=[],Ft={data(){return{models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}},computed:{multiple(){return!0===this.options.multiple&&1!==this.options.max},checkedIcon(){return!0===this.multiple?"check":"circle-filled"}},watch:{search(){this.updateSearch()}},created(){this.updateSearch=V(this.updateSearch,200)},methods:{fetch(){const t={page:this.pagination.page,search:this.search,...this.fetchData||{}};return this.$api.get(this.options.endpoint,t).then(t=>{this.models=t.data,this.pagination=t.pagination,this.onFetched&&this.onFetched(t)}).catch(t=>{this.models=[],this.issue=t.message})},open(t,e){this.pagination.page=0,this.search=null;let s=!0;Array.isArray(t)?(this.models=t,s=!1):(this.models=[],e=t),this.options={...this.options,...e},this.selected={},this.options.selected.forEach(t=>{this.$set(this.selected,t,{id:t})}),s?this.fetch().then(()=>{this.$refs.dialog.open()}):this.$refs.dialog.open()},paginate(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected(t){return void 0!==this.selected[t.id]},toggle(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)},updateSearch(){this.pagination.page=0,this.fetch()}}},Ut={mixins:[Ft]},Ht=Ut,zt=(s("bf53"),Object(c["a"])(Ht,Rt,qt,!1,null,null,null)),Kt=zt.exports,Gt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[s("k-form",{ref:"form",attrs:{fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},Wt=[],Yt={mixins:[m],props:{fields:{type:[Array,Object],default(){return[]}},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default(){return this.$t("save")}},theme:{type:String,default:"positive"},value:{type:Object,default(){return{}}}}},Vt=Yt,Jt=Object(c["a"])(Vt,Gt,Wt,!1,null,null,null),Zt=Jt.exports,Xt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("language.create")},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},Qt=[],te={mixins:[m],data(){return{language:{name:"",code:"",direction:"ltr",locale:""}}},computed:{fields(){return{name:{label:this.$t("language.name"),type:"text",required:!0,icon:"title"},code:{label:this.$t("language.code"),type:"text",required:!0,counter:!1,icon:"globe",width:"1/2"},direction:{label:this.$t("language.direction"),type:"select",required:!0,empty:!1,options:[{value:"ltr",text:this.$t("language.direction.ltr")},{value:"rtl",text:this.$t("language.direction.rtl")}],width:"1/2"},locale:{label:this.$t("language.locale"),type:"text"}}},system(){return this.$store.state.system.info}},watch:{"language.name"(t){this.onNameChanges(t)},"language.code"(t){this.language.code=this.$helper.slug(t,[this.system.ascii]),this.onCodeChanges(this.language.code)}},methods:{onCodeChanges(t){if(!t)return this.language.locale=null;if(t.length>=2)if(-1!==t.indexOf("-")){let e=t.split("-"),s=[e[0],e[1].toUpperCase()];this.language.locale=s.join("_")}else{let e=this.$store.state.system.info.locales||[];e&&e[t]?this.language.locale=e[t]:this.language.locale=null}},onNameChanges(t){this.language.code=this.$helper.slug(t,[this.language.rules,this.system.ascii]).substr(0,2)},open(){this.language={name:"",code:"",direction:"ltr"},this.$refs.dialog.open()},async submit(){this.language.locale&&(this.language.locale=this.language.locale.trim()||null);try{await this.$api.languages.create({name:this.language.name,code:this.language.code,direction:this.language.direction,locale:this.language.locale}),this.$store.dispatch("languages/load"),this.success({message:":)",event:"language.create"})}catch(t){this.$refs.dialog.error(t.message)}}}},ee=te,se=Object(c["a"])(ee,Xt,Qt,!1,null,null,null),ie=se.exports,ne=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("language.delete.confirm",{name:t.$esc(t.language.name)})},on:{submit:t.submit}})},ae=[],re={mixins:[m],data(){return{language:{name:null}}},methods:{async open(t){try{this.language=await this.$api.languages.get(t),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{await this.$api.languages.delete(this.language.code),this.$store.dispatch("languages/load"),this.success({message:this.$t("language.deleted"),event:"language.delete"})}catch(t){this.$refs.dialog.error(t.message)}}}},oe=re,le=Object(c["a"])(oe,ne,ae,!1,null,null,null),ce=le.exports,ue=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,size:"medium"},on:{submit:t.submit},model:{value:t.language,callback:function(e){t.language=e},expression:"language"}})},de=[],pe={mixins:[ie],computed:{fields(){let t=ie.computed.fields.apply(this);return t.code.disabled=!0,"object"===typeof this.language.locale&&(t.locale={label:t.locale.label,type:"info",text:this.$t("language.locale.warning")}),t}},methods:{onCodeChanges(){return!1},onNameChanges(){return!1},async open(t){try{this.language=await this.$api.languages.get(t);const e=Object.keys(this.language.locale);1===e.length&&(this.language.locale=this.language.locale[e[0]]),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){if(0===this.language.name.length)return this.$refs.dialog.error(this.$t("error.language.name"));"string"===typeof this.language.locale&&(this.language.locale=this.language.locale.trim()||null);try{await this.$api.languages.update(this.language.code,{name:this.language.name,direction:this.language.direction,locale:this.language.locale}),this.$store.dispatch("languages/load"),this.success({message:this.$t("language.updated"),event:"language.update"})}catch(t){this.$refs.dialog.error(t.message)}}}},he=pe,me=Object(c["a"])(he,ue,de,!1,null,null,null),fe=me.exports,ge=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("page.draft.create")},on:{submit:t.submit,close:t.reset},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},be=[],ke={mixins:[m],data(){return{parent:null,section:null,templates:[],page:this.emptyForm()}},computed:{fields(){let t={title:{label:this.$t("title"),type:"text",required:!0,icon:"title"},slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,icon:"url"}};return(this.templates.length>1||O.debug)&&(t.template={name:"template",label:this.$t("template"),type:"select",disabled:1===this.templates.length,required:!0,icon:"code",empty:!1,options:this.templates}),t},slugs(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system(){return this.$store.state.system.info}},watch:{"page.title"(t){this.page.slug=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{emptyForm(){return{title:"",slug:"",template:null}},async open(t,e,s){this.parent=t,this.section=s;try{const t=await this.$api.get(e,{section:s});this.templates=t.map(t=>({value:t.name,text:t.title})),this.templates[0]&&(this.page.template=this.templates[0].value),this.$refs.dialog.open()}catch(i){this.$store.dispatch("notification/error",i)}},async submit(){if(this.page.title=this.page.title.trim(),0===this.page.title.length)return void this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"));const t={template:this.page.template,slug:this.page.slug,content:{title:this.page.title}};try{const e=await this.$api.post(this.parent+"/children",t);this.success({route:this.$api.pages.link(e.id),message:":)",event:"page.create"})}catch(e){this.$refs.dialog.error(e.message)}},reset(){this.page=this.emptyForm()}}},ve=ke,$e=Object(c["a"])(ve,ge,be,!1,null,null,null),ye=$e.exports,_e=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("duplicate")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},we=[],xe={mixins:[m],data(){return{page:{children:!1,files:!1,hasChildren:!1,hasDrafts:!1,hasFiles:!1,id:null,slug:""}}},computed:{fields(){const t=this.page.hasChildren||this.page.hasDrafts,e=this.page.hasFiles;let s={slug:{label:this.$t("slug"),type:"text",required:!0,counter:!1,spellcheck:!1,icon:"url"}};return e&&(s.files={label:this.$t("page.duplicate.files"),type:"toggle",required:!0,width:t?"1/2":null}),t&&(s.children={label:this.$t("page.duplicate.pages"),type:"toggle",required:!0,width:e?"1/2":null}),s},slugs(){return this.$store.state.languages.default?this.$store.state.languages.default.rules:this.system.slugs},system(){return this.$store.state.system.info}},watch:{"page.slug"(t){this.page.slug=this.$helper.slug(t,[this.slugs,this.system.ascii])}},methods:{async open(t){try{const e=await this.$api.pages.get(t,{language:"@default",select:"id,slug,hasChildren,hasDrafts,hasFiles,title"});this.page.id=e.id,this.page.slug=e.slug+"-"+this.$helper.slug(this.$t("page.duplicate.appendix")),this.page.hasChildren=e.hasChildren,this.page.hasDrafts=e.hasDrafts,this.page.hasFiles=e.hasFiles,this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{const t=await this.$api.pages.duplicate(this.page.id,this.page.slug,{children:this.page.children,files:this.page.files});this.success({route:this.$api.pages.link(t.id),message:":)",event:"page.duplicate"})}catch(t){this.$refs.dialog.error(t.message)}}}},Oe=xe,Ce=Object(c["a"])(Oe,_e,we,!1,null,null,null),Se=Ce.exports,Ee=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-remove-dialog",{ref:"dialog",attrs:{size:t.hasSubpages?"medium":"small"},on:{submit:t.submit,close:t.reset}},[t.page.hasChildren||t.page.hasDrafts?[s("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.$esc(t.page.title)}))}}),s("div",{staticClass:"k-page-remove-warning"},[s("k-box",{attrs:{theme:"negative"},domProps:{innerHTML:t._s(t.$t("page.delete.confirm.subpages"))}})],1),t.hasSubpages?s("k-form",{attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}}):t._e()]:[s("k-text",{domProps:{innerHTML:t._s(t.$t("page.delete.confirm",{title:t.$esc(t.page.title)}))},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)}}})]],2)},je=[],Te={mixins:[m],data(){return{page:{title:null,hasChildren:!1,hasDrafts:!1},model:this.emptyForm()}},computed:{hasSubpages(){return this.page.hasChildren||this.page.hasDrafts},fields(){return{check:{label:this.$t("page.delete.confirm.title"),type:"text",counter:!1}}}},methods:{emptyForm(){return{check:null}},async open(t){try{this.page=await this.$api.pages.get(t,{select:"id, title, hasChildren, hasDrafts, parent"}),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){if(this.hasSubpages&&this.model.check!==this.page.title)return this.$refs.dialog.error(this.$t("error.page.delete.confirm"));try{await this.$api.pages.delete(this.page.id,{force:!0}),this.$store.dispatch("content/remove","pages/"+this.page.id);const t={message:":)",event:"page.delete"};this.$route.params.path&&this.page.id===this.$route.params.path.replace(/\+/g,"/")&&(this.page.parent?t.route=this.$api.pages.link(this.page.parent.id):t.route="/pages"),this.success(t)}catch(t){this.$refs.dialog.error(t.message)}},reset(){this.model=this.emptyForm()}}},Le=Te,Ie=(s("12fb"),Object(c["a"])(Le,Ee,je,!1,null,null,null)),Ae=Ie.exports,Be=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-page-rename-dialog",attrs:{autofocus:!1,"submit-button":t.$t("change"),size:"medium",theme:"positive"},on:{ready:t.onReady,submit:function(e){return t.$refs.form.submit()}}},[s("k-form",{ref:"form",on:{submit:t.submit}},[s("k-text-field",t._b({ref:"title",model:{value:t.title,callback:function(e){t.title=e},expression:"title"}},"k-text-field",t.fields.title,!1)),s("k-text-field",t._b({ref:"slug",attrs:{value:t.slug},on:{input:function(e){return t.sluggify(e)}}},"k-text-field",t.fields.slug,!1),[s("k-button",{attrs:{slot:"options",disabled:t.fields.slug.disabled,icon:"wand"},on:{click:function(e){return t.sluggify(t.title)}},slot:"options"},[t._v(" "+t._s(t.$t("page.changeSlug.fromTitle"))+" ")])],1)],1)],1)},Me=[],De={mixins:[m],data(){return{page:{id:null,parent:null,title:null},permissions:{},select:"title",slug:null,title:null,url:null}},computed:{fields(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",disabled:!1===this.permissions.changeTitle},slug:{name:"slug",label:this.$t("slug"),type:"text",required:!0,icon:"url",help:"/"+this.url,counter:!1,disabled:!1===this.permissions.changeSlug}}},slugs(){return this.$store.state.languages.current?this.$store.state.languages.current.rules:this.system.slugs},system(){return this.$store.state.system.info}},methods:{onReady(){this.$refs[this.select]&&this.$refs[this.select].select()},async open(t,e,s="title"){try{this.page=await this.$api.pages.get(t,{view:"panel"}),this.select=s,this.title=this.page.title,this.sluggify(this.page.slug),this.permissions=e,this.$refs.dialog.open()}catch(i){this.$store.dispatch("notification/error",i)}},sluggify(t){t=t.trim(),this.slug=this.$helper.slug(t,[this.slugs,this.system.ascii]),this.page.parents?this.url=this.page.parents.map(t=>t.slug).concat([this.slug]).join("/"):this.url=this.slug},async submit(){if(this.title=this.title.trim(),this.title===this.page.title&&this.slug===this.page.slug)return this.$refs.dialog.close(),void this.$store.dispatch("notification/success",":)");if(0===this.title.length)return this.$refs.dialog.error(this.$t("error.page.changeTitle.empty"));if(0===this.slug.length)return this.$refs.dialog.error(this.$t("error.page.slug.invalid"));try{let t={message:":)",event:[]};if(this.title!==this.page.title&&(await this.$api.pages.changeTitle(this.page.id,this.title),t.event.push("page.changeTitle")),this.slug!==this.page.slug){const e=await this.$api.pages.changeSlug(this.page.id,this.slug);this.$store.dispatch("content/move",["pages/"+this.page.id,"pages/"+e.id]),t.event.push("page.changeSlug"),!this.$route.params.path||this.page.id!==this.$route.params.path.replace(/\+/g,"/")||this.$store.state.languages.current&&!0!==this.$store.state.languages.current.default||(t.route=this.$api.pages.link(e.id),t.emit=!1,delete t.event)}this.success(t)}catch(t){this.$refs.dialog.error(t.message)}}}},Ne=De,Pe=(s("5f52"),Object(c["a"])(Ne,Be,Me,!1,null,null,null)),Re=Pe.exports,qe=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.form,callback:function(e){t.form=e},expression:"form"}})},Fe=[],Ue={mixins:[m],data(){return{page:{id:null,siblings:[]},isBlocked:!1,isIncomplete:!1,form:{status:null,position:null},states:{}}},computed:{fields(){let t={status:{name:"status",label:this.$t("page.changeStatus.select"),type:"radio",required:!0,options:Object.keys(this.states).map(t=>({value:t,text:this.states[t].label,info:this.states[t].text}))}};return"listed"===this.form.status&&"default"===this.page.blueprint.num&&(t.position={name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions}),t},sortingOptions(){let t=[],e=0;return this.page.siblings.forEach(s=>{if(s.id===this.page.id||s.num<1)return!1;e++,t.push({value:e,text:e}),t.push({value:s.id,text:s.title,disabled:!0})}),t.push({value:e+1,text:e+1}),t}},methods:{async open(t){try{const s=await this.$api.pages.get(t,{select:["id","status","num","errors","blueprint"]});if(!1===s.blueprint.options.changeStatus)return this.$store.dispatch("notification/error",{message:this.$t("error.page.changeStatus.permission")});if("draft"===s.status&&Object.keys(s.errors).length>0)return this.$store.dispatch("notification/error",{message:this.$t("error.page.changeStatus.incomplete"),details:s.errors});if("default"===s.blueprint.num)try{const e=await this.$api.pages.get(t,{select:["siblings"]});this.setup({...s,siblings:e.siblings})}catch(e){this.$store.dispatch("notification/error",e)}else this.setup({...s,siblings:[]})}catch(e){this.$store.dispatch("notification/error",e)}},setup(t){this.page=t,this.form.position=t.num||t.siblings.length+1,this.form.status=t.status,this.states=t.blueprint.status,this.$refs.dialog.open()},async submit(){try{await this.$api.pages.changeStatus(this.page.id,this.form.status,this.form.position||1),this.success({message:":)",event:"page.changeStatus"})}catch(t){this.$refs.dialog.error(t.message)}}}},He=Ue,ze=Object(c["a"])(He,qe,Fe,!1,null,null,null),Ke=ze.exports,Ge={extends:Ke,computed:{fields(){return{position:{name:"position",label:this.$t("page.changeStatus.position"),type:"select",empty:!1,options:this.sortingOptions}}}},methods:{async open(t){try{const e=await this.$api.pages.get(t,{select:["id","status","num","errors","blueprint","siblings"]});this.setup(e)}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{await this.$api.pages.status(this.page.id,"listed",this.form.position||1),this.success({message:":)",event:"page.sort"})}catch(t){this.$refs.dialog.error(t.message)}}}},We=Ge,Ye=Object(c["a"])(We,w,x,!1,null,null,null),Ve=Ye.exports,Je=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})},Ze=[],Xe={mixins:[m],data(){return{blueprints:[],page:{id:null,template:null}}},computed:{fields(){return{template:{label:this.$t("template"),type:"select",required:!0,empty:!1,options:this.page.blueprints,icon:"template"}}}},methods:{async open(t){try{const e=await this.$api.pages.get(t,{select:["id","template","blueprints"]});if(e.blueprints.length<=1)return this.$store.dispatch("notification/error",{message:this.$t("error.page.changeTemplate.invalid",{slug:e.id})});this.page=e,this.page.blueprints=this.page.blueprints.map(t=>({text:t.title,value:t.name})),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){this.$events.$emit("keydown.cmd.s");try{await this.$api.pages.changeTemplate(this.page.id,this.page.template),this.success({message:":)",event:"page.changeTemplate"})}catch(t){this.$refs.dialog.error(t.message)}}}},Qe=Xe,ts=Object(c["a"])(Qe,Je,Ze,!1,null,null,null),es=ts.exports,ss=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,html:!1,theme:"negative"}})]:[t.model?s("header",{staticClass:"k-pages-dialog-navbar"},[s("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),s("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.models.length?[s("k-list",t._l(t.models,(function(e){return s("k-list-item",{key:e.id,attrs:{text:e.text,info:e.info,image:e.image,icon:e.icon},on:{click:function(s){return t.toggle(e)}}},[s("template",{slot:"options"},[t.isSelected(e)?s("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):s("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"}),t.model?s("k-button",{attrs:{disabled:!e.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(s){return s.stopPropagation(),t.go(e)}}}):t._e()],1)],2)})),1),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"page"}},[t._v(" "+t._s(t.$t("dialog.pages.empty"))+" ")])]],2)},is=[],ns={mixins:[Ft],data(){const t=Ft.data();return{...t,model:{title:null,parent:null},options:{...t.options,parent:null}}},computed:{fetchData(){return{parent:this.options.parent}}},methods:{back(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched(t){this.model=t.model}}},as=ns,rs=(s("ac27"),Object(c["a"])(as,ss,is,!1,null,null,null)),os=rs.exports,ls=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)},cs=[],us={mixins:[m],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default(){return this.$t("delete")}},text:String,theme:{type:String,default:"negative"}}},ds=us,ps=Object(c["a"])(ds,ls,cs,!1,null,null,null),hs=ps.exports,ms=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.site,callback:function(e){t.site=e},expression:"site"}})},fs=[],gs={mixins:[m],data(){return{site:{id:null,title:null}}},computed:{fields(){return{title:{label:this.$t("title"),type:"text",required:!0,icon:"title",preselect:!0}}}},methods:{async open(){try{this.site=await this.$api.site.get({select:["title"]}),this.$refs.dialog.open()}catch(t){this.$store.dispatch("notification/error",t)}},async submit(){if(this.site.title=this.site.title.trim(),0!==this.site.title.length)try{await this.$api.site.changeTitle(this.site.title),this.$store.dispatch("system/title",this.site.title),this.success({message:":)",event:"site.changeTitle"})}catch(t){this.$refs.dialog.error(t.message)}else this.$refs.dialog.error(this.$t("error.site.changeTitle.empty"))}}},bs=gs,ks=Object(c["a"])(bs,ms,fs,!1,null,null,null),vs=ks.exports,$s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",[s("k-text",{domProps:{innerHTML:t._s(t.text)}})])],2)},ys=[],_s={mixins:[m],props:{text:String}},ws=_s,xs=Object(c["a"])(ws,$s,ys,!1,null,null,null),Os=xs.exports,Cs=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("create")},on:{submit:t.create,close:t.reset},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Ss=[],Es={mixins:[m],data(){return{user:this.emptyForm(),languages:[],roles:[]}},computed:{fields(){return{name:{label:this.$t("name"),type:"text",icon:"user"},email:{label:this.$t("email"),type:"email",icon:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",icon:"key"},language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1},role:{label:this.$t("role"),type:1===this.roles.length?"hidden":"radio",required:!0,options:this.roles}}}},methods:{async create(){try{await this.$api.users.create(this.user),this.success({message:":)",event:"user.create"})}catch(t){this.$refs.dialog.error(t.message)}},emptyForm(){return{name:"",email:"",password:"",language:this.$store.state.system.info.defaultLanguage||"en",role:this.$user.role.name}},async open(){try{this.roles=await this.$api.roles.options({canBe:"created"}),"admin"!==this.$user.role.name&&(this.roles=this.roles.filter(t=>"admin"!==t.value))}catch(t){this.$store.dispatch("notification/error",t)}try{this.languages=await this.$api.translations.options()}catch(t){this.$store.dispatch("notification/error",t)}this.$refs.dialog.open()},reset(){this.user=this.emptyForm()}}},js=Es,Ts=Object(c["a"])(js,Cs,Ss,!1,null,null,null),Ls=Ts.exports,Is=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},As=[],Bs={mixins:[m],data(){return{user:{id:null,email:null}}},computed:{fields(){return{email:{label:this.$t("email"),preselect:!0,required:!0,type:"email"}}}},methods:{async open(t){try{this.user=await this.$api.users.get(t,{select:["id","email"]}),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{await this.$api.users.changeEmail(this.user.id,this.user.email),this.$store.dispatch("content/revert","users/"+this.user.id),this.$user.id===this.user.id&&this.$store.dispatch("user/email",this.user.email);let t={message:":)",event:"user.changeEmail"};this.success(t)}catch(t){this.$refs.dialog.error(t.message)}}}},Ms=Bs,Ds=Object(c["a"])(Ms,Is,As,!1,null,null,null),Ns=Ds.exports,Ps=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},Rs=[],qs={mixins:[m],data(){return{user:{language:"en"},languages:[]}},computed:{fields(){return{language:{label:this.$t("language"),type:"select",icon:"globe",options:this.languages,required:!0,empty:!1}}}},async created(){this.languages=await this.$api.translations.options()},methods:{async open(t){try{this.user=await this.$api.users.get(t,{view:"compact"}),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{this.user=await this.$api.users.changeLanguage(this.user.id,this.user.language),this.$user.id===this.user.id&&this.$store.dispatch("user/language",this.user.language),this.success({message:":)",event:"user.changeLanguage"})}catch(t){this.$refs.dialog.error(t.message)}}}},Fs=qs,Us=Object(c["a"])(Fs,Ps,Rs,!1,null,null,null),Hs=Us.exports,zs=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})},Ks=[],Gs={mixins:[m],data(){return{user:null,values:{password:null,passwordConfirmation:null}}},computed:{fields(){return{password:{label:this.$t("user.changePassword.new"),type:"password",icon:"key"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},methods:{async open(t){try{this.user=await this.$api.users.get(t),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){if(!this.values.password||this.values.password.length<8)return this.$refs.dialog.error(this.$t("error.user.password.invalid")),!1;if(this.values.password!==this.values.passwordConfirmation)return this.$refs.dialog.error(this.$t("error.user.password.notSame")),!1;try{await this.$api.users.changePassword(this.user.id,this.values.password),this.success({message:":)",event:"user.changePassword"})}catch(t){this.$refs.dialog.error(t.message)}}}},Ws=Gs,Ys=Object(c["a"])(Ws,zs,Ks,!1,null,null,null),Vs=Ys.exports,Js=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-remove-dialog",{ref:"dialog",attrs:{text:t.$t("user.delete.confirm",{email:t.$esc(t.user.email)})},on:{submit:t.submit}})},Zs=[],Xs={mixins:[m],data(){return{user:{email:null}}},methods:{async open(t){try{this.user=await this.$api.users.get(t),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{await this.$api.users.delete(this.user.id),this.$store.dispatch("content/remove","users/"+this.user.id),this.success({message:":)",event:"user.delete"}),"User"===this.$route.name&&this.$go("/users")}catch(t){this.$refs.dialog.error(t.message)}}}},Qs=Xs,ti=Object(c["a"])(Qs,Js,Zs,!1,null,null,null),ei=ti.exports,si=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("rename")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},ii=[],ni={mixins:[m],data(){return{user:{id:null,name:null}}},computed:{fields(){return{name:{label:this.$t("name"),type:"text",icon:"user",preselect:!0}}}},methods:{async open(t){try{this.user=await this.$api.users.get(t,{select:["id","name"]}),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){this.user.name=this.user.name.trim();try{await this.$api.users.changeName(this.user.id,this.user.name),this.$user.id===this.user.id&&this.$store.dispatch("user/name",this.user.name),this.success({message:":)",event:"user.changeName"})}catch(t){this.$refs.dialog.error(t.message)}}}},ai=ni,ri=Object(c["a"])(ai,si,ii,!1,null,null,null),oi=ri.exports,li=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("user.changeRole")},on:{submit:t.submit},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})},ci=[],ui={mixins:[m],data(){return{roles:[],user:{id:null,role:"visitor"}}},computed:{fields(){return{role:{label:this.$t("user.changeRole.select"),type:"radio",required:!0,options:this.roles}}}},methods:{async open(t){this.id=t;try{this.user=await this.$api.users.get(t),this.user.role=this.user.role.name,this.roles=await this.$api.users.roles(t),"admin"!==this.$user.role.name&&(this.roles=this.roles.filter(t=>"admin"!==t.value)),this.$refs.dialog.open()}catch(e){this.$store.dispatch("notification/error",e)}},async submit(){try{await this.$api.users.changeRole(this.user.id,this.user.role),this.$user.id===this.user.id&&this.$store.dispatch("user/load"),this.success({message:":)",event:"user.changeRole"})}catch(t){this.$refs.dialog.error(t.message)}}}},di=ui,pi=Object(c["a"])(di,li,ci,!1,null,null,null),hi=pi.exports,mi=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,html:!1,theme:"negative"}})]:[t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.models.length?[s("k-list",t._l(t.models,(function(e){return s("k-list-item",{key:e.email,attrs:{text:e.text,info:e.info!==e.text?e.info:null,image:e.image,icon:e.icon},on:{click:function(s){return t.toggle(e)}}},[t.isSelected(e)?s("k-button",{attrs:{slot:"options",autofocus:!0,icon:t.checkedIcon,tooltip:t.$t("remove"),theme:"positive"},slot:"options"}):s("k-button",{attrs:{slot:"options",autofocus:!0,tooltip:t.$t("select"),icon:"circle-outline"},slot:"options"})],1)})),1),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("dialog.users.empty"))+" ")])]],2)},fi=[],gi={mixins:[Ft]},bi=gi,ki=(s("7568"),Object(c["a"])(bi,mi,fi,!1,null,null,null)),vi=ki.exports,$i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay",attrs:{dimmed:!1},on:{close:t.onClose,open:t.onOpen}},[s("div",{staticClass:"k-drawer",attrs:{"data-nested":t.nested},on:{mousedown:function(e){t.click=!0},mouseup:t.mouseup}},[s("div",{staticClass:"k-drawer-box",on:{mousedown:function(e){e.stopPropagation(),t.click=!1}}},[s("header",{staticClass:"k-drawer-header"},[1===t.breadcrumb.length?s("h2",{staticClass:"k-drawer-title"},[s("k-icon",{attrs:{type:t.icon}}),t._v(" "+t._s(t.title)+" ")],1):s("ul",{staticClass:"k-drawer-breadcrumb"},t._l(t.breadcrumb,(function(e){return s("li",{key:e.id},[s("k-button",{attrs:{icon:e.icon},on:{click:function(s){return t.goTo(e.id)}}},[t._v(" "+t._s(e.title)+" ")])],1)})),0),t.hasTabs?s("nav",{staticClass:"k-drawer-tabs"},t._l(t.tabs,(function(e){return s("k-button",{key:e.name,staticClass:"k-drawer-tab",attrs:{current:t.tab==e.name},on:{click:function(s){return s.stopPropagation(),t.$emit("tab",e.name)}}},[t._v(" "+t._s(e.label)+" ")])})),1):t._e(),s("nav",{staticClass:"k-drawer-options"},[t._t("options"),s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"check"},on:{click:t.close}})],2)]),s("div",{staticClass:"k-drawer-body"},[t._t("default")],2)])])])},yi=[],_i={inheritAttrs:!1,props:{icon:String,tab:String,tabs:Object,title:String},data(){return{click:!1}},computed:{breadcrumb(){return this.$store.state.drawers.open},hasTabs(){return this.tabs&&Object.keys(this.tabs).length>1},index(){return this.breadcrumb.findIndex(t=>t.id===this._uid)},nested(){return this.index>0}},watch:{index(){-1===this.index&&this.close()}},destroyed(){this.$store.dispatch("drawers/close",this._uid)},methods:{close(){this.$refs.overlay.close()},goTo(t){if(t===this._uid)return!0;this.$store.dispatch("drawers/goto",t)},mouseup(){!0===this.click&&this.close(),this.click=!1},onClose(){this.$store.dispatch("drawers/close",this._uid),this.$emit("close")},onOpen(){this.$store.dispatch("drawers/open",{id:this._uid,icon:this.icon,title:this.title}),this.$emit("open")},open(){this.$refs.overlay.open()}}},wi=_i,xi=(s("5332"),Object(c["a"])(wi,$i,yi,!1,null,null,null)),Oi=xi.exports,Ci=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-drawer",{ref:"drawer",staticClass:"k-form-drawer",attrs:{icon:t.icon,tabs:t.tabs,tab:t.tab,title:t.title},on:{close:function(e){return t.$emit("close")},open:function(e){return t.$emit("open")},tab:function(e){t.tab=e}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0},{key:"default",fn:function(){return[0===Object.keys(t.fields).length?s("k-box",{attrs:{theme:"info"}},[t._v(" "+t._s(t.empty)+" ")]):s("k-form",{ref:"form",attrs:{autofocus:!0,fields:t.fields,value:t.$helper.clone(t.value)},on:{input:function(e){return t.$emit("input",e)}}})]},proxy:!0}],null,!0)})},Si=[],Ei={inheritAttrs:!1,props:{empty:{type:String,default(){return"Missing field setup"}},icon:String,tabs:Object,title:String,type:String,value:Object},data(){return{tab:null}},computed:{fields(){const t=this.tab||null,e=this.tabs,s=e[t]||this.firstTab,i=s.fields||{};return i},firstTab(){return Object.values(this.tabs)[0]}},methods:{close(){this.$refs.drawer.close()},focus(t){this.$refs.form&&"function"===typeof this.$refs.form.focus&&this.$refs.form.focus(t)},open(t,e=!0){this.$refs.drawer.open(),this.tab=t||this.firstTab.name,!1!==e&&setTimeout(()=>{let t=Object.values(this.fields).filter(t=>!0===t.autofocus)[0]||null;this.focus(t)},1)}}},ji=Ei,Ti=Object(c["a"])(ji,Ci,Si,!1,null,null,null),Li=Ti.exports,Ii=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),s("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,i){return s("k-dropdown-item",t._b({key:i,on:{mousedown:function(s){return t.onSelect(e)},keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"tab",9,s.key,"Tab")?null:(s.preventDefault(),t.onSelect(e))},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close(e))}]}},"k-dropdown-item",e,!1),[s("span",{domProps:{innerHTML:t._s(t.html?e.text:t.$esc(e.text))}})])})),1),t._v(" "+t._s(t.query)+" ")],2)},Ai=[],Bi={props:{html:{type:Boolean,default:!1},limit:{type:Number,default:10},skip:{type:Array,default(){return[]}},options:Array,query:String},data(){return{matches:[],selected:{text:null}}},methods:{close(){this.$refs.dropdown.close()},onSelect(t){this.$emit("select",t),this.$refs.dropdown.close()},search(t){if(t.length<1)return;const e=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter(t=>!!t.text&&(-1===this.skip.indexOf(t.value)&&null!==t.text.match(e))).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}},Mi=Bi,Di=Object(c["a"])(Mi,Ii,Ai,!1,null,null,null),Ni=Di.exports,Pi=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-calendar-input"},[s("nav",[s("k-button",{attrs:{icon:"angle-left"},on:{click:t.prev}}),s("span",{staticClass:"k-calendar-selects"},[s("k-select-input",{attrs:{options:t.months,disabled:t.disabled,required:!0},model:{value:t.view.month,callback:function(e){t.$set(t.view,"month",t._n(e))},expression:"view.month"}}),s("k-select-input",{attrs:{options:t.years,disabled:t.disabled,required:!0},model:{value:t.view.year,callback:function(e){t.$set(t.view,"year",t._n(e))},expression:"view.year"}})],1),s("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],1),s("table",{staticClass:"k-calendar-table"},[s("thead",[s("tr",t._l(t.weekdays,(function(e){return s("th",{key:"weekday_"+e},[t._v(" "+t._s(e)+" ")])})),0)]),s("tbody",t._l(t.numberOfWeeks,(function(e){return s("tr",{key:"week_"+e},t._l(t.days(e),(function(e,i){return s("td",{key:"day_"+i,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isSelected(e)&&"date","data-between":t.isBetween(e),"data-first":t.isFirst(e),"data-last":t.isLast(e)}},[e?s("k-button",{attrs:{disabled:t.isDisabled(e)},on:{click:function(s){return t.select(e)}}},[t._v(" "+t._s(e)+" ")]):t._e()],1)})),0)})),0),s("tfoot",[s("tr",[s("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[s("k-button",{on:{click:function(e){return t.select("today")}}},[t._v(" "+t._s(t.$t("today"))+" ")])],1)])])])])},Ri=[],qi={props:{disabled:Boolean,multiple:Boolean,max:String,min:String,value:[Array,String]},data(){return this.toData(this.value)},computed:{numberOfDays(){return this.viewDt.daysInMonth()},numberOfWeeks(){return Math.ceil((this.numberOfDays+this.firstWeekday-1)/7)},firstWeekday(){const t=this.viewDt.day();return t>0?t:7},weekdays(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months(){var t=[];return this.monthnames.forEach((e,s)=>{const i=this.toDate(1,s);t.push({value:s,text:e,disabled:i.isBefore(this.view.min,"month")||i.isAfter(this.view.max,"month")})}),t},years(){var t=[];const e=this.view.min?this.view.min.get("year"):this.view.year-20,s=this.view.max?this.view.max.get("year"):this.view.year+20;for(var i=e;i<=s;i++)t.push({value:i,text:this.$helper.pad(i)});return t},viewDt(){const t=`${this.view.year}-${this.view.month+1}-01 00:00:00`;return this.$library.dayjs.utc(t)}},watch:{value(t){const e=this.toData(t);this.datetimes=e.datetimes,this.view=e.view}},methods:{days(t){let e=[];const s=7*(t-1)+1;for(let i=s;ithis.numberOfDays?e.push(""):e.push(t)}return e},isBetween(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;const e=this.toDate(t);return this.isFirst(t)||this.isLast(t)||e.isAfter(this.datetimes[0],"day")&&e.isBefore(this.datetimes[1],"day")},isDisabled(t){const e=this.toDate(t);return e.isBefore(this.view.min,"day")||e.isAfter(this.view.max,"day")},isFirst(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;const e=this.toDate(t);return e.isSame(this.datetimes[0],"day")},isLast(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;const e=this.toDate(t);return e.isSame(this.datetimes[1],"day")},isSelected(t){if(""===t)return!1;const e=this.toDate(t);return this.datetimes.some(t=>e.isSame(t,"day"))},isToday(t){return this.toDate(t).isSame(this.toToday(),"day")},next(){let t=this.viewDt.clone().add(1,"month");this.show(t)},prev(){let t=this.viewDt.clone().subtract(1,"month");this.show(t)},mergeTime(t,e){return t.clone().set("second",e.get("second")).set("minute",e.get("minute")).set("hour",e.get("hour"))},select(t){const e=this.datetimes[0]||this.toToday();if("today"===t){const t=this.mergeTime(this.$library.dayjs(),e);this.datetimes=[t],this.show(t)}else{let s=this.toDate(t);s=this.mergeTime(s,e),!1===this.multiple||0===this.datetimes.length||2===this.datetimes.length||s.isBefore(this.datetimes[0])?this.datetimes=[s]:this.datetimes.push(s)}const s=this.multiple?this.datetimes.map(t=>this.toISO(t)):this.toISO(this.datetimes[0]);this.$emit("input",s)},show(t){this.view.year=t.year(),this.view.month=t.month()},toData(t){const e=this.toToday(),s=this.toDatetimes(t);return{datetimes:s,view:{month:(s[0]||e).month(),year:(s[0]||e).year(),min:this.min?this.$library.dayjs.utc(this.min):null,max:this.max?this.$library.dayjs.utc(this.max):null}}},toDate(t,e=this.view.month,s=this.view.year){return this.$library.dayjs.utc(`${s}-${e+1}-${t} 00:00:00`)},toDatetimes(t){return t?"string"===typeof t?[this.$library.dayjs.utc(t)]:t.map(t=>this.$library.dayjs.utc(t)):[]},toISO(t){return t.format("YYYY-MM-DD HH:mm:ss")},toToday(){return this.$library.dayjs.utc()}}},Fi=qi,Ui=(s("ee15"),Object(c["a"])(Fi,Pi,Ri,!1,null,null,null)),Hi=Ui.exports,zi=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[s("span",[t._v(t._s(t.count))]),t.min&&t.max?s("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?s("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?s("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])},Ki=[],Gi={props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}},Wi=Gi,Yi=(s("fc0f"),Object(c["a"])(Wi,zi,Ki,!1,null,null,null)),Vi=Yi.exports,Ji=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[t._t("header"),t._t("default",[s("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]),t._t("footer"),s("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)},Zi=[],Xi={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default(){return{}}},novalidate:{type:Boolean,default:!1},value:{type:Object,default(){return{}}}},data(){return{errors:{},listeners:{...this.$listeners,submit:this.onSubmit}}},methods:{focus(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit(){this.$emit("submit",this.value)},submit(){this.$refs.submitter.click()}}},Qi=Xi,tn=(s("5d33"),Object(c["a"])(Qi,Ji,Zi,!1,null,null,null)),en=tn.exports,sn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"k-form-buttons",attrs:{"data-theme":t.mode}},["unlock"===t.mode?s("k-view",[s("p",{staticClass:"k-form-lock-info"},[t._v(" "+t._s(t.$t("lock.isUnlocked"))+" ")]),s("span",{staticClass:"k-form-lock-buttons"},[s("k-button",{staticClass:"k-form-button",attrs:{icon:"download"},on:{click:t.onDownload}},[t._v(" "+t._s(t.$t("download"))+" ")]),s("k-button",{staticClass:"k-form-button",attrs:{icon:"check"},on:{click:t.onResolve}},[t._v(" "+t._s(t.$t("confirm"))+" ")])],1)]):"lock"===t.mode?s("k-view",[s("p",{staticClass:"k-form-lock-info"},[s("k-icon",{attrs:{type:"lock"}}),s("span",{domProps:{innerHTML:t._s(t.$t("lock.isLocked",{email:t.$esc(t.form.lock.email)}))}})],1),t.form.lock.unlockable?s("k-button",{staticClass:"k-form-button",attrs:{icon:"unlock"},on:{click:t.setUnlock}},[t._v(" "+t._s(t.$t("lock.unlock"))+" ")]):s("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?s("k-view",[s("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"undo"},on:{click:function(e){return t.$refs.revert.open()}}},[t._v(" "+t._s(t.$t("revert"))+" ")]),s("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,icon:"check"},on:{click:t.onSave}},[t._v(" "+t._s(t.$t("save"))+" ")])],1):t._e(),s("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.onRevert}},[s("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)},nn=[],an={data(){return{supportsLocking:!0}},computed:{api(){return{lock:[this.$route.path+"/lock",null,null,!0],unlock:[this.$route.path+"/unlock",null,null,!0]}},hasChanges(){return this.$store.getters["content/hasChanges"]()},form(){return{lock:this.$store.state.content.status.lock,unlock:this.$store.state.content.status.unlock}},id(){return this.$store.state.content.current},isDisabled(){return!1===this.$store.state.content.status.enabled},isLocked(){return null!==this.form.lock},isUnlocked(){return null!==this.form.unlock},mode(){return!0===this.isUnlocked?"unlock":!0===this.isLocked?"lock":!0===this.hasChanges?"changes":null}},watch:{hasChanges(t,e){if(!1===e&&!0===t)return this.$store.dispatch("heartbeat/remove",this.getLock),void this.$store.dispatch("heartbeat/add",[this.setLock,30]);this.id&&!0===e&&!1===t&&this.removeLock()},id(){this.id&&!1===this.hasChanges&&this.$store.dispatch("heartbeat/add",[this.getLock,10])}},created(){this.$events.$on("keydown.cmd.s",this.onSave)},destroyed(){this.$events.$off("keydown.cmd.s",this.onSave)},methods:{getLock(){return this.$api.get(...this.api.lock).then(t=>{if(!1===t.supported)return this.supportsLocking=!1,void this.$store.dispatch("heartbeat/remove",this.getLock);!1===t.locked?(this.isLocked&&this.form.lock.user!==this.$store.state.user.current.id&&this.$events.$emit("model.reload"),this.$store.dispatch("content/lock",null)):this.$store.dispatch("content/lock",t.locked)}).catch(()=>{})},setLock(){!0===this.supportsLocking&&this.$api.patch(...this.api.lock).catch(t=>{if("error.lock.notImplemented"===t.key)return this.supportsLocking=!1,this.$store.dispatch("heartbeat/remove",this.setLock),!1;this.$store.dispatch("content/revert",this.id),this.$store.dispatch("heartbeat/remove",this.setLock),this.$store.dispatch("heartbeat/add",[this.getLock,10])})},removeLock(){!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.delete(...this.api.lock).then(()=>{this.$store.dispatch("content/lock",null),this.$store.dispatch("heartbeat/add",[this.getLock,10])}).catch(()=>{}))},setUnlock(){!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.patch(...this.api.unlock).then(()=>{this.$store.dispatch("content/lock",null),this.$store.dispatch("heartbeat/add",[this.getLock,10])}).catch(()=>{}))},removeUnlock(){!0===this.supportsLocking&&(this.$store.dispatch("heartbeat/remove",this.setLock),this.$api.delete(...this.api.unlock).then(()=>{this.$store.dispatch("content/unlock",null),this.$store.dispatch("heartbeat/add",[this.getLock,10])}).catch(()=>{}))},onDownload(){let t="";Object.keys(this.form.unlock).forEach(e=>{t+=e+": \n\n"+this.form.unlock[e],t+="\n\n----\n\n"});let e=document.createElement("a");e.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),e.setAttribute("download",this.id+".txt"),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)},onResolve(){this.$store.dispatch("content/revert"),this.removeUnlock()},onRevert(){this.$store.dispatch("content/revert"),this.$refs.revert.close()},onSave(t){return!!t&&(t.preventDefault&&t.preventDefault(),!1===this.hasChanges||void this.$store.dispatch("content/save").then(()=>{this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}).catch(t=>{403!==t.code&&(t.details&&Object.keys(t.details).length>0?this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:t.details}):this.$store.dispatch("notification/error",{message:this.$t("error.form.notSaved"),details:[{label:"Exception: "+t.exception,message:t.message}]}))}))}}},rn=an,on=(s("18dd"),Object(c["a"])(rn,sn,nn,!1,null,null,null)),ln=on.exports,cn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.hasChanges?s("k-dropdown",{staticClass:"k-form-indicator"},[s("k-button",{staticClass:"k-topbar-button",on:{click:t.toggle}},[s("k-icon",{staticClass:"k-form-indicator-icon",attrs:{type:"edit"}})],1),s("k-dropdown-content",{ref:"list",attrs:{align:"right"}},[s("p",{staticClass:"k-form-indicator-info"},[t._v(" "+t._s(t.$t("lock.unsaved"))+": ")]),s("hr"),t._l(t.entries,(function(e){return s("k-dropdown-item",{key:e.id,attrs:{icon:e.icon},nativeOn:{click:function(s){return s.stopPropagation(),t.go(e.target)}}},[t._v(" "+t._s(e.label)+" ")])}))],2)],1):t._e()},un=[],dn={data(){return{isOpen:!1,entries:[]}},computed:{store(){return this.$store.state.content.models},models(){const t=Object.keys(this.store).filter(t=>!!this.store[t]);let e=t.map(t=>({id:t,...this.store[t]}));return e.filter(t=>Object.keys(t.changes).length>0)},hasChanges(){return this.models.length>0}},methods:{go(t){if(t.language&&this.$store.state.languages.current.code!==t.language){const e=this.$store.state.languages.all.filter(e=>e.code===t.language)[0];this.$store.dispatch("languages/current",e)}this.$go(t.link)},load(){const t=this.models.map(t=>this.$api.get(t.api,{view:"compact"},null,!0).then(e=>{let s;if(s=!0===t.id.startsWith("pages/")?{icon:"page",label:e.title,target:{link:this.$api.pages.link(e.id)}}:!0===t.id.startsWith("files/")?{icon:"image",label:e.filename,target:{link:e.link}}:!0===t.id.startsWith("users/")?{icon:"user",label:e.email,target:{link:this.$api.users.link(e.id)}}:{icon:"home",label:e.title,target:{link:"/site"}},this.$store.state.languages.current){const e=t.id.split("/").pop();s.label=s.label+" ("+e+")",s.target.language=e}return s}).catch(()=>(this.$store.dispatch("content/remove",t.id),null)));return Promise.all(t).then(t=>{this.entries=t.filter(t=>null!==t),0===this.entries.length&&this.$store.dispatch("notification/success",this.$t("lock.unsaved.empty"))})},toggle(){!1===this.$refs.list.isOpen?this.load().then(()=>{this.$refs.list&&this.$refs.list.toggle()}):this.$refs.list.toggle()}}},pn=dn,hn=(s("9e26"),Object(c["a"])(pn,cn,un,!1,null,null,null)),mn=hn.exports,fn=s("38b6"),gn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("fieldset",{staticClass:"k-fieldset"},[s("k-grid",[t._l(t.fields,(function(e,i){return["hidden"!==e.type&&t.meetsCondition(e)?s("k-column",{key:e.signature,attrs:{width:e.width}},[s("k-error-boundary",[t.hasFieldType(e.type)?s("k-"+e.type+"-field",t._b({ref:i,refInFor:!0,tag:"component",attrs:{name:i,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(s){return t.$emit("input",t.value,e,i)},focus:function(s){return t.$emit("focus",s,e,i)},invalid:function(s,n){return t.onInvalid(s,n,e,i)},submit:function(s){return t.$emit("submit",s,e,i)}},model:{value:t.value[i],callback:function(e){t.$set(t.value,i,e)},expression:"value[fieldName]"}},"component",e,!1)):s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[t._v(" The field type "),s("strong",[t._v('"'+t._s(i)+'"')]),t._v(" does not exist ")])],1)],1)],1):t._e()]}))],2)],1)},bn=[],kn={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default(){return[]}},novalidate:{type:Boolean,default:!1},value:{type:Object,default(){return{}}}},data(){return{errors:{}}},methods:{focus(t){if(t)return void(this.hasField(t)&&"function"===typeof this.$refs[t][0].focus&&this.$refs[t][0].focus());const e=Object.keys(this.$refs)[0];this.focus(e)},hasFieldType(t){return this.$helper.isComponent(`k-${t}-field`)},hasField(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach(s=>{const i=this.value[s.toLowerCase()],n=t.when[s];i!==n&&(e=!1)}),e},onInvalid(t,e,s,i){this.errors[i]=e,this.$emit("invalid",this.errors)},hasErrors(){return Object.keys(this.errors).length}}},vn=kn,$n=(s("862b"),Object(c["a"])(vn,gn,bn,!1,null,null,null)),yn=$n.exports,_n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?s("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",[t._v(t._s(t.before))])],2):t._e(),s("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus(e)}}},[t._t("default",[s("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))])],2),t.$slots.after||t.after?s("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",[t._v(t._s(t.after))])],2):t._e(),t.$slots.icon||t.icon?s("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",[s("k-icon",{attrs:{type:t.icon}})])],2):t._e()])},wn=[],xn={inheritAttrs:!1,props:{after:String,autofocus:Boolean,before:String,disabled:Boolean,type:String,icon:[String,Boolean],invalid:Boolean,theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}},data(){return{isInvalid:this.invalid,listeners:{...this.$listeners,invalid:(t,e)=>{this.isInvalid=t,this.$emit("invalid",t,e)}}}},computed:{inputProps(){return{...this.$props,...this.$attrs}}},methods:{blur(t){t&&t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.trigger(null,"blur")},focus(t){this.trigger(t,"focus")},select(t){this.trigger(t,"select")},trigger(t,e){if(t&&t.target&&"INPUT"===t.target.tagName&&"function"===typeof t.target[e])return void t.target[e]();if(this.$refs.input&&"function"===typeof this.$refs.input[e])return void this.$refs.input[e]();const s=this.$el.querySelector("input, select, textarea");s&&"function"===typeof s[e]&&s[e]()}}},On=xn,Cn=(s("c7c8"),Object(c["a"])(On,_n,wn,!1,null,null,null)),Sn=Cn.exports,En=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[s("h1",{staticClass:"k-offscreen"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?s("div",{staticClass:"k-login-alert",on:{click:function(e){t.issue=null}}},[s("span",[t._v(t._s(t.issue))]),s("k-icon",{attrs:{type:"alert"}})],1):t._e(),s("div",{staticClass:"k-login-fields"},[!0===t.canToggle?s("button",{staticClass:"k-login-toggler",attrs:{type:"button"},on:{click:t.toggleForm}},[t._v(" "+t._s(t.toggleText)+" ")]):t._e(),s("k-fieldset",{ref:"fieldset",attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1),s("div",{staticClass:"k-login-buttons"},[!1===t.isResetForm?s("span",{staticClass:"k-login-checkbox"},[s("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1):t._e(),s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+(t.isResetForm?".reset":"")))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)])},jn=[],Tn={data(){return{currentForm:null,isLoading:!1,issue:"",user:{email:"",password:"",remember:!1}}},computed:{canToggle(){let t=this.$store.state.system.info.loginMethods;return null!==this.codeMode&&!0===t.includes("password")&&(!0===t.includes("password-reset")||!0===t.includes("code"))},codeMode(){let t=this.$store.state.system.info.loginMethods;return!0===t.includes("password-reset")?"password-reset":!0===t.includes("code")?"code":null},fields(){let t={email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1}};return"email-password"===this.form&&(t.password={label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}),t},form(){return this.currentForm?this.currentForm:"password"===this.$store.state.system.info.loginMethods[0]?"email-password":"email"},isResetForm(){return"password-reset"===this.codeMode&&"email"===this.form},toggleText(){return this.$t("login.toggleText."+this.codeMode+"."+this.formOpposite(this.form))}},methods:{formOpposite(t){return"email-password"===t?"email":"email-password"},async login(){this.issue=null,this.isLoading=!0;let t=Object.assign({},this.user);"email"===this.currentForm&&(t.password=null),!0===this.isResetForm&&(t.remember=!1);try{const e=await this.$api.auth.login(t);e.challenge?this.$store.dispatch("user/pending",{email:t.email,challenge:e.challenge}):(this.$store.dispatch("user/login",e.user),await this.$store.dispatch("system/load",!0),this.$store.dispatch("notification/success",this.$t("welcome")))}catch(e){this.issue=e.message}finally{this.isLoading=!1}},toggleForm(){this.currentForm=this.formOpposite(this.form),this.$refs.fieldset.focus("email")}}},Ln=Tn,In=Object(c["a"])(Ln,En,jn,!1,null,null,null),An=In.exports,Bn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{staticClass:"k-login-form k-login-code-form",on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[s("h1",{staticClass:"k-offscreen"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?s("div",{staticClass:"k-login-alert",on:{click:function(e){t.issue=null}}},[s("span",[t._v(t._s(t.issue))]),s("k-icon",{attrs:{type:"alert"}})],1):t._e(),s("k-user-info",{attrs:{user:t.$store.state.user.pendingEmail}}),s("k-text-field",{attrs:{autofocus:!0,counter:!1,help:t.$t("login.code.text."+t.$store.state.user.pendingChallenge),label:t.$t("login.code.label."+t.mode),novalidate:!0,placeholder:t.$t("login.code.placeholder."+t.$store.state.user.pendingChallenge),required:!0,autocomplete:"one-time-code",icon:"unlock",name:"code"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),s("div",{staticClass:"k-login-buttons"},[s("k-button",{staticClass:"k-login-button k-login-back-button",attrs:{icon:"angle-left"},on:{click:t.back}},[t._v(" "+t._s(t.$t("back"))+" "),t.isLoadingBack?[t._v(" … ")]:t._e()],2),s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+("password-reset"===t.mode?".reset":"")))+" "),t.isLoadingLogin?[t._v(" … ")]:t._e()],2)],1)],1)},Mn=[],Dn={data(){return{code:"",isLoadingBack:!1,isLoadingLogin:!1,issue:""}},computed:{mode(){return!0===this.$store.state.system.info.loginMethods.includes("password-reset")?"password-reset":"login"}},methods:{async back(){this.isLoadingBack=!0,await this.$store.dispatch("user/logout"),this.isLoadingBack=!1},async login(){this.issue=null,this.isLoadingLogin=!0;try{const t=await this.$api.auth.verifyCode(this.code);"password-reset"===this.mode&&this.$store.dispatch("user/visit","/reset-password"),this.$store.dispatch("user/login",t.user),await this.$store.dispatch("system/load",!0),this.$store.dispatch("notification/success",this.$t("welcome"))}catch(t){this.issue=t.message}finally{this.isLoadingLogin=!1}}}},Nn=Dn,Pn=(s("e1f3"),Object(c["a"])(Nn,Bn,Mn,!1,null,null,null)),Rn=Pn.exports,qn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-upload"},[s("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),s("k-dialog",{ref:"dialog",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[t.errors.length>0?[s("k-headline",[t._v(t._s(t.$t("upload.errors")))]),s("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,(function(e,i){return s("li",{key:"error-"+i},[s("p",{staticClass:"k-upload-error-filename"},[t._v(" "+t._s(e.file.name)+" ")]),s("p",{staticClass:"k-upload-error-message"},[t._v(" "+t._s(e.message)+" ")])])})),0)]:[s("k-headline",[t._v(t._s(t.$t("upload.progress")))]),s("ul",{staticClass:"k-upload-list"},t._l(t.files,(function(e,i){return s("li",{key:"file-"+i},[s("k-progress",{ref:e.name,refInFor:!0}),s("p",{staticClass:"k-upload-list-filename"},[t._v(" "+t._s(e.name)+" ")]),s("p",[t._v(t._s(t.errors[e.name]))])],1)})),0)],s("template",{slot:"footer"},[t.errors.length>0?[s("k-button-group",[s("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.$refs.dialog.close()}}},[t._v(" "+t._s(t.$t("confirm"))+" ")])],1)]:t._e()],2)],2)],1)},Fn=[],Un={props:{url:{type:String},accept:{type:String,default:"*"},attributes:{type:Object},multiple:{type:Boolean,default:!0},max:{type:Number}},data(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},methods:{open(t){this.params(t),setTimeout(()=>{this.$refs.input.click()},1)},params(t){this.options=Object.assign({},this.$props,t)},select(t){this.upload(t.target.files)},drop(t,e){this.params(e),this.upload(t)},upload(t){this.$refs.dialog.open(),this.files=[...t],this.completed={},this.errors=[],this.hasErrors=!1,this.options.max&&(this.files=this.files.slice(0,this.options.max)),this.total=this.files.length,this.files.forEach(t=>{this.$helper.upload(t,{url:this.options.url,attributes:this.options.attributes,headers:{"X-CSRF":window.panel.csrf},progress:(t,e,s)=>{this.$refs[e.name]&&this.$refs[e.name][0]&&this.$refs[e.name][0].set(s)},success:(t,e,s)=>{this.complete(e,s.data)},error:(t,e,s)=>{this.errors.push({file:e,message:s.message}),this.complete(e,s.data)}})})},complete(t,e){if(this.completed[t.name]=e,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout(()=>{this.$refs.dialog.close(),this.$emit("success",this.files,Object.values(this.completed))},250)}}}},Hn=Un,zn=(s("5aee"),Object(c["a"])(Hn,qn,Fn,!1,null,null,null)),Kn=zn.exports,Gn=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"editor",staticClass:"k-writer",attrs:{"data-empty":t.isEmpty,"data-placeholder":t.placeholder,spellcheck:t.spellcheck}},[t.editor?[t.toolbar.visible?s("k-writer-toolbar",{ref:"toolbar",style:{bottom:t.toolbar.position.bottom+"px",left:t.toolbar.position.left+"px"},attrs:{editor:t.editor,"active-marks":t.toolbar.marks,"active-nodes":t.toolbar.nodes},on:{command:function(e){return t.editor.command(e)}}}):t._e(),s("k-writer-link-dialog",{ref:"linkDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleLink",e)}}})]:t._e()],2)},Wn=[],Yn=(s("bf19"),s("5313")),Vn=s("576a"),Jn=s("304a"),Zn=s("7f06"),Xn=s("0010"),Qn=s("f95e"),ta=s("665f");function ea(t,e){const{from:s,to:i}=t.selection;let n=[];t.doc.nodesBetween(s,i,t=>{n=[...n,...t.marks]});const a=n.find(t=>t.type.name===e.name);return a?a.attrs:{}}function sa(t,e,s){let i=[];return s.doc.nodesBetween(t,e,(t,e)=>{i=[...i,...t.marks.map(s=>({start:e,end:e+t.nodeSize,mark:s}))]}),i}var ia=function(t,e,s){return new Qn["a"](t,(t,i,n,a)=>{const r=s instanceof Function?s(i):s,{tr:o}=t,l=i.length-1;let c=a,u=n;if(i[l]){const s=n+i[0].indexOf(i[l-1]),r=s+i[l-1].length-1,d=s+i[l-1].lastIndexOf(i[l]),p=d+i[l].length,h=sa(n,a,t).filter(t=>{const{excluded:s}=t.mark.type;return s.find(t=>t.name===e.name)}).filter(t=>t.end>s);if(h.length)return!1;ps&&o.delete(s,d),u=s,c=u+i[l].length}return o.addMark(u,c,e.create(r)),o.removeStoredMark(e),o})};function na(t,e){const{from:s,$from:i,to:n,empty:a}=t.selection;return a?!!e.isInSet(t.storedMarks||i.marks()):!!t.doc.rangeHasMark(s,n,e)}var aa=function(t,e,s){const i=(n,a)=>{const r=[];return n.forEach(n=>{if(n.isText){const{text:i,marks:o}=n;let l,c=0;const u=!!o.filter(t=>"link"===t.type.name)[0];while(!u&&null!==(l=t.exec(i)))if(a&&a.type.allowsMarkType(e)&&l[1]){const t=l.index,i=t+l[0].length,a=t+l[0].indexOf(l[1]),o=a+l[1].length,u=s instanceof Function?s(l):s;t>0&&r.push(n.cut(c,t)),r.push(n.cut(a,o).mark(e.create(u).addToSet(n.marks))),c=i}cnew Jn["j"](i(t.content),t.openStart,t.openEnd)}})};function ra(t=0,e=0,s=0){return Math.min(Math.max(parseInt(t,10),e),s)}var oa=function(t,e,s){return new Qn["a"](t,(t,i,n,a)=>{const r=s instanceof Function?s(i):s,{tr:o}=t;return i[0]&&o.replaceWith(n-1,a,e.create(r)),o})},la=(t,e)=>{for(let s=t.depth;s>0;s--){const i=t.node(s);if(e(i))return{pos:s>0?t.before(s):0,start:t.start(s),depth:s,node:i}}},ca=t=>({$from:e})=>la(e,t),ua=t=>t instanceof Yn["c"],da=(t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t,pa=t=>e=>{if(ua(e)){const{node:s,$from:i}=e;if(da(t,s))return{node:s,pos:i.pos,depth:i.depth}}},ha=(t,e,s={})=>{const i=t=>t.type===e,n=pa(e)(t.selection)||ca(i)(t.selection);return Object.keys(s).length&&n?n.node.hasMarkup(e,{...n.node.attrs,...s}):!!n};function ma(t=null,e=null){if(!t||!e)return!1;const s=t.parent.childAfter(t.parentOffset);if(!s.node)return!1;const i=s.node.marks.find(t=>t.type===e);if(!i)return!1;let n=t.index(),a=t.start()+s.offset,r=n+1,o=a+s.node.nodeSize;while(n>0&&i.isInSet(t.parent.child(n-1).marks))n-=1,a-=t.parent.child(n).nodeSize;while(r{const{tr:i,selection:n}=e;let{from:a,to:r}=n;const{$from:o,empty:l}=n;if(l){const e=ma(o,t);a=e.from,r=e.to}return i.removeMark(a,r,t),s(i)}},ga=function(t,e,s){const i=n=>{const a=[];return n.forEach(n=>{if(n.isText){const{text:i}=n;let r,o=0;do{if(r=t.exec(i),r){const t=r.index,i=t+r[0].length,l=s instanceof Function?s(r[0]):s;t>0&&a.push(n.cut(o,t)),a.push(n.cut(t,i).mark(e.create(l).addToSet(n.marks))),o=i}}while(r);onew Jn["j"](i(t.content),t.openStart,t.openEnd)}})},ba=function(t,e,s={}){return(i,n,a)=>{const r=ha(i,t,s);return r?Object(Xn["d"])(e)(i,n,a):Object(Xn["d"])(t,s)(i,n,a)}};function ka(t,e){return t.type===e.nodes.bulletList||t.type===e.nodes.orderedList||t.type===e.nodes.todoList}function va(t,e){return(s,i,n)=>{const{schema:a,selection:r}=s,{$from:o,$to:l}=r,c=o.blockRange(l);if(!c)return!1;const u=ca(t=>ka(t,a))(r);if(c.depth>=1&&u&&c.depth-u.depth<=1){if(u.node.type===t)return Object(ta["b"])(e)(s,i,n);if(ka(u.node,a)&&t.validContent(u.node.content)){const{tr:e}=s;return e.setNodeMarkup(u.pos,t),i&&i(e),!1}}return Object(ta["e"])(t)(s,i,n)}}var $a=function(t,e){return(s,i)=>{const{tr:n,selection:a,doc:r}=s,{ranges:o,empty:l}=a;if(l){const{from:s,to:i}=ma(a.$from,t);r.rangeHasMark(s,i,t)&&n.removeMark(s,i,t),n.addMark(s,i,t.create(e))}else o.forEach(s=>{const{$to:i,$from:a}=s;r.rangeHasMark(a.pos,i.pos,t)&&n.removeMark(a.pos,i.pos,t),n.addMark(a.pos,i.pos,t.create(e))});return i(n)}},ya={chainCommands:Xn["b"],exitCode:Xn["c"],setBlockType:Xn["d"],toggleMark:Xn["e"],wrappingInputRule:Qn["e"],textblockTypeInputRule:Qn["c"],addListNodes:ta["a"],wrapInList:ta["e"],splitListItem:ta["d"],liftListItem:ta["b"],sinkListItem:ta["c"],getMarkAttrs:ea,markInputRule:ia,markIsActive:na,markPasteRule:aa,minMax:ra,nodeIsActive:ha,nodeInputRule:oa,pasteRule:ga,removeMark:fa,toggleBlockType:ba,toggleList:va,updateMark:$a};class _a{emit(t,...e){this._callbacks=this._callbacks||{};const s=this._callbacks[t];return s&&s.forEach(t=>t.apply(this,e)),this}off(t,e){if(arguments.length){const s=this._callbacks?this._callbacks[t]:null;s&&(e?this._callbacks[t]=s.filter(t=>t!==e):delete this._callbacks[t])}else this._callbacks={};return this}on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]=this._callbacks[t]||[],this._callbacks[t].push(e),this}}class wa{constructor(t=[],e){t.forEach(t=>{t.bindEditor(e),t.init()}),this.extensions=t}commands({schema:t,view:e}){return this.extensions.filter(t=>t.commands).reduce((s,i)=>{const{name:n,type:a}=i,r={},o=i.commands({schema:t,utils:ya,...["node","mark"].includes(a)?{type:t[a+"s"][n]}:{}}),l=(t,s)=>{r[t]=t=>{if("function"!==typeof s||!e.editable)return!1;e.focus();const i=s(t);return"function"===typeof i?i(e.state,e.dispatch,e):i}};return"object"===typeof o?Object.entries(o).forEach(([t,e])=>{l(t,e)}):l(n,o),{...s,...r}},{})}buttons(t="mark"){const e={};return this.extensions.filter(e=>e.type===t).filter(t=>t.button).forEach(t=>{Array.isArray(t.button)?t.button.forEach((s,i)=>{e[t.name+"-"+i]=s}):e[t.name]=t.button}),e}getAllowedExtensions(t){return t instanceof Array||!t?t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions:[]}getFromExtensions(t,e,s=this.extensions){return s.filter(t=>["extension"].includes(t.type)).filter(e=>e[t]).map(s=>s[t]({...e,utils:ya}))}getFromNodesAndMarks(t,e,s=this.extensions){return s.filter(t=>["node","mark"].includes(t.type)).filter(e=>e[t]).map(s=>s[t]({...e,type:e.schema[s.type+"s"][s.name],utils:ya}))}inputRules({schema:t,excludedExtensions:e}){const s=this.getAllowedExtensions(e),i=this.getFromExtensions("inputRules",{schema:t},s),n=this.getFromNodesAndMarks("inputRules",{schema:t},s);return[...i,...n].reduce((t,e)=>[...t,...e],[])}keymaps({schema:t}){const e=this.getFromExtensions("keys",{schema:t}),s=this.getFromNodesAndMarks("keys",{schema:t});return[...e,...s].map(t=>Object(Zn["a"])(t))}get marks(){return this.extensions.filter(t=>"mark"===t.type).reduce((t,{name:e,schema:s})=>({...t,[e]:s}),{})}get nodes(){return this.extensions.filter(t=>"node"===t.type).reduce((t,{name:e,schema:s})=>({...t,[e]:s}),{})}get options(){const{view:t}=this;return this.extensions.reduce((e,s)=>({...e,[s.name]:new Proxy(s.options,{set(e,s,i){const n=e[s]!==i;return Object.assign(e,{[s]:i}),n&&t.updateState(t.state),!0}})}),{})}pasteRules({schema:t,excludedExtensions:e}){const s=this.getAllowedExtensions(e),i=this.getFromExtensions("pasteRules",{schema:t},s),n=this.getFromNodesAndMarks("pasteRules",{schema:t},s);return[...i,...n].reduce((t,e)=>[...t,...e],[])}plugins({schema:t}){const e=this.getFromExtensions("plugins",{schema:t}),s=this.getFromNodesAndMarks("plugins",{schema:t});return[...e,...s].reduce((t,e)=>[...t,...e],[]).map(t=>t instanceof Yn["d"]?t:new Yn["d"](t))}}class xa{constructor(t={}){this.options={...this.defaults,...t}}init(){return null}bindEditor(t=null){this.editor=t}get name(){return null}get type(){return"extension"}get defaults(){return{}}plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class Oa extends xa{constructor(t={}){super(t)}get type(){return"node"}get schema(){return null}commands(){return{}}}class Ca extends Oa{get defaults(){return{inline:!1}}get name(){return"doc"}get schema(){return{content:this.options.inline?"paragraph+":"block+"}}}class Sa extends Oa{commands({utils:t,type:e}){return{paragraph:()=>t.setBlockType(e)}}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}get name(){return"paragraph"}}class Ea extends Oa{get name(){return"text"}get schema(){return{group:"inline"}}}class ja extends _a{constructor(t={}){super(),this.defaults={autofocus:!1,content:"",disableInputRules:!1,disablePasteRules:!1,editable:!0,element:null,extensions:[],emptyDocument:{type:"doc",content:[]},events:{},inline:!1,parseOptions:{},topNode:"doc",useBuiltInExtensions:!0},this.init(t)}blur(){this.view.dom.blur()}get builtInExtensions(){return this.options.useBuiltInExtensions?[new Ca({inline:this.options.inline}),new Ea,new Sa]:[]}buttons(t){return this.extensions.buttons(t)}clearContent(t=!1){this.setContent(this.options.emptyDocument,t)}command(t,...e){this.commands[t]&&this.commands[t](...e)}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createDocument(t,e=this.options.parseOptions){if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===typeof t)try{return this.schema.nodeFromJSON(t)}catch(s){return window.console.warn("Invalid content.","Passed value:",t,"Error:",s),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"===typeof t){const s=`
${t}
`,i=new window.DOMParser,n=i.parseFromString(s,"text/html").body.firstElementChild;return Jn["a"].fromSchema(this.schema).parse(n,e)}return!1}createEvents(){const t=this.options.events||{};return Object.entries(t).forEach(([t,e])=>{this.on(t,e)}),t}createExtensions(){return new wa([...this.builtInExtensions,...this.options.extensions],this)}createFocusEvents(){const t=(t,e,s=!0)=>{this.focused=s,this.emit(s?"focus":"blur",{event:e,state:t.state,view:t});const i=this.state.tr.setMeta("focused",s);this.view.dispatch(i)};return new Yn["d"]({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,s)=>{t(e,s,!0)},blur:(e,s)=>{t(e,s,!1)}}}})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createMarks(){return this.extensions.marks}createNodes(){return this.extensions.nodes}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createPlugins(){return this.extensions.plugins({schema:this.schema})}createSchema(){return new Jn["i"]({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return Yn["b"].create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,Object(Qn["b"])({rules:this.inputRules}),...this.pasteRules,...this.keymaps,Object(Zn["a"])({Backspace:Qn["d"]}),Object(Zn["a"])(Xn["a"]),this.createFocusEvents()]})}createView(){return new Vn["a"](this.element,{dispatchTransaction:this.dispatchTransaction.bind(this),editable:()=>this.options.editable,handlePaste:(...t)=>{this.emit("paste",...t)},handleDrop:(...t)=>{this.emit("drop",...t)},state:this.createState()})}destroy(){this.view&&this.view.destroy()}dispatchTransaction(t){const e=this.state,s=this.state.apply(t);this.view.updateState(s),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks();const i={editor:this,getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t};this.emit("transaction",i),!t.docChanged&&t.getMeta("preventUpdate")||this.emit("update",i);const{from:n,to:a}=this.state.selection,r=!e||!e.selection.eq(s.selection);this.emit(s.selection.empty?"deselect":"select",{...i,from:n,hasChanged:r,to:a})}focus(t=null){if(this.view.focused&&null===t||!1===t)return;const{from:e,to:s}=this.selectionAtPosition(t);this.setSelection(e,s),setTimeout(()=>this.view.focus(),10)}getHTML(){const t=document.createElement("div"),e=Jn["b"].fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),this.options.inline&&t.querySelector("p")?t.querySelector("p").innerHTML:t.innerHTML}getJSON(){return this.state.doc.toJSON()}getMarkAttrs(t=null){return this.activeMarkAttrs[t]}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.nodes,marks:this.marks}))}init(t={}){this.options={...this.defaults,...t},this.element=this.options.element,this.focused=!1,this.selection={from:0,to:0},this.events=this.createEvents(),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.plugins=this.createPlugins(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),!1!==this.options.autofocus&&this.focus(this.options.autofocus),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}isEditable(){return this.options.editable}isEmpty(){if(this.state)return 0===this.state.doc.textContent.length}get isActive(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce((t,[e,s])=>({...t,[e]:(t={})=>s(t)}),{})}removeMark(t){if(this.schema.marks[t])return ya.removeMark(this.schema.marks[t])(this.state,this.view.dispatch)}selectionAtPosition(t=null){if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){const{doc:t}=this.state;return{from:t.content.size,to:t.content.size}}return{from:t,to:t}}setActiveNodesAndMarks(){this.activeMarks=Object.values(this.schema.marks).filter(t=>ya.markIsActive(this.state,t)).map(t=>t.name),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((t,[e,s])=>({...t,[e]:ya.getMarkAttrs(this.state,s)}),{}),this.activeNodes=Object.values(this.schema.nodes).filter(t=>ya.nodeIsActive(this.state,t)).map(t=>t.name)}setContent(t={},e=!1,s){const{doc:i,tr:n}=this.state,a=this.createDocument(t,s),r=Yn["g"].create(i,0,i.content.size),o=n.setSelection(r).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e);this.view.dispatch(o)}setSelection(t=0,e=0){const{doc:s,tr:i}=this.state,n=ya.minMax(t,0,s.content.size),a=ya.minMax(e,0,s.content.size),r=Yn["g"].create(s,n,a),o=i.setSelection(r);this.view.dispatch(o)}get state(){return this.view?this.view.state:null}toggleMark(t){if(this.schema.marks[t])return ya.toggleMark(this.schema.marks[t])(this.state,this.view.dispatch)}updateMark(t,e){if(this.schema.marks[t])return ya.updateMark(this.schema.marks[t],e)(this.state,this.view.dispatch)}}var Ta=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.link,callback:function(e){t.link=e},expression:"link"}})},La=[],Ia={data(){return{link:{href:null,title:null,target:!1}}},computed:{fields(){return{href:{label:this.$t("url"),type:"text",icon:"url"},title:{label:this.$t("title"),type:"text",icon:"title"},target:{label:this.$t("open.newWindow"),type:"toggle",text:[this.$t("no"),this.$t("yes")]}}}},methods:{open(t){this.link={title:null,target:!1,...t},this.link.target=Boolean(this.link.target),this.$refs.dialog.open()},submit(){this.$emit("submit",{...this.link,target:this.link.target?"_blank":null}),this.$refs.dialog.close()}}},Aa=Ia,Ba=Object(c["a"])(Aa,Ta,La,!1,null,null,null),Ma=Ba.exports;class Da extends xa{constructor(t={}){super(t)}command(){return()=>{}}remove(){this.editor.removeMark(this.name)}get schema(){return null}get type(){return"mark"}toggle(){return this.editor.toggleMark(this.name)}update(t){this.editor.updateMark(this.name,t)}}class Na extends Da{get button(){return{icon:"code",label:I["a"].$t("toolbar.button.code")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:`)([^`]+)(?:`)$/,t)]}keys(){return{"Mod-`":()=>this.toggle()}}get name(){return"code"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:`)([^`]+)(?:`)/g,t)]}get schema(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}}class Pa extends Da{get button(){return{icon:"bold",label:I["a"].$t("toolbar.button.bold")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}keys(){return{"Mod-b":()=>this.toggle()}}get name(){return"bold"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong",0]}}}class Ra extends Da{get button(){return{icon:"italic",label:I["a"].$t("toolbar.button.italic")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:^|[^_])(_([^_]+)_)$/,t),e.markInputRule(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}keys(){return{"Mod-i":()=>this.toggle()}}get name(){return"italic"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/_([^_]+)_/g,t),e.markPasteRule(/\*([^*]+)\*/g,t)]}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}}class qa extends Da{get button(){return{icon:"url",label:I["a"].$t("toolbar.button.link")}}commands(){return{link:()=>{this.editor.emit("link",this.editor)},insertLink:(t={})=>{if(t.href)return this.update(t)},removeLink:()=>this.remove(),toggleLink:(t={})=>{t.href&&t.href.length>0?this.editor.command("insertLink",t):this.editor.command("removeLink")}}}get defaults(){return{target:null}}get name(){return"link"}pasteRules({type:t,utils:e}){return[e.pasteRule(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,]*)/gi,t,t=>({href:t}))]}plugins(){return[{props:{handleClick:(t,e,s)=>{const i=this.editor.getMarkAttrs("link");i.href&&!0===s.altKey&&s.target instanceof HTMLAnchorElement&&(s.stopPropagation(),window.open(i.href,i.target))}}}]}get schema(){return{attrs:{href:{default:null},target:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>({href:t.getAttribute("href"),target:t.getAttribute("target"),title:t.getAttribute("title")})}],toDOM:t=>["a",{...t.attrs,rel:"noopener noreferrer nofollow"},0]}}}class Fa extends Da{get button(){return{icon:"strikethrough",label:I["a"].$t("toolbar.button.strike")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/~([^~]+)~$/,t)]}keys(){return{"Mod-d":()=>this.toggle()}}get name(){return"strike"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/~([^~]+)~/g,t)]}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:t=>"line-through"===t}],toDOM:()=>["s",0]}}}class Ua extends Da{get button(){return{icon:"underline",label:I["a"].$t("toolbar.button.underline")}}commands(){return()=>this.toggle()}keys(){return{"Mod-u":()=>this.toggle()}}get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>"underline"===t}],toDOM:()=>["u",0]}}}class Ha extends Oa{get button(){return{icon:"list-bullet",label:I["a"].$t("toolbar.button.ul")}}commands({type:t,schema:e,utils:s}){return()=>s.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^\s*([-+*])\s$/,t)]}keys({type:t,schema:e,utils:s}){return{"Shift-Ctrl-8":s.toggleList(t,e.nodes.listItem)}}get name(){return"bulletList"}get schema(){return{content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}}class za extends Oa{commands({utils:t,type:e}){return()=>this.createHardBreak(t,e)}createHardBreak(t,e){return t.chainCommands(t.exitCode,(t,s)=>(s(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0))}get defaults(){return{enter:!1,text:!1}}keys({utils:t,type:e}){const s=this.createHardBreak(t,e);let i={"Mod-Enter":s,"Shift-Enter":s};return this.options.enter&&(i["Enter"]=s),i}get name(){return"hardBreak"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}}class Ka extends Oa{get button(){return this.options.levels.map(t=>({command:"h"+t,icon:"title",label:"Heading "+t}))}commands({type:t,schema:e,utils:s}){let i={toggleHeading:i=>s.toggleBlockType(t,e.nodes.paragraph,i)};return this.options.levels.forEach(e=>{i["h"+e]=()=>s.setBlockType(t,{level:e})}),i}get defaults(){return{levels:[1,2,3]}}inputRules({type:t,utils:e}){return this.options.levels.map(s=>e.textblockTypeInputRule(new RegExp(`^(#{1,${s}})\\s$`),t,()=>({level:s})))}keys({type:t,utils:e}){return this.options.levels.reduce((s,i)=>({...s,["Shift-Ctrl-"+i]:e.setBlockType(t,{level:i})}),{})}get name(){return"heading"}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map(t=>({tag:"h"+t,attrs:{level:t}})),toDOM:t=>["h"+t.attrs.level,0]}}}class Ga extends Oa{commands({type:t}){return()=>(e,s)=>s(e.tr.replaceSelectionWith(t.create()))}inputRules({type:t,utils:e}){return[e.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,t)]}get name(){return"horizontalRule"}get schema(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}}class Wa extends Oa{keys({type:t,utils:e}){return{Enter:e.splitListItem(t),"Shift-Tab":e.liftListItem(t),Tab:e.sinkListItem(t)}}get name(){return"listItem"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}}class Ya extends Oa{get button(){return{icon:"list-numbers",label:I["a"].$t("toolbar.button.ol")}}commands({type:t,schema:e,utils:s}){return()=>s.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^(\d+)\.\s$/,t,t=>({order:+t[1]}),(t,e)=>e.childCount+e.attrs.order===+t[1])]}keys({type:t,schema:e,utils:s}){return{"Shift-Ctrl-9":s.toggleList(t,e.nodes.listItem)}}get name(){return"orderedList"}get schema(){return{attrs:{order:{default:1}},content:"listItem+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]}}}var Va=s("8726");class Ja extends xa{commands(){return{undo:()=>Va["d"],redo:()=>Va["b"],undoDepth:()=>Va["e"],redoDepth:()=>Va["c"]}}get defaults(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":Va["d"],"Mod-y":Va["b"],"Shift-Mod-z":Va["b"],"Mod-я":Va["d"],"Shift-Mod-я":Va["b"]}}get name(){return"history"}plugins(){return[Object(Va["a"])({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}class Za extends xa{constructor(t={}){super(t)}close(){this.visible=!1,this.emit()}emit(){this.editor.emit("toolbar",{marks:this.marks,nodes:this.nodes,position:this.position,visible:this.visible})}init(){this.position={left:0,bottom:0},this.visible=!1,this.editor.on("blur",()=>{this.close()}),this.editor.on("deselect",()=>{this.close()}),this.editor.on("select",({hasChanged:t})=>{!1!==t?this.open():this.emit()})}get marks(){return this.editor.activeMarks}get nodes(){return this.editor.activeNodes}open(){this.visible=!0,this.reposition(),this.emit()}reposition(){const{from:t,to:e}=this.editor.selection,s=this.editor.view.coordsAtPos(t),i=this.editor.view.coordsAtPos(e,!0),n=this.editor.element.getBoundingClientRect();let a=(s.left+i.left)/2-n.left,r=Math.round(n.bottom-s.top);return this.position={bottom:r,left:a}}get type(){return"toolbar"}}var Xa,Qa,tr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-writer-toolbar"},[Object.keys(t.nodeButtons).length>1&&t.activeNode?s("k-dropdown",{nativeOn:{mousedown:function(t){t.preventDefault()}}},[s("k-button",{staticClass:"k-writer-toolbar-button k-writer-toolbar-nodes",attrs:{icon:t.activeNode.icon},on:{click:function(e){return t.$refs.nodes.toggle()}}}),s("k-dropdown-content",{ref:"nodes"},t._l(t.nodeButtons,(function(e,i){return s("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(s){return t.command(e.command||i)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1):t._e(),t._l(t.markButtons,(function(e,i){return s("k-button",{key:i,class:{"k-writer-toolbar-button":!0,"k-writer-toolbar-button-active":t.activeMarks.includes(i)},attrs:{icon:e.icon},on:{mousedown:function(s){return s.preventDefault(),t.command(e.command||i)}}})}))],2)},er=[],sr={props:{activeMarks:{type:Array,default(){return[]}},activeNodes:{type:Array,default(){return[]}},editor:{type:Object,required:!0},marks:{type:Array}},computed:{activeNode(){const t=Object.keys(this.nodeButtons).find(t=>this.activeNodes.includes(t));return!!t&&this.nodeButtons[t]},markButtons(){return this.buttons("mark")},nodeButtons(){return this.buttons("node")}},methods:{buttons(t){const e=this.editor.buttons(t);let s=this.sorting;!1!==s&&!1!==Array.isArray(s)||(s=Object.keys(e));let i={};return s.forEach(t=>{e[t]&&(i[t]=e[t])}),i},command(t,...e){this.$emit("command",t,...e)}}},ir=sr,nr=(s("6a16"),Object(c["a"])(ir,tr,er,!1,null,null,null)),ar=nr.exports,rr={components:{"k-writer-link-dialog":Ma,"k-writer-toolbar":ar},props:{autofocus:Boolean,breaks:Boolean,code:Boolean,disabled:Boolean,emptyDocument:{type:Object,default(){return{type:"doc",content:[]}}},headings:[Array,Boolean],inline:{type:Boolean,default:!1},marks:{type:[Array,Boolean],default:!0},nodes:{type:[Array,Boolean],default(){return["heading","bulletList","orderedList"]}},placeholder:String,spellcheck:Boolean,extensions:Array,value:{type:String,default:""}},data(){return{editor:null,html:this.value,isEmpty:!0,toolbar:!1}},watch:{value(t,e){t!==e&&t!==this.html&&(this.html=t,this.editor.setContent(this.html))}},mounted(){this.editor=new ja({autofocus:this.autofocus,content:this.value,editable:!this.disabled,element:this.$el,emptyDocument:this.emptyDocument,events:{link:t=>{this.$refs.linkDialog.open(t.getMarkAttrs("link"))},toolbar:t=>{this.toolbar=t,this.toolbar.visible&&this.$nextTick(()=>{this.onToolbarOpen()})},update:t=>{this.html=t.editor.getHTML(),this.isEmpty=t.editor.isEmpty(),this.isEmpty&&(0===t.editor.activeNodes.length||t.editor.activeNodes.includes("paragraph"))&&(this.html=""),this.$emit("input",this.html)}},extensions:[...this.createMarks(),...this.createNodes(),new Ja,new Za,...this.extensions||[]],inline:this.inline}),this.isEmpty=this.editor.isEmpty()},beforeDestroy(){this.editor.destroy()},methods:{filterExtensions(t,e,s){!1===e?e=[]:!0!==e&&!1!==Array.isArray(e)||(e=Object.keys(t));let i=[];return e.forEach(e=>{t[e]&&i.push(t[e])}),"function"===typeof s&&(i=s(e,i)),i},command(t,...e){this.editor.command(t,...e)},createMarks(){return this.filterExtensions({bold:new Pa,italic:new Ra,strike:new Fa,underline:new Ua,code:new Na,link:new qa},this.marks)},createNodes(){const t=new za({text:!0,enter:this.inline});return!0===this.inline?[t]:this.filterExtensions({bulletList:new Ha,orderedList:new Ya,heading:new Ka,horizontalRule:new Ga,listItem:new Wa},this.nodes,(e,s)=>((e.includes("bulletList")||e.includes("orderedList"))&&s.push(new Wa),s.push(t),s))},getHTML(){return this.editor.getHTML()},focus(){this.editor.focus()},onToolbarOpen(){if(this.$refs.toolbar){const t=this.$el.clientWidth,e=this.$refs.toolbar.$el.clientWidth;let s=this.toolbar.position.left;s-e/2<0&&(s=s+(e/2-s)-20),s+e/2>t&&(s=s-(s+e/2-t)+20),s!==this.toolbar.position.left&&(this.$refs.toolbar.$el.style.left=s+"px")}}}},or=rr,lr=(s("4041"),Object(c["a"])(or,Gn,Wn,!1,null,null,null)),cr=lr.exports,ur=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[s("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),s("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[s("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),s("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])},dr=[],pr=s("b5ae"),hr={inheritAttrs:!1,props:{autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:[Number,String],label:String,required:{type:Boolean,default:!1},value:Boolean},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onChange(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||pr["required"]}}}},mr=hr,fr=(s("42e4"),Object(c["a"])(mr,ur,dr,!1,null,null,null)),gr=fr.exports,br=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,i){return s("li",{key:i},[s("k-checkbox-input",{attrs:{id:t.id+"-"+i,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(s){return t.onInput(e.value,s)}}})],1)})),0)},kr=[],vr={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default(){return this._uid}},max:Number,min:Number,options:Array,required:Boolean,value:{type:[Array,Object],default(){return[]}}},data(){return{selected:this.valueToArray(this.value)}},watch:{value(t){this.selected=this.valueToArray(t)},selected(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t,e){if(!0===e)this.selected.push(t);else{const e=this.selected.indexOf(t);-1!==e&&this.selected.splice(e,1)}this.$emit("input",this.selected)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()},valueToArray(t){return!0===Array.isArray(t)?t:"string"===typeof t?String(t).split(","):"object"===typeof t?Object.values(t):void 0}},validations(){return{selected:{required:!this.required||pr["required"],min:!this.min||Object(pr["minLength"])(this.min),max:!this.max||Object(pr["maxLength"])(this.max)}}}},$r=vr,yr=Object(c["a"])($r,br,kr,!1,null,null,null),_r=yr.exports,wr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-text-input",t._b({ref:"input",class:"k-"+t.type+"-input",attrs:{placeholder:t.display,spellcheck:!1,type:"text"},on:{blur:t.onBlur,input:t.onInput,invalid:t.onInvalid,focus:function(e){return t.$emit("focus")},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),e.preventDefault(),t.onDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),e.preventDefault(),t.onUp(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab(e)}]},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}},"k-text-input",t.$props,!1))},xr=[],Or={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,display:{type:String,default:"DD.MM.YYYY"},id:[String,Number],max:String,min:String,required:Boolean,step:{type:Object,default(){return{size:1,unit:"day"}}},type:{type:String,default:"date"},value:String},data(){return{input:this.toFormat(this.value),selected:null}},computed:{map(){return{day:["D","DD"],month:["M","MM","MMM","MMMM"],year:["YY","YYYY"]}},parsed(){if(this.input)for(let t=0;t[t]):i.forEach(t=>{s=s.concat(e.map(e=>e.concat([t])))}),t=t.concat(s),e=s,s=[]}}return t.map(t=>t.join(this.separator)).reverse()},separator(){return this.display.match(/[\W]/)[0]},tokens(){return this.display.split(/\W/)}},watch:{value(t){this.input=this.toFormat(t),this.onInvalid()}},mounted(){this.onInvalid()},methods:{emit(t){const e=this.toFormat(this.parsed,"YYYY-MM-DD HH:mm:ss")||"";this.$emit(t,e)},focus(){this.$refs.input.focus()},manipulate(t){let e;if(this.parsed){let s=this.step.unit,i=this.step.size;if(this.selected=this.toCursorIndex(),null!==this.selected){const e=this.tokens[this.selected];"a"===e.toLowerCase()?(s="hour",i=12,t="pm"===this.parts[this.selected]?"subtract":"add"):(s=this.toUnit(e),s!==this.step.unit&&(i=1))}e=this.parsed.clone()[t](i,s)}else e=this.toNearest(this.$library.dayjs()),this.selected=this.toIndex();this.input=this.toFormat(e),this.emit("update"),this.$nextTick(()=>{this.select()})},onBlur(){this.parsed||(this.input=null),this.selected=null,this.emit("update")},onDown(){this.manipulate("subtract")},onEnter(){this.onBlur(),this.emit("enter")},onInput(){this.emit("input")},onInvalid(t,e){this.$emit("invalid",t||this.$v.$invalid,e||this.$v)},onTab(t){const e=this.toCursorIndex();null===this.selected?this.selected=e||0:e!==this.selected?this.selected=e:this.selected++,this.selected>=this.parts.length?this.selected=null:(t.preventDefault(),t.stopPropagation(),this.select())},onUp(){this.manipulate("add")},select(){if(null!==this.selected){const t=this.toRange(this.selected);this.selected>0&&t.start++,this.$refs.input.$refs.input.setSelectionRange(t.start,t.end)}},toCursorIndex(){if(0===this.$refs.input.$refs.input.selectionStart&&this.$refs.input.$refs.input.selectionEnd===String(this.input).length)return null;for(let t=0;t=this.$refs.input.$refs.input.selectionEnd)return t}},toDatetime(t){return this.$library.dayjs.utc(t)},toFormat(t,e=this.display){return t?("string"==typeof t&&(t=this.toDatetime(t)),!1===t.isValid()?null:this.toNearest(t).format(e)):null},toNearest(t,e=this.step.unit,s=this.step.size){"day"===e&&(e="date");const i=t.get(e),n=Math.round(i/s)*s;return t.set(e,n).startOf(e)},toIndex(t=this.step.unit){const e=this.map[t];for(let s=0;se.includes(t));return s[0]},toUnit(t,e=!0){const s=Object.keys(this.map),i=Object.values(this.map);let n=i.findIndex(e=>e.includes(t));const a=this.step.unit;return!0===e&&nthis.$helper.validate.datetime(this,t,this.min,"isAfter",this.step.unit)),max:!this.max||(t=>this.$helper.validate.datetime(this,t,this.max,"isBefore",this.step.unit)),required:!this.required||pr["required"]}}}},Cr=Or,Sr=Object(c["a"])(Cr,wr,xr,!1,null,null,null),Er=Sr.exports,jr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-datetime-input"},[s("k-date-input",t._b({ref:"dateInput",on:{input:function(e){return t.onInput(e,"date")},update:function(e){return t.onUpdate(e,"date")},enter:function(e){return t.onEnter(e,"date")},focus:function(e){return t.$emit("focus")}}},"k-date-input",t.dateOptions,!1)),t.time?[s("k-time-input",t._b({ref:"timeInput",on:{input:function(e){return t.onInput(e,"time")},update:function(e){return t.onUpdate(e,"time")},enter:function(e){return t.onEnter(e,"time")},focus:function(e){return t.$emit("focus")}}},"k-time-input",t.timeOptions,!1))]:t._e()],2)},Tr=[],Lr={inheritAttrs:!1,props:{...Er.props,time:{type:[Boolean,Object],default(){return{}}},value:String},data(){return{input:this.toDatetime(this.value)}},computed:{dateOptions(){return{autofocus:this.autofocus,disabled:this.disabled,display:this.display,id:this.id,required:this.required,value:this.value}},timeOptions(){return{...this.time,disabled:this.disabled,required:this.required,value:this.value?this.toDatetime(this.value).format("HH:mm:ss"):null}}},watch:{value(){this.input=this.toDatetime(this.value),this.onInvalid()}},mounted(){this.onInvalid()},methods:{emit(t,e=this.input){e?this.$emit(t,e.format("YYYY-MM-DD HH:mm:ss")):this.$emit(t,"")},focus(){this.$refs.dateInput.focus()},onUpdate(t,e){const s=this.toDatetime(this.value);e=this.toDatetime(t,e,s),this.emit("update",e)},onEnter(t,e){this.onUpdate(e,t),this.emit("enter")},onInput(t,e){this.input=this.toDatetime(t,e,this.input),this.emit("input")},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},toDatetime(t,e,s){if(!t)return null;let i=this.$library.dayjs.utc(t);return"time"===e&&(i=this.$library.dayjs.utc(t,"HH:mm:ss")),!1===i.isValid()?null:e&&s?"date"===e?s.clone().utc().set("year",i.get("year")).set("month",i.get("month")).set("date",i.get("date")):"time"===e?s.clone().utc().set("hour",i.get("hour")).set("minute",i.get("minute")).set("second",i.get("second")):void 0:i}},validations(){return{value:{min:!this.min||(t=>this.$helper.validate.datetime(this,t,this.min,"isAfter",this.step.unit)),max:!this.max||(t=>this.$helper.validate.datetime(this,t,this.max,"isBefore",this.step.unit)),required:!this.required||pr["required"]}}}},Ir=Lr,Ar=(s("4433"),Object(c["a"])(Ir,jr,Tr,!1,null,null,null)),Br=Ar.exports,Mr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("input",t._g(t._b({ref:"input",staticClass:"k-text-input",attrs:{dir:t.direction}},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))},Dr=[],Nr=function(t){const e=t.$store.state.languages.default||null,s=t.$store.state.languages.current||null,i=t.$store.state.system.info.multilang||!1,n=t.$store.state.system.info.user?t.$store.state.system.info.user.language:null,a=s?s.direction:null;if(i&&s&&!1===t.disabled&&(s.direction!==e.direction||n!==s.code))return a},Pr={inheritAttrs:!1,class:"k-text-input",props:{autocomplete:{type:[Boolean,String],default:"off"},autofocus:Boolean,disabled:Boolean,id:[Number,String],maxlength:Number,minlength:Number,name:[Number,String],pattern:String,placeholder:String,preselect:Boolean,required:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String},data(){return{listeners:{...this.$listeners,input:t=>this.onInput(t.target.value)}}},computed:{direction(){return Nr(this)}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.select()}},validations(){const t=t=>!this.required&&!t||!this.$refs.input.validity.patternMismatch;return{value:{required:!this.required||pr["required"],minLength:!this.minlength||Object(pr["minLength"])(this.minlength),maxLength:!this.maxlength||Object(pr["maxLength"])(this.maxlength),email:"email"!==this.type||pr["email"],url:"url"!==this.type||pr["url"],pattern:!this.pattern||t}}}},Rr=Pr,qr=(s("cb8f"),Object(c["a"])(Rr,Mr,Dr,!1,null,null,null)),Fr=qr.exports,Ur={extends:Fr,props:{...Fr.props,autocomplete:{type:String,default:"email"},placeholder:{type:String,default(){return this.$t("email.placeholder")}},type:{type:String,default:"email"}}},Hr=Ur,zr=Object(c["a"])(Hr,Xa,Qa,!1,null,null,null),Kr=zr.exports,Gr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-writer",t._b({ref:"input",staticClass:"k-list-input",attrs:{extensions:t.extensions,nodes:["bulletList","orderedList"],value:t.list},on:{input:t.onInput}},"k-writer",t.$props,!1))},Wr=[];class Yr extends Ca{get schema(){return{content:"bulletList|orderedList"}}}var Vr,Jr,Zr,Xr,Qr,to,eo,so,io={inheritAttrs:!1,props:{autofocus:Boolean,marks:{type:[Array,Boolean],default:!0},value:String},data(){return{list:this.value,html:this.value}},computed:{extensions(){return[new Yr({inline:!0})]}},watch:{value(t){t!==this.html&&(this.list=t,this.html=t)}},methods:{focus(){this.$refs.input.focus()},onInput(t){let e=(new DOMParser).parseFromString(t,"text/html"),s=e.querySelector("ul, ol");if(!s)return void this.$emit("input",this.list="");let i=s.textContent.trim();0!==i.length?(this.list=t,this.html=t.replace(/(

|<\/p>)/gi,""),this.$emit("input",this.html)):this.$emit("input",this.list="")}}},no=io,ao=(s("82c9"),Object(c["a"])(no,Gr,Wr,!1,null,null,null)),ro=ao.exports,oo=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle(e)}}},[t._l(t.sorted,(function(e){return s("k-tag",{key:e.value,ref:e.value,refInFor:!0,attrs:{removable:!0},on:{remove:function(s){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.navigate("next")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:t.$refs.dropdown.open(e)}]}},[s("span",{domProps:{innerHTML:t._s(e.text)}})])})),s("k-dropdown-content",{ref:"dropdown",attrs:{slot:"footer"},on:{open:t.onOpen,close:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close(e))}},slot:"footer"},[t.search?s("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape(e))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),s("div",{staticClass:"k-multiselect-options"},[t._l(t.visible,(function(e){return s("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(s){return s.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.preventDefault(),s.stopPropagation(),t.select(e))},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"space",32,s.key,[" ","Spacebar"])?null:(s.preventDefault(),s.stopPropagation(),t.select(e))}]}},[s("span",{domProps:{innerHTML:t._s(e.display)}}),s("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?s("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v(" "+t._s(t.emptyLabel)+" ")]):t._e()],2),t.visible.length1&&!this.sort},dragOptions(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel(){return this.q?this.$t("search.results.none"):this.$t("options.none")},filtered(){return this.q&&this.q.length>=(this.search.min||0)?this.options.filter(t=>this.isFiltered(t)).map(t=>({...t,display:this.toHighlightedString(t.text),info:this.toHighlightedString(t.value)})):this.options.map(t=>({...t,display:t.text,info:t.value}))},more(){return!this.max||this.state.lengththis.options.findIndex(e=>e.value===t.value);return t.sort((t,s)=>e(t)-e(s))},visible(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered}},watch:{value(t){this.state=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close)},destroyed(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close)},methods:{add(t){!0===this.more&&(this.state.push(t),this.onInput())},blur(){this.close()},close(){!0===this.$refs.dropdown.isOpen&&(this.$refs.dropdown.close(),this.limit=!0)},escape(){this.q?this.q=null:this.close()},focus(){this.$refs.dropdown.open()},index(t){return this.state.findIndex(e=>e.value===t.value)},isFiltered(t){return String(t.text).match(this.regex)||String(t.value).match(this.regex)},isSelected(t){return-1!==this.index(t)},navigate(t){let e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus&&e.nextSibling.focus();break}},onClose(){!1===this.$refs.dropdown.isOpen&&(document.activeElement===this.$parent.$el&&(this.q=null),this.$parent.$el.focus())},onInput(){this.$emit("input",this.sorted)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen(){this.$nextTick(()=>{this.$refs.search&&this.$refs.search.focus&&this.$refs.search.focus(),this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop=this.scrollTop})},remove(t){this.state.splice(this.index(t),1),this.onInput()},select(t){this.scrollTop=this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop,t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)},toHighlightedString(t){return t=this.$helper.string.stripHTML(t),t.replace(this.regex,"$1")}},validations(){return{state:{required:!this.required||pr["required"],minLength:!this.min||Object(pr["minLength"])(this.min),maxLength:!this.max||Object(pr["maxLength"])(this.max)}}}},uo=co,po=(s("11ae"),Object(c["a"])(uo,oo,lo,!1,null,null,null)),ho=po.exports,mo=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{step:t.stepNumber,type:"number"},domProps:{value:t.number},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.ctrlKey?t.clean(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.clean(e):null}]}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required},!1),t.listeners))},fo=[],go={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],max:Number,min:Number,name:[Number,String],placeholder:String,preselect:Boolean,required:Boolean,step:Number,value:{type:[Number,String],default:null}},data(){return{number:this.format(this.value),stepNumber:this.format(this.step),timeout:null,listeners:{...this.$listeners,input:t=>this.onInput(t.target.value),blur:this.onBlur}}},watch:{value(t){this.number=t},number:{immediate:!0,handler(){this.onInvalid()}}},mounted(){this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{decimals(){const t=Number(this.step||0);return Math.floor(t)===t?0:-1!==t.toString().indexOf("e")?parseInt(t.toFixed(16).split(".")[1].split("").reverse().join("")).toString().length:t.toString().split(".")[1].length||0},format(t){if(isNaN(t)||""===t)return"";const e=this.decimals();return t=e?parseFloat(t).toFixed(e):Number.isInteger(this.step)?parseInt(t):parseFloat(t),t},clean(){this.number=this.format(this.number)},emit(t){t=parseFloat(t),isNaN(t)&&(t=""),t!==this.value&&this.$emit("input",t)},focus(){this.$refs.input.focus()},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.number=t,this.emit(t)},onBlur(){this.clean(),this.emit(this.number)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||pr["required"],min:!this.min||Object(pr["minValue"])(this.min),max:!this.max||Object(pr["maxValue"])(this.max)}}}},bo=go,ko=(s("6018"),Object(c["a"])(bo,mo,fo,!1,null,null,null)),vo=ko.exports,$o={extends:Fr,props:{...Fr.props,autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}}},yo=$o,_o=Object(c["a"])(yo,Vr,Jr,!1,null,null,null),wo=_o.exports,xo=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,i){return s("li",{key:i},[s("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+i,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(s){return t.onInput(e.value)}}}),e.info?s("label",{attrs:{for:t.id+"-"+i}},[s("span",{staticClass:"k-radio-input-text",domProps:{innerHTML:t._s(e.text)}}),s("span",{staticClass:"k-radio-input-info"},[t._v(t._s(e.info))])]):s("label",{attrs:{for:t.id+"-"+i},domProps:{innerHTML:t._s(e.text)}}),e.icon?s("k-icon",{attrs:{type:e.icon}}):t._e()],1)})),0)},Oo=[],Co={inheritAttrs:!1,props:{autofocus:Boolean,columns:Number,disabled:Boolean,id:{type:[Number,String],default(){return this._uid}},options:Array,required:Boolean,value:[String,Number,Boolean]},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||pr["required"]}}}},So=Co,Eo=(s("893d"),Object(c["a"])(So,xo,Oo,!1,null,null,null)),jo=Eo.exports,To=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-range-input"},[s("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:"--min: "+t.min+"; --max: "+t.max+"; --value: "+t.position,attrs:{type:"range"},domProps:{value:t.position}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step},!1),t.listeners)),t.tooltip?s("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?s("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),s("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?s("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])},Lo=[],Io={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[String,Number],default:[Number,String],max:{type:Number,default:100},min:{type:Number,default:0},name:[String,Number],required:Boolean,step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default(){return{before:null,after:null}}},value:[Number,String]},data(){return{listeners:{...this.$listeners,input:t=>this.onInput(t.target.value)}}},computed:{baseline(){return this.min<0?0:this.min},label(){return this.required||this.value||0===this.value?this.format(this.position):"–"},position(){return this.value||0===this.value?this.value:this.default||this.baseline}},watch:{position(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},format(t){const e=document.lang?document.lang.replace("_","-"):"en",s=this.step.toString().split("."),i=s.length>1?s[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:i}).format(t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.$emit("input",t)}},validations(){return{position:{required:!this.required||pr["required"],min:!this.min||Object(pr["minValue"])(this.min),max:!this.max||Object(pr["maxValue"])(this.max)}}}},Ao=Io,Bo=(s("b5d2"),Object(c["a"])(Ao,To,Lo,!1,null,null,null)),Mo=Bo.exports,Do=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[s("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{id:t.id,autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,name:t.name,required:t.required},domProps:{value:t.selected}},t.listeners),[t.hasEmptyOption?s("option",{attrs:{disabled:t.required,value:""}},[t._v(" "+t._s(t.emptyOption)+" ")]):t._e(),t._l(t.options,(function(e){return s("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v(" "+t._s(e.text)+" ")])}))],2),t._v(" "+t._s(t.label)+" ")])},No=[],Po={inheritAttrs:!1,props:{autofocus:Boolean,ariaLabel:String,default:String,disabled:Boolean,empty:{type:[Boolean,String],default:!0},id:[Number,String],name:[Number,String],placeholder:String,options:{type:Array,default:()=>[]},required:Boolean,value:{type:[String,Number,Boolean],default:""}},data(){return{selected:this.value,listeners:{...this.$listeners,click:t=>this.onClick(t),change:t=>this.onInput(t.target.value),input:()=>{}}}},computed:{emptyOption(){return this.placeholder||"—"},hasEmptyOption(){return!1!==this.empty&&!(this.required&&this.default)},label(){const t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value(t){this.selected=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onClick(t){t.stopPropagation(),this.$emit("click",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.selected=t,this.$emit("input",this.selected)},select(){this.focus()},text(t){let e=null;return this.options.forEach(s=>{s.value==t&&(e=s.text)}),e}},validations(){return{selected:{required:!this.required||pr["required"]}}}},Ro=Po,qo=(s("6a18"),Object(c["a"])(Ro,Do,No,!1,null,null,null)),Fo=qo.exports,Uo=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-draggable",{ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions,dir:t.direction},on:{end:t.onInput}},[t._l(t.tags,(function(e,i){return s("k-tag",{key:i,ref:e.value,refInFor:!0,attrs:{removable:!t.disabled,name:"tag"},on:{remove:function(s){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(s){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(s){return t.edit(e)}}},[s("span",{domProps:{innerHTML:t._s(e.text)}})])})),s("span",{staticClass:"k-tags-input-element",attrs:{slot:"footer"},slot:"footer"},[s("k-autocomplete",{ref:"autocomplete",attrs:{html:!0,options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[s("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput(e)}]}})])],1)],2)},Ho=[],zo={inheritAttrs:!1,props:{autofocus:Boolean,accept:{type:String,default:"all"},disabled:Boolean,icon:{type:[String,Boolean],default:"tag"},id:[Number,String],layout:String,max:Number,min:Number,name:[Number,String],options:{type:Array,default(){return[]}},required:Boolean,separator:{type:String,default:","},value:{type:Array,default(){return[]}}},data(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map(t=>(this.icon&&this.icon.length>0&&(t.icon=this.icon),t),this)}},computed:{direction(){return Nr(this)},dragOptions(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable(){return this.tags.length>1},skip(){return this.tags.map(t=>t.value)}},watch:{value(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString(t){if(t)if(t=t.trim(),t.includes(this.separator))t.split(this.separator).forEach(t=>{this.addString(t)});else if(0!==t.length)if("options"===this.accept){const e=this.options.filter(e=>e.text===t)[0];if(!e)return;this.addTag(e)}else this.addTag({text:t,value:t})},addTag(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex(t){if("options"===this.accept){const e=this.options.filter(e=>e.value===t.value)[0];if(!e)return}-1===this.index(t)&&(!this.max||this.tags.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t;break}let i=this.tags[e];if(i){let t=this.$refs[i.value];if(t&&t[0])return{ref:t[0],tag:i,index:e}}return!1},index(t){return this.tags.findIndex(e=>e.value===t.value)},onInput(){this.$emit("input",this.tags)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags(t){return!1===Array.isArray(t)?[]:t.map(t=>"string"===typeof t?{text:t,value:t}:t)},remove(t){const e=this.get("prev"),s=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):s?this.selectTag(s.tag):(this.selectTag(null),this.$refs.input.focus())},select(){this.focus()},selectTag(t){this.selected=t},tab(t){this.newTag&&this.newTag.length>0&&(t.preventDefault(),this.addString(this.newTag))},type(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations(){return{tags:{required:!this.required||pr["required"],minLength:!this.min||Object(pr["minLength"])(this.min),maxLength:!this.max||Object(pr["maxLength"])(this.max)}}}},Ko=zo,Go=(s("27c1"),Object(c["a"])(Ko,Uo,Ho,!1,null,null,null)),Wo=Go.exports,Yo={extends:Fr,props:{...Fr.props,autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}}},Vo=Yo,Jo=Object(c["a"])(Vo,Zr,Xr,!1,null,null,null),Zo=Jo.exports,Xo=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-textarea-input",attrs:{"data-theme":t.theme,"data-over":t.over}},[s("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons&&!t.disabled?s("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,disabled:t.disabled,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),s("textarea",t._b({ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font,"data-size":t.size,dir:t.direction},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit(e):null},function(e){return e.metaKey?t.onShortcut(e):null},function(e){return e.ctrlKey?t.onShortcut(e):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),s("k-toolbar-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),s("k-toolbar-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),s("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?s("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)},Qo=[],tl={inheritAttrs:!1,props:{autofocus:Boolean,buttons:{type:[Boolean,Array],default:!0},disabled:Boolean,endpoints:Object,font:String,id:[Number,String],name:[Number,String],maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,required:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String},data(){return{over:!1}},computed:{direction(){return Nr(this)}},watch:{value(){this.onInvalid(),this.$nextTick(()=>{this.resize()})}},mounted(){this.$nextTick(()=>{this.$library.autosize(this.$refs.input)}),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel(){this.$refs.input.focus()},dialog(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus(){this.$refs.input.focus()},insert(t){const e=this.$refs.input,s=e.value;setTimeout(()=>{if(e.focus(),document.execCommand("insertText",!1,t),e.value===s){const s=e.value.slice(0,e.selectionStart)+t+e.value.slice(e.selectionEnd);e.value=s,this.$emit("input",s)}}),this.resize()},insertFile(t){t&&t.length>0&&this.insert(t.map(t=>t.dragText).join("\n\n"))},insertUpload(t,e){this.insert(e.map(t=>t.dragText).join("\n\n")),this.$events.$emit("model.update")},onClick(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand(t,e){"function"===typeof this[t]?"function"===typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop(t){if(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:O.api+"/"+this.endpoints.field+"/upload",multiple:!1});const e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus(t){this.$emit("focus",t)},onInput(t){this.$emit("input",t.target.value)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut(){this.$refs.input.blur(),this.over=!1},onOver(t){if(this.uploads&&this.$helper.isUploadEvent(t))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);const e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut(t){!1!==this.buttons&&"Meta"!==t.key&&"Control"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit(t){return this.$emit("submit",t)},prepend(t){this.insert(t+" "+this.selection())},resize(){this.$library.autosize.update(this.$refs.input)},select(){this.$refs.select()},selectFile(){this.$refs.fileDialog.open({endpoint:this.endpoints.field+"/files",multiple:!1})},selection(){const t=this.$refs.input,e=t.selectionStart,s=t.selectionEnd;return t.value.substring(e,s)},uploadFile(){this.$refs.fileUpload.open({url:O.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap(t){this.insert(t+this.selection()+t)}},validations(){return{value:{required:!this.required||pr["required"],minLength:!this.minlength||Object(pr["minLength"])(this.minlength),maxLength:!this.maxlength||Object(pr["maxLength"])(this.maxlength)}}}},el=tl,sl=(s("cca8"),Object(c["a"])(el,Xo,Qo,!1,null,null,null)),il=sl.exports,nl={extends:Er,props:{display:{type:String,default:"HH:mm"},max:String,min:String,step:{type:Object,default(){return{size:5,unit:"minute"}}},type:{type:String,default:"time"}},computed:{is12HourFormat(){return this.display.toLowerCase().includes("a")},map(){return{second:["s","ss"],minute:["m","mm"],hour:this.is12HourFormat?["h","hh"]:["H","HH"]}},patterns(){let t=Er.computed.patterns.apply(this);return this.is12HourFormat&&(t=t.map(t=>t+"a").concat(t)),t}},methods:{emit(t){const e=this.toFormat(this.parsed,"HH:mm:ss")||"";this.$emit(t,e)},toDatetime(t){return this.$library.dayjs.utc(t,"HH:mm:ss")}}},al=nl,rl=Object(c["a"])(al,Qr,to,!1,null,null,null),ol=rl.exports,ll=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-toggle-input",attrs:{"data-disabled":t.disabled}},[s("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),s("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])},cl=[],ul={inheritAttrs:!1,props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String],default(){return[this.$t("off"),this.$t("on")]}},required:Boolean,value:Boolean},computed:{label(){return Array.isArray(this.text)?this.value?this.text[1]:this.text[0]:this.text}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onEnter(t){"Enter"===t.key&&this.$refs.input.click()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.focus()}},validations(){return{value:{required:!this.required||pr["required"]}}}},dl=ul,pl=(s("bb41"),Object(c["a"])(dl,ll,cl,!1,null,null,null)),hl=pl.exports,ml={extends:Fr,props:{...Fr.props,autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}}},fl=ml,gl=Object(c["a"])(fl,eo,so,!1,null,null,null),bl=gl.exports,kl=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-blocks-field"},"k-field",t.$props,!1),[t.hasFieldsets?s("k-dropdown",{attrs:{slot:"options"},slot:"options"},[s("k-button",{attrs:{icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"add"},on:{click:function(e){return t.$refs.blocks.choose(t.value.length)}}},[t._v(" "+t._s(t.$t("add"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"trash"},on:{click:function(e){return t.$refs.blocks.confirmToRemoveAll()}}},[t._v(" "+t._s(t.$t("delete.all"))+" ")])],1)],1):t._e(),s("k-blocks",t._g({ref:"blocks",attrs:{compact:!1,empty:t.empty,endpoints:t.endpoints,fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups,group:t.group,max:t.max,value:t.value},on:{close:function(e){t.opened=e},open:function(e){t.opened=e}}},t.$listeners))],1)},vl=[],$l={inheritAttrs:!1,props:{...fn["a"].props,empty:String,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default(){return[]}}},data(){return{opened:[]}},computed:{hasFieldsets(){return Object.keys(this.fieldsets).length},isEmpty(){return 0===this.value.length},isFull(){return null!==this.max&&this.value.length>=this.max}}},yl=$l,_l=(s("ae14"),Object(c["a"])(yl,kl,vl,!1,null,null,null)),wl=_l.exports,xl=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)},Ol=[],Cl={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,..._r.props,counter:{type:Boolean,default:!0}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus(){this.$refs.input.focus()}}},Sl=Cl,El=Object(c["a"])(Sl,xl,Ol,!1,null,null,null),jl=El.exports,Tl=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.value,theme:"field"},scopedSlots:t._u([t.calendar?{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:t.onFocus}}),s("k-dropdown-content",{ref:"calendar",attrs:{align:"right"}},[s("k-calendar",{attrs:{value:t.datetime,min:t.min,max:t.max},on:{input:t.onSelect}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1),t.listeners))],1)},Ll=[],Il={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Br.props,calendar:{type:Boolean,default:!0},icon:{type:String,default:"calendar"}},data(){return{datetime:this.value}},computed:{inputType(){return!1===this.time?"date":"datetime"},listeners(){return{...this.$listeners,enter:this.onSelect,focus:this.onFocus,input:this.onInput,update:this.onUpdate}}},watch:{value(t){this.datetime=t}},methods:{focus(){this.$refs.input.focus()},onUpdate(t){this.$emit("input",t)},onFocus(){this.$refs.calendar&&this.$refs.calendar.open()},onInput(t){this.datetime=t},onSelect(t){this.onUpdate(t),this.$refs.calendar&&this.$refs.calendar.close()}}},Al=Il,Bl=Object(c["a"])(Al,Tl,Ll,!1,null,null,null),Ml=Bl.exports,Dl=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"}},"k-input",t.$props,!1),t.$listeners),[t.link?s("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Nl=[],Pl={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Kr.props,link:{type:Boolean,default:!0},icon:{type:String,default:"email"}},computed:{mailto(){return this.value&&this.value.length>0?"mailto:"+this.value:null}},methods:{focus(){this.$refs.input.focus()}}},Rl=Pl,ql=Object(c["a"])(Rl,Dl,Nl,!1,null,null,null),Fl=ql.exports,Ul=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-files-field"},"k-field",t.$props,!1),[t.more&&!t.disabled?s("template",{slot:"options"},[s("k-button-group",{staticClass:"k-field-options"},[t.uploads?[s("k-dropdown",[s("k-button",{ref:"pickerToggle",staticClass:"k-field-options-button",attrs:{icon:t.btnIcon},on:{click:t.prompt}},[t._v(" "+t._s(t.btnLabel)+" ")]),s("k-dropdown-content",{ref:"picker",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"check"},on:{click:t.open}},[t._v(" "+t._s(t.$t("select"))+" ")]),s("k-dropdown-item",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(" "+t._s(t.$t("upload"))+" ")])],1)],1)]:[s("k-button",{staticClass:"k-field-options-button",attrs:{icon:"check"},on:{click:t.open}},[t._v(" "+t._s(t.$t("select"))+" ")])]],2)],1):t._e(),t.selected.length?[s("k-draggable",{attrs:{element:t.elements.list,list:t.selected,"data-size":t.size,handle:!0,"data-invalid":t.isInvalid},on:{end:t.onInput}},t._l(t.selected,(function(e,i){return s(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,link:t.link?e.link:null,info:e.info,image:e.image,icon:e.icon}},[t.disabled?t._e():s("k-button",{attrs:{slot:"options",tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)})),1)]:s("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"image"},on:{click:t.prompt}},[t._v(" "+t._s(t.empty||t.$t("field.files.empty"))+" ")]),s("k-files-dialog",{ref:"selector",on:{submit:t.select}}),s("k-upload",{ref:"fileUpload",on:{success:t.selectUpload}})],2)},Hl=[],zl={inheritAttrs:!1,props:{...fn["a"].props,empty:String,info:String,link:Boolean,layout:{type:String,default:"list"},max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default(){return[]}}},data(){return{selected:this.value}},computed:{btnIcon(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},elements(){const t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},isInvalid(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},more(){return!this.max||this.max>this.selected.length}},watch:{value(t){this.selected=t}},methods:{focus(){},onInput(){this.$emit("input",this.selected)},remove(t){this.selected.splice(t,1),this.onInput()},removeById(t){this.selected=this.selected.filter(e=>e.id!==t),this.onInput()},select(t){0!==t.length?(this.selected=this.selected.filter(e=>t.filter(t=>t.id===e.id).length>0),t.forEach(t=>{0===this.selected.filter(e=>t.id===e.id).length&&this.selected.push(t)}),this.onInput()):this.selected=[]}}},Kl={mixins:[zl],props:{uploads:[Boolean,Object,Array]},created(){this.$events.$on("file.delete",this.removeById)},destroyed(){this.$events.$off("file.delete",this.removeById)},methods:{prompt(t){if(t.stopPropagation(),this.disabled)return!1;this.more&&this.uploads?this.$refs.picker.toggle():this.open()},open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map(t=>t.id)})},selectUpload(t,e){!1===this.multiple&&(this.selected=[]),e.forEach(t=>{this.selected.push(t)}),this.onInput(),this.$events.$emit("model.update")},upload(){this.$refs.fileUpload.open({url:O.api+"/"+this.endpoints.field+"/upload",multiple:this.multiple,accept:this.uploads.accept})}}},Gl=Kl,Wl=(s("4a4b"),Object(c["a"])(Gl,Ul,Hl,!1,null,null,null)),Yl=Wl.exports,Vl=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-field k-gap-field"})},Jl=[],Zl={},Xl=Object(c["a"])(Zl,Vl,Jl,!1,null,null,null),Ql=Xl.exports,tc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-headline-field"},[s("k-headline",{attrs:{"data-numbered":t.numbered,size:"large"}},[t._v(" "+t._s(t.label)+" ")]),t.help?s("footer",{staticClass:"k-field-footer"},[t.help?s("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)},ec=[],sc={props:{help:String,label:String,numbered:Boolean}},ic=sc,nc=(s("19d7"),Object(c["a"])(ic,tc,ec,!1,null,null,null)),ac=nc.exports,rc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-field k-info-field"},[s("k-headline",[t._v(t._s(t.label))]),s("k-box",{attrs:{theme:t.theme}},[s("k-text",{domProps:{innerHTML:t._s(t.text)}})],1),t.help?s("footer",{staticClass:"k-field-footer"},[t.help?s("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)},oc=[],lc={props:{help:String,label:String,text:String,theme:{type:String,default:"info"}}},cc=lc,uc=(s("ddfd"),Object(c["a"])(cc,rc,oc,!1,null,null,null)),dc=uc.exports,pc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-layout-field"},"k-field",t.$props,!1),[s("k-block-layouts",t._b({on:{input:function(e){return t.$emit("input",e)}}},"k-block-layouts",t.$props,!1))],1)},hc=[],mc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.rows.length?[s("k-draggable",t._b({staticClass:"k-layouts",on:{sort:t.save}},"k-draggable",t.draggableOptions,!1),t._l(t.rows,(function(e,i){return s("k-layout",t._b({key:e.id,attrs:{disabled:t.disabled,endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,"is-selected":t.selected===e.id,settings:t.settings},on:{append:function(e){return t.selectLayout(i+1)},duplicate:function(s){return t.duplicateLayout(i,e)},prepend:function(e){return t.selectLayout(i)},remove:function(s){return t.removeLayout(e)},select:function(s){t.selected=e.id},updateAttrs:function(e){return t.updateAttrs(i,e)},updateColumn:function(s){return t.updateColumn(Object.assign({},{layout:e,layoutIndex:i},s))}}},"k-layout",e,!1))})),1),t.disabled?t._e():s("k-button",{staticClass:"k-layout-add-button",attrs:{icon:"add"},on:{click:function(e){return t.selectLayout(t.rows.length)}}})]:[s("k-empty",{staticClass:"k-layout-empty",attrs:{icon:"dashboard"},on:{click:function(e){return t.selectLayout(0)}}},[t._v(" "+t._s(t.empty||t.$t("field.layout.empty"))+" ")])],s("k-dialog",{ref:"selector",staticClass:"k-layout-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[s("k-headline",[t._v(t._s(t.$t("field.layout.select")))]),s("ul",t._l(t.layouts,(function(e,i){return s("li",{key:i,staticClass:"k-layout-selector-option"},[s("k-grid",{nativeOn:{click:function(s){return t.addLayout(e)}}},t._l(e,(function(t,e){return s("k-column",{key:e,attrs:{width:t}})})),1)],1)})),0)],1)],2)},fc=[],gc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"k-layout",attrs:{"data-selected":t.isSelected,tabindex:"0"},on:{click:function(e){return t.$emit("select")}}},[s("k-grid",{staticClass:"k-layout-columns"},t._l(t.columns,(function(e,i){return s("k-layout-column",t._b({key:e.id,attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets},on:{input:function(s){return t.$emit("updateColumn",{column:e,columnIndex:i,blocks:s})}}},"k-layout-column",e,!1))})),1),t.disabled?t._e():s("nav",{staticClass:"k-layout-toolbar"},[t.settings?s("k-button",{staticClass:"k-layout-toolbar-button",attrs:{tooltip:t.$t("settings"),icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}}):t._e(),s("k-dropdown",[s("k-button",{staticClass:"k-layout-toolbar-button",attrs:{icon:"angle-down"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"angle-up"},on:{click:function(e){return t.$emit("prepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),s("k-dropdown-item",{attrs:{icon:"angle-down"},on:{click:function(e){return t.$emit("append")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),s("hr"),t.settings?s("k-dropdown-item",{attrs:{icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]):t._e(),s("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$refs.confirmRemoveDialog.open()}}},[t._v(" "+t._s(t.$t("field.layout.delete"))+" ")])],1)],1),s("k-sort-handle")],1),t.settings?s("k-form-drawer",{ref:"drawer",staticClass:"k-layout-drawer",attrs:{tabs:t.tabs,title:t.$t("settings"),value:t.attrs,icon:"settings"},on:{input:function(e){return t.$emit("updateAttrs",e)}}}):t._e(),s("k-remove-dialog",{ref:"confirmRemoveDialog",attrs:{text:t.$t("field.layout.delete.confirm")},on:{submit:function(e){return t.$emit("remove")}}})],1)},bc=[],kc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-column k-layout-column",attrs:{id:t.id,"data-width":t.width,tabindex:"0"},on:{dblclick:function(e){return t.$refs.blocks.choose(t.blocks.length)}}},[s("k-blocks",{ref:"blocks",attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,value:t.blocks,group:"layout"},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{dblclick:function(t){t.stopPropagation()}}})],1)},vc=[],$c={props:{blocks:Array,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,width:String}},yc=$c,_c=(s("e791"),Object(c["a"])(yc,kc,vc,!1,null,null,null)),wc=_c.exports,xc={components:{"k-layout-column":wc},props:{attrs:[Array,Object],columns:Array,disabled:Boolean,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,settings:Object},computed:{tabs(){let t=this.settings.tabs;return Object.entries(t).forEach(([e,s])=>{Object.entries(s.fields).forEach(([s])=>{t[e].fields[s].endpoints={field:this.endpoints.field+"/fields/"+s,section:this.endpoints.section,model:this.endpoints.model}})}),t}}},Oc=xc,Cc=(s("170b"),Object(c["a"])(Oc,gc,bc,!1,null,null,null)),Sc=Cc.exports,Ec={components:{"k-layout":Sc},props:{disabled:Boolean,empty:String,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,layouts:Array,max:Number,settings:Object,value:Array},data(){return{currentLayout:null,nextIndex:null,rows:this.value,selected:null}},computed:{draggableOptions(){return{id:this._uid,handle:!0,list:this.rows}}},watch:{value(){this.rows=this.value}},methods:{async addLayout(t){let e=await this.$api.post(this.endpoints.field+"/layout",{columns:t});this.rows.splice(this.nextIndex,0,e),this.layouts.length>1&&this.$refs.selector.close(),this.save()},duplicateLayout(t,e){let s={...this.$helper.clone(e),id:this.$helper.uuid()};s.columns=s.columns.map(t=>(t.id=this.$helper.uuid(),t.blocks=t.blocks.map(t=>(t.id=this.$helper.uuid(),t)),t)),this.rows.splice(t+1,0,s),this.save()},removeLayout(t){const e=this.rows.findIndex(e=>e.id===t.id);-1!==e&&this.$delete(this.rows,e),this.save()},save(){this.$emit("input",this.rows)},selectLayout(t){this.nextIndex=t,1!==this.layouts.length?this.$refs.selector.open():this.addLayout(this.layouts[0])},updateColumn(t){this.rows[t.layoutIndex].columns[t.columnIndex].blocks=t.blocks,this.save()},updateAttrs(t,e){this.rows[t].attrs=e,this.save()}}},jc=Ec,Tc=(s("a659"),Object(c["a"])(jc,mc,fc,!1,null,null,null)),Lc=Tc.exports,Ic={components:{"k-block-layouts":Lc},inheritAttrs:!1,props:{...fn["a"].props,empty:String,fieldsetGroups:Object,fieldsets:Object,layouts:{type:Array,default(){return[["1/1"]]}},settings:Object,value:{type:Array,default(){return[]}}}},Ac=Ic,Bc=Object(c["a"])(Ac,pc,hc,!1,null,null,null),Mc=Bc.exports,Dc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("hr",{staticClass:"k-line-field"})},Nc=[],Pc={},Rc=Pc,qc=(s("718c"),Object(c["a"])(Rc,Dc,Nc,!1,null,null,null)),Fc=qc.exports,Uc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-list-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[s("k-input",t._b({ref:"input",attrs:{id:t._uid,marks:t.marks,value:t.value,type:"list",theme:"field"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)},Hc=[],zc={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,marks:[Array,Boolean],value:String},methods:{focus(){this.$refs.input.focus()}}},Kc=zc,Gc=(s("116a"),Object(c["a"])(Kc,Uc,Hc,!1,null,null,null)),Wc=Gc.exports,Yc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus(e))}}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)},Vc=[],Jc={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...ho.props,counter:{type:Boolean,default:!0},icon:{type:String,default:"angle-down"}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},mounted(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur(t){this.$refs.input.blur(t)},focus(){this.$refs.input.focus()}}},Zc=Jc,Xc=Object(c["a"])(Zc,Yc,Vc,!1,null,null,null),Qc=Xc.exports,tu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)},eu=[],su={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...vo.props},methods:{focus(){this.$refs.input.focus()}}},iu=su,nu=Object(c["a"])(iu,tu,eu,!1,null,null,null),au=nu.exports,ru=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-pages-field"},"k-field",t.$props,!1),[s("k-button-group",{staticClass:"k-field-options",attrs:{slot:"options"},slot:"options"},[t.more&&!t.disabled?s("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon},on:{click:t.open}},[t._v(" "+t._s(t.btnLabel)+" ")]):t._e()],1),t.selected.length?[s("k-draggable",{attrs:{element:t.elements.list,handle:!0,list:t.selected,"data-size":t.size,"data-invalid":t.isInvalid},on:{end:t.onInput}},t._l(t.selected,(function(e,i){return s(t.elements.item,{key:e.id,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:t.link?e.link:null,icon:e.icon,image:e.image}},[t.disabled?t._e():s("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)})),1)]:s("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"page"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.pages.empty"))+" ")]),s("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)},ou=[],lu={mixins:[zl],methods:{open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map(t=>t.id)})}}},cu=lu,uu=(s("7e85"),Object(c["a"])(cu,ru,ou,!1,null,null,null)),du=uu.exports,pu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"password"}},"k-input",t.$props,!1),t.$listeners))],2)},hu=[],mu={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...wo.props,counter:{type:Boolean,default:!0},minlength:{type:Number,default:8},icon:{type:String,default:"key"}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus(){this.$refs.input.focus()}}},fu=mu,gu=Object(c["a"])(fu,pu,hu,!1,null,null,null),bu=gu.exports,ku=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)},vu=[],$u={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...jo.props},methods:{focus(){this.$refs.input.focus()}}},yu=$u,_u=Object(c["a"])(yu,ku,vu,!1,null,null,null),wu=_u.exports,xu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)},Ou=[],Cu={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Mo.props},methods:{focus(){this.$refs.input.focus()}}},Su=Cu,Eu=Object(c["a"])(Su,xu,Ou,!1,null,null,null),ju=Eu.exports,Tu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)},Lu=[],Iu={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Fo.props,icon:{type:String,default:"angle-down"}},methods:{focus(){this.$refs.input.focus()}}},Au=Iu,Bu=Object(c["a"])(Au,Tu,Lu,!1,null,null,null),Mu=Bu.exports,Du=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}}},"k-field",t.$props,!1),[s("template",{slot:"options"},[t.more&&null===t.currentIndex?s("k-button",{ref:"add",attrs:{id:t._uid,icon:"add"},on:{click:t.add}},[t._v(" "+t._s(t.$t("add"))+" ")]):t._e()],1),null!==t.currentIndex?[s("div",{staticClass:"k-structure-backdrop",on:{click:t.escape}}),s("section",{staticClass:"k-structure-form"},[s("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{fields:t.formFields},on:{input:t.onInput,submit:t.submit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}),s("footer",{staticClass:"k-structure-form-buttons"},[s("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{icon:"cancel"},on:{click:t.close}},[t._v(" "+t._s(t.$t("cancel"))+" ")]),"new"!==t.currentIndex?s("k-pagination",{attrs:{dropdown:!1,total:t.items.length,limit:1,page:t.currentIndex+1,details:!0,validate:t.beforePaginate},on:{paginate:t.paginate}}):t._e(),s("k-button",{staticClass:"k-structure-form-submit-button",attrs:{icon:"check"},on:{click:t.submit}},[t._v(" "+t._s(t.$t("new"!==t.currentIndex?"confirm":"add"))+" ")])],1)],1)]:0===t.items.length?s("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"list-bullet"},on:{click:t.add}},[t._v(" "+t._s(t.empty||t.$t("field.structure.empty"))+" ")]):[s("table",{staticClass:"k-structure-table",attrs:{"data-invalid":t.isInvalid,"data-sortable":t.isSortable}},[s("thead",[s("tr",[s("th",{staticClass:"k-structure-table-index"},[t._v(" # ")]),t._l(t.columns,(function(e,i){return s("th",{key:i+"-header",staticClass:"k-structure-table-column",style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),t.disabled?t._e():s("th")],2)]),s("k-draggable",{attrs:{list:t.items,"data-disabled":t.disabled,options:t.dragOptions,handle:!0,dir:t.direction,element:"tbody"},on:{end:t.onInput}},t._l(t.paginatedItems,(function(e,i){return s("tr",{key:i,on:{click:function(t){t.stopPropagation()}}},[s("td",{staticClass:"k-structure-table-index"},[t.isSortable?s("k-sort-handle"):t._e(),s("span",{staticClass:"k-structure-table-index-number"},[t._v(t._s(t.indexOf(i)))])],1),t._l(t.columns,(function(n,a){return s("td",{key:a,staticClass:"k-structure-table-column",style:"width:"+t.width(n.width),attrs:{title:n.label,"data-align":n.align},on:{click:function(e){return t.jump(i,a)}}},[!1===t.columnIsEmpty(e[a])?[t.previewExists(n.type)?s("k-"+n.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:n,field:t.fields[a]},on:{input:function(e){return t.update(i,a,e)}}}):[s("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(n.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(n.after)+" ")])]]:t._e()],2)})),t.disabled?t._e():s("td",{staticClass:"k-structure-table-options"},[t.duplicate&&t.more&&null===t.currentIndex?[s("k-button",{key:i,ref:"actionsToggle",refInFor:!0,staticClass:"k-structure-table-options-button",attrs:{icon:"dots"},on:{click:function(e){t.$refs[i+"-actions"][0].toggle()}}}),s("k-dropdown-content",{ref:i+"-actions",refInFor:!0,attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.duplicateItem(i)}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("k-dropdown-item",{attrs:{icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}},[t._v(" "+t._s(t.$t("remove"))+" ")])],1)]:[s("k-button",{staticClass:"k-structure-table-options-button",attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(i)}}})]],2)],2)})),0)],1),t.limit?s("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():s("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[s("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)},Nu=[],Pu=s("9fc0"),Ru={mixins:[Pu["a"]],inheritAttrs:!1,props:{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default(){return[]}}},data(){return{autofocus:null,items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{direction(){return Nr(this)},dragOptions(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields(){let t={};return Object.keys(this.fields).forEach(e=>{let s=this.fields[e];s.section=this.name,s.endpoints={field:this.endpoints.field+"+"+e,section:this.endpoints.section,model:this.endpoints.model},null===this.autofocus&&!0===s.autofocus&&(this.autofocus=e),t[e]=s}),t},more(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isInvalid(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.max))},isSortable(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination(){let t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},paginatedItems(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add(){if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;let t={};Object.keys(this.fields).forEach(e=>{const s=this.fields[e];null!==s.default?t[e]=this.$helper.clone(s.default):t[e]=null}),this.currentIndex="new",this.currentModel=t,this.createForm()},addItem(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},beforePaginate(){return this.save(this.currentModel)},close(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("content/enable")},columnIsEmpty(t){return void 0===t||null===t||""===t||("object"===typeof t&&0===Object.keys(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length)},confirmRemove(t){this.close(),this.trash=t+this.pagination.offset,this.$refs.remove.open()},createForm(t){this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("content/disable"),this.$nextTick(()=>{this.$refs.form&&this.$refs.form.focus(t||this.autofocus)})},duplicateItem(t){this.addItem(this.items[t+this.pagination.offset]),this.onInput()},escape(){if("new"===this.currentIndex){let t=Object.values(this.currentModel),e=!0;if(t.forEach(t=>{!1===this.columnIsEmpty(t)&&(e=!1)}),!0===e)return void this.close()}this.submit()},focus(){this.$refs.add&&this.$refs.add.focus&&this.$refs.add.focus()},indexOf(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive(t){return this.currentIndex===t},jump(t,e){this.open(t+this.pagination.offset,e)},makeItems(t){return!1===Array.isArray(t)?[]:this.sort(t)},onInput(){this.$emit("input",this.items)},open(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.createForm(e)},paginate(t){this.open(t.offset)},paginateItems(t){this.page=t.page},remove(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},sort(t){return this.sortBy?t.sortBy(this.sortBy):t},save(){return null!==this.currentIndex&&void 0!==this.currentIndex?this.validate(this.currentModel).then(()=>("new"===this.currentIndex?this.addItem(this.currentModel):this.items[this.currentIndex]=this.currentModel,this.items=this.sort(this.items),this.onInput(),!0)).catch(t=>{throw this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:t}),t}):Promise.resolve()},submit(){this.save().then(this.close).catch(()=>{})},validate(t){return this.$api.post(this.endpoints.field+"/validate",t).then(t=>{if(t.length>0)throw t;return!0})},update(t,e,s){this.items[t][e]=s,this.onInput()}}},qu=Ru,Fu=(s("088c"),Object(c["a"])(qu,Du,Nu,!1,null,null,null)),Uu=Fu.exports,Hu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)},zu=[],Ku={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Wo.props,counter:{type:Boolean,default:!0}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value&&Array.isArray(this.value)?this.value.length:0,min:this.min,max:this.max}}},methods:{focus(){this.$refs.input.focus()}}},Gu=Ku,Wu=Object(c["a"])(Gu,Hu,zu,!1,null,null,null),Yu=Wu.exports,Vu=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)},Ju=[],Zu={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Zo.props,icon:{type:String,default:"phone"}},methods:{focus(){this.$refs.input.focus()}}},Xu=Zu,Qu=Object(c["a"])(Xu,Vu,Ju,!1,null,null,null),td=Qu.exports,ed=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t._t("options",null,{slot:"options"}),s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],2)},sd=[],id={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...Fr.props,counter:{type:Boolean,default:!0}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?String(this.value).length:0,min:this.minlength,max:this.maxlength}}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},nd=id,ad=(s("b746"),Object(c["a"])(nd,ed,sd,!1,null,null,null)),rd=ad.exports,od=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)},ld=[],cd={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...il.props,counter:{type:Boolean,default:!0}},computed:{counterOptions(){return null!==this.value&&!this.disabled&&!1!==this.counter&&{count:this.value?this.value.length:0,min:this.minlength,max:this.maxlength}}},methods:{focus(){this.$refs.input.focus()}}},ud=cd,dd=Object(c["a"])(ud,od,ld,!1,null,null,null),pd=dd.exports,hd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"time"}},"k-input",t.$props,!1),t.listeners))],1)},md=[],fd={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...ol.props,icon:{type:String,default:"clock"}},computed:{listeners(){return{...this.$listeners,update:t=>this.$emit("input",t),input:()=>{}}}},methods:{focus(){this.$refs.input.focus()}}},gd=fd,bd=Object(c["a"])(gd,hd,md,!1,null,null,null),kd=bd.exports,vd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)},$d=[],yd={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...hl.props},methods:{focus(){this.$refs.input.focus()}}},_d=yd,wd=Object(c["a"])(_d,vd,$d,!1,null,null,null),xd=wd.exports,Od=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"}},"k-input",t.$props,!1),t.$listeners),[t.link?s("k-button",{staticClass:"k-input-icon-button",attrs:{slot:"icon",icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"},slot:"icon"}):t._e()],1)],1)},Cd=[],Sd={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...bl.props,link:{type:Boolean,default:!0},icon:{type:String,default:"url"}},methods:{focus(){this.$refs.input.focus()}}},Ed=Sd,jd=Object(c["a"])(Ed,Od,Cd,!1,null,null,null),Td=jd.exports,Ld=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-users-field"},"k-field",t.$props,!1),[s("k-button-group",{staticClass:"k-field-options",attrs:{slot:"options"},slot:"options"},[t.more&&!t.disabled?s("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon},on:{click:t.open}},[t._v(" "+t._s(t.btnLabel)+" ")]):t._e()],1),t.selected.length?[s("k-draggable",{attrs:{element:t.elements.list,list:t.selected,handle:!0,"data-invalid":t.isInvalid},on:{end:t.onInput}},t._l(t.selected,(function(e,i){return s(t.elements.item,{key:e.email,tag:"component",attrs:{sortable:!t.disabled&&t.selected.length>1,text:e.text,info:e.info,link:t.link?t.$api.users.link(e.id):null,image:e.image,icon:e.icon}},[t.disabled?t._e():s("k-button",{attrs:{slot:"options",icon:"remove"},on:{click:function(e){return t.remove(i)}},slot:"options"})],1)})),1)]:s("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"users"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.users.empty"))+" ")]),s("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)},Id=[],Ad={mixins:[zl],methods:{open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map(t=>t.id)})}}},Bd=Ad,Md=(s("7f6e"),Object(c["a"])(Bd,Ld,Id,!1,null,null,null)),Dd=Md.exports,Nd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-writer-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[s("k-input",t._b({attrs:{after:t.after,before:t.before,icon:t.icon,theme:"field"}},"k-input",t.$props,!1),[s("k-writer",t._b({ref:"input",staticClass:"k-writer-field-input",attrs:{value:t.value},on:{input:function(e){return t.$emit("input",e)}}},"k-writer",t.$props,!1))],1)],1)},Pd=[],Rd={inheritAttrs:!1,props:{...fn["a"].props,...Sn.props,...cr.props},methods:{focus(){this.$refs.input.focus()}}},qd=Rd,Fd=(s("1267"),Object(c["a"])(qd,Nd,Pd,!1,null,null,null)),Ud=Fd.exports,Hd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"k-toolbar"},[s("div",{staticClass:"k-toolbar-wrapper"},[s("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,(function(e,i){return[e.divider?[s("span",{key:i,staticClass:"k-toolbar-divider"})]:e.dropdown?[s("k-dropdown",{key:i},[s("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[i+"-dropdown"][0].toggle()}}}),s("k-dropdown-content",{ref:i+"-dropdown",refInFor:!0},t._l(e.dropdown,(function(e,i){return s("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(s){return t.command(e.command,e.args)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1)]:[s("k-button",{key:i,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(s){return t.command(e.command,e.args)}}})]]}))],2)])])},zd=[];const Kd=function(t){this.command("insert",(e,s)=>{let i=[];return s.split("\n").forEach((e,s)=>{let n="ol"===t?s+1+".":"-";i.push(n+" "+e)}),i.join("\n")})};var Gd,Wd,Yd={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data(){let t={},e={},s=[],i=this.commands();return!1===this.buttons?t:(Array.isArray(this.buttons)&&(s=this.buttons),!0!==Array.isArray(this.buttons)&&(s=this.$options.layout),s.forEach((s,n)=>{if("|"===s)t["divider-"+n]={divider:!0};else if(i[s]){let n=i[s];t[s]=n,n.shortcut&&(e[n.shortcut]=s)}}),{layout:t,shortcuts:e})},methods:{command(t,e){"function"===typeof t?t.apply(this):this.$emit("command",t,e)},close(){Object.keys(this.$refs).forEach(t=>{const e=this.$refs[t][0];e.close&&"function"===typeof e.close&&e.close()})},fileCommandSetup(){let t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command(){return Kd.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command(){return Kd.apply(this,["ol"])}}}},shortcut(t,e){if(this.shortcuts[t]){const s=this.layout[this.shortcuts[t]];if(!s)return!1;e.preventDefault(),this.command(s.command,s.args)}}}},Vd=Yd,Jd=(s("df0d"),Object(c["a"])(Vd,Hd,zd,!1,null,null,null)),Zd=Jd.exports,Xd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[s("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},Qd=[],tp={data(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$store.state.system.info.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){const t=this.value.email||"";return this.value.text&&this.value.text.length>0?`(email: ${t} text: ${this.value.text})`:`(email: ${t})`},createMarkdown(){const t=this.value.email||"";return this.value.text&&this.value.text.length>0?`[${this.value.text}](mailto:${t})`:`<${t}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},ep=tp,sp=Object(c["a"])(ep,Xd,Qd,!1,null,null,null),ip=sp.exports,np=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[s("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},ap=[],rp={data(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$store.state.system.info.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){return this.value.text.length>0?`(link: ${this.value.url} text: ${this.value.text})`:`(link: ${this.value.url})`},createMarkdown(){return this.value.text.length>0?`[${this.value.text}](${this.value.url})`:`<${this.value.url}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},op=rp,lp=Object(c["a"])(op,np,ap,!1,null,null,null),cp=lp.exports,up=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("p",{staticClass:"k-date-field-preview"},[t._v(" "+t._s(t.text)+" ")])])},dp=[],pp={props:{field:Object,value:String},computed:{text(){const t=Er.methods.toDatetime.call(this,this.value);return t.format(this.field.display)}}},hp=pp,mp=(s("96a5"),Object(c["a"])(hp,up,dp,!1,null,null,null)),fp=mp.exports,gp=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",{staticClass:"k-url-field-preview"},[t._v(" "+t._s(t.column.before)+" "),s("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(" "+t._s(t.value)+" ")]),t._v(" "+t._s(t.column.after)+" ")],1)},bp=[],kp={props:{column:{type:Object,default(){return{}}},value:String},computed:{link(){return this.value}}},vp=kp,$p=(s("977f"),Object(c["a"])(vp,gp,bp,!1,null,null,null)),yp=$p.exports,_p={extends:yp,computed:{link(){return this.value&&this.value.length>0?"mailto:"+this.value:null}}},wp=_p,xp=Object(c["a"])(wp,Gd,Wd,!1,null,null,null),Op=xp.exports,Cp=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-files-field-preview"},t._l(t.value,(function(e){return s("li",{key:e.url},[s("k-link",{attrs:{title:e.filename,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},["image"===e.type?s("k-image",t._b({},"k-image",t.imageOptions(e),!1)):s("k-icon",t._b({},"k-icon",e.icon,!1))],1)],1)})),0):t._e()},Sp=[],Ep=function(t,e="list",s="1/1"){if(!t||0===t.length)return!1;let i=null,n=null;if(t.list?(i=t[e].url,n=t[e].srcset):(i=t.url,n=t.srcset),!i)return!1;let a={src:i,srcset:n,back:t.back||"black",cover:t.cover};return"cards"===e&&(a.ratio=t.ratio||"3/2",a.sizes=jp(s)),a};function jp(t){switch(t){case"1/2":case"2/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 44em, 27em";case"1/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 29.333em, 27em";case"1/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 22em, 27em";case"2/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 27em, 27em";case"3/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 66em, 27em";default:return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 88em, 27em"}}var Tp,Lp,Ip={props:{value:Array,field:Object},methods:{imageOptions(t){const e=Ep(t.image);return e.src?{...e,back:"pattern",cover:!1,...this.field.image||{}}:{src:t.url}}}},Ap=Ip,Bp=(s("21dc"),Object(c["a"])(Ap,Cp,Sp,!1,null,null,null)),Mp=Bp.exports,Dp=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-list-field-preview",domProps:{innerHTML:t._s(t.value)}})},Np=[],Pp={inheritAttrs:!1,props:{value:String}},Rp=Pp,qp=(s("200d"),Object(c["a"])(Rp,Dp,Np,!1,null,null,null)),Fp=qp.exports,Up=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-pages-field-preview"},t._l(t.value,(function(e){return s("li",{key:e.id},[s("figure",[s("k-link",{attrs:{title:e.id,to:t.$api.pages.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[s("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"page",back:"pattern"}}),s("figcaption",[t._v(" "+t._s(e.text)+" ")])],1)],1)])})),0):t._e()},Hp=[],zp={props:{value:Array}},Kp=zp,Gp=(s("d0c1"),Object(c["a"])(Kp,Up,Hp,!1,null,null,null)),Wp=Gp.exports,Yp=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("p",{staticClass:"k-time-field-preview"},[t._v(" "+t._s(t.text)+" ")])])},Vp=[],Jp={props:{field:Object,value:String},computed:{text(){const t=ol.methods.toDatetime.call(this,this.value);return t.format(this.field.display)}}},Zp=Jp,Xp=(s("f9aa"),Object(c["a"])(Zp,Yp,Vp,!1,null,null,null)),Qp=Xp.exports,th=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})},eh=[],sh={props:{field:Object,value:Boolean,column:Object},computed:{text(){return!1!==this.column.text?this.field.text:null}}},ih=sh,nh=(s("1c4e"),Object(c["a"])(ih,th,eh,!1,null,null,null)),ah=nh.exports,rh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-users-field-preview"},t._l(t.value,(function(e){return s("li",{key:e.email},[s("figure",[s("k-link",{attrs:{title:e.email,to:t.$api.users.link(e.id)},nativeOn:{click:function(t){t.stopPropagation()}}},[e.avatar?s("k-image",{staticClass:"k-users-field-preview-avatar",attrs:{src:e.avatar.url,back:"pattern"}}):s("k-icon",{staticClass:"k-users-field-preview-avatar",attrs:{type:"user",back:"pattern"}}),s("figcaption",[t._v(" "+t._s(e.username)+" ")])],1)],1)])})),0):t._e()},oh=[],lh={props:{value:Array}},ch=lh,uh=(s("3a85"),Object(c["a"])(ch,rh,oh,!1,null,null,null)),dh=uh.exports,ph=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-writer-field-preview",domProps:{innerHTML:t._s(t.value)}})},hh=[],mh={inheritAttrs:!1,props:{value:String}},fh=mh,gh=(s("5e9a"),Object(c["a"])(fh,ph,hh,!1,null,null,null)),bh=gh.exports,kh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-aspect-ratio",style:{paddingBottom:t.ratioPadding},attrs:{"data-cover":t.cover}},[t._t("default")],2)},vh=[],$h={props:{cover:Boolean,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio)}}},yh=$h,_h=(s("8d8b"),Object(c["a"])(yh,kh,vh,!1,null,null,null)),wh=_h.exports,xh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-bar"},[t.$slots.left?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])},Oh=[],Ch={},Sh=Ch,Eh=(s("6f7b"),Object(c["a"])(Sh,xh,Oh,!1,null,null,null)),jh=Eh.exports,Th=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",[t.html?s("k-text",{domProps:{innerHTML:t._s(t.text)}}):s("k-text",[t._v(" "+t._s(t.text)+" ")])])],2)},Lh=[],Ih={props:{theme:{type:String,default:"none"},text:String,html:{type:Boolean,default:!0}}},Ah=Ih,Bh=(s("7dc7"),Object(c["a"])(Ah,Th,Lh,!1,null,null,null)),Mh=Bh.exports,Dh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("figure",t._g({staticClass:"k-card"},t.$listeners),[t.sortable?s("k-sort-handle"):t._e(),s(t.wrapper,{tag:"component",attrs:{to:t.link,target:t.target}},[t.imageOptions?s("k-image",t._b({staticClass:"k-card-image"},"k-image",t.imageOptions,!1)):s("span",{staticClass:"k-card-icon",style:"padding-bottom:"+t.ratioPadding},[s("k-icon",t._b({},"k-icon",t.icon,!1))],1),s("figcaption",{staticClass:"k-card-content"},[s("span",{staticClass:"k-card-text",attrs:{"data-noinfo":!t.info},domProps:{innerHTML:t._s(t.text)}}),t.info?s("span",{staticClass:"k-card-info",domProps:{innerHTML:t._s(t.info)}}):t._e()])],1),s("nav",{staticClass:"k-card-options"},[t._t("options",[t.flag?s("k-button",t._b({staticClass:"k-card-options-button",on:{click:t.flag.click}},"k-button",t.flag,!1)):t.statusIcon?s("k-status-icon",t._b({staticClass:"k-card-options-button"},"k-status-icon",t.statusIcon,!1)):t._e(),t.options?s("k-button",{staticClass:"k-card-options-button",attrs:{tooltip:t.$t("options"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}):t._e(),s("k-dropdown-content",{ref:"dropdown",staticClass:"k-card-options-dropdown",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Nh=[],Ph={inheritAttrs:!1,props:{column:String,flag:Object,icon:{type:Object,default(){return{type:"file",back:"black"}}},image:[Object,Boolean],info:String,link:[String,Function],options:[Array,Function],sortable:Boolean,statusIcon:Object,target:String,text:String},computed:{wrapper(){return this.link?"k-link":"div"},ratioPadding(){return this.icon&&this.icon.ratio?this.$helper.ratio(this.icon.ratio):this.$helper.ratio("3/2")},imageOptions(){return Ep(this.image,"cards",this.column)}}},Rh=Ph,qh=(s("c119"),Object(c["a"])(Rh,Dh,Nh,!1,null,null,null)),Fh=qh.exports,Uh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-cards"},[t._t("default",t._l(t.cards,(function(e,i){return s("k-card",t._g(t._b({key:i},"k-card",e,!1),t.$listeners))})))],2)},Hh=[],zh={props:{cards:Array}},Kh=zh,Gh=(s("f56d"),Object(c["a"])(Kh,Uh,Hh,!1,null,null,null)),Wh=Gh.exports,Yh=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-collection",attrs:{"data-layout":t.layout}},[s("k-draggable",{attrs:{list:t.items,options:t.dragOptions,element:t.elements.list,"data-size":t.size,handle:!0},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd}},t._l(t.items,(function(e,i){return s(t.elements.item,t._b({key:i,tag:"component",class:{"k-draggable-item":e.sortable},on:{action:function(s){return t.$emit("action",e,s)},dragstart:function(s){return t.onDragStart(s,e.dragText)}}},"component",e,!1))})),1),t.hasFooter?s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),s("div",{staticClass:"k-collection-pagination"},[t.hasPagination?s("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)},Vh=[],Jh={props:{help:String,items:{type:[Array,Object],default(){return[]}},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default(){return!1}}},computed:{hasPagination(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter(){return!(!this.hasPagination&&!this.help)},dragOptions(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}},elements(){const t={cards:{list:"k-cards",item:"k-card"},list:{list:"k-list",item:"k-list-item"}};return t[this.layout]?t[this.layout]:t["list"]},paginationOptions(){const t="object"!==typeof this.pagination?{}:this.pagination;return{limit:10,details:!0,keys:!1,total:0,hide:!1,...t}}},watch:{$props(){this.$forceUpdate()}},over:null,methods:{onEnd(){this.over&&this.over.removeAttribute("data-over"),this.$emit("sort",this.items)},onDragStart(t,e){this.$store.dispatch("drag",{type:"text",data:e})}}},Zh=Jh,Xh=(s("8c28"),Object(c["a"])(Zh,Yh,Vh,!1,null,null,null)),Qh=Xh.exports,tm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[s("div",[t._t("default")],2)])},em=[],sm={props:{width:String,sticky:Boolean}},im=sm,nm=(s("c9cb"),Object(c["a"])(im,tm,em,!1,null,null,null)),am=nm.exports,rm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)},om=[],lm={props:{disabled:{type:Boolean,default:!1}},data(){return{files:[],dragging:!1,over:!1}},methods:{cancel(){this.reset()},reset(){this.dragging=!1,this.over=!1},onDrop(t){return!0===this.disabled||!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave(){this.reset()},onOver(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},cm=lm,um=(s("414d"),Object(c["a"])(cm,rm,om,!1,null,null,null)),dm=um.exports,pm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.element,t._g({tag:"component",staticClass:"k-empty",attrs:{"data-layout":t.layout,type:"button"===t.element&&"button"}},t.$listeners),[t.icon?s("k-icon",{attrs:{type:t.icon}}):t._e(),s("p",[t._t("default")],2)],1)},hm=[],mm={props:{text:String,icon:String,layout:{type:String,default:"list"}},computed:{element(){return void 0!==this.$listeners["click"]?"button":"div"}}},fm=mm,gm=(s("ba8f"),Object(c["a"])(fm,pm,hm,!1,null,null,null)),bm=gm.exports,km=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-file-preview"},[s("k-view",{staticClass:"k-file-preview-layout"},[s("div",{staticClass:"k-file-preview-image"},[s("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.file.url,title:t.$t("open"),target:"_blank"}},[t.file.panelImage&&t.file.panelImage.cards&&t.file.panelImage.cards.url?s("k-image",{attrs:{src:t.file.panelImage.cards.url,srcset:t.file.panelImage.cards.srcset,back:"none"}}):t.file.panelIcon?s("k-icon",{staticClass:"k-file-preview-icon",style:{color:t.file.panelIcon.color},attrs:{type:t.file.panelIcon.type}}):s("span",{staticClass:"k-file-preview-placeholder"})],1)],1),s("div",{staticClass:"k-file-preview-details"},[s("ul",[s("li",[s("h3",[t._v(t._s(t.$t("template")))]),s("p",[t._v(t._s(t.file.template||"—"))])]),s("li",[s("h3",[t._v(t._s(t.$t("mime")))]),s("p",[t._v(t._s(t.file.mime))])]),s("li",[s("h3",[t._v(t._s(t.$t("url")))]),s("p",[s("k-link",{attrs:{to:t.file.url,tabindex:"-1",target:"_blank"}},[t._v(" /"+t._s(t.file.id)+" ")])],1)]),s("li",[s("h3",[t._v(t._s(t.$t("size")))]),s("p",[t._v(t._s(t.file.niceSize))])]),s("li",[s("h3",[t._v(t._s(t.$t("dimensions")))]),t.file.dimensions&&(t.file.dimensions.width||t.file.dimensions.height)?s("p",[t._v(" "+t._s(t.file.dimensions.width)+"×"+t._s(t.file.dimensions.height)+" "+t._s(t.$t("pixel"))+" ")]):s("p",[t._v(" — ")])]),s("li",[s("h3",[t._v(t._s(t.$t("orientation")))]),t.file.dimensions&&t.file.dimensions.orientation?s("p",[t._v(" "+t._s(t.$t("orientation."+t.file.dimensions.orientation))+" ")]):s("p",[t._v(" — ")])])])])])],1)},vm=[],$m={props:{file:Object}},ym=$m,_m=(s("696b"),Object(c["a"])(ym,km,vm,!1,null,null,null)),wm=_m.exports,xm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)},Om=[],Cm={props:{gutter:String}},Sm=Cm,Em=(s("5b23"),Object(c["a"])(Sm,xm,Om,!1,null,null,null)),jm=Em.exports,Tm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("header",{staticClass:"k-header",attrs:{"data-editable":t.editable}},[s("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?s("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),s("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?s("k-bar",{staticClass:"k-header-buttons"},[t._t("left",null,{slot:"left"}),t._t("right",null,{slot:"right"})],2):t._e(),s("k-tabs",{attrs:{tab:t.tab,tabs:t.tabsWithBadges,theme:"notice"}})],1)},Lm=[],Im={props:{editable:Boolean,tab:String,tabs:{type:Array,default(){return[]}}},computed:{tabsWithBadges(){const t=Object.keys(this.$store.getters["content/changes"]());return this.tabs.map(e=>{let s=[];return Object.values(e.columns).forEach(t=>{Object.values(t.sections).forEach(t=>{"fields"===t.type&&Object.keys(t.fields).forEach(t=>{s.push(t)})})}),e.badge=s.filter(e=>t.includes(e.toLowerCase())).length,e})}}},Am=Im,Bm=(s("53c5"),Object(c["a"])(Am,Tm,Lm,!1,null,null,null)),Mm=Bm.exports,Dm=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"k-list"},[t._t("default",t._l(t.items,(function(e,i){return s("k-list-item",t._g(t._b({key:i},"k-list-item",e,!1),t.$listeners))})))],2)},Nm=[],Pm={props:{items:Array}},Rm=Pm,qm=(s("c857"),Object(c["a"])(Rm,Dm,Nm,!1,null,null,null)),Fm=qm.exports,Um=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.element,t._g({tag:"component",staticClass:"k-list-item"},t.$listeners),[t.sortable?s("k-sort-handle"):t._e(),s("k-link",{staticClass:"k-list-item-content",attrs:{to:t.link,target:t.target}},[t.image?s("span",{staticClass:"k-list-item-image"},[t._t("image",[t.imageOptions?s("k-image",t._b({},"k-image",t.imageOptions,!1)):s("k-icon",t._b({},"k-icon",t.icon,!1))])],2):t._e(),s("span",{staticClass:"k-list-item-text"},[t._t("default",[s("em",{domProps:{innerHTML:t._s(t.text)}}),t.info?s("small",{domProps:{innerHTML:t._s(t.info)}}):t._e()])],2)]),s("nav",{staticClass:"k-list-item-options"},[t._t("options",[t.flag?s("k-button",t._b({staticClass:"k-list-item-status",on:{click:t.flag.click}},"k-button",t.flag,!1)):t.statusIcon?s("k-status-icon",t._b({staticClass:"k-list-item-status"},"k-status-icon",t.statusIcon,!1)):t._e(),t.options?s("k-button",{staticClass:"k-list-item-toggle",attrs:{tooltip:t.$t("options"),icon:"dots",alt:"Options"},on:{click:function(e){return e.stopPropagation(),t.$refs.options.toggle()}}}):t._e(),s("k-dropdown-content",{ref:"options",attrs:{options:t.options,align:"right"},on:{action:function(e){return t.$emit("action",e)}}})])],2)],1)},Hm=[],zm={inheritAttrs:!1,props:{element:{type:String,default:"li"},image:[Object,Boolean],icon:{type:Object,default(){return{type:"file",back:"black"}}},sortable:Boolean,text:String,target:String,info:String,link:[String,Function],flag:Object,options:[Array,Function],statusIcon:Object},computed:{imageOptions(){return Ep(this.image)}}},Km=zm,Gm=(s("fa6a"),Object(c["a"])(Km,Um,Hm,!1,null,null,null)),Wm=Gm.exports,Ym=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isOpen?s("portal",[s("div",t._g({ref:"overlay",staticClass:"k-overlay",class:t.$vnode.data.staticClass,attrs:{"data-centered":t.loading||t.centered,"data-dimmed":t.dimmed,"data-loading":t.loading},on:{mousedown:t.close}},t.$listeners),[t.loading?s("k-loader",{staticClass:"k-overlay-loader"}):t._t("default",null,{close:t.close,isOpen:t.isOpen})],2)]):t._e()},Vm=[],Jm={inheritAttrs:!0,props:{autofocus:{type:Boolean,default:!0},centered:{type:Boolean,default:!1},dimmed:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data(){return{isOpen:!1,scrollTop:0}},methods:{close(){this.isOpen=!1,this.$emit("close"),this.restoreScrollPosition(),this.$events.$off("keydown.esc",this.close),document.removeEventListener("focus",this.focustrap)},focus(){let t=this.$refs.overlay.querySelector("\n [autofocus],\n [data-autofocus]\n ");null===t&&(t=this.$refs.overlay.querySelector("\n input,\n textarea,\n select,\n button\n ")),t&&"function"===typeof t.focus?t.focus():this.$slots.default[0]&&this.$slots.default[0].context&&"function"===typeof this.$slots.default[0].context.focus&&this.$slots.default[0].context.focus()},focustrap(t){this.$refs.overlay&&!1===this.$refs.overlay.contains(t.target)&&this.focus()},open(){this.storeScrollPosition(),this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),setTimeout(()=>{!0===this.autofocus&&this.focus(),document.querySelector(".k-overlay > *").addEventListener("mousedown",t=>t.stopPropagation()),this.$emit("ready")},1)},restoreScrollPosition(){const t=document.querySelector(".k-panel-view");t&&t.scrollTop&&(t.scrollTop=this.scrollTop)},storeScrollPosition(){const t=document.querySelector(".k-panel-view");t&&t.scrollTop?this.scrollTop=t.scrollTop:this.scrollTop=0}}},Zm=Jm,Xm=(s("f7f5"),Object(c["a"])(Zm,Ym,Vm,!1,null,null,null)),Qm=Xm.exports,tf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.tabs&&t.tabs.length>1?s("div",{staticClass:"k-tabs",attrs:{"data-theme":t.theme}},[s("nav",[t._l(t.visibleTabs,(function(e){return s("k-button",{key:e.name,staticClass:"k-tab-button",attrs:{link:"#"+e.name,current:t.current===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" "),e.badge?s("span",{staticClass:"k-tabs-badge"},[t._v(" "+t._s(e.badge)+" ")]):t._e()])})),t.invisibleTabs.length?s("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{text:t.$t("more"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}}):t._e()],2),t.invisibleTabs.length?s("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,(function(e){return s("k-dropdown-item",{key:"more-"+e.name,attrs:{link:"#"+e.name,current:t.tab===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.name)+" ")])})),1):t._e()],1):t._e()},ef=[],sf={props:{tab:String,tabs:Array,theme:String},data(){return{size:null,visibleTabs:this.tabs,invisibleTabs:[]}},computed:{current(){const t=this.tabs.find(t=>t.name===this.tab)||this.tabs[0]||{};return t.name}},watch:{tabs(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created(){window.addEventListener("resize",this.resize)},destroyed(){window.removeEventListener("resize",this.resize)},methods:{resize(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},nf=sf,af=(s("8f7d"),Object(c["a"])(nf,tf,ef,!1,null,null,null)),rf=af.exports,of=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)},lf=[],cf={props:{align:String}},uf=cf,df=(s("daa8"),Object(c["a"])(uf,of,lf,!1,null,null,null)),pf=df.exports,hf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{"component-data":t.data,tag:t.element,list:t.list,move:t.move}},"draggable",t.dragOptions,!1),t.listeners),[t._t("default"),t._t("footer",null,{slot:"footer"})],2)},mf=[],ff=s("b76a"),gf=s.n(ff),bf={components:{draggable:gf.a},props:{data:Object,element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data(){return{listeners:{...this.$listeners,start:t=>{this.$store.dispatch("drag",{}),this.$listeners.start&&this.$listeners.start(t)},end:t=>{this.$store.dispatch("drag",null),this.$listeners.end&&this.$listeners.end(t)}}}},computed:{dragOptions(){let t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,{fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view"),...this.options}}}},kf=bf,vf=Object(c["a"])(kf,hf,mf,!1,null,null,null),$f=vf.exports,yf={data(){return{error:null}},errorCaptured(t){return O.debug&&window.console.warn(t),this.error=t,!1},render(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},_f=yf,wf=Object(c["a"])(_f,Tp,Lp,!1,null,null,null),xf=wf.exports,Of=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?s("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)},Cf=[],Sf={props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},Ef=Sf,jf=(s("f8a7"),Object(c["a"])(Ef,Of,Cf,!1,null,null,null)),Tf=jf.exports,Lf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{class:"k-icon k-icon-"+t.type,attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.isEmoji?s("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):s("svg",{style:{color:t.color},attrs:{viewBox:"0 0 16 16"}},[s("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])},If=[],Af={props:{alt:String,color:String,back:String,size:String,type:String},computed:{isEmoji(){return this.$helper.string.hasEmoji(this.type)}}},Bf=Af,Mf=(s("3342"),Object(c["a"])(Bf,Lf,If,!1,null,null,null)),Df=Mf.exports,Nf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[s("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?s("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src,srcset:t.srcset,sizes:t.sizes},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():s("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?s("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])},Pf=[],Rf={props:{alt:String,back:String,cover:Boolean,ratio:String,sizes:String,src:String,srcset:String},data(){return{loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}},computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"1/1")}},created(){let t=new Image;t.onload=()=>{this.loaded=!0,this.$emit("load")},t.onerror=()=>{this.error=!0,this.$emit("error")},t.src=this.src}},qf=Rf,Ff=(s("0d56"),Object(c["a"])(qf,Nf,Pf,!1,null,null,null)),Uf=Ff.exports,Hf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-icon",{staticClass:"k-loader",attrs:{type:"loader"}})},zf=[],Kf=(s("3cf3"),{}),Gf=Object(c["a"])(Kf,Hf,zf,!1,null,null,null),Wf=Gf.exports,Yf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v(" "+t._s(t.state)+"% ")])},Vf=[],Jf={props:{value:{type:Number,default:0}},data(){return{state:this.value}},methods:{set(t){this.state=t}}},Zf=Jf,Xf=(s("9799"),Object(c["a"])(Zf,Yf,Vf,!1,null,null,null)),Qf=Xf.exports,tg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-icon",{staticClass:"k-sort-handle",attrs:{type:t.icon,"aria-hidden":"true"}})},eg=[],sg={props:{icon:{type:String,default:"sort"}}},ig=sg,ng=(s("35cb"),Object(c["a"])(ig,tg,eg,!1,null,null,null)),ag=ng.exports,rg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-button",{class:"k-status-icon k-status-icon-"+t.status,attrs:{disabled:t.disabled,icon:t.icon,responsive:t.responsive,tooltip:t.title},on:{click:t.onClick}},[t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2)},og=[],lg={props:{click:{type:Function,default:()=>{}},disabled:Boolean,responsive:Boolean,status:String,text:String,tooltip:String},computed:{icon(){return"draft"===this.status?"circle-outline":"unlisted"===this.status?"circle-half":"circle"},title(){let t=this.tooltip||this.text;return this.disabled&&(t+=` (${this.$t("disabled")})`),t}},methods:{onClick(){this.click(),this.$emit("click")}}},cg=lg,ug=(s("dd70"),Object(c["a"])(cg,rg,og,!1,null,null,null)),dg=ug.exports,pg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)},hg=[],mg={props:{align:String,size:String,theme:String}},fg=mg,gg=(s("b0d6"),Object(c["a"])(fg,pg,hg,!1,null,null,null)),bg=gg.exports,kg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-user-info"},[t.user.avatar?s("k-image",{attrs:{cover:!0,src:t.user.avatar.url,ratio:"1/1"}}):s("k-icon",{attrs:{type:"user"}}),t._v(" "+t._s(t.user.name||t.user.email||t.user)+" ")],1)},vg=[],$g={props:{user:[Object,String]}},yg=$g,_g=(s("217b"),Object(c["a"])(yg,kg,vg,!1,null,null,null)),wg=_g.exports,xg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t._t("default")],2)},Og=[],Cg={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus(){this.$refs.button.focus&&this.$refs.button.focus()},tab(){this.$refs.button.tab&&this.$refs.button.tab()},untab(){this.$refs.button.untab&&this.$refs.button.untab()}}},Sg=Cg,Eg=(s("3787"),Object(c["a"])(Sg,xg,Og,!1,null,null,null)),jg=Eg.exports,Tg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},Lg=[],Ig={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},Ag=Ig,Bg=(s("16eb"),Object(c["a"])(Ag,Tg,Lg,!1,null,null,null)),Mg=Bg.exports,Dg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-button-group"},[t._t("default")],2)},Ng=[],Pg={},Rg=Pg,qg=(s("a567"),Object(c["a"])(Rg,Dg,Ng,!1,null,null,null)),Fg=qg.exports,Ug=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-link",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},Hg=[],zg={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String}},Kg=zg,Gg=Object(c["a"])(Kg,Ug,Hg,!1,null,null,null),Wg=Gg.exports,Yg=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("button",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type:t.type}},t.$listeners),[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)},Vg=[],Jg={mounted(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus(){this.$el.focus&&this.$el.focus()},onTab(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab(){this.$el.removeAttribute("data-tabbed")},tab(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab(){this.$el.removeAttribute("data-tabbed")}}},Zg={mixins:[Jg],inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},Xg=Zg,Qg=Object(c["a"])(Xg,Yg,Vg,!1,null,null,null),tb=Qg.exports,eb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)},sb=[],ib={},nb=ib,ab=(s("f95f"),Object(c["a"])(nb,eb,sb,!1,null,null,null)),rb=ab.exports,ob=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isOpen?s("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align,"data-dropup":t.dropup}},[t._t("default",[t._l(t.items,(function(e,i){return["-"===e?s("hr",{key:t._uid+"-item-"+i}):s("k-dropdown-item",t._b({key:t._uid+"-item-"+i,ref:t._uid+"-item-"+i,refInFor:!0,on:{click:function(s){return t.$emit("action",e.click)}}},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])]}))])],2):t._e()},lb=[];let cb=null;var ub,db,pb={props:{options:[Array,Function],align:{type:String,default:"left"}},data(){return{current:-1,dropup:!1,isOpen:!1,items:[]}},methods:{async fetchOptions(t){if(!this.options)return t(this.items);if("string"===typeof this.options){const e=await fetch(this.options),s=await e.json();return t(s)}"function"===typeof this.options?this.options(t):Array.isArray(this.options)&&t(this.options)},open(){this.reset(),cb&&cb!==this&&cb.close(),this.fetchOptions(t=>{this.$events.$on("keydown",this.navigate),this.$events.$on("click",this.close),this.items=t,this.isOpen=!0,cb=this,this.onOpen(),this.$emit("open")})},reset(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close(){this.reset(),this.isOpen=cb=!1,this.$emit("close")},toggle(){this.isOpen?this.close():this.open()},focus(t=0){this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},onOpen(){this.dropup=!1,this.$nextTick(()=>{const t=document.querySelector(".k-panel-view");if(t&&this.$el){let e=t.clientHeight-40,s=this.$el.getBoundingClientRect().top||0,i=this.$el.clientHeight;this.dropup=s+i>e}})},navigate(t){switch(t.code){case"Escape":case"ArrowLeft":this.close(),this.$emit("leave",t.code);break;case"ArrowUp":t.preventDefault();while(1){if(this.current--,this.current<0){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"ArrowDown":t.preventDefault();while(1){if(this.current++,this.current>this.$children.length-1){const t=this.$children.filter(t=>!1===t.disabled);this.current=this.$children.indexOf(t[t.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":while(1){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}break}}}},hb=pb,mb=(s("98a1"),Object(c["a"])(hb,ob,lb,!1,null,null,null)),fb=mb.exports,gb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)},bb=[],kb={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data(){return{listeners:{...this.$listeners,click:t=>{this.$parent.close(),this.$emit("click",t)}}}},methods:{focus(){this.$refs.button.focus()},tab(){this.$refs.button.tab()}}},vb=kb,$b=(s("580a"),Object(c["a"])(vb,gb,bb,!1,null,null,null)),yb=$b.exports,_b=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.to&&!t.disabled?s("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):s("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)},wb=[],xb={mixins:[Jg],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:{...this.$listeners,click:this.onClick}}},computed:{href(){return"function"===typeof this.to?"":void 0===this.$route||"/"!==this.to[0]||this.target?this.to:(this.$router.options.url||"")+this.to}},methods:{isRoutable(t){return void 0!==this.$route&&(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&!this.target)))},onClick(t){if(!0===this.disabled)return t.preventDefault(),!1;"function"===typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},Ob=xb,Cb=(s("cc79"),Object(c["a"])(Ob,_b,wb,!1,null,null,null)),Sb=Cb.exports,Eb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.languages.length?s("k-dropdown",[s("k-button",{attrs:{responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}},[t._v(" "+t._s(t.language.name)+" ")]),t.languages?s("k-dropdown-content",{ref:"languages"},[s("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(" "+t._s(t.defaultLanguage.name)+" ")]),s("hr"),t._l(t.languages,(function(e){return s("k-dropdown-item",{key:e.code,on:{click:function(s){return t.change(e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2):t._e()],1):t._e()},jb=[],Tb={computed:{defaultLanguage(){return this.$store.state.languages.default},language(){return this.$store.state.languages.current},languages(){return this.$store.state.languages.all.filter(t=>!1===t.default)}},methods:{change(t){this.$store.dispatch("languages/current",t),this.$emit("change",t)}}},Lb=Tb,Ib=Object(c["a"])(Lb,Eb,jb,!1,null,null,null),Ab=Ib.exports,Bb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.show?s("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?s("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[s("k-dropdown",[s("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(t._s(t.total)+" ")],2),s("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick((function(){return t.$refs.page.focus()}))}}},[s("div",{staticClass:"k-pagination-settings"},[s("label",{attrs:{for:"k-pagination-page"}},[s("span",[t._v(t._s(t.pageLabel)+":")]),s("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return s("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v(" "+t._s(e)+" ")])})),0)]),s("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[s("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+" ")],2)]]:t._e(),t.show?s("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()},Mb=[],Db={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},keys:{type:Boolean,default:!1},limit:{type:Number,default:10},page:{type:Number,default:1},pageLabel:{type:String,default(){return this.$t("pagination.page")}},total:{type:Number,default:0},prevLabel:{type:String,default(){return this.$t("prev")}},nextLabel:{type:String,default(){return this.$t("next")}},validate:{type:Function,default(){return Promise.resolve()}}},data(){return{currentPage:this.page}},computed:{show(){return this.pages>1},start(){return(this.currentPage-1)*this.limit+1},end(){let t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages(){return Math.ceil(this.total/this.limit)},hasPrev(){return this.start>1},hasNext(){return this.endthis.limit},offset(){return this.start-1}},watch:{page(t){this.currentPage=parseInt(t)}},created(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed(){window.removeEventListener("keydown",this.navigate,!1)},methods:{goTo(t){this.validate(t).then(()=>{t<1&&(t=1),t>this.pages&&(t=this.pages),this.currentPage=t,this.$refs.dropdown&&this.$refs.dropdown.close(),this.$emit("paginate",{page:this.currentPage,start:this.start,end:this.end,limit:this.limit,offset:this.offset})}).catch(()=>{})},prev(){this.goTo(this.currentPage-1)},next(){this.goTo(this.currentPage+1)},navigate(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next();break}}}},Nb=Db,Pb=(s("a66d"),Object(c["a"])(Nb,Bb,Mb,!1,null,null,null)),Rb=Pb.exports,qb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-button-group",{staticClass:"k-prev-next"},[s("k-button",t._b({attrs:{icon:"angle-left"}},"k-button",t.button(t.prev),!1)),s("k-button",t._b({attrs:{icon:"angle-right"}},"k-button",t.button(t.next),!1))],1)},Fb=[],Ub={props:{prev:{type:[Boolean,Object],default:!1},next:{type:[Boolean,Object],default:!1}},methods:{button(t){return t||{disabled:!0,link:"#"}}}},Hb=Ub,zb=(s("7a7d"),Object(c["a"])(Hb,qb,Fb,!1,null,null,null)),Kb=zb.exports,Gb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay"},[s("div",{staticClass:"k-search",attrs:{role:"search"}},[s("div",{staticClass:"k-search-input"},[s("k-dropdown",{staticClass:"k-search-types"},[s("k-button",{attrs:{icon:t.currentType.icon},on:{click:function(e){return t.$refs.types.toggle()}}},[t._v(" "+t._s(t.currentType.label)+": ")]),s("k-dropdown-content",{ref:"types"},t._l(t.types,(function(e,i){return s("k-dropdown-item",{key:i,attrs:{icon:e.icon},on:{click:function(e){return t.changeType(i)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1),s("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"input",attrs:{placeholder:t.$t("search")+" …","aria-label":t.$t("search"),autofocus:!0,type:"text"},domProps:{value:t.q},on:{input:[function(e){e.target.composing||(t.q=e.target.value)},function(e){t.hasResults=!0}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.onDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.onUp(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTab(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}]}}),s("k-button",{staticClass:"k-search-close",attrs:{icon:t.isLoading?"loader":"cancel",tooltip:t.$t("close")},on:{click:t.close}})],1),!t.q||t.hasResults&&!t.items.length?t._e():s("div",{staticClass:"k-search-results"},[t.items.length?s("ul",{on:{mouseout:function(e){t.selected=-1}}},t._l(t.items,(function(e,i){return s("li",{key:e.id,attrs:{"data-selected":t.selected===i},on:{mouseover:function(e){t.selected=i}}},[s("k-link",{attrs:{to:e.link},on:{click:t.close}},[s("span",{staticClass:"k-search-item-image"},[t.imageOptions(e.image)?s("k-image",t._b({},"k-image",t.imageOptions(e.image),!1)):s("k-icon",t._b({},"k-icon",e.icon,!1))],1),s("span",{staticClass:"k-search-item-info"},[s("strong",[t._v(t._s(e.title))]),s("small",[t._v(t._s(e.info))])])])],1)})),0):t.hasResults?t._e():s("p",{staticClass:"k-search-empty"},[t._v(" "+t._s(t.$t("search.results.none"))+" ")])])])])},Wb=[],Yb={props:{types:{type:Object,default(){return{}}},type:{type:String}},data(){return{isLoading:!1,hasResults:!0,items:[],currentType:this.getType(this.type),q:null,selected:-1}},watch:{q(){this.search(this.q)},currentType(){this.search(this.q)},type(){this.currentType=this.getType(this.type)},types(){this.currentType=this.getType(this.type)}},created(){this.search=V(this.search,250),this.$events.$on("keydown.cmd.shift.f",this.open)},destroyed(){this.$events.$off("keydown.cmd.shift.f",this.open)},methods:{changeType(t){this.currentType=this.getType(t),this.$nextTick(()=>{this.$refs.input.focus()})},close(){this.$refs.overlay.close(),this.hasResults=!0,this.items=[],this.q=null},getType(t){return this.types[t]||this.types[Object.keys(this.types)[0]]},imageOptions(t){return Ep(t)},navigate(t){this.$go(t.link),this.close()},onDown(){this.selected=0&&this.selected--},open(){this.$refs.overlay.open()},async search(t){this.isLoading=!0,this.$refs.types&&this.$refs.types.close();try{if(""===t)throw new Error;this.items=await this.currentType.search({query:t,limit:O.search.limit})}catch(e){this.items=[]}finally{this.selected=-1,this.isLoading=!1,this.hasResults=this.items.length>0}}}},Vb=Yb,Jb=(s("4cb2"),Object(c["a"])(Vb,Gb,Wb,!1,null,null,null)),Zb=Jb.exports,Xb=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{ref:"button",staticClass:"k-tag",attrs:{tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove(e))}}},[s("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?s("span",{staticClass:"k-tag-toggle",on:{click:t.remove}},[t._v("×")]):t._e()])},Qb=[],tk={props:{removable:Boolean},methods:{remove(){this.removable&&this.$emit("remove")},focus(){this.$refs.button.focus()}}},ek=tk,sk=(s("021f"),Object(c["a"])(ek,Xb,Qb,!1,null,null,null)),ik=sk.exports,nk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.user&&t.view?s("div",{staticClass:"k-topbar"},[s("k-view",[s("div",{staticClass:"k-topbar-wrapper"},[s("k-dropdown",{staticClass:"k-topbar-menu"},[s("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[s("k-icon",{attrs:{type:"angle-down"}})],1),s("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu"},[s("ul",[t._l(t.views,(function(e,i){return[!1!==t.viewEntryInMenu(i,e)?s("li",{key:"menu-item-"+i,attrs:{"aria-current":t.$store.state.view===i}},[s("k-dropdown-item",{attrs:{disabled:"disabled"===t.viewEntryInMenu(i,e),icon:e.icon,link:e.link}},[t._v(" "+t._s(t.menuTitle(e,i))+" ")])],1):t._e()]})),s("li",[s("hr")]),s("li",{attrs:{"aria-current":"account"===t.$route.meta.view}},[s("k-dropdown-item",{attrs:{icon:"account",link:"/account"}},[t._v(" "+t._s(t.$t("view.account"))+" ")])],1),s("li",[s("hr")]),s("li",[s("k-dropdown-item",{attrs:{icon:"logout",link:"/logout"}},[t._v(" "+t._s(t.$t("logout"))+" ")])],1)],2)])],1),t.view?s("k-link",{staticClass:"k-topbar-button k-topbar-view-button",attrs:{to:t.view.link}},[s("k-icon",{attrs:{type:t.view.icon}}),t._v(" "+t._s(t.breadcrumbTitle)+" ")],1):t._e(),t.$store.state.breadcrumb.length>1?s("k-dropdown",{staticClass:"k-topbar-breadcrumb-menu"},[s("k-button",{staticClass:"k-topbar-button",on:{click:function(e){return t.$refs.crumb.toggle()}}},[t._v(" … "),s("k-icon",{attrs:{type:"angle-down"}})],1),s("k-dropdown-content",{ref:"crumb"},[s("k-dropdown-item",{attrs:{icon:t.view.icon,link:t.view.link}},[t._v(" "+t._s(t.$t("view."+t.$store.state.view,t.view.label))+" ")]),t._l(t.$store.state.breadcrumb,(function(e,i){return s("k-dropdown-item",{key:"crumb-"+i+"-dropdown",attrs:{icon:t.view.icon,link:e.link}},[t._v(" "+t._s(e.label)+" ")])}))],2)],1):t._e(),s("nav",{staticClass:"k-topbar-crumbs"},t._l(t.$store.state.breadcrumb,(function(e,i){return s("k-link",{key:"crumb-"+i,attrs:{to:e.link}},[t._v(" "+t._s(e.label)+" ")])})),1),s("div",{staticClass:"k-topbar-signals"},[s("span",{directives:[{name:"show",rawName:"v-show",value:t.$store.state.isLoading,expression:"$store.state.isLoading"}],staticClass:"k-topbar-loader"},[s("svg",{attrs:{viewBox:"0 0 16 18"}},[s("path",{attrs:{fill:"white",d:"M8,0 L16,4.50265232 L16,13.5112142 L8,18.0138665 L0,13.5112142 L0,4.50265232 L8,0 Z M2.10648757,5.69852516 L2.10648757,12.3153414 L8,15.632396 L13.8935124,12.3153414 L13.8935124,5.69852516 L8,2.38147048 L2.10648757,5.69852516 Z"}})])]),t.notification?[s("k-button",{staticClass:"k-topbar-notification k-topbar-signals-button",attrs:{theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}},[t._v(" "+t._s(t.notification.message)+" ")])]:t.unregistered?[s("div",{staticClass:"k-registration"},[s("p",[t._v(t._s(t.$t("license.unregistered")))]),s("k-button",{staticClass:"k-topbar-signals-button",attrs:{responsive:!0,tooltip:t.$t("license.unregistered"),icon:"key"},on:{click:function(e){return t.$emit("register")}}},[t._v(" "+t._s(t.$t("license.register"))+" ")]),s("k-button",{staticClass:"k-topbar-signals-button",attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v(" "+t._s(t.$t("license.buy"))+" ")])],1)]:t._e(),[s("k-form-indicator")],s("k-button",{staticClass:"k-topbar-signals-button",attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$emit("search")}}})],2)],1)])],1):t._e()},ak=[],rk={site:{link:"/site",icon:"page",menu:!0},users:{link:"/users",icon:"users",menu:!0},settings:{link:"/settings",icon:"settings",menu:!0},account:{link:"/account",icon:"users",menu:!1},resetPassword:{link:"/reset-password",icon:"key",menu:!1},...window.panel.plugins.views},ok={computed:{breadcrumbTitle(){let t=this.$t("view."+this.$store.state.view,this.view.label);return"site"===this.$store.state.view&&this.$store.state.system.info.title||t},view(){return rk[this.$store.state.view]},views(){return rk},user(){return this.$store.state.user.current},notification(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null},unregistered(){return!this.$store.state.system.info.license}},methods:{menuTitle(t,e){let s=this.$t("view."+e,t.label);return"site"===e&&this.$store.state.system.info.site||s},viewEntryInMenu(t,e){let s=e.menu;return"function"===typeof s&&(s=s(this)),[!0,!1,"disabled"].indexOf(s)>=0?s:!1!==this.$permissions.access[t]||"disabled"}}},lk=ok,ck=(s("1e3b"),Object(c["a"])(lk,nk,ak,!1,null,null,null)),uk=ck.exports,dk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return 0===t.tabs.length?s("k-box",{attrs:{text:t.empty,theme:"info"}}):s("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.currentTab.columns,(function(e,i){return s("k-column",{key:t.parent+"-column-"+i,attrs:{width:e.width,sticky:e.sticky}},[t._l(e.sections,(function(n,a){return[t.meetsCondition(n)?[t.exists(n.type)?s("k-"+n.type+"-section",t._b({key:t.parent+"-column-"+i+"-section-"+a+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+n.name,attrs:{name:n.name,parent:t.parent,blueprint:t.blueprint,column:e.width},on:{submit:function(e){return t.$emit("submit",e)}}},"component",n,!1)):[s("k-box",{key:t.parent+"-column-"+i+"-section-"+a,attrs:{text:t.$t("error.section.type.invalid",{type:n.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)},pk=[],hk={props:{empty:String,blueprint:String,parent:String,tab:String,tabs:Array},computed:{currentTab(){return this.tabs.find(t=>t.name===this.tab)||this.tabs[0]||{}},content(){return this.$store.getters["content/values"]()}},methods:{exists(t){return this.$helper.isComponent(`k-${t}-section`)},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach(s=>{const i=this.content[s.toLowerCase()],n=t.when[s];i!==n&&(e=!1)}),e}}},mk=hk,fk=(s("6bcd"),Object(c["a"])(mk,dk,pk,!1,null,null,null)),gk=fk.exports,bk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"k-info-section"},[s("k-headline",{staticClass:"k-info-section-headline"},[t._v(" "+t._s(t.headline)+" ")]),s("k-box",{attrs:{theme:t.theme}},[s("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)},kk=[],vk={props:{blueprint:String,help:String,name:String,parent:String},methods:{load(){return this.$api.get(this.parent+"/sections/"+this.name)}}},$k={mixins:[vk],data(){return{headline:null,text:null,theme:null}},created(){this.load().then(t=>{this.headline=t.options.headline,this.text=t.options.text,this.theme=t.options.theme||"info"})}},yk=$k,_k=(s("4333"),Object(c["a"])(yk,bk,kk,!1,null,null,null)),wk=_k.exports,xk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.isLoading?s("section",{staticClass:"k-pages-section",attrs:{"data-processing":t.isProcessing}},[s("header",{staticClass:"k-section-header"},[s("k-headline",{attrs:{link:t.options.link}},[t._v(" "+t._s(t.headline)+" "),t.options.min?s("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?s("k-button-group",[s("k-button",{attrs:{icon:"add"},on:{click:t.create}},[t._v(" "+t._s(t.$t("add"))+" ")])],1):t._e()],1),t.error?[s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[s("strong",[t._v(" "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+": ")]),t._v(" "+t._s(t.error)+" ")])],1)]:[t.data.length?s("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{change:t.sort,paginate:t.paginate,action:t.action}}):[s("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"page"},on:{click:t.create}},[t._v(" "+t._s(t.options.empty||t.$t("pages.empty"))+" ")]),s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)],s("k-page-create-dialog",{ref:"create"}),s("k-page-duplicate-dialog",{ref:"duplicate"}),s("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),s("k-page-sort-dialog",{ref:"sort",on:{success:t.update}}),s("k-page-status-dialog",{ref:"status",on:{success:t.update}}),s("k-page-template-dialog",{ref:"template",on:{success:t.update}}),s("k-page-remove-dialog",{ref:"remove",on:{success:t.update}})]],2):t._e()},Ok=[],Ck={inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String},data(){return{data:[],error:null,isLoading:!1,isProcessing:!1,options:{empty:null,headline:null,help:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}},computed:{headline(){return this.options.headline||" "},help(){return this.options.help},isInvalid(){return!!(this.options.min&&this.data.lengththis.options.max)},language(){return this.$store.state.languages.current},paginationId(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{language(){this.reload()}},methods:{items(t){return t},async load(t){t||(this.isLoading=!0),this.isProcessing=!0,null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1);try{const t=await this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page});this.options=t.options,this.pagination=t.pagination,this.data=this.items(t.data)}catch(e){this.error=e.message}finally{this.isProcessing=!1,this.isLoading=!1}},paginate(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},async reload(){await this.load(!0)}}},Sk={mixins:[Ck],computed:{add(){return this.options.add&&this.$permissions.pages.create}},created(){this.load(),this.$events.$on("page.changeStatus",this.reload),this.$events.$on("page.sort",this.reload)},destroyed(){this.$events.$off("page.changeStatus",this.reload),this.$events.$off("page.sort",this.reload)},methods:{create(){this.add&&this.$refs.create.open(this.options.link||this.parent,this.parent+"/blueprints",this.name)},action(t,e){switch(e){case"duplicate":this.$refs.duplicate.open(t.id);break;case"preview":{let e=window.open("","_blank");e.document.write="...",this.$api.pages.preview(t.id).then(t=>{e.location.href=t}).catch(t=>{this.$store.dispatch("notification/error",t)});break}case"rename":this.$refs.rename.open(t.id,t.permissions,"title");break;case"url":this.$refs.rename.open(t.id,t.permissions,"slug");break;case"sort":this.$refs.sort.open(t.id);break;case"status":this.$refs.status.open(t.id);break;case"template":this.$refs.template.open(t.id);break;case"remove":if(this.data.length<=this.options.min){const t=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.pages.min."+t,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.id);break;default:throw new Error("Invalid action")}},items(t){return t.map(t=>{const e=!1!==t.permissions.changeStatus;return t.statusIcon={status:t.status,tooltip:this.$t("page.status"),disabled:!e,click:()=>{this.action(t,"status")}},t.sortable=t.permissions.sort&&this.options.sortable,t.column=this.column,t.options=async e=>{try{const s=await this.$api.pages.options(t.id,"list",t.sortable);e(s)}catch(s){this.$store.dispatch("notification/error",s)}},t})},async sort(t){let e=null;if(t.added&&(e="added"),t.moved&&(e="moved"),e){this.isProcessing=!0;const i=t[e].element,n=t[e].newIndex+1+this.pagination.offset;try{await this.$api.pages.status(i.id,"listed",n),this.$store.dispatch("notification/success",":)"),this.$events.$emit("page.sort",i)}catch(s){this.$store.dispatch("notification/error",{message:s.message,details:s.details}),await this.reload()}finally{this.isProcessing=!1}}},update(){this.reload(),this.$events.$emit("model.update")}}},Ek=Sk,jk=(s("224d"),Object(c["a"])(Ek,xk,Ok,!1,null,null,null)),Tk=jk.exports,Lk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.isLoading?s("section",{staticClass:"k-files-section",attrs:{"data-processing":t.isProcessing}},[s("header",{staticClass:"k-section-header"},[s("k-headline",[t._v(" "+t._s(t.headline)+" "),t.options.min?s("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?s("k-button-group",[s("k-button",{attrs:{icon:"upload"},on:{click:t.upload}},[t._v(" "+t._s(t.$t("add"))+" ")])],1):t._e()],1),t.error?[s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[s("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v(" "+t._s(t.error)+" ")])],1)]:[s("k-dropzone",{attrs:{disabled:!1===t.add},on:{drop:t.drop}},[t.data.length?s("k-collection",{attrs:{help:t.help,items:t.data,layout:t.options.layout,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[s("k-empty",{attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"image"},on:{click:function(e){t.add&&t.upload()}}},[t._v(" "+t._s(t.options.empty||t.$t("files.empty"))+" ")]),s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]],2),s("k-file-rename-dialog",{ref:"rename",on:{success:t.update}}),s("k-file-remove-dialog",{ref:"remove",on:{success:t.update}}),s("k-file-sort-dialog",{ref:"sort",on:{success:t.reload}}),s("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()},Ik=[],Ak={mixins:[Ck],computed:{add(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created(){this.load(),this.$events.$on("model.update",this.reload),this.$events.$on("file.sort",this.reload)},destroyed(){this.$events.$off("model.update",this.reload),this.$events.$off("file.sort",this.reload)},methods:{action(t,e){switch(e){case"edit":this.$go(t.link);break;case"download":window.open(t.url);break;case"rename":this.$refs.rename.open(t.parent,t.filename);break;case"replace":this.$refs.upload.open({url:O.api+"/"+this.$api.files.url(t.parent,t.filename),accept:"."+t.extension+","+t.mime,multiple:!1});break;case"remove":if(this.data.length<=this.options.min){const t=this.options.min>1?"plural":"singular";this.$store.dispatch("notification/error",{message:this.$t("error.section.files.min."+t,{section:this.options.headline||this.name,min:this.options.min})});break}this.$refs.remove.open(t.parent,t.filename);break;case"sort":this.$refs.sort.open(t.parent,t,this.options.apiUrl);break}},drop(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,{...this.add,url:O.api+"/"+this.add.api})},items(t){return t.map(t=>(t.sortable=this.options.sortable,t.column=this.column,t.options=async e=>{try{const s=await this.$api.files.options(t.parent,t.filename,"list",this.options.sortable);e(s)}catch(s){this.$store.dispatch("notification/error",s)}},t))},replace(t){this.$refs.upload.open({url:O.api+"/"+this.$api.files.url(t.parent,t.filename),accept:t.mime,multiple:!1})},async sort(t){if(!1===this.options.sortable)return!1;this.isProcessing=!0,t=t.map(t=>t.id);try{await this.$api.patch(this.options.apiUrl+"/files/sort",{files:t,index:this.pagination.offset}),this.$store.dispatch("notification/success",":)"),this.$events.$emit("file.sort")}catch(e){this.reload(),this.$store.dispatch("notification/error",e.message)}finally{this.isProcessing=!1}},update(){this.$events.$emit("model.update")},upload(){if(!1===this.add)return!1;this.$refs.upload.open({...this.add,url:O.api+"/"+this.add.api})},uploaded(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},Bk=Ak,Mk=(s("b7a8"),Object(c["a"])(Bk,Lk,Ik,!1,null,null,null)),Dk=Mk.exports,Nk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isLoading?t._e():s("section",{staticClass:"k-fields-section"},[t.issue?[s("k-headline",{staticClass:"k-fields-issue-headline"},[t._v(" Error ")]),s("k-box",{attrs:{text:t.issue.message,html:!1,theme:"negative"}})]:t._e(),s("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values,disabled:null!==t.$store.state.content.status.lock},on:{input:t.input,submit:t.onSubmit}})],2)},Pk=[],Rk={mixins:[vk],inheritAttrs:!1,data(){return{fields:{},isLoading:!0,issue:null}},computed:{language(){return this.$store.state.languages.current},values(){return this.$store.getters["content/values"]()}},watch:{language(){this.fetch()}},created(){this.input=V(this.input,50),this.fetch()},methods:{input(t,e,s){this.$store.dispatch("content/update",[s,t[s]])},async fetch(){try{const t=await this.load();this.fields=t.fields,Object.keys(this.fields).forEach(t=>{this.fields[t].section=this.name,this.fields[t].endpoints={field:this.parent+"/fields/"+t,section:this.parent+"/sections/"+this.name,model:this.parent}})}catch(t){this.issue=t}finally{this.isLoading=!1}},onSubmit(t){this.$events.$emit("keydown.cmd.s",t)}}},qk=Rk,Fk=(s("7d5d"),Object(c["a"])(qk,Nk,Pk,!1,null,null,null)),Uk=Fk.exports,Hk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-error-view",{staticClass:"k-browser-view"},[s("p",[t._v(" We are really sorry, but your browser does not support all features required for the Kirby Panel. ")]),!1===t.hasFetchSupport?[s("p",[s("strong",[t._v("Fetch")]),s("br"),t._v(" We use Javascript's new Fetch API. You can find a list of supported browsers for this feature on "),s("strong",[s("a",{attrs:{href:"https://caniuse.com/#feat=fetch"}},[t._v("caniuse.com")])])])]:t._e(),!1===t.hasGridSupport?[s("p",[s("strong",[t._v("CSS Grid")]),s("br"),t._v(" We use CSS Grids for all our layouts. You can find a list of supported browsers for this feature on "),s("strong",[s("a",{attrs:{href:"https://caniuse.com/#feat=css-grid"}},[t._v("caniuse.com")])])])]:t._e()],2)},zk=[],Kk={grid(){return!(!window.CSS||!window.CSS.supports("display","grid"))},fetch(){return void 0!==window.fetch},all(){return this.fetch()&&this.grid()}},Gk={computed:{hasFetchSupport(){return Kk.fetch()},hasGridSupport(){return Kk.grid()}},created(){this.$store.dispatch("content/current",null),Kk.all()&&this.$go("/")}},Wk=Gk,Yk=(s("d6fc"),Object(c["a"])(Wk,Hk,zk,!1,null,null,null)),Vk=Yk.exports,Jk=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-error-boundary",{key:t.plugin,scopedSlots:t._u([{key:"error",fn:function(e){var i=e.error;return s("k-error-view",{},[t._v(" "+t._s(i.message||i)+" ")])}}])},[s("k-"+t.plugin+"-plugin-view",t._b({tag:"component"},"component",t.$props,!1))],1)},Zk=[],Xk={props:{plugin:String,hash:String},beforeRouteEnter(t,e,s){s(t=>{t.$store.dispatch("breadcrumb",[]),t.$store.dispatch("content/current",null)})}},Qk=Xk,tv=Object(c["a"])(Qk,Jk,Zk,!1,null,null,null),ev=tv.exports,sv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-view",{staticClass:"k-error-view"},[s("div",{staticClass:"k-error-view-content"},[s("k-text",[s("p",[s("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),s("p",[t._t("default")],2)])],1)])},iv=[],nv=(s("d221"),{}),av=Object(c["a"])(nv,sv,iv,!1,null,null,null),rv=av.exports,ov=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):null!==t.file.id?s("div",{staticClass:"k-file-view"},[s("k-file-preview",{attrs:{file:t.file}}),s("k-view",{staticClass:"k-file-content",attrs:{"data-locked":t.isLocked}},[s("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab,tabs:t.tabs},on:{edit:function(e){return t.action("rename")}}},[t._v(" "+t._s(t.file.filename)+" "),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[s("k-button",{attrs:{link:t.file.url,responsive:!0,icon:"open",target:"_blank"}},[t._v(" "+t._s(t.$t("open"))+" ")]),s("k-dropdown",[s("k-button",{attrs:{responsive:!0,disabled:t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]),s("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),s("k-languages-dropdown")],1),t.file.id?s("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.file.id?s("k-sections",{attrs:{blueprint:t.file.blueprint.name,empty:t.$t("file.blueprint",{template:t.$esc(t.file.blueprint.name)}),parent:t.parent,tab:t.tab,tabs:t.tabs}}):t._e(),s("k-file-rename-dialog",{ref:"rename",on:{success:t.renamed}}),s("k-file-remove-dialog",{ref:"remove",on:{success:t.deleted}}),s("k-upload",{ref:"upload",attrs:{url:t.uploadApi,accept:t.file.mime,multiple:!1},on:{success:t.uploaded}})],1)],1):t._e()},lv=[],cv={computed:{isLocked(){return null!==this.$store.state.content.status.lock}},created(){this.fetch(),this.$events.$on("model.reload",this.fetch),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed(){this.$events.$off("model.reload",this.fetch),this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{toPrev(t){this.prev&&"body"===t.target.localName&&this.$router.push(this.prev.link)},toNext(t){this.next&&"body"===t.target.localName&&this.$router.push(this.next.link)}}},uv={mixins:[cv],props:{path:{type:String},filename:{type:String,required:!0},tab:{type:String,required:!0}},data(){return{file:{id:null,parent:null,filename:"",url:"",prev:null,next:null,panelIcon:null,panelImage:null,mime:null,content:{}},parent:null,permissions:{changeName:!1,delete:!1},issue:null,tabs:[],options:null}},computed:{uploadApi(){return O.api+"/"+this.path+"/files/"+this.filename},prev(){return this.file.prev?{link:this.$api.files.link(this.path,this.file.prev.filename),tooltip:this.file.prev.filename}:null},language(){return this.$store.state.languages.current},next(){return this.file.next?{link:this.$api.files.link(this.path,this.file.next.filename),tooltip:this.file.next.filename}:null}},watch:{language(){this.fetch()},filename(){this.fetch()}},methods:{async fetch(){try{const t=await this.$api.files.get(this.path,this.filename,{view:"panel"});this.file={...t,next:t.nextWithTemplate,prev:t.prevWithTemplate,url:t.url},this.parent=this.$api.files.url(this.path,t.filename),this.tabs=t.blueprint.tabs,this.permissions=t.options,this.options=async t=>{const e=await this.$api.files.options(this.path,this.file.filename);t(e)},this.$store.dispatch("breadcrumb",this.$api.files.breadcrumb(this.file,this.$route.name)),this.$store.dispatch("title",this.filename),this.$store.dispatch("content/create",{id:"files/"+t.id,api:this.$api.files.link(this.path,this.filename),content:t.content})}catch(t){window.console.error(t),this.issue=t}},action(t){switch(t){case"rename":this.$refs.rename.open(this.path,this.file.filename);break;case"replace":this.$refs.upload.open({url:O.api+"/"+this.$api.files.url(this.path,this.file.filename),accept:"."+this.file.extension+","+this.file.mime});break;case"remove":this.$refs.remove.open(this.path,this.file.filename);break}},deleted(){this.path?this.$go("/"+this.path):this.$go("/site")},renamed(t){this.$go(this.$api.files.link(this.path,t.filename))},uploaded(){this.fetch(),this.$store.dispatch("notification/success",":)")}}},dv=uv,pv=Object(c["a"])(dv,ov,lv,!1,null,null,null),hv=pv.exports,mv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.system?s("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},["install"===t.state?s("form",{on:{submit:function(e){return e.preventDefault(),t.install(e)}}},[s("h1",{staticClass:"k-offscreen"},[t._v(" "+t._s(t.$t("installation"))+" ")]),s("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),s("k-button",{attrs:{type:"submit",icon:"check"}},[t._v(" "+t._s(t.$t("install"))+" ")])],1):"completed"===t.state?s("k-text",[s("k-headline",[t._v(t._s(t.$t("installation.completed")))]),s("k-link",{attrs:{to:"/login"}},[t._v(" "+t._s(t.$t("login"))+" ")])],1):s("div",[t.system.isInstalled?t._e():s("k-headline",[t._v(" "+t._s(t.$t("installation.issues.headline"))+" ")]),s("ul",{staticClass:"k-installation-issues"},[!1===t.system.isInstallable?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),s("k-button",{attrs:{icon:"refresh"},on:{click:t.check}},[t._v(" "+t._s(t.$t("retry"))+" ")])],1)],1):t._e()},fv=[],gv={data(){return{user:{name:"",email:"",language:"",password:"",role:"admin"},languages:[],system:null}},computed:{state(){return this.system.isOk&&this.system.isInstallable&&!this.system.isInstalled?"install":this.system.isOk&&this.system.isInstallable&&this.system.isInstalled?"completed":null},translation(){return this.$store.state.translation.current},requirements(){return this.system&&this.system.requirements?this.system.requirements:{}},fields(){return{email:{label:this.$t("email"),type:"email",link:!1,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.languages,icon:"globe",empty:!1,required:!0}}}},watch:{translation:{handler(t){this.user.language=t},immediate:!0},"user.language"(t){this.$store.dispatch("translation/activate",t)}},created(){this.$store.dispatch("content/current",null),this.check()},methods:{install(){this.$api.system.install(this.user).then(t=>{this.$store.dispatch("user/current",t),this.$store.dispatch("notification/success",this.$t("welcome")+"!"),this.$go("/")}).catch(t=>{this.$store.dispatch("notification/error",t)})},check(){this.$store.dispatch("system/load",!0).then(t=>{!0===t.isInstalled&&t.isReady?this.$go("/login"):this.$api.translations.options().then(e=>{this.languages=e,this.system=t,this.$store.dispatch("title",this.$t("view.installation"))})})}}},bv=gv,kv=(s("146c"),Object(c["a"])(bv,mv,fv,!1,null,null,null)),vv=kv.exports,$v=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):t.ready&&"login"===t.form?s("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[s("k-login-plugin")],1):t.ready&&"code"===t.form?s("k-view",{staticClass:"k-login-code-view",attrs:{align:"center"}},[s("k-login-code")],1):t._e()},yv=[],_v={components:{"k-login-plugin":window.panel.plugins.login||An},data(){return{ready:!1,issue:null}},computed:{form(){return this.$store.state.user.pendingEmail?"code":this.$store.state.user.current?null:"login"}},created(){this.$store.dispatch("content/current",null),this.$store.dispatch("system/load").then(t=>{t.isReady||this.$go("/installation"),t.user&&t.user.id&&this.$go("/"),"pending"===t.authStatus.status&&this.$store.dispatch("user/pending",t.authStatus),this.ready=!0,this.$store.dispatch("title",this.$t("login"))}).catch(t=>{this.issue=t})}},wv=_v,xv=(s("24c1"),Object(c["a"])(wv,$v,yv,!1,null,null,null)),Ov=xv.exports,Cv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):s("k-view",{staticClass:"k-page-view",attrs:{"data-locked":t.isLocked}},[s("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tab:t.tab,tabs:t.tabs},on:{edit:function(e){return t.action("rename")}}},[t._v(" "+t._s(t.page.title)+" "),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[t.permissions.preview&&t.page.previewUrl?s("k-button",{attrs:{responsive:!0,link:t.page.previewUrl,target:"_blank",icon:"open"}},[t._v(" "+t._s(t.$t("open"))+" ")]):t._e(),t.status?s("k-status-icon",{attrs:{status:t.page.status,disabled:!t.permissions.changeStatus||t.isLocked,responsive:!0,text:t.status.label},on:{click:function(e){return t.action("status")}}}):t._e(),s("k-dropdown",[s("k-button",{attrs:{responsive:!0,disabled:!0===t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]),s("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),s("k-languages-dropdown")],1),t.page.id?s("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],1),t.page.id?s("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("page.blueprint",{template:t.$esc(t.blueprint)}),parent:t.$api.pages.url(t.page.id),tab:t.tab,tabs:t.tabs}}):t._e(),s("k-page-rename-dialog",{ref:"rename",on:{success:t.update}}),s("k-page-duplicate-dialog",{ref:"duplicate"}),s("k-page-status-dialog",{ref:"status",on:{success:t.update}}),s("k-page-template-dialog",{ref:"template",on:{success:t.update}}),s("k-page-remove-dialog",{ref:"remove"})],1)},Sv=[],Ev={mixins:[cv],props:{path:{type:String,required:!0},tab:{type:String}},data(){return{page:{title:"",id:null,prev:null,next:null,status:null},blueprint:null,preview:!0,permissions:{changeTitle:!1,changeStatus:!1},icon:"page",issue:null,tabs:[],options:null}},computed:{language(){return this.$store.state.languages.current},next(){return this.page.next?{link:this.$api.pages.link(this.page.next.id),tooltip:this.page.next.title}:null},prev(){return this.page.prev?{link:this.$api.pages.link(this.page.prev.id),tooltip:this.page.prev.title}:null},status(){return null!==this.page.status?this.page.blueprint.status[this.page.status]:null}},watch:{language(){this.fetch()},path(){this.fetch()}},created(){this.$events.$on("page.changeSlug",this.update)},destroyed(){this.$events.$off("page.changeSlug",this.update)},methods:{action(t){switch(t){case"duplicate":this.$refs.duplicate.open(this.page.id);break;case"rename":this.$refs.rename.open(this.page.id,this.permissions,"title");break;case"url":this.$refs.rename.open(this.page.id,this.permissions,"slug");break;case"status":this.$refs.status.open(this.page.id);break;case"template":this.$refs.template.open(this.page.id);break;case"remove":this.$refs.remove.open(this.page.id);break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}},async fetch(){try{this.page=await this.$api.pages.get(this.path,{view:"panel"}),this.blueprint=this.page.blueprint.name,this.permissions=this.page.options,this.tabs=this.page.blueprint.tabs,this.options=async t=>{const e=await this.$api.pages.options(this.page.id);t(e)},this.$store.dispatch("breadcrumb",this.$api.pages.breadcrumb(this.page)),this.$store.dispatch("title",this.page.title),this.$store.dispatch("content/create",{id:"pages/"+this.page.id,api:this.$api.pages.link(this.page.id),content:this.page.content})}catch(t){this.issue=t}},update(){this.fetch(),this.$emit("model.update")}}},jv=Ev,Tv=Object(c["a"])(jv,Cv,Sv,!1,null,null,null),Lv=Tv.exports,Iv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-view",{staticClass:"k-password-reset-view",attrs:{align:"center"}},[s("k-form",{attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}},[s("template",{slot:"header"},[s("h1",{staticClass:"k-offscreen"},[t._v(" "+t._s(t.$t("view.resetPassword"))+" ")]),t.issue?s("div",{staticClass:"k-login-alert",on:{click:function(e){t.issue=null}}},[s("span",[t._v(t._s(t.issue))]),s("k-icon",{attrs:{type:"alert"}})],1):t._e(),s("k-user-info",{attrs:{user:t.$user}})],1),s("div",{staticClass:"k-login-buttons",attrs:{slot:"footer"},slot:"footer"},[s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("change"))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)],2)],1)},Av=[],Bv={data(){return{isLoading:!1,issue:"",values:{password:null,passwordConfirmation:null}}},computed:{fields(){return{password:{autofocus:!0,label:this.$t("user.changePassword.new"),icon:"key",type:"password"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},mounted(){this.$store.dispatch("title",this.$t("view.resetPassword"))},methods:{async submit(){if(!this.values.password||this.values.password.length<8)return this.issue=this.$t("error.user.password.invalid"),!1;if(this.values.password!==this.values.passwordConfirmation)return this.issue=this.$t("error.user.password.notSame"),!1;this.isLoading=!0;try{await this.$api.users.changePassword(this.$user.id,this.values.password),this.$store.dispatch("notification/success",":)"),this.$go("/")}catch(t){this.issue=t.message}finally{this.isLoading=!1}}}},Mv=Bv,Dv=(s("310e"),Object(c["a"])(Mv,Iv,Av,!1,null,null,null)),Nv=Dv.exports,Pv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-view",{staticClass:"k-settings-view"},[s("k-header",[t._v(" "+t._s(t.$t("view.settings"))+" ")]),s("section",{staticClass:"k-system-info"},[s("header",[s("k-headline",[t._v("Kirby")])],1),s("ul",{staticClass:"k-system-info-box"},[s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("license")))]),s("dd",[t.license?[t._v(" "+t._s(t.license)+" ")]:s("p",[s("strong",{staticClass:"k-system-unregistered"},[t._v(t._s(t.$t("license.unregistered")))])])],2)])]),s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("version")))]),s("dd",[t._v(t._s(t.$store.state.system.info.version))])])])])]),t.multilang?s("section",{staticClass:"k-languages"},[t.languages.length>0?[s("section",{staticClass:"k-languages-section"},[s("header",[s("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),s("k-collection",{attrs:{items:t.defaultLanguage},on:{action:t.action}})],1),s("section",{staticClass:"k-languages-section"},[s("header",[s("k-headline",[t._v(t._s(t.$t("languages.secondary")))]),s("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(" "+t._s(t.$t("language.create"))+" ")])],1),t.translations.length?s("k-collection",{attrs:{items:t.translations},on:{action:t.action}}):s("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(" "+t._s(t.$t("languages.secondary.empty"))+" ")])],1)]:0===t.languages.length?[s("header",[s("k-headline",[t._v(t._s(t.$t("languages")))]),s("k-button",{attrs:{icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(" "+t._s(t.$t("language.create"))+" ")])],1),s("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(" "+t._s(t.$t("languages.empty"))+" ")])]:t._e(),s("k-language-create-dialog",{ref:"create",on:{success:t.fetch}}),s("k-language-update-dialog",{ref:"update",on:{success:t.fetch}}),s("k-language-remove-dialog",{ref:"remove",on:{success:t.fetch}})],2):t._e()],1)},Rv=[],qv={data(){return{languages:[]}},computed:{defaultLanguage(){return this.languages.filter(t=>t.default)},multilang(){return this.$store.state.system.info.multilang},license(){return this.$store.state.system.info.license},translations(){return this.languages.filter(t=>!1===t.default)}},created(){this.$store.dispatch("content/current",null),this.$store.dispatch("title",this.$t("view.settings")),this.$store.dispatch("breadcrumb",[]),this.fetch()},methods:{fetch(){!0===this.multilang?this.$api.get("languages").then(t=>{this.languages=t.data.map(e=>({id:e.code,default:e.default,icon:{type:"globe",back:"black"},image:!0,text:this.$esc(e.name),info:this.$esc(e.code),link:()=>{this.$refs.update.open(e.code)},options:[{icon:"edit",text:this.$t("edit"),click:"update"},{icon:"trash",text:this.$t("delete"),disabled:e.default&&1!==t.data.length,click:"remove"}]}))}):this.languages=[]},action(t,e){switch(e){case"update":this.$refs.update.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}}}},Fv=qv,Uv=(s("9bd5"),Object(c["a"])(Fv,Pv,Rv,!1,null,null,null)),Hv=Uv.exports,zv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):s("k-view",{key:"site-view",staticClass:"k-site-view",attrs:{"data-locked":t.isLocked}},[s("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tab:t.tab,tabs:t.tabs},on:{edit:function(e){return t.action("rename")}}},[t._v(" "+t._s(t.site.title)+" "),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[s("k-button",{attrs:{responsive:!0,link:t.site.previewUrl,target:"_blank",icon:"open"}},[t._v(" "+t._s(t.$t("open"))+" ")]),s("k-languages-dropdown")],1)],1),t.site.url?s("k-sections",{attrs:{blueprint:t.site.blueprint.name,empty:t.$t("site.blueprint"),tab:t.tab,tabs:t.tabs,parent:"site"},on:{submit:function(e){return t.$emit("submit",e)}}}):t._e(),s("k-site-rename-dialog",{ref:"rename",on:{success:t.fetch}})],1)},Kv=[],Gv={props:{tab:String},data(){return{site:{title:null,url:null},issue:null,tabs:[],options:null,permissions:{changeTitle:!0}}},computed:{isLocked(){return null!==this.$store.state.content.status.lock},language(){return this.$store.state.languages.current}},watch:{language(){this.fetch()}},created(){this.fetch()},methods:{fetch(){this.$api.site.get({view:"panel"}).then(t=>{this.site=t,this.tabs=t.blueprint.tabs,this.permissions=t.options,this.options=t=>{this.$api.site.options().then(e=>{t(e)})},this.$store.dispatch("breadcrumb",[]),this.$store.dispatch("title",null),this.$store.dispatch("content/create",{id:"site",api:"site",content:t.content})}).catch(t=>{this.issue=t})},action(t){switch(t){case"languages":this.$refs.languages.open();break;case"rename":this.$refs.rename.open();break;default:this.$store.dispatch("notification/error",this.$t("notification.notImplemented"));break}}}},Wv=Gv,Yv=Object(c["a"])(Wv,zv,Kv,!1,null,null,null),Vv=Yv.exports,Jv=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):s("k-view",{staticClass:"k-users-view"},[s("k-header",[t._v(" "+t._s(t.$t("view.users"))+" "),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[s("k-button",{attrs:{disabled:!1===t.$permissions.users.create,icon:"add"},on:{click:function(e){return t.$refs.create.open()}}},[t._v(" "+t._s(t.$t("user.create"))+" ")])],1),s("k-button-group",{attrs:{slot:"right"},slot:"right"},[s("k-dropdown",[s("k-button",{attrs:{responsive:!0,icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}},[t._v(" "+t._s(t.$t("role"))+": "+t._s(t.role?t.role.text:t.$t("role.all"))+" ")]),s("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"bolt"},on:{click:function(e){return t.filter(!1)}}},[t._v(" "+t._s(t.$t("role.all"))+" ")]),s("hr"),t._l(t.roles,(function(e){return s("k-dropdown-item",{key:e.value,attrs:{icon:"bolt"},on:{click:function(s){return t.filter(e)}}},[t._v(" "+t._s(e.text)+" ")])}))],2)],1)],1)],1),t.users.length>0?[s("k-collection",{attrs:{items:t.users,pagination:t.pagination},on:{paginate:t.paginate,action:t.action}})]:0===t.total?[s("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("role.empty"))+" ")])]:t._e(),s("k-user-create-dialog",{ref:"create",on:{success:t.fetch}}),s("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),s("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),s("k-user-password-dialog",{ref:"password"}),s("k-user-remove-dialog",{ref:"remove",on:{success:t.fetch}}),s("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),s("k-user-role-dialog",{ref:"role",on:{success:t.fetch}})],2)},Zv=[],Xv={data(){return{page:1,limit:20,total:null,users:[],roles:[],issue:null}},computed:{pagination(){return{page:this.page,limit:this.limit,total:this.total}},role(){let t=null;return this.$route.params.role&&this.roles.forEach(e=>{e.value===this.$route.params.role&&(t=e)}),t}},watch:{$route(){this.fetch()}},created(){this.$store.dispatch("content/current",null),this.$api.roles.options().then(t=>{this.roles=t,this.fetch()})},methods:{fetch(){this.$store.dispatch("title",this.$t("view.users"));let t={paginate:{page:this.page,limit:this.limit},sortBy:"username asc"};this.role&&(t.filterBy=[{field:"role",operator:"==",value:this.role.value}]),this.$api.users.list(t).then(t=>{this.users=t.data.map(t=>{let e={id:t.id,icon:{type:"user",back:"black"},text:this.$esc(t.name||t.email),info:this.$esc(t.role.title),link:"/users/"+t.id,options:e=>{this.$api.users.options(t.id,"list").then(t=>e(t)).catch(t=>{this.$store.dispatch("notification/error",t)})},image:!0};return t.avatar&&(e.image={url:t.avatar.url,cover:!0}),e}),this.role?this.$store.dispatch("breadcrumb",[{link:"/users/role/"+this.role.value,label:this.$t("role")+": "+this.role.text}]):this.$store.dispatch("breadcrumb",[]),this.total=t.pagination.total}).catch(t=>{this.issue=t})},paginate(t){this.page=t.page,this.limit=t.limit,this.fetch()},action(t,e){switch(e){case"edit":this.$go("/users/"+t.id);break;case"email":this.$refs.email.open(t.id);break;case"role":this.$refs.role.open(t.id);break;case"rename":this.$refs.rename.open(t.id);break;case"password":this.$refs.password.open(t.id);break;case"language":this.$refs.language.open(t.id);break;case"remove":this.$refs.remove.open(t.id);break}},filter(t){!1===t?this.$go("/users"):this.$go("/users/role/"+t.value),this.$refs.roles.close()}}},Qv=Xv,t$=Object(c["a"])(Qv,Jv,Zv,!1,null,null,null),e$=t$.exports,s$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.issue?s("k-error-view",[t._v(" "+t._s(t.issue.message)+" ")]):t.ready?s("div",{staticClass:"k-user-view",attrs:{"data-locked":t.isLocked}},[s("div",{staticClass:"k-user-profile"},[s("k-view",[t.avatar?[s("k-dropdown",[s("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar"),disabled:t.isLocked},on:{click:function(e){return t.$refs.picture.toggle()}}},[t.avatar?s("k-image",{attrs:{cover:!0,src:t.avatar,ratio:"1/1"}}):t._e()],1),s("k-dropdown-content",{ref:"picture"},[s("k-dropdown-item",{attrs:{icon:"upload"},on:{click:function(e){return t.$refs.upload.open()}}},[t._v(" "+t._s(t.$t("change"))+" ")]),s("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.action("picture.delete")}}},[t._v(" "+t._s(t.$t("delete"))+" ")])],1)],1)]:[s("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar")},on:{click:function(e){return t.$refs.upload.open()}}},[s("k-icon",{attrs:{type:"user"}})],1)],s("k-button-group",[s("k-button",{attrs:{disabled:!t.permissions.changeEmail||t.isLocked,icon:"email"},on:{click:function(e){return t.action("email")}}},[t._v(" "+t._s(t.$t("email"))+": "+t._s(t.user.email)+" ")]),s("k-button",{attrs:{disabled:!t.permissions.changeRole||t.isLocked,icon:"bolt"},on:{click:function(e){return t.action("role")}}},[t._v(" "+t._s(t.$t("role"))+": "+t._s(t.user.role.title)+" ")]),s("k-button",{attrs:{disabled:!t.permissions.changeLanguage||t.isLocked,icon:"globe"},on:{click:function(e){return t.action("language")}}},[t._v(" "+t._s(t.$t("language"))+": "+t._s(t.user.language)+" ")])],1)],2)],1),s("k-view",[s("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab,tabs:t.tabs},on:{edit:function(e){return t.action("rename")}}},[t.user.name&&0!==t.user.name.length?[t._v(" "+t._s(t.user.name)+" ")]:s("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")]),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[s("k-dropdown",[s("k-button",{attrs:{disabled:t.isLocked,icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]),s("k-dropdown-content",{ref:"settings",attrs:{options:t.options},on:{action:t.action}})],1),s("k-languages-dropdown")],1),t.user.id&&"User"===t.$route.name?s("k-prev-next",{attrs:{slot:"right",prev:t.prev,next:t.next},slot:"right"}):t._e()],2),t.user?s("k-sections",{attrs:{blueprint:t.user.blueprint.name,empty:t.$t("user.blueprint",{role:t.$esc(t.user.role.name)}),parent:"users/"+t.user.id,tab:t.tab,tabs:t.tabs}}):t._e(),s("k-user-email-dialog",{ref:"email",on:{success:t.fetch}}),s("k-user-language-dialog",{ref:"language",on:{success:t.fetch}}),s("k-user-password-dialog",{ref:"password"}),s("k-user-remove-dialog",{ref:"remove"}),s("k-user-rename-dialog",{ref:"rename",on:{success:t.fetch}}),s("k-user-role-dialog",{ref:"role",on:{success:t.fetch}}),s("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1):t._e()},i$=[],n$={mixins:[cv],props:{id:{type:[Boolean,String],required:!0},tab:String},data(){return{tabs:[],ready:!1,user:{role:{name:null},name:null,language:null,prev:null,next:null},permissions:{changeEmail:!0,changeName:!0,changeLanguage:!0,changeRole:!0},issue:null,avatar:null,options:null}},computed:{language(){return this.$store.state.languages.current},next(){return this.user.next?{link:this.$api.users.link(this.user.next.id),tooltip:this.user.next.name}:null},prev(){return this.user.prev?{link:this.$api.users.link(this.user.prev.id),tooltip:this.user.prev.name}:null},uploadApi(){return O.api+"/users/"+this.user.id+"/avatar"}},watch:{"$route.name":{handler(t){"Account"===t&&this.$store.dispatch("breadcrumb",[])},immediate:!0},language(){this.fetch()},id(){this.fetch()}},methods:{async action(t){switch(t){case"email":this.$refs.email.open(this.user.id);break;case"language":this.$refs.language.open(this.user.id);break;case"password":this.$refs.password.open(this.user.id);break;case"picture.delete":await this.$api.users.deleteAvatar(this.id),this.avatar=null,this.$store.dispatch("notification/success",":)");break;case"remove":this.$refs.remove.open(this.user.id);break;case"rename":this.$refs.rename.open(this.user.id);break;case"role":this.$refs.role.open(this.user.id);break;default:this.$store.dispatch("notification/error","Not yet implemented")}},async fetch(){if(this.id)try{this.user=await this.$api.users.get(this.id,{view:"panel"}),this.tabs=this.user.blueprint.tabs,this.ready=!0,this.permissions=this.user.options,this.options=async t=>{const e=await this.$api.users.options(this.user.id);t(e)},this.user.avatar?this.avatar=this.user.avatar.url:this.avatar=null,"User"===this.$route.name&&this.$store.dispatch("breadcrumb",this.$api.users.breadcrumb(this.user)),this.$store.dispatch("title",this.user.name||this.user.email),this.$store.dispatch("content/create",{id:"users/"+this.user.id,api:this.$api.users.link(this.user.id),content:this.user.content})}catch(t){window.console.error(t),this.issue=t}},uploadedAvatar(){this.$store.dispatch("notification/success",":)"),this.fetch()}}},a$=n$,r$=(s("bd96"),Object(c["a"])(a$,s$,i$,!1,null,null,null)),o$=r$.exports,l$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"container",staticClass:"k-block-container",class:"k-block-container-type-"+t.type,attrs:{"data-batched":t.isBatched,"data-disabled":t.fieldset.disabled,"data-hidden":t.isHidden,"data-last-in-batch":t.isLastInBatch,"data-selected":t.isSelected,"data-translate":t.fieldset.translate,tabindex:"0"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortDown")):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortUp")):null}],focus:function(e){return t.$emit("focus")},focusin:function(e){return t.$emit("focus")}}},[s("div",{staticClass:"k-block",class:t.className},[s(t.customComponent,t._g(t._b({ref:"editor",tag:"component"},"component",t.$props,!1),t.listeners))],1),s("k-block-options",t._g({ref:"options",attrs:{"is-batched":t.isBatched,"is-full":t.isFull,"is-hidden":t.isHidden}},t.listeners)),t.isBatched?t._e():s("k-form-drawer",{ref:"drawer",staticClass:"k-block-drawer",attrs:{icon:t.fieldset.icon||"box",tabs:t.tabs,title:t.fieldset.name,value:t.content},on:{close:function(e){return t.focus()},input:function(e){return t.$emit("update",e)}},scopedSlots:t._u([{key:"options",fn:function(){return[t.isHidden?s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"hidden"},on:{click:function(e){return t.$emit("show")}}}):t._e(),s("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.prev,icon:"angle-left"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.prev)}}}),s("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.next,icon:"angle-right"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.next)}}}),s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"trash"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.confirmToRemove(e)}}})]},proxy:!0}],null,!1,2458022885)}),s("k-remove-dialog",{ref:"removeDialog",attrs:{text:t.$t("field.blocks.delete.confirm")},on:{submit:t.remove}})],1)},c$=[],u$={inheritAttrs:!1,props:{attrs:[Array,Object],content:[Array,Object],endpoints:Object,fieldset:Object,id:String,isBatched:Boolean,isFull:Boolean,isHidden:Boolean,isLastInBatch:Boolean,isSelected:Boolean,name:String,next:Object,prev:Object,type:String},data(){return{skipFocus:!1}},computed:{className(){let t=["k-block-type-"+this.type];return this.fieldset.preview&&this.fieldset.preview!==this.type&&t.push("k-block-type-"+this.fieldset.preview),!1===this.wysiwyg&&t.push("k-block-type-default"),t},customComponent(){return this.wysiwyg?this.wysiwygComponent:"k-block-type-default"},listeners(){return{...this.$listeners,confirmToRemove:this.confirmToRemove,open:this.open}},tabs(){let t=this.fieldset.tabs;return Object.entries(t).forEach(([e,s])=>{Object.entries(s.fields).forEach(([s])=>{t[e].fields[s].section=this.name,t[e].fields[s].endpoints={field:this.endpoints.field+"/fieldsets/"+this.type+"/fields/"+s,section:this.endpoints.section,model:this.endpoints.model}})}),t},wysiwyg(){return!1!==this.wysiwygComponent},wysiwygComponent(){if(!1===this.fieldset.preview)return!1;let t="k-block-type-"+this.type;return(this.$helper.isComponent(t)||!(!this.fieldset.preview||(t="k-block-type-"+this.fieldset.preview,!this.$helper.isComponent(t))))&&t}},methods:{close(){this.$refs.drawer.close()},confirmToRemove(){this.$refs.removeDialog.open()},focus(){!0!==this.skipFocus&&("function"===typeof this.$refs.editor.focus?this.$refs.editor.focus():this.$refs.container.focus())},goTo(t){t&&(this.skipFocus=!0,this.close(),this.$nextTick(()=>{t.$refs.container.focus(),t.open(),this.skipFocus=!1}))},open(){this.$refs.drawer.open()},remove(){this.$refs.removeDialog.close(),this.$emit("remove",this.id)}}},d$=u$,p$=(s("bbdf"),Object(c["a"])(d$,l$,c$,!1,null,null,null)),h$=p$.exports,m$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-blocks",attrs:{"data-empty":0===t.blocks.length,"data-alt":t.altKey}},[t.hasFieldsets?[s("k-draggable",t._b({staticClass:"k-blocks-list",on:{sort:t.save},scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-empty",{staticClass:"k-blocks-empty",attrs:{icon:"box"},on:{click:function(e){return t.choose(t.blocks.length)}}},[t._v(" "+t._s(t.empty||t.$t("field.blocks.empty"))+" ")])]},proxy:!0}],null,!1,2413899928)},"k-draggable",t.draggableOptions,!1),t._l(t.blocks,(function(e,i){return s("k-block",t._b({key:e.id,ref:"block-"+e.id,refInFor:!0,attrs:{endpoints:t.endpoints,fieldset:t.fieldset(e),"is-batched":t.isBatched(e),"is-last-in-batch":t.isLastInBatch(e),"is-full":t.isFull,"is-hidden":!0===e.isHidden,"is-selected":t.isSelected(e),next:t.prevNext(i+1),prev:t.prevNext(i-1)},on:{append:function(e){return t.add(e,i+1)},blur:function(e){return t.select(null)},choose:function(e){return t.choose(e)},chooseToAppend:function(e){return t.choose(i+1)},chooseToConvert:function(s){return t.chooseToConvert(e)},chooseToPrepend:function(e){return t.choose(i)},confirmToRemoveSelected:t.confirmToRemoveSelected,duplicate:function(s){return t.duplicate(e,i)},focus:function(s){return t.select(e)},hide:function(s){return t.hide(e)},prepend:function(e){return t.add(e,i)},remove:function(s){return t.remove(e)},sortDown:function(s){return t.sort(e,i,i+1)},sortUp:function(s){return t.sort(e,i,i-1)},show:function(s){return t.show(e)},update:function(s){return t.update(e,s)}}},"k-block",e,!1))})),1),s("k-block-selector",{ref:"selector",attrs:{fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups},on:{add:t.add,convert:t.convert}}),s("k-remove-dialog",{ref:"removeAll",attrs:{text:t.$t("field.blocks.delete.confirm.all")},on:{submit:t.removeAll}}),s("k-remove-dialog",{ref:"removeSelected",attrs:{text:t.$t("field.blocks.delete.confirm.selected")},on:{submit:t.removeSelected}})]:[s("k-box",{attrs:{theme:"info"}},[t._v(" No fieldsets yet ")])]],2)},f$=[],g$={inheritAttrs:!1,props:{empty:String,endpoints:Object,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default(){return[]}}},data(){return{batch:[],blocks:this.value,altKey:!1}},computed:{draggableOptions(){return{id:this._uid,handle:".k-block-handle",list:this.blocks,move:this.move,delay:10,data:{fieldsets:this.fieldsets,isFull:this.isFull},options:{group:this.group}}},hasFieldsets(){return Object.keys(this.fieldsets).length},isEmpty(){return 0===this.blocks.length},isFull(){return null!==this.max&&this.blocks.length>=this.max},selected(){return this.$store.state.blocks.current}},watch:{value(){this.blocks=this.value}},created(){this.outsideFocus=t=>{const e=document.querySelector(".k-overlay:last-of-type");!1!==this.$el.contains(t.target)||e&&!1!==e.contains(t.target)||this.select(null)},document.addEventListener("focus",this.outsideFocus,!0),this.onAlt=t=>{t.altKey?this.altKey=!0:this.altKey=!1},document.addEventListener("keydown",this.onAlt,!0),document.addEventListener("keyup",this.onAlt,!0)},destroyed(){document.removeEventListener("focus",this.outsideFocus),document.removeEventListener("keydown",this.onAlt),document.removeEventListener("keyup",this.onAlt)},methods:{async add(t="text",e){const s=await this.$api.get(this.endpoints.field+"/fieldsets/"+t);this.blocks.splice(e,0,s),this.save(),this.$nextTick(()=>{this.focusOrOpen(s)})},addToBatch(t){null!==this.selected&&!1===this.batch.includes(this.selected)&&(this.batch.push(this.selected),this.$store.dispatch("blocks/current",null)),!1===this.batch.includes(t.id)&&this.batch.push(t.id)},choose(t){if(1===Object.keys(this.fieldsets).length){const e=Object.values(this.fieldsets)[0].type;this.add(e,t)}else this.$refs.selector.open(t)},chooseToConvert(t){this.$refs.selector.open(t,{disabled:[t.type],headline:this.$t("field.blocks.changeType"),event:"convert"})},click(t){this.$emit("click",t)},confirmToRemoveAll(){this.$refs.removeAll.open()},confirmToRemoveSelected(){this.$refs.removeSelected.open()},async convert(t,e){const s=this.blocks.findIndex(t=>t.id===e.id);if(-1===s)return!1;const i=t=>{let e={};return Object.values(t.tabs).forEach(t=>{e={...e,...t.fields}}),e},n=this.blocks[s],a=await this.$api.get(this.endpoints.field+"/fieldsets/"+t),r=this.fieldsets[n.type],o=this.fieldsets[t];if(!o)return!1;let l=a.content;const c=i(r),u=i(o);Object.entries(u).forEach(([t,e])=>{const s=c[t];s&&s.type===e.type&&n.content[t]&&(l[t]=n.content[t])}),this.blocks[s]={...a,id:n.id,content:l},this.save()},async duplicate(t,e){const s={...this.$helper.clone(t),id:this.$helper.uuid()};this.blocks.splice(e+1,0,s),this.save()},fieldset(t){return this.fieldsets[t.type]||{icon:"box",name:t.type,tabs:{content:{fields:{}}},type:t.type}},focus(t){this.$refs["block-"+t.id]&&this.$refs["block-"+t.id][0].focus()},focusOrOpen(t){this.fieldsets[t.type].wysiwyg?this.focus(t):this.open(t)},hide(t){this.$set(t,"isHidden",!0),this.save()},isBatched(t){return this.batch.includes(t.id)},isLastInBatch(t){const[e]=this.batch.slice(-1);return e&&t.id===e},isSelected(t){return this.selected&&this.selected===t.id},move(t){if(t.from!==t.to){const e=t.draggedContext.element,s=t.relatedContext.component.componentData||t.relatedContext.component.$parent.componentData;if(!1===Object.keys(s.fieldsets).includes(e.type))return!1;if(!0===s.isFull)return!1}return!0},open(t){this.$refs["block-"+t.id]&&this.$refs["block-"+t.id][0].open()},prevNext(t){if(this.blocks[t]){let e=this.blocks[t];if(this.$refs["block-"+e.id])return this.$refs["block-"+e.id][0]}},remove(t){const e=this.blocks.findIndex(e=>e.id===t.id);-1!==e&&(this.selected&&this.selected.id===t.id&&this.select(null),this.$delete(this.blocks,e),this.save())},removeAll(){this.blocks=[],this.save(),this.$refs.removeAll.close()},removeSelected(){this.batch.forEach(t=>{const e=this.blocks.findIndex(e=>e.id===t);-1!==e&&this.$delete(this.blocks,e)}),this.batch=[],this.$store.dispatch("blocks/current",null),this.save(),this.$refs.removeSelected.close()},save(){this.$emit("input",this.blocks)},select(t){t&&this.altKey?this.addToBatch(t):(this.batch=[],this.$store.dispatch("blocks/current",t?t.id:null))},show(t){this.$set(t,"isHidden",!1),this.save()},sort(t,e,s){if(s<0)return;let i=this.$helper.clone(this.blocks);i.splice(e,1),i.splice(s,0,t),this.blocks=i,this.save(),this.$nextTick(()=>{this.focus(t)})},update(t,e){const s=this.blocks.findIndex(e=>e.id===t.id);-1!==s&&Object.entries(e).forEach(([t,e])=>{this.$set(this.blocks[s].content,t,e)}),this.save()}}},b$=g$,k$=(s("f470"),Object(c["a"])(b$,m$,f$,!1,null,null,null)),v$=k$.exports,$$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("figure",{staticClass:"k-block-figure"},[t.isEmpty?s("k-button",{staticClass:"k-block-figure-empty",attrs:{icon:t.emptyIcon},on:{click:function(e){return t.$emit("open")}}},[t._v(" "+t._s(t.emptyText)+" ")]):s("span",{staticClass:"k-block-figure-container",on:{dblclick:function(e){return t.$emit("open")}}},[t._t("default")],2),t.caption?s("figcaption",[s("k-writer",{attrs:{inline:!0,marks:t.captionMarks,value:t.caption},on:{input:function(e){return t.$emit("update",{caption:e})}}})],1):t._e()],1)},y$=[],_$={inheritAttrs:!1,props:{caption:String,captionMarks:[Boolean,Array],cover:{type:Boolean,default:!0},isEmpty:Boolean,emptyIcon:String,emptyText:String,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"16/9")}}},w$=_$,x$=(s("0069"),Object(c["a"])(w$,$$,y$,!1,null,null,null)),O$=x$.exports,C$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dropdown",{staticClass:"k-block-options"},[t.isBatched?[s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("remove"),icon:"trash"},nativeOn:{mousedown:function(e){return e.preventDefault(),t.$emit("confirmToRemoveSelected")}}})]:[s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("edit"),icon:"edit"},on:{click:function(e){return t.$emit("open")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{disabled:t.isFull,tooltip:t.$t("insert.after"),icon:"add"},on:{click:function(e){return t.$emit("chooseToAppend")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("delete"),icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("more"),icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-button",{staticClass:"k-block-options-button k-block-handle",attrs:{tooltip:t.$t("sort"),icon:"sort"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.$emit("sortUp"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.$emit("sortDown"))}]}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-up"},on:{click:function(e){return t.$emit("chooseToPrepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-down"},on:{click:function(e){return t.$emit("chooseToAppend")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"edit"},on:{click:function(e){return t.$emit("open")}}},[t._v(" "+t._s(t.$t("edit"))+" ")]),s("k-dropdown-item",{attrs:{icon:"refresh"},on:{click:function(e){return t.$emit("chooseToConvert")}}},[t._v(" "+t._s(t.$t("field.blocks.changeType"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:t.isHidden?"preview":"hidden"},on:{click:function(e){return t.$emit(t.isHidden?"show":"hide")}}},[t._v(" "+t._s(!0===t.isHidden?t.$t("show"):t.$t("hide"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}},[t._v(" "+t._s(t.$t("delete"))+" ")])],1)]],2)},S$=[],E$={props:{isBatched:Boolean,isFull:Boolean,isHidden:Boolean},methods:{open(){this.$refs.options.open()}}},j$=E$,T$=(s("9c44"),Object(c["a"])(j$,C$,S$,!1,null,null,null)),L$=T$.exports,I$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-block-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[t.headline?s("k-headline",[t._v(" "+t._s(t.headline)+" ")]):t._e(),t._l(t.groups,(function(e,i){return s("details",{key:i,attrs:{open:e.open}},[s("summary",[t._v(t._s(e.label))]),s("div",{staticClass:"k-block-types"},t._l(e.fieldsets,(function(e){return s("k-button",{key:e.name,ref:"fieldset-"+e.index,refInFor:!0,attrs:{disabled:t.disabled.includes(e.type),icon:e.icon||"box"},on:{keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"up",38,s.key,["Up","ArrowUp"])?null:t.navigate(e.index-1)},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"down",40,s.key,["Down","ArrowDown"])?null:t.navigate(e.index+1)}],click:function(s){return t.add(e.type)}}},[t._v(" "+t._s(e.name)+" ")])})),1)])}))],2)},A$=[],B$={inheritAttrs:!1,props:{endpoint:String,fieldsets:Object,fieldsetGroups:Object},data(){return{disabled:[],headline:null,payload:null,event:"add",groups:this.createGroups()}},methods:{add(t){this.$emit(this.event,t,this.payload),this.$refs.dialog.close()},createGroups(){let t={},e=0;const s=this.fieldsetGroups||{blocks:{label:this.$t("field.blocks.fieldsets.label"),sets:Object.keys(this.fieldsets)}};return Object.keys(s).forEach(i=>{let n=s[i];n.open=!1!==n.open,n.fieldsets=n.sets.filter(t=>this.fieldsets[t]).map(t=>(e++,{...this.fieldsets[t],index:e})),0!==n.fieldsets.length&&(t[i]=n)}),t},navigate(t){const e=this.$refs["fieldset-"+t];e&&e[0]&&e[0].focus()},open(t,e={}){const s={event:"add",disabled:[],headline:null,...e};this.event=s.event,this.disabled=s.disabled,this.headline=s.headline,this.payload=t,this.$refs.dialog.open()}}},M$=B$,D$=(s("f6c2"),Object(c["a"])(M$,I$,A$,!1,null,null,null)),N$=D$.exports,P$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",t._g({staticClass:"k-block-title"},t.$listeners),[s("k-icon",{staticClass:"k-block-icon",attrs:{type:t.icon}}),s("span",{staticClass:"k-block-name"},[t._v(" "+t._s(t.name)+" ")]),t.label?s("span",{staticClass:"k-block-label"},[t._v(" "+t._s(t.label)+" ")]):t._e()],1)},R$=[],q$={inheritAttrs:!1,props:{fieldset:Object,content:Object},computed:{icon(){return this.fieldset.icon||"box"},label(){if(!this.fieldset.label||0===this.fieldset.label.length)return!1;if(this.fieldset.label===this.fieldset.name)return!1;const t=this.$helper.string.template(this.fieldset.label,this.content);return"…"!==t&&t},name(){return this.fieldset.name}}},F$=q$,U$=(s("c21a"),Object(c["a"])(F$,P$,R$,!1,null,null,null)),H$=U$.exports,z$={inheritAttrs:!1,props:{content:Object,fieldset:Object},methods:{field(t,e=null){let s=null;return Object.values(this.fieldset.tabs).forEach(e=>{e.fields[t]&&(s=e.fields[t])}),s||e},open(){this.$emit("open")},update(t){this.$emit("update",{...this.content,...t})}}},K$=z$,G$=Object(c["a"])(K$,ub,db,!1,null,null,null),W$=G$.exports;I["a"].component("k-block",h$),I["a"].component("k-blocks",v$),I["a"].component("k-block-figure",O$),I["a"].component("k-block-options",L$),I["a"].component("k-block-selector",N$),I["a"].component("k-block-title",H$),I["a"].component("k-block-type",W$);const Y$=s("9711");Y$.keys().map(t=>{const e=t.match(/\w+/)[0],s=e.toLowerCase();let i=Y$(t).default;i.extends=W$,I["a"].component("k-block-type-"+s,i)}),I["a"].component("k-dialog",mt),I["a"].component("k-error-dialog",$t),I["a"].component("k-file-rename-dialog",It),I["a"].component("k-file-remove-dialog",Ct),I["a"].component("k-file-sort-dialog",Pt),I["a"].component("k-files-dialog",Kt),I["a"].component("k-form-dialog",Zt),I["a"].component("k-language-create-dialog",ie),I["a"].component("k-language-remove-dialog",ce),I["a"].component("k-language-update-dialog",fe),I["a"].component("k-page-create-dialog",ye),I["a"].component("k-page-duplicate-dialog",Se),I["a"].component("k-page-remove-dialog",Ae),I["a"].component("k-page-sort-dialog",Ve),I["a"].component("k-page-rename-dialog",Re),I["a"].component("k-page-status-dialog",Ke),I["a"].component("k-page-template-dialog",es),I["a"].component("k-pages-dialog",os),I["a"].component("k-remove-dialog",hs),I["a"].component("k-site-rename-dialog",vs),I["a"].component("k-text-dialog",Os),I["a"].component("k-user-create-dialog",Ls),I["a"].component("k-user-email-dialog",Ns),I["a"].component("k-user-language-dialog",Hs),I["a"].component("k-user-password-dialog",Vs),I["a"].component("k-user-remove-dialog",ei),I["a"].component("k-user-rename-dialog",oi),I["a"].component("k-user-role-dialog",hi),I["a"].component("k-users-dialog",vi),I["a"].component("k-drawer",Oi),I["a"].component("k-form-drawer",Li),I["a"].component("k-calendar",Hi),I["a"].component("k-counter",Vi),I["a"].component("k-autocomplete",Ni),I["a"].component("k-form",en),I["a"].component("k-form-buttons",ln),I["a"].component("k-form-indicator",mn),I["a"].component("k-field",fn["a"]),I["a"].component("k-fieldset",yn),I["a"].component("k-input",Sn),I["a"].component("k-login",An),I["a"].component("k-login-code",Rn),I["a"].component("k-upload",Kn),I["a"].component("k-writer",cr),I["a"].component("k-checkbox-input",gr),I["a"].component("k-checkboxes-input",_r),I["a"].component("k-date-input",Er),I["a"].component("k-datetime-input",Br),I["a"].component("k-email-input",Kr),I["a"].component("k-list-input",ro),I["a"].component("k-multiselect-input",ho),I["a"].component("k-number-input",vo),I["a"].component("k-password-input",wo),I["a"].component("k-radio-input",jo),I["a"].component("k-range-input",Mo),I["a"].component("k-select-input",Fo),I["a"].component("k-tags-input",Wo),I["a"].component("k-tel-input",Zo),I["a"].component("k-text-input",Fr),I["a"].component("k-textarea-input",il),I["a"].component("k-time-input",ol),I["a"].component("k-toggle-input",hl),I["a"].component("k-url-input",bl),I["a"].component("k-blocks-field",wl),I["a"].component("k-checkboxes-field",jl),I["a"].component("k-date-field",Ml),I["a"].component("k-email-field",Fl),I["a"].component("k-files-field",Yl),I["a"].component("k-gap-field",Ql),I["a"].component("k-headline-field",ac),I["a"].component("k-info-field",dc),I["a"].component("k-layout-field",Mc),I["a"].component("k-line-field",Fc),I["a"].component("k-list-field",Wc),I["a"].component("k-multiselect-field",Qc),I["a"].component("k-number-field",au),I["a"].component("k-pages-field",du),I["a"].component("k-password-field",bu),I["a"].component("k-radio-field",wu),I["a"].component("k-range-field",ju),I["a"].component("k-select-field",Mu),I["a"].component("k-structure-field",Uu),I["a"].component("k-tags-field",Yu),I["a"].component("k-text-field",rd),I["a"].component("k-textarea-field",pd),I["a"].component("k-tel-field",td),I["a"].component("k-time-field",kd),I["a"].component("k-toggle-field",xd),I["a"].component("k-url-field",Td),I["a"].component("k-users-field",Dd),I["a"].component("k-writer-field",Ud),I["a"].component("k-toolbar",Zd),I["a"].component("k-toolbar-email-dialog",ip),I["a"].component("k-toolbar-link-dialog",cp),I["a"].component("k-date-field-preview",fp),I["a"].component("k-email-field-preview",Op),I["a"].component("k-files-field-preview",Mp),I["a"].component("k-list-field-preview",Fp),I["a"].component("k-pages-field-preview",Wp),I["a"].component("k-toggle-field-preview",ah),I["a"].component("k-time-field-preview",Qp),I["a"].component("k-url-field-preview",yp),I["a"].component("k-users-field-preview",dh),I["a"].component("k-writer-field-preview",bh),I["a"].component("k-aspect-ratio",wh),I["a"].component("k-bar",jh),I["a"].component("k-box",Mh),I["a"].component("k-card",Fh),I["a"].component("k-cards",Wh),I["a"].component("k-collection",Qh),I["a"].component("k-column",am),I["a"].component("k-dropzone",dm),I["a"].component("k-empty",bm),I["a"].component("k-file-preview",wm),I["a"].component("k-grid",jm),I["a"].component("k-header",Mm),I["a"].component("k-list",Fm),I["a"].component("k-list-item",Wm),I["a"].component("k-overlay",Qm),I["a"].component("k-tabs",rf),I["a"].component("k-view",pf),I["a"].component("k-draggable",$f),I["a"].component("k-error-boundary",xf),I["a"].component("k-headline",Tf),I["a"].component("k-icon",Df),I["a"].component("k-image",Uf),I["a"].component("k-loader",Wf),I["a"].component("k-progress",Qf),I["a"].component("k-status-icon",dg),I["a"].component("k-sort-handle",ag),I["a"].component("k-text",bg),I["a"].component("k-user-info",wg),I["a"].component("k-button",jg),I["a"].component("k-button-disabled",Mg),I["a"].component("k-button-group",Fg),I["a"].component("k-button-link",Wg),I["a"].component("k-button-native",tb),I["a"].component("k-dropdown",rb),I["a"].component("k-dropdown-content",fb),I["a"].component("k-dropdown-item",yb),I["a"].component("k-languages-dropdown",Ab),I["a"].component("k-link",Sb),I["a"].component("k-pagination",Rb),I["a"].component("k-prev-next",Kb),I["a"].component("k-search",Zb),I["a"].component("k-tag",ik),I["a"].component("k-topbar",uk),I["a"].component("k-sections",gk),I["a"].component("k-info-section",wk),I["a"].component("k-pages-section",Tk),I["a"].component("k-files-section",Dk),I["a"].component("k-fields-section",Uk),I["a"].component("k-browser-view",Vk),I["a"].component("k-custom-view",ev),I["a"].component("k-error-view",rv),I["a"].component("k-file-view",hv),I["a"].component("k-installation-view",vv),I["a"].component("k-login-view",Ov),I["a"].component("k-page-view",Lv),I["a"].component("k-reset-password-view",Nv),I["a"].component("k-settings-view",Hv),I["a"].component("k-site-view",Vv),I["a"].component("k-users-view",e$),I["a"].component("k-user-view",o$);var V$=s("2f62"),J$={namespaced:!0,state:{current:null},mutations:{CURRENT(t,e){t.current=e}},actions:{current(t,e){t.commit("CURRENT",e)}}};const Z$=(t,e)=>{localStorage.setItem("kirby$content$"+t,JSON.stringify(e))};var X$={namespaced:!0,state:{current:null,models:{},status:{enabled:!0,lock:null,unlock:null}},getters:{exists:t=>e=>Object.prototype.hasOwnProperty.call(t.models,e),hasChanges:(t,e)=>t=>{const s=e.model(t).changes;return Object.keys(s).length>0},isCurrent:t=>e=>t.current===e,id:(t,e,s)=>e=>(e=e||t.current,s.languages.current?e+"/"+s.languages.current.code:e),model:(t,e)=>s=>(s=s||t.current,!0===e.exists(s)?t.models[s]:{api:null,originals:{},values:{},changes:{}}),originals:(t,e)=>t=>Y(e.model(t).originals),values:(t,e)=>t=>({...e.originals(t),...e.changes(t)}),changes:(t,e)=>t=>Y(e.model(t).changes)},mutations:{CREATE(t,[e,s]){if(!s)return!1;let i=t.models[e]?t.models[e].changes:s.changes;I["a"].set(t.models,e,{api:s.api,originals:s.originals,changes:i||{}})},CURRENT(t,e){t.current=e},LOCK(t,e){I["a"].set(t.status,"lock",e)},MOVE(t,[e,s]){const i=Y(t.models[e]);I["a"].delete(t.models,e),I["a"].set(t.models,s,i);const n=localStorage.getItem("kirby$content$"+e);localStorage.removeItem("kirby$content$"+e),localStorage.setItem("kirby$content$"+s,n)},REMOVE(t,e){I["a"].delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT(t,e){t.models[e]&&(I["a"].set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS(t,e){I["a"].set(t.status,"enabled",e)},UNLOCK(t,e){e&&I["a"].set(t.models[t.current],"changes",{}),I["a"].set(t.status,"unlock",e)},UPDATE(t,[e,s,i]){if(!t.models[e])return!1;i=Y(i);const n=JSON.stringify(i),a=JSON.stringify(t.models[e].originals[s]);a==n?I["a"].delete(t.models[e].changes,s):I["a"].set(t.models[e].changes,s,i),Z$(e,{api:t.models[e].api,originals:t.models[e].originals,changes:t.models[e].changes})}},actions:{init(t){Object.keys(localStorage).filter(t=>t.startsWith("kirby$content$")).map(t=>t.split("kirby$content$")[1]).forEach(e=>{const s=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(s)])}),Object.keys(localStorage).filter(t=>t.startsWith("kirby$form$")).map(t=>t.split("kirby$form$")[1]).forEach(e=>{const s=localStorage.getItem("kirby$form$"+e);let i=null;try{i=JSON.parse(s)}catch(a){}if(!i||!i.api)return localStorage.removeItem("kirby$form$"+e),!1;const n={api:i.api,originals:i.originals,changes:i.values};t.commit("CREATE",[e,n]),Z$(e,n),localStorage.removeItem("kirby$form$"+e)})},create(t,e){e.id=t.getters.id(e.id),(e.id.startsWith("pages/")||e.id.startsWith("site"))&&delete e.content.title;const s={api:e.api,originals:Y(e.content),changes:{}};I["a"].$api.get(e.api+"/unlock").then(s=>{!0===s.supported&&!0===s.unlocked&&t.commit("UNLOCK",t.state.models[e.id].changes)}).catch(()=>{}),t.commit("CREATE",[e.id,s]),t.dispatch("current",e.id)},current(t,e){t.commit("CURRENT",e)},disable(t){t.commit("STATUS",!1)},enable(t){t.commit("STATUS",!0)},lock(t,e){t.commit("LOCK",e)},move(t,[e,s]){e=t.getters.id(e),s=t.getters.id(s),t.commit("MOVE",[e,s])},remove(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert(t,e){e=e||t.state.current,t.commit("REVERT",e)},save(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");const s=t.getters.model(e),i={...s.originals,...s.changes};return I["a"].$api.patch(s.api,i).then(()=>{t.commit("CREATE",[e,{...s,originals:i}]),t.dispatch("revert",e),t.dispatch("enable")}).catch(e=>{throw t.dispatch("enable"),e})},unlock(t,e){t.commit("UNLOCK",e)},update(t,[e,s,i]){i=i||t.state.current,t.commit("UPDATE",[i,e,s])}}},Q$={namespaced:!0,state:{open:[]},mutations:{CLOSE(t,e){t.open=t.open.filter(t=>t.id!==e)},GOTO(t,e){t.open=t.open.filter(t=>t.id===e)},OPEN(t,e){t.open.push(e)}},actions:{close(t,e){t.commit("CLOSE",e)},goto(t,e){t.commit("GOTO",e)},open(t,e){t.commit("OPEN",e)}}},ty={namespaced:!0,state:{instance:null,clock:0,step:5,beats:[]},mutations:{ADD(t,e){t.beats.push(e)},CLEAR(t){clearInterval(t.instance),t.clock=0},CLOCK(t){t.clock+=t.step},INITIALIZE(t,e){t.instance=e},REMOVE(t,e){const s=t.beats.map(t=>t.handler).indexOf(e);-1!==s&&I["a"].delete(t.beats,s)}},actions:{add(t,e){e={handler:e[0]||e,interval:e[1]||t.state.step},e.handler(),t.commit("ADD",e),1===t.state.beats.length&&t.dispatch("run")},clear(t){t.commit("CLEAR")},remove(t,e){t.commit("REMOVE",e),t.state.beats.length<1&&t.commit("CLEAR")},run(t){t.commit("CLEAR"),t.commit("INITIALIZE",setInterval(()=>{t.commit("CLOCK"),t.state.beats.forEach(e=>{t.state.clock%e.interval===0&&e.handler()})},1e3*t.state.step))}}},ey={namespaced:!0,state:{all:[],current:null,default:null},mutations:{SET_ALL(t,e){t.all=e.map(t=>({code:t.code,default:t.default,direction:t.direction,locale:t.locale,name:t.name,rules:t.rules,url:t.url}))},SET_CURRENT(t,e){t.current=e,e&&e.code&&localStorage.setItem("kirby$language",e.code)},SET_DEFAULT(t,e){t.default=e}},actions:{current(t,e){t.commit("SET_CURRENT",e)},install(t,e){const s=e.filter(t=>t.default)[0];t.commit("SET_ALL",e),t.commit("SET_DEFAULT",s);const i=localStorage.getItem("kirby$language");if(i){const s=e.filter(t=>t.code===i)[0];if(s)return void t.dispatch("current",s)}t.dispatch("current",s||e[0]||null)},async load(t){const e=await I["a"].$api.languages.list();t.dispatch("install",e.data)}}},sy={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close(t){clearTimeout(this.timer),t.commit("UNSET")},open(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout(()=>{t.dispatch("close")},e.timeout))},success(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",{type:"success",timeout:4e3,...e})},error(t,e){"string"===typeof e&&(e={message:e}),t.dispatch("open",{type:"error",...e})}}},iy={namespaced:!0,state:{info:{title:null}},mutations:{SET_INFO(t,e){t.info=e},SET_LICENSE(t,e){t.info.license=e},SET_TITLE(t,e){t.info.title=e}},actions:{async load(t,e){if(!e&&t.state.info.isReady&&t.rootState.user.current)return new Promise(e=>{e(t.state.info)});try{const e=await I["a"].$api.system.get();return t.commit("SET_INFO",{isReady:e.isInstalled&&e.isOk,...e}),e.languages&&t.dispatch("languages/install",e.languages,{root:!0}),t.dispatch("translation/install",e.translation,{root:!0}),t.dispatch("translation/activate",e.translation.id,{root:!0}),e.user&&t.dispatch("user/current",e.user,{root:!0}),t.state.info}catch(s){t.commit("SET_INFO",{isBroken:!0,error:s.message})}},register(t,e){t.commit("SET_LICENSE",e)},title(t,e){t.commit("SET_TITLE",e)}}},ny={namespaced:!0,state:{current:null,installed:[]},mutations:{SET_CURRENT(t,e){t.current=e},INSTALL(t,e){t.installed[e.id]=e}},actions:{load(t,e){return I["a"].$api.translations.get(e)},install(t,e){t.commit("INSTALL",e),I["a"].i18n.add(e.id,e.data)},async activate(t,e){const s=t.state.installed[e];if(!s){const s=await t.dispatch("load",e);return t.dispatch("install",s),void t.dispatch("activate",e)}I["a"].i18n.set(e),t.commit("SET_CURRENT",e),document.dir=s.direction,document.documentElement.lang=e}}},ay={namespaced:!0,state:{current:null,path:null,pendingEmail:null,pendingChallenge:null},mutations:{SET_CURRENT(t,e){t.current=e,t.pendingEmail=null,t.pendingChallenge=null,e&&e.permissions?(I["a"].prototype.$user=e,I["a"].prototype.$permissions=e.permissions):(I["a"].prototype.$user=null,I["a"].prototype.$permissions=null)},SET_PATH(t,e){t.path=e},SET_PENDING(t,{email:e,challenge:s}){t.pendingEmail=e,t.pendingChallenge=s,t.user=null,I["a"].prototype.$user=null,I["a"].prototype.$permissions=null}},actions:{current(t,e){t.commit("SET_CURRENT",e)},email(t,e){t.commit("SET_CURRENT",{...t.state.current,email:e})},language(t,e){t.dispatch("translation/activate",e,{root:!0}),t.commit("SET_CURRENT",{...t.state.current,language:e})},async load(t){const e=await I["a"].$api.auth.user();return t.commit("SET_CURRENT",e),e},login(t,e){return t.commit("SET_CURRENT",e),t.dispatch("translation/activate",e.language,{root:!0}),I["a"].prototype.$go(t.state.path||"/"),e},async logout(t,e){if(t.commit("SET_CURRENT",null),e)window.location.href=(window.panel.url||"")+"/login";else try{await I["a"].$api.auth.logout()}finally{I["a"].prototype.$go("/login")}},name(t,e){t.commit("SET_CURRENT",{...t.state.current,name:e})},pending(t,e){t.commit("SET_PENDING",e)},visit(t,e){t.commit("SET_PATH",e)}}};I["a"].use(V$["a"]);var ry=new V$["a"].Store({strict:!1,state:{breadcrumb:[],dialog:null,drag:null,fatal:null,isLoading:!1,title:null,view:null},mutations:{SET_BREADCRUMB(t,e){t.breadcrumb=e},SET_DIALOG(t,e){t.dialog=e},SET_DRAG(t,e){t.drag=e},SET_FATAL(t,e){t.fatal=e},SET_TITLE(t,e){t.title=e},SET_VIEW(t,e){t.view=e},START_LOADING(t){t.isLoading=!0},STOP_LOADING(t){t.isLoading=!1}},actions:{breadcrumb(t,e){t.commit("SET_BREADCRUMB",e)},dialog(t,e){t.commit("SET_DIALOG",e)},drag(t,e){t.commit("SET_DRAG",e)},fatal(t,e){t.commit("SET_FATAL",e)},isLoading(t,e){t.commit(!0===e?"START_LOADING":"STOP_LOADING")},title(t,e){let s;s=t.state.user.current?I["a"].$api.site.get(["title"]):new Promise(e=>{e(t.state.system.info)}),s.then(s=>{t.commit("SET_TITLE",e),t.dispatch("system/title",s.title),document.title=e||"",document.title+=null!==e?" | "+s.title:s.title})},view(t,e){t.commit("SET_VIEW",e)}},modules:{blocks:J$,content:X$,drawers:Q$,heartbeat:ty,languages:ey,notification:sy,system:iy,translation:ny,user:ay}});I["a"].config.errorHandler=t=>{O.debug&&window.console.error(t),ry.dispatch("notification/error",{message:t.message||"An error occurred. Please reload the Panel."})},window.panel=window.panel||{},window.panel.error=(t,e)=>{O.debug&&window.console.error(t+": "+e),ry.dispatch("error",t+". See the console for more information.")};var oy=s("f2f3");I["a"].use(oy["a"].plugin,ry);var ly=s("19e9"),cy=s.n(ly),uy=s("5a0c"),dy=s.n(uy),py=s("f906"),hy=s.n(py),my=s("0ecf"),fy=s.n(my);dy.a.extend(hy.a),dy.a.extend(fy.a),I["a"].prototype.$library={autosize:cy.a,dayjs:dy.a};let gy={};for(var by in I["a"].options.components)gy[by]=I["a"].options.components[by];let ky={section:vk};Object.entries(window.panel.plugins.components).forEach(([t,e])=>{e.template||e.render||e.extends?(e.extends&&"string"===typeof e.extends&&(e.extends=gy[e.extends].extend({options:e,components:{...gy,...e.components||{}}}),e.template&&(e.render=null)),e.mixins&&(e.mixins=e.mixins.map(t=>"string"===typeof t?ky[t]:t)),gy[t]&&window.console.warn(`Plugin is replacing "${t}"`),I["a"].component(t,e),gy[t]=I["a"].options.components[t]):ry.dispatch("notification/error",`Neither template or render method provided nor extending a component when loading plugin component "${t}". The component has not been registered.`)}),Object.entries(window.panel.plugins.views).forEach(([t,e])=>{if(!e.component)return ry.dispatch("notification/error",`No view component provided when loading view "${t}". The view has not been registered.`),void delete window.panel.plugins.views[t];e.link="/plugins/"+t,void 0===e.icon&&(e.icon="page"),void 0===e.menu&&(e.menu=!0),window.panel.plugins.views[t]={id:t,text:e.text||e.label,link:e.link,icon:e.icon,menu:e.menu},I["a"].component("k-"+t+"-plugin-view",e.component)}),window.panel.plugins.use.forEach(t=>{I["a"].use(t)});var vy=s("82f1"),$y=s("8c4f"),yy=function(t,e,s){ry.dispatch("system/load").then(()=>{const e=ry.state.user.current;if(!e)return ry.dispatch("user/visit",t.path),ry.dispatch("user/logout"),s(!1);const i=e.permissions.access;return!1===i.panel?(window.location.href=O.site,s(!1)):!1===i[t.meta.view]?(ry.dispatch("notification/error",{message:I["a"].i18n.translate("error.access.view")}),s(!1===i.site?"/account":"/")):void s()})};let _y=[{path:"/",name:"Home",redirect:"/site"},{path:"/browser",name:"Browser",component:I["a"].component("k-browser-view"),meta:{outside:!0}},{path:"/login",component:I["a"].component("k-login-view"),meta:{outside:!0}},{path:"/logout",beforeEnter(){Object.keys(localStorage).forEach(t=>{t.startsWith("kirby$content$")&&localStorage.removeItem(t)}),ry.dispatch("user/logout")},meta:{outside:!0}},{path:"/installation",component:I["a"].component("k-installation-view"),meta:{outside:!0}},{path:"/site",name:"Site",meta:{view:"site"},component:I["a"].component("k-site-view"),beforeEnter:yy,props:t=>({tab:t.hash.slice(1)||"main"})},{path:"/site/files/:filename",name:"SiteFile",meta:{view:"site"},component:I["a"].component("k-file-view"),beforeEnter:yy,props:t=>({filename:t.params.filename,path:"site",tab:t.hash.slice(1)||"main"})},{path:"/pages/:path/files/:filename",name:"PageFile",meta:{view:"site"},component:I["a"].component("k-file-view"),beforeEnter:yy,props:t=>({filename:t.params.filename,path:"pages/"+t.params.path,tab:t.hash.slice(1)||"main"})},{path:"/users/:path/files/:filename",name:"UserFile",meta:{view:"users"},component:I["a"].component("k-file-view"),beforeEnter:yy,props:t=>({filename:t.params.filename,path:"users/"+t.params.path,tab:t.hash.slice(1)||"main"})},{path:"/pages/:path",name:"Page",meta:{view:"site"},component:I["a"].component("k-page-view"),beforeEnter:yy,props:t=>({path:t.params.path,tab:t.hash.slice(1)||"main"})},{path:"/settings",name:"Settings",meta:{view:"settings"},component:I["a"].component("k-settings-view"),beforeEnter:yy},{path:"/users/role/:role",name:"UsersByRole",meta:{view:"users"},component:I["a"].component("k-users-view"),beforeEnter:yy,props:t=>({role:t.params.role})},{path:"/users",name:"Users",meta:{view:"users"},beforeEnter:yy,component:I["a"].component("k-users-view")},{path:"/users/:id",name:"User",meta:{view:"users"},component:I["a"].component("k-user-view"),beforeEnter:yy,props:t=>({id:t.params.id,tab:t.hash.slice(1)||"main"})},{path:"/account",name:"Account",meta:{view:"account"},component:I["a"].component("k-user-view"),beforeEnter:yy,props:t=>({id:!!ry.state.user.current&&ry.state.user.current.id,tab:t.hash.slice(1)||"main"})},{path:"/reset-password",name:"Reset password",meta:{view:"resetPassword"},component:I["a"].component("k-reset-password-view"),beforeEnter:yy},{path:"/plugins/:id",name:"Plugin",meta:{view:"plugin"},props:t=>({plugin:t.params.id,hash:t.hash.slice(1)}),beforeEnter:yy,component:I["a"].component("k-custom-view")}];_y.push({path:"*",name:"NotFound",beforeEnter:(t,e,s)=>{s("/")}});var wy=_y;I["a"].use($y["a"]);const xy=new $y["a"]({mode:"history",routes:wy,url:"/"===O.url?"":O.url});xy.beforeEach((t,e,s)=>{"Browser"!==t.name&&!1===Kk.all()&&s("/browser"),t.meta.outside||ry.dispatch("user/visit",t.path),"plugin"===t.meta.view?ry.dispatch("view",t.params.id):ry.dispatch("view",t.meta.view),ry.dispatch("content/lock",null),ry.dispatch("content/unlock",null),ry.dispatch("heartbeat/clear"),s()});var Oy=xy;I["a"].config.productionTip=!1,I["a"].config.devtools=!0,I["a"].use(rt),I["a"].use(K),I["a"].use(z),I["a"].use(W.a),I["a"].use(vy["a"]),I["a"].use(H,ry),I["a"].$t=I["a"].prototype.$t,I["a"].prototype.$go=t=>{t=t.split("#"),t={path:t[0],hash:t[1]||null},Oy.push(t).catch(t=>{if(t&&t.name&&"NavigationDuplicated"===t.name)return!0;throw t})},new I["a"]({router:Oy,store:ry,created(){window.panel.app=this,window.panel.plugins.created.forEach(t=>{t(this)}),this.$store.dispatch("content/init")},render:t=>t(T)}).$mount("#app")},"56f2":function(t,e,s){},"577a":function(t,e,s){},"580a":function(t,e,s){"use strict";s("ae29")},"5aee":function(t,e,s){"use strict";s("931e")},"5b23":function(t,e,s){"use strict";s("05be")},"5c0b":function(t,e,s){"use strict";s("9c0c")},"5c47":function(t,e,s){},"5c57":function(t,e,s){},"5cbe":function(t,e,s){},"5d33":function(t,e,s){"use strict";s("4e0b")},"5e2d":function(t,e,s){},"5e77":function(t,e,s){},"5e9a":function(t,e,s){"use strict";s("aa34")},"5f34":function(t,e,s){"use strict";s("b231")},"5f43":function(t,e,s){},"5f52":function(t,e,s){"use strict";s("26c3")},6018:function(t,e,s){"use strict";s("2a08")},"625a":function(t,e,s){"use strict";s("d3bb")},6284:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-input",{ref:"input",staticClass:"k-block-type-markdown-input",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.text,type:"textarea"},on:{input:function(e){return t.update({text:e})}}})},n=[],a={computed:{placeholder(){return this.field("text",{}).placeholder}},methods:{focus(){this.$refs.input.focus()}}},r=a,o=(s("af44"),s("2877")),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},"64e4":function(t,e,s){"use strict";s("99ed")},"653a":function(t,e,s){},"696b":function(t,e,s){"use strict";s("40a6")},6992:function(t,e,s){},"6a16":function(t,e,s){"use strict";s("ca47")},"6a18":function(t,e,s){"use strict";s("c57e")},"6ae1":function(t,e,s){},"6ae8":function(t,e,s){},"6bc0":function(t,e,s){},"6bcd":function(t,e,s){"use strict";s("d49c")},"6f7b":function(t,e,s){"use strict";s("f13c")},7041:function(t,e,s){},7086:function(t,e,s){},7187:function(t,e,s){},"718c":function(t,e,s){"use strict";s("43bf")},7491:function(t,e,s){},7568:function(t,e,s){"use strict";s("6bc0")},"772f":function(t,e,s){},7737:function(t,e,s){"use strict";s("2609")},7740:function(t,e,s){},7997:function(t,e,s){},"7a7d":function(t,e,s){"use strict";s("53fd")},"7b55":function(t,e,s){},"7d5d":function(t,e,s){"use strict";s("1e4a")},"7dc7":function(t,e,s){"use strict";s("6992")},"7e85":function(t,e,s){"use strict";s("f239")},"7f51":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-block-type-heading-input",attrs:{"data-level":t.content.level}},[s("k-writer",{ref:"input",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})],1)},n=[],a={computed:{textField(){return this.field("text",{marks:!0})}},methods:{focus(){this.$refs.input.focus()}}},r=a,o=(s("455b"),s("2877")),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},"7f6e":function(t,e,s){"use strict";s("772f")},8065:function(t,e,s){},8152:function(t,e,s){},8216:function(t,e,s){},"82b4":function(t,e,s){},"82c9":function(t,e,s){"use strict";s("e661")},"862b":function(t,e,s){"use strict";s("f0f6")},"86ab":function(t,e,s){},"86c7":function(t,e){RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")}},"86eb":function(t,e,s){},"877d":function(t,e,s){},"893d":function(t,e,s){"use strict";s("fdbf")},"8a02":function(t,e,s){},"8abf":function(t,e,s){},"8c28":function(t,e,s){"use strict";s("4f8f")},"8d8b":function(t,e,s){"use strict";s("e292")},"8f7d":function(t,e,s){"use strict";s("c82a")},"907a":function(t,e,s){},"91a7":function(t,e,s){"use strict";s("653a")},"931e":function(t,e,s){},"96a5":function(t,e,s){"use strict";s("5c57")},9711:function(t,e,s){var i={"./Code.vue":"1bde","./Default.vue":"367b","./Gallery.vue":"3273","./Heading.vue":"7f51","./Image.vue":"9978","./List.vue":"1991","./Markdown.vue":"6284","./Quote.vue":"d55e","./Table.vue":"e54a","./Text.vue":"dc40","./Video.vue":"a08f"};function n(t){var e=a(t);return s(e)}function a(t){if(!s.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}n.keys=function(){return Object.keys(i)},n.resolve=a,t.exports=n,n.id="9711"},"977f":function(t,e,s){"use strict";s("ccf4")},9799:function(t,e,s){"use strict";s("8152")},"98a1":function(t,e,s){"use strict";s("20f8")},9978:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.image.placeholder")+" …","is-empty":!t.src,"empty-icon":"image"},on:{open:t.open,update:t.update}},[t.src?[t.ratio?s("k-aspect-ratio",{attrs:{ratio:t.ratio,cover:t.crop}},[s("img",{attrs:{alt:t.content.alt,src:t.src}})]):s("img",{staticClass:"k-block-type-image-auto",attrs:{alt:t.content.alt,src:t.src}})]:t._e()],2)},n=[],a={computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},crop(){return this.content.crop||!1},src(){return"web"===this.content.location?this.content.src:!(!this.content.image[0]||!this.content.image[0].url)&&this.content.image[0].url},ratio(){return this.content.ratio||!1}}},r=a,o=(s("625a"),s("2877")),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},"99ed":function(t,e,s){},"9aff":function(t,e,s){},"9bd5":function(t,e,s){"use strict";s("3e1e")},"9c0c":function(t,e,s){},"9c44":function(t,e,s){"use strict";s("56f2")},"9d40":function(t,e,s){},"9d48":function(t,e,s){},"9d9f":function(t,e,s){},"9e26":function(t,e,s){"use strict";s("9d9f")},"9efc":function(t,e,s){},"9fc0":function(t,e,s){"use strict";var i=s("38b6");e["a"]={props:{...i["a"].props},methods:{displayText(t,e){switch(t.type){case"user":return e.email;case"date":{const s=this.$library.dayjs(e),i=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return s.isValid()?s.format(i):""}case"tags":case"multiselect":return e.map(t=>t.text).join(", ");case"checkboxes":return e.map(e=>{let s=e;return t.options.forEach(t=>{t.value===e&&(s=t.text)}),s}).join(", ");case"radio":case"select":{const s=t.options.filter(t=>t.value===e)[0];return s?s.text:null}}return"object"===typeof e&&null!==e?"…":e.toString()},previewExists(t){return this.$helper.isComponent(`k-${t}-field-preview`)},width(t){if(!t)return"auto";const e=t.toString().split("/");if(2!==e.length)return"auto";const s=Number(e[0]),i=Number(e[1]);return parseFloat(String(100/i*s)).toFixed(2)+"%"}}}},a08f:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.video.placeholder")+" …","is-empty":!t.video,"empty-icon":"video"},on:{open:t.open,update:t.update}},[s("k-aspect-ratio",{attrs:{ratio:"16/9"}},[t.video?s("iframe",{attrs:{src:t.video}}):t._e()])],1)},n=[],a={computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},video(){var t=this.content.url;if(!t)return!1;var e=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/,s=t.match(e);if(s)return"https://www.youtube.com/embed/"+s[2];var i=/vimeo\.com\/([0-9]+)/,n=t.match(i);return!!n&&"https://player.vimeo.com/video/"+n[1]}}},r=a,o=s("2877"),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},a11f:function(t,e,s){},a134:function(t,e,s){"use strict";s("b329")},a2eb:function(t,e,s){},a567:function(t,e,s){"use strict";s("6ae8")},a5f3:function(t,e,s){"use strict";s("1174")},a659:function(t,e,s){"use strict";s("86eb")},a66d:function(t,e,s){"use strict";s("f464")},a901:function(t,e,s){},aa34:function(t,e,s){},ac27:function(t,e,s){"use strict";s("3dcf")},ae14:function(t,e,s){"use strict";s("7997")},ae1b:function(t,e,s){"use strict";s("e928")},ae29:function(t,e,s){},af44:function(t,e,s){"use strict";s("907a")},b0d6:function(t,e,s){"use strict";s("c6d0")},b231:function(t,e,s){},b329:function(t,e,s){},b5d2:function(t,e,s){"use strict";s("526c")},b746:function(t,e,s){"use strict";s("7187")},b7a8:function(t,e,s){"use strict";s("9efc")},b846:function(t,e,s){},ba8f:function(t,e,s){"use strict";s("0643")},bad3:function(t,e,s){},bb41:function(t,e,s){"use strict";s("49b6")},bbdf:function(t,e,s){"use strict";s("e729")},bd96:function(t,e,s){"use strict";s("e947")},bf53:function(t,e,s){"use strict";s("ecf0")},c08c:function(t,e,s){},c119:function(t,e,s){"use strict";s("8065")},c130:function(t,e,s){},c21a:function(t,e,s){"use strict";s("c577")},c24c:function(t,e,s){},c362:function(t,e,s){},c577:function(t,e,s){},c57e:function(t,e,s){},c6d0:function(t,e,s){},c7c8:function(t,e,s){"use strict";s("7086")},c82a:function(t,e,s){},c857:function(t,e,s){"use strict";s("022d")},c9cb:function(t,e,s){"use strict";s("577a")},ca47:function(t,e,s){},cb5b:function(t,e,s){},cb8f:function(t,e,s){"use strict";s("82b4")},cc79:function(t,e,s){"use strict";s("0de1")},cca8:function(t,e,s){"use strict";s("b846")},ccf4:function(t,e,s){},d0c1:function(t,e,s){"use strict";s("d4e5")},d221:function(t,e,s){"use strict";s("1a8b")},d3bb:function(t,e,s){},d49c:function(t,e,s){},d4e5:function(t,e,s){},d55e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-block-type-quote-editor"},[s("k-writer",{ref:"text",staticClass:"k-block-type-quote-text",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}}),s("k-writer",{ref:"citation",staticClass:"k-block-type-quote-citation",attrs:{inline:!0,marks:t.citationField.marks,placeholder:t.citationField.placeholder,value:t.content.citation},on:{input:function(e){return t.update({citation:e})}}})],1)},n=[],a={computed:{citationField(){return this.field("citation",{})},textField(){return this.field("text",{})}},methods:{focus(){this.$refs.text.focus()}}},r=a,o=(s("91a7"),s("2877")),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},d6fc:function(t,e,s){"use strict";s("877d")},d733:function(t,e,s){},daa8:function(t,e,s){"use strict";s("04f3")},dc40:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-writer",{ref:"input",staticClass:"k-block-type-text-input",attrs:{inline:t.textField.inline,marks:t.textField.marks,nodes:t.textField.nodes,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})},n=[],a={computed:{textField(){return this.field("text",{})}},methods:{focus(){this.$refs.input.focus()}}},r=a,o=(s("f293"),s("2877")),l=Object(o["a"])(r,i,n,!1,null,null,null);e["default"]=l.exports},dd70:function(t,e,s){"use strict";s("a901")},ddfd:function(t,e,s){"use strict";s("7491")},df0d:function(t,e,s){"use strict";s("5c47")},e1f3:function(t,e,s){"use strict";s("3b07")},e292:function(t,e,s){},e2d7:function(t,e,s){},e54a:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("table",{staticClass:"k-block-type-table-preview",on:{dblclick:t.open}},[s("tr",t._l(t.columns,(function(e,i){return s("th",{key:i,style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),0),0===t.rows.length?s("tr",[s("td",{attrs:{colspan:t.columnsCount}},[s("small",{staticClass:"k-block-type-table-preview-empty"},[t._v(t._s(t.$t("field.structure.empty")))])])]):t._l(t.rows,(function(e,i){return s("tr",{key:i},t._l(t.columns,(function(n,a){return s("td",{key:i+"-"+a,style:"width:"+t.width(n.width),attrs:{"data-align":n.align}},[t.previewExists(n.type)?s("k-"+n.type+"-field-preview",{tag:"component",attrs:{value:e[a],column:n,field:t.fields[a]}}):[s("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(n.before)+" "+t._s(t.displayText(t.fields[a],e[a])||"–")+" "+t._s(n.after)+" ")])]],2)})),0)}))],2)},n=[],a=s("9fc0"),r={mixins:[a["a"]],inheritAttrs:!1,computed:{columns(){return this.table.columns||this.fields},columnsCount(){return Object.keys(this.columns).length},fields(){return this.table.fields||{}},rows(){return this.content.rows||[]},table(){let t=null;return Object.values(this.fieldset.tabs).forEach(e=>{e.fields.rows&&(t=e.fields.rows)}),t||{}}}},o=r,l=(s("f635"),s("2877")),c=Object(l["a"])(o,i,n,!1,null,null,null);e["default"]=c.exports},e661:function(t,e,s){},e729:function(t,e,s){},e791:function(t,e,s){"use strict";s("2283")},e863:function(t,e,s){},e928:function(t,e,s){},e947:function(t,e,s){},ecf0:function(t,e,s){},ee15:function(t,e,s){"use strict";s("4c2e")},ee92:function(t,e,s){},efe1:function(t,e,s){},f0f6:function(t,e,s){},f13c:function(t,e,s){},f239:function(t,e,s){},f293:function(t,e,s){"use strict";s("c24c")},f3da:function(t,e,s){},f464:function(t,e,s){},f470:function(t,e,s){"use strict";s("cb5b")},f56d:function(t,e,s){"use strict";s("7041")},f635:function(t,e,s){"use strict";s("4bcb")},f6c2:function(t,e,s){"use strict";s("0c44")},f7f5:function(t,e,s){"use strict";s("7b55")},f8a7:function(t,e,s){"use strict";s("4d5b")},f95f:function(t,e,s){"use strict";s("0756")},f9aa:function(t,e,s){"use strict";s("5f43")},f9c1:function(t,e,s){},fa6a:function(t,e,s){"use strict";s("5e77")},fc0f:function(t,e,s){"use strict";s("a11f")},fdbf:function(t,e,s){}}); \ No newline at end of file diff --git a/kirby/panel/dist/js/index.js b/kirby/panel/dist/js/index.js new file mode 100644 index 0000000..32a0cdb --- /dev/null +++ b/kirby/panel/dist/js/index.js @@ -0,0 +1 @@ +var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(e,s,n)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,a=(t,e)=>{for(var s in e||(e={}))i.call(e,s)&&r(t,s,e[s]);if(n)for(var s of n(e))o.call(e,s)&&r(t,s,e[s]);return t},l=(t,n)=>e(t,s(n));import{V as u,a as c,m as d,d as p,c as h,u as f,b as m,I as g,P as k,S as v,F as b,N as y,s as $,l as _,w,e as x,f as S,t as C,g as O,h as E,i as T,j as A,k as L,n as I,D as j,o as B,E as M,p as D,q as P,r as N,T as q,v as F,x as R,y as z,z as H,A as U,B as K,C as J,G,H as V,J as W,K as Y}from"./vendor.js";var X=t=>({changeName:async(e,s,n)=>t.patch(e+"/files/"+s+"/name",{name:n}),delete:async(e,s)=>t.delete(e+"/files/"+s),async get(e,s,n){let i=await t.get(e+"/files/"+s,n);return!0===Array.isArray(i.content)&&(i.content={}),i},link(t,e,s){return"/"+this.url(t,e,s)},update:async(e,s,n)=>t.patch(e+"/files/"+s,n),url(t,e,s){let n=t+"/files/"+e;return s&&(n+="/"+s),n}}),Z=t=>({async blueprint(e){return t.get("pages/"+this.id(e)+"/blueprint")},async blueprints(e,s){return t.get("pages/"+this.id(e)+"/blueprints",{section:s})},async changeSlug(e,s){return t.patch("pages/"+this.id(e)+"/slug",{slug:s})},async changeStatus(e,s,n){return t.patch("pages/"+this.id(e)+"/status",{status:s,position:n})},async changeTemplate(e,s){return t.patch("pages/"+this.id(e)+"/template",{template:s})},async changeTitle(e,s){return t.patch("pages/"+this.id(e)+"/title",{title:s})},async children(e,s){return t.post("pages/"+this.id(e)+"/children/search",s)},async create(e,s){return null===e||"/"===e?t.post("site/children",s):t.post("pages/"+this.id(e)+"/children",s)},async delete(e,s){return t.delete("pages/"+this.id(e),s)},async duplicate(e,s,n){return t.post("pages/"+this.id(e)+"/duplicate",{slug:s,children:n.children||!1,files:n.files||!1})},async get(e,s){let n=await t.get("pages/"+this.id(e),s);return!0===Array.isArray(n.content)&&(n.content={}),n},id:t=>t.replace(/\//g,"+"),async files(e,s){return t.post("pages/"+this.id(e)+"/files/search",s)},link(t){return"/"+this.url(t)},async preview(t){return(await this.get(this.id(t),{select:"previewUrl"})).previewUrl},async search(e,s){return e?t.post("pages/"+this.id(e)+"/children/search?select=id,title,hasChildren",s):t.post("site/children/search?select=id,title,hasChildren",s)},async update(e,s){return t.patch("pages/"+this.id(e),s)},url(t,e){let s=null===t?"pages":"pages/"+String(t).replace(/\//g,"+");return e&&(s+="/"+e),s}});var Q=t=>({running:0,async request(e,s,n=!1){s=Object.assign(s||{},{credentials:"same-origin",cache:"no-store",headers:a({"x-requested-with":"xmlhttprequest","content-type":"application/json"},s.headers)}),t.methodOverwrite&&"GET"!==s.method&&"POST"!==s.method&&(s.headers["x-http-method-override"]=s.method,s.method="POST"),s=t.onPrepare(s);const i=e+"/"+JSON.stringify(s);t.onStart(i,n),this.running++;const o=await fetch([t.endpoint,e].join(t.endpoint.endsWith("/")||e.startsWith("/")?"":"/"),s);try{const e=await async function(t){const e=await t.text();let s;try{s=JSON.parse(e)}catch(n){return window.panel.$vue.$api.onParserError({html:e}),!1}return s}(o);if(o.status<200||o.status>299)throw e;if(e.status&&"error"===e.status)throw e;let s=e;return e.data&&e.type&&"model"===e.type&&(s=e.data),this.running--,t.onComplete(i),t.onSuccess(e),s}catch(r){throw this.running--,t.onComplete(i),t.onError(r),r}},async get(t,e,s,n=!1){return e&&(t+="?"+Object.keys(e).filter((t=>void 0!==e[t]&&null!==e[t])).map((t=>t+"="+e[t])).join("&")),this.request(t,Object.assign(s||{},{method:"GET"}),n)},async post(t,e,s,n="POST",i=!1){return this.request(t,Object.assign(s||{},{method:n,body:JSON.stringify(e)}),i)},async patch(t,e,s,n=!1){return this.post(t,e,s,"PATCH",n)},async delete(t,e,s,n=!1){return this.post(t,e,s,"DELETE",n)}}),tt=t=>({blueprint:async e=>t.get("users/"+e+"/blueprint"),blueprints:async(e,s)=>t.get("users/"+e+"/blueprints",{section:s}),changeEmail:async(e,s)=>t.patch("users/"+e+"/email",{email:s}),changeLanguage:async(e,s)=>t.patch("users/"+e+"/language",{language:s}),changeName:async(e,s)=>t.patch("users/"+e+"/name",{name:s}),changePassword:async(e,s)=>t.patch("users/"+e+"/password",{password:s}),changeRole:async(e,s)=>t.patch("users/"+e+"/role",{role:s}),create:async e=>t.post("users",e),delete:async e=>t.delete("users/"+e),deleteAvatar:async e=>t.delete("users/"+e+"/avatar"),link(t,e){return"/"+this.url(t,e)},async list(e){return t.post(this.url(null,"search"),e)},get:async(e,s)=>t.get("users/"+e,s),async roles(e){return(await t.get(this.url(e,"roles"))).data.map((t=>({info:t.description||`(${window.panel.$t("role.description.placeholder")})`,text:t.title,value:t.name})))},search:async e=>t.post("users/search",e),update:async(e,s)=>t.patch("users/"+e,s),url(t,e){let s=t?"users/"+t:"users";return e&&(s+="/"+e),s}}),et={install(t,e){t.prototype.$api=t.$api=((t={})=>{const e=a(a({},{endpoint:"/api",methodOverwrite:!0,onPrepare:t=>t,onStart(){},onComplete(){},onSuccess(){},onParserError(){},onError(t){throw window.console.log(t.message),t}}),t.config||{});let s=a(a(a({},e),Q(e)),t);return s.auth=(t=>({async login(e){const s={long:e.remember||!1,email:e.email,password:e.password};return t.post("auth/login",s)},logout:async()=>t.post("auth/logout"),user:async e=>t.get("auth",e),verifyCode:async e=>t.post("auth/code",{code:e})}))(s),s.files=X(s),s.languages=(t=>({create:async e=>t.post("languages",e),delete:async e=>t.delete("languages/"+e),get:async e=>t.get("languages/"+e),list:async()=>t.get("languages"),update:async(e,s)=>t.patch("languages/"+e,s)}))(s),s.pages=Z(s),s.roles=(t=>({list:async e=>t.get("roles",e),get:async e=>t.get("roles/"+e)}))(s),s.system=(t=>({get:async(e={view:"panel"})=>t.get("system",e),install:async e=>(await t.post("system/install",e)).user,register:async e=>t.post("system/register",e)}))(s),s.site=(t=>({blueprint:async()=>t.get("site/blueprint"),blueprints:async()=>t.get("site/blueprints"),changeTitle:async e=>t.patch("site/title",{title:e}),children:async e=>t.post("site/children/search",e),get:async(e={view:"panel"})=>t.get("site",e),update:async e=>t.post("site",e)}))(s),s.translations=(t=>({list:async()=>t.get("translations"),get:async e=>t.get("translations/"+e)}))(s),s.users=tt(s),s.files.rename=s.files.changeName,s.pages.slug=s.pages.changeSlug,s.pages.status=s.pages.changeStatus,s.pages.template=s.pages.changeTemplate,s.pages.title=s.pages.changeTitle,s.site.title=s.site.changeTitle,s.system.info=s.system.get,s})({config:{endpoint:window.panel.$urls.api,onComplete:s=>{t.$api.requests=t.$api.requests.filter((t=>t!==s)),0===t.$api.requests.length&&e.dispatch("isLoading",!1)},onError:e=>{window.panel.$config.debug&&window.console.error(e),403!==e.code||"Unauthenticated"!==e.message&&"access.panel"!==e.key||t.prototype.$go("/logout")},onParserError:({html:t,silent:s})=>{e.dispatch("fatal",{html:t,silent:s})},onPrepare:t=>(window.panel.$language&&(t.headers["x-language"]=window.panel.$language.code),t.headers["x-csrf"]=window.panel.$system.csrf,t),onStart:(s,n=!1)=>{!1===n&&e.dispatch("isLoading",!0),t.$api.requests.push(s)},onSuccess:()=>{clearInterval(t.$api.ping),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},ping:null,requests:[]}),t.$api.ping=setInterval(t.$api.auth.user,3e5)}},st=t=>{if(void 0!==t)return JSON.parse(JSON.stringify(t))};function nt(t,e){for(const s of Object.keys(e))e[s]instanceof Object&&Object.assign(e[s],nt(t[s]||{},e[s]));return Object.assign(t||{},e),t}const it=(t,e)=>{localStorage.setItem("kirby$content$"+t,JSON.stringify(e))};var ot={namespaced:!0,state:{current:null,models:{},status:{enabled:!0}},getters:{exists:t=>e=>Object.prototype.hasOwnProperty.call(t.models,e),hasChanges:(t,e)=>t=>{const s=e.model(t).changes;return Object.keys(s).length>0},isCurrent:t=>e=>t.current===e,id:t=>e=>(e=e||t.current,window.panel.$language?e+"?language="+window.panel.$language.code:e),model:(t,e)=>s=>(s=s||t.current,!0===e.exists(s)?t.models[s]:{api:null,originals:{},values:{},changes:{}}),originals:(t,e)=>t=>st(e.model(t).originals),values:(t,e)=>t=>a(a({},e.originals(t)),e.changes(t)),changes:(t,e)=>t=>st(e.model(t).changes)},mutations:{CLEAR(t){Object.keys(t.models).forEach((e=>{t.models[e].changes={}})),Object.keys(localStorage).forEach((t=>{t.startsWith("kirby$content$")&&localStorage.removeItem(t)}))},CREATE(t,[e,s]){if(!s)return!1;let n=t.models[e]?t.models[e].changes:s.changes;u.set(t.models,e,{api:s.api,originals:s.originals,changes:n||{}})},CURRENT(t,e){t.current=e},MOVE(t,[e,s]){const n=st(t.models[e]);u.delete(t.models,e),u.set(t.models,s,n);const i=localStorage.getItem("kirby$content$"+e);localStorage.removeItem("kirby$content$"+e),localStorage.setItem("kirby$content$"+s,i)},REMOVE(t,e){u.delete(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT(t,e){t.models[e]&&(u.set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS(t,e){u.set(t.status,"enabled",e)},UPDATE(t,[e,s,n]){if(!t.models[e])return!1;n=st(n);const i=JSON.stringify(n);JSON.stringify(t.models[e].originals[s])==i?u.delete(t.models[e].changes,s):u.set(t.models[e].changes,s,n),it(e,{api:t.models[e].api,originals:t.models[e].originals,changes:t.models[e].changes})}},actions:{init(t){Object.keys(localStorage).filter((t=>t.startsWith("kirby$content$"))).map((t=>t.split("kirby$content$")[1])).forEach((e=>{const s=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(s)])})),Object.keys(localStorage).filter((t=>t.startsWith("kirby$form$"))).map((t=>t.split("kirby$form$")[1])).forEach((e=>{const s=localStorage.getItem("kirby$form$"+e);let n=null;try{n=JSON.parse(s)}catch(o){}if(!n||!n.api)return localStorage.removeItem("kirby$form$"+e),!1;const i={api:n.api,originals:n.originals,changes:n.values};t.commit("CREATE",[e,i]),it(e,i),localStorage.removeItem("kirby$form$"+e)}))},clear(t){t.commit("CLEAR")},create(t,e){e.id=t.getters.id(e.id),(e.id.startsWith("/pages/")||e.id.startsWith("/site"))&&delete e.content.title;const s={api:e.api,originals:st(e.content),changes:{}};t.commit("CREATE",[e.id,s]),t.dispatch("current",e.id)},current(t,e){t.commit("CURRENT",e)},disable(t){t.commit("STATUS",!1)},enable(t){t.commit("STATUS",!0)},move(t,[e,s]){e=t.getters.id(e),s=t.getters.id(s),t.commit("MOVE",[e,s])},remove(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert(t,e){e=e||t.state.current,t.commit("REVERT",e)},async save(t,e){if(e=e||t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");const s=t.getters.model(e),n=a(a({},s.originals),s.changes);try{await u.$api.patch(s.api,n),t.commit("CREATE",[e,l(a({},s),{originals:n})]),t.dispatch("revert",e)}finally{t.dispatch("enable")}},update(t,[e,s,n]){n=n||t.state.current,t.commit("UPDATE",[n,e,s])}}},rt={namespaced:!0,state:{open:[]},mutations:{CLOSE(t,e){t.open=e?t.open.filter((t=>t.id!==e)):[]},GOTO(t,e){t.open=t.open.slice(0,t.open.findIndex((t=>t.id===e))+1)},OPEN(t,e){t.open.push(e)}},actions:{close(t,e){t.commit("CLOSE",e)},goto(t,e){t.commit("GOTO",e)},open(t,e){t.commit("OPEN",e)}}},at={timer:null,namespaced:!0,state:{type:null,message:null,details:null,timeout:null},mutations:{SET(t,e){t.type=e.type,t.message=e.message,t.details=e.details,t.timeout=e.timeout},UNSET(t){t.type=null,t.message=null,t.details=null,t.timeout=null}},actions:{close(t){clearTimeout(this.timer),t.commit("UNSET")},deprecated(t,e){console.warn("Deprecated: "+e)},error(t,e){let s=e;"string"==typeof e&&(s={message:e}),e instanceof Error&&(s={message:e.message},window.panel.$config.debug&&window.console.error(e)),t.dispatch("dialog",{component:"k-error-dialog",props:s},{root:!0}),t.dispatch("close")},open(t,e){t.dispatch("close"),t.commit("SET",e),e.timeout&&(this.timer=setTimeout((()=>{t.dispatch("close")}),e.timeout))},success(t,e){"string"==typeof e&&(e={message:e}),t.dispatch("open",a({type:"success",timeout:4e3},e))}}};u.use(c);var lt=new c.Store({strict:!1,state:{dialog:null,drag:null,fatal:!1,isLoading:!1},mutations:{SET_DIALOG(t,e){t.dialog=e},SET_DRAG(t,e){t.drag=e},SET_FATAL(t,e){t.fatal=e},SET_LOADING(t,e){t.isLoading=e}},actions:{dialog(t,e){t.commit("SET_DIALOG",e)},drag(t,e){t.commit("SET_DRAG",e)},fatal(t,e){!1!==e?(console.error("The JSON response could not be parsed"),window.panel.$config.debug&&console.info(e.html),e.silent||t.commit("SET_FATAL",e.html)):t.commit("SET_FATAL",!1)},isLoading(t,e){t.commit("SET_LOADING",!0===e)},navigate(t){t.dispatch("dialog",null),t.dispatch("drawers/close")}},modules:{content:ot,drawers:rt,notification:at}}),ut={options:{},state:{},init(t,e={}){this.options=a({base:document.querySelector("base").href,headers:()=>{},onFinish:()=>{},onStart:()=>{},onSwap:()=>{},query:()=>{}},e),this.setState(t),window.addEventListener("popstate",this.reload.bind(this))},arrayToString:t=>!1===Array.isArray(t)?String(t):t.join(","),body:t=>"object"==typeof t?JSON.stringify(t):t,async go(t,e){try{const s=await this.request(t,e);return!1!==s&&this.setState(s,e)}catch(s){if(!0!==(null==e?void 0:e.silent))throw s}},query(t={},e={}){let s=new URLSearchParams(e);return"object"!=typeof t&&(t={}),Object.entries(t).forEach((([t,e])=>{null!==e&&s.set(t,e)})),Object.entries(this.options.query()).forEach((([t,e])=>{var n,i;null!==(e=null!=(i=null!=(n=s.get(t))?n:e)?i:null)&&s.set(t,e)})),s},reload(t={}){return this.go(window.location.href,l(a({},t),{replace:!0}))},async request(t,e={}){e=a({globals:!1,method:"GET",only:[],query:{},silent:!1,type:"$view"},e);const s=this.arrayToString(e.globals),n=this.arrayToString(e.only);this.options.onStart(e);try{const o=this.url(t,e.query),r=await fetch(o,{method:e.method,body:this.body(e.body),credentials:"same-origin",cache:"no-store",headers:a(l(a({},this.options.headers()),{"X-Fiber":!0,"X-Fiber-Globals":s,"X-Fiber-Only":n,"X-Fiber-Referrer":this.state.$view.path}),e.headers)}),u=await r.text();let c;try{c=JSON.parse(u)}catch(i){return lt.dispatch("fatal",{html:u,silent:e.silent}),!1}if(!c[e.type])throw Error(`The ${e.type} could not be loaded`);const d=c[e.type];if(d.error)throw Error(d.error);return"$view"===e.type?n.length?nt(this.state,c):c:d}finally{this.options.onFinish(e)}},async setState(t,e={}){if("object"!=typeof t)return!1;this.state=st(t),!0===e.replace||this.url(this.state.$url).href===window.location.href?window.history.replaceState(this.state,"",this.state.$url):window.history.pushState(this.state,"",this.state.$url),this.options.onSwap(t,e)},url(t="",e={}){return(t="string"==typeof t&&null===t.match(/^https?:\/\//)?new URL(this.options.base+t.replace(/^\//,"")):new URL(t)).search=this.query(e,t.search),t}},ct={name:"Fiber",data:()=>({component:null,state:window.fiber,key:null}),created(){ut.init(this.state,{headers:()=>({"X-CSRF":this.state.$system.csrf}),onFinish:()=>{0===this.$api.requests.length&&this.$store.dispatch("isLoading",!1)},onStart:({silent:t})=>{!0!==t&&this.$store.dispatch("isLoading",!0)},onSwap:async(t,e)=>{e=a({navigate:!0,replace:!1},e),this.setGlobals(t),this.setTitle(t),this.setTranslation(t),this.component=t.$view.component,this.state=t,this.key=!0===e.replace?this.key:t.$view.timestamp,!0===e.navigate&&this.navigate()},query:()=>{var t;return{language:null==(t=this.state.$language)?void 0:t.code}}})},methods:{navigate(){this.$store.dispatch("navigate")},setGlobals(t){["$config","$direction","$language","$languages","$license","$menu","$multilang","$permissions","$searches","$system","$translation","$urls","$user","$view"].forEach((e=>{void 0!==t[e]?u.prototype[e]=window.panel[e]=t[e]:u.prototype[e]=t[e]=window.panel[e]}))},setTitle(t){t.$view.title?document.title=t.$view.title+" | "+t.$system.title:document.title=t.$system.title},setTranslation(t){t.$translation&&(document.documentElement.lang=t.$translation.code)}},render(t){if(this.component)return t(this.component,{key:this.key,props:this.state.$view.props})}},dt={install(t){window.panel=window.panel||{},window.onunhandledrejection=t=>{t.preventDefault(),lt.dispatch("notification/error",t.reason)},window.panel.deprecated=t=>{lt.dispatch("notification/deprecated",t)},window.panel.error=t.config.errorHandler=t=>{lt.dispatch("notification/error",t)}}},pt={install(t){const e=d(),s={$on:e.on,$off:e.off,$emit:e.emit,click(t){s.$emit("click",t)},copy(t){s.$emit("copy",t)},dragenter(t){s.entered=t.target,s.prevent(t),s.$emit("dragenter",t)},dragleave(t){s.prevent(t),s.entered===t.target&&s.$emit("dragleave",t)},drop(t){s.prevent(t),s.$emit("drop",t)},entered:null,focus(t){s.$emit("focus",t)},keydown(e){let n=["keydown"];(e.metaKey||e.ctrlKey)&&n.push("cmd"),!0===e.altKey&&n.push("alt"),!0===e.shiftKey&&n.push("shift");let i=t.prototype.$helper.string.lcfirst(e.key);const o={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};o[i]&&(i=o[i]),!1===["alt","control","shift","meta"].includes(i)&&n.push(i),s.$emit(n.join("."),e),s.$emit("keydown",e)},keyup(t){s.$emit("keyup",t)},online(t){s.$emit("online",t)},offline(t){s.$emit("offline",t)},paste(t){s.$emit("paste",t)},prevent(t){t.stopPropagation(),t.preventDefault()}};window.addEventListener("online",s.online),window.addEventListener("offline",s.offline),window.addEventListener("dragenter",s.dragenter,!1),window.addEventListener("dragover",s.prevent,!1),window.addEventListener("dragexit",s.prevent,!1),window.addEventListener("dragleave",s.dragleave,!1),window.addEventListener("drop",s.drop,!1),window.addEventListener("keydown",s.keydown,!1),window.addEventListener("keyup",s.keyup,!1),document.addEventListener("click",s.click,!1),document.addEventListener("copy",s.copy,!0),document.addEventListener("focus",s.focus,!0),document.addEventListener("paste",s.paste,!0),t.prototype.$events=s}};async function ht(t,e={}){const s=await ut.request("dialogs/"+t,l(a({},e),{type:"$dialog"}));if(!1===s)return!1;if(!s.component||!1===this.$helper.isComponent(s.component))throw Error("The dialog component does not exist");return s.props=s.props||{},this.$store.dispatch("dialog",s),s}function ft(t,e){return async s=>{const n=await ut.request("dropdowns/"+t,l(a({},e),{method:"POST",type:"$dropdown"}));if(!1===n)return!1;if(!1===Array.isArray(n.options)||0===n.options.length)throw Error("The dropdown is empty");n.options.map((t=>(t.dialog&&(t.click=function(){const e="string"==typeof t.dialog?t.dialog:t.dialog.url,s="object"==typeof t.dialog?t.dialog:{};this.$dialog(e,s)}),t))),s(n.options)}}async function mt(t,e,s={}){return await ut.request("search/"+t,a({query:{query:e},type:"$search"},s))}var gt={install(t){t.prototype.$dialog=window.panel.$dialog=ht,t.prototype.$dropdown=window.panel.$dropdown=ft,t.prototype.$go=window.panel.$go=(t,e)=>ut.go(ut.url(t),e),t.prototype.$reload=window.panel.$reload=t=>ut.reload(t),t.prototype.$request=window.panel.$request=(...t)=>ut.request(...t),t.prototype.$search=window.panel.$search=mt,t.prototype.$url=window.panel.$url=(...t)=>ut.url(...t)}};var kt={read:function(t){if(!t)return null;if("string"==typeof t)return t;if(t instanceof ClipboardEvent){t.preventDefault();const e=t.clipboardData.getData("text/html")||t.clipboardData.getData("text/plain")||null;if(e)return e.replace(/\u00a0/g," ")}return null},write:function(t,e){if("string"!=typeof t&&(t=JSON.stringify(t,null,2)),e&&e instanceof ClipboardEvent)return e.preventDefault(),e.clipboardData.setData("text/plain",t),!0;const s=document.createElement("textarea");if(s.value=t,document.body.append(s),navigator.userAgent.match(/ipad|ipod|iphone/i)){s.contentEditable=!0,s.readOnly=!0;const t=document.createRange();t.selectNodeContents(s);const e=window.getSelection();e.removeAllRanges(),e.addRange(t),s.setSelectionRange(0,999999)}else s.select();return document.execCommand("copy"),s.remove(),!0}};function vt(t){if("string"==typeof t)return"pattern"===t?"var(--color-gray-800) var(--bg-pattern)":null!==t.match(/^(black|white|light|gray|red|orange|yellow|green|aqua|blue|purple)/i)?`var(--color-${t})`:t}var bt=(t,e)=>{let s=null;return function(){clearTimeout(s),s=setTimeout((()=>t.apply(this,arguments)),e)}};function yt(t,e=!1){if(!t.match("youtu"))return!1;let s=null;try{s=new URL(t)}catch(d){return!1}const n=s.pathname.split("/").filter((t=>""!==t)),i=n[0],o=n[1],r="https://"+(!0===e?"www.youtube-nocookie.com":s.host)+"/embed",a=t=>!!t&&null!==t.match(/^[a-zA-Z0-9_-]+$/);let l=s.searchParams,u=null;switch(n.join("/")){case"embed/videoseries":case"playlist":a(l.get("list"))&&(u=r+"/videoseries");break;case"watch":a(l.get("v"))&&(u=r+"/"+l.get("v"),l.has("t")&&l.set("start",l.get("t")),l.delete("v"),l.delete("t"));break;default:s.host.includes("youtu.be")&&a(i)?(u="https://www.youtube.com/embed/"+i,l.has("t")&&l.set("start",l.get("t")),l.delete("t")):"embed"===i&&a(o)&&(u=r+"/"+o)}if(!u)return!1;const c=l.toString();return c.length&&(u+="?"+c),u}function $t(t,e=!1){let s=null;try{s=new URL(t)}catch(l){return!1}const n=s.pathname.split("/").filter((t=>""!==t));let i=s.searchParams,o=null;switch(!0===e&&i.append("dnt",1),s.host){case"vimeo.com":case"www.vimeo.com":o=n[0];break;case"player.vimeo.com":o=n[1]}if(!o||!o.match(/^[0-9]*$/))return!1;let r="https://player.vimeo.com/video/"+o;const a=i.toString();return a.length&&(r+="?"+a),r}var _t={youtube:yt,vimeo:$t,video:function(t,e=!1){return t.includes("youtu")?yt(t,e):!!t.includes("vimeo")&&$t(t,e)}},wt=t=>void 0!==u.options.components[t],xt=t=>!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")));var St={metaKey:function(){return window.navigator.userAgent.indexOf("Mac")>-1?"cmd":"ctrl"}},Ct=(t,e)=>{let s="";for(e=(e||2)-(t=String(t)).length;s.length{const n=String(t).split("/");if(2!==n.length)return e;const i=Number(n[0]),o=Number(n[1]);let r=100;return 0!==i&&0!==o&&(r=s?r/i*o:r/o*i,r=parseFloat(String(r)).toFixed(2)),r+"%"};RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")};var Et=(t,e=[],s="")=>{if(!t)return"";const n="-";return s="a-z0-9"+s,t=t.trim().toLowerCase(),e.forEach((e=>{e&&Object.keys(e).forEach((s=>{const n="/"!==s.substr(0,1),i=s.substring(1,s.length-1),o=n?s:i;t=t.replace(new RegExp(RegExp.escape(o),"g"),e[s])}))})),t=(t=(t=(t=(t=(t=t.replace("/[^\t\n\r -~]/","")).replace(new RegExp("[^"+s+"]","ig"),n)).replace(new RegExp("["+RegExp.escape(n)+"]{2,}","g"),n)).replace("/",n)).replace(new RegExp("^[^"+s+"]+","g"),"")).replace(new RegExp("[^"+s+"]+$","g"),"")},Tt=t=>{var e=(t=t||{}).desc?-1:1,s=-e,n=/^0/,i=/\s+/g,o=/^\s+|\s+$/g,r=/[^\x00-\x80]/,a=/^0x[0-9a-f]+$/i,l=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return function(t){if(t.toLocaleLowerCase)return t.toLocaleLowerCase();return t.toLowerCase()}(""+t).replace(o,"")}:function(t){return(""+t).replace(o,"")};function d(t){return t.replace(l,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function p(t,e){return(!t.match(n)||1===e)&&parseFloat(t)||t.replace(i," ").replace(o,"")||0}return function(t,n){var i=c(t),o=c(n);if(!i&&!o)return 0;if(!i&&o)return s;if(i&&!o)return e;var l=d(i),h=d(o),f=parseInt(i.match(a),16)||1!==l.length&&Date.parse(i),m=parseInt(o.match(a),16)||f&&o.match(u)&&Date.parse(o)||null;if(m){if(fm)return e}for(var g=l.length,k=h.length,v=0,b=Math.max(g,k);v0)return e;if(_<0)return s;if(v===b-1)return 0}else{if(y<$)return s;if(y>$)return e}}return 0}};function At(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=/]/g,(t=>e[t]))}function Lt(t,e={}){const s=function(t,e={}){var n;const i=At(t.shift()),o=null!=(n=e[i])?n:null;return null===o?Object.prototype.hasOwnProperty.call(e,i)||"…":0===t.length?o:s(t,o)},n="[{]{1,2}[\\s]?",i="[\\s]?[}]{1,2}";return(t=t.replace(new RegExp(`${n}(.*?)${i}`,"gi"),((t,n)=>s(n.split("."),e)))).replace(new RegExp(`${n}.*${i}`,"gi"),"…")}function It(t){const e=String(t);return e.charAt(0).toUpperCase()+e.substr(1)}var jt={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},escapeHTML:At,hasEmoji:function(t){if("string"!=typeof t)return!1;const e=t.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/i);return null!==e&&null!==e.length},lcfirst:function(t){const e=String(t);return e.charAt(0).toLowerCase()+e.substr(1)},random:function(t){let e="";const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=s.length;for(var i=0;i]+)>)/gi,"")},template:Lt,ucfirst:It,ucwords:function(t){return String(t).split(/ /g).map((t=>It(t))).join(" ")}},Bt=(t,e)=>{const s=Object.assign({url:"/",field:"file",method:"POST",attributes:{},complete:function(){},error:function(){},success:function(){},progress:function(){}},e),n=new FormData;n.append(s.field,t,t.name),s.attributes&&Object.keys(s.attributes).forEach((t=>{n.append(t,s.attributes[t])}));const i=new XMLHttpRequest,o=e=>{if(!e.lengthComputable||!s.progress)return;let n=Math.max(0,Math.min(100,e.loaded/e.total*100));s.progress(i,t,Math.ceil(n))};i.upload.addEventListener("loadstart",o),i.upload.addEventListener("progress",o),i.addEventListener("load",(e=>{let n=null;try{n=JSON.parse(e.target.response)}catch(o){n={status:"error",message:"The file could not be uploaded"}}n.status&&"error"===n.status?s.error(i,t,n):(s.success(i,t,n),s.progress(i,t,100))})),i.addEventListener("error",(e=>{const n=JSON.parse(e.target.response);s.error(i,t,n),s.progress(i,t,100)})),i.open(s.method,s.url,!0),s.headers&&Object.keys(s.headers).forEach((t=>{const e=s.headers[t];i.setRequestHeader(t,e)})),i.send(n)},Mt=()=>{var t,e,s="";for(t=0;t<32;t++)e=16*Math.random()|0,8!=t&&12!=t&&16!=t&&20!=t||(s+="-"),s+=(12==t?4:16==t?3&e|8:e).toString(16);return s};var Dt={datetime:function(t,e,s,n,i="day"){let o=t.$library.dayjs.utc(e);return o.isValid()||(o=t.$library.dayjs.utc(e,"HH:mm:ss")),s?!e||!o.isValid()||(s=t.$library.dayjs.utc(s),o.isSame(s,i)||o[n](s,i)):e&&o.isValid()}},Pt={install(t){Array.prototype.sortBy=function(e){const s=t.prototype.$helper.sort(),n=e.split(" "),i=n[0],o=n[1]||"asc";return this.sort(((t,e)=>{const n=String(t[i]).toLowerCase(),r=String(e[i]).toLowerCase();return"desc"===o?s(r,n):s(n,r)}))},t.prototype.$helper={clipboard:kt,clone:st,color:vt,embed:_t,isComponent:wt,isUploadEvent:xt,debounce:bt,keyboard:St,pad:Ct,ratio:Ot,slug:Et,sort:Tt,string:jt,upload:Bt,uuid:Mt,validate:Dt},t.prototype.$esc=jt.escapeHTML}},Nt={install(t){t.$t=t.prototype.$t=window.panel.$t=(t,e,s=null)=>{if("string"!=typeof t)return;const n=window.panel.$translation.data[t]||s;return"string"!=typeof n?n:Lt(n,e)},t.directive("direction",{inserted(t,e,s){!0!==s.context.disabled?t.dir=s.context.$direction:t.dir=null}})}},qt={install(t){p.extend(h),p.extend(f),t.prototype.$library={autosize:m,dayjs:p}}},Ft={props:{blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number},methods:{load(){return this.$api.get(this.parent+"/sections/"+this.name)}}},Rt={install(t){let e={};for(var s in t.options.components)e[s]=t.options.components[s];let n={section:Ft};Object.entries(window.panel.plugins.components).forEach((([s,i])=>{i.template||i.render||i.extends?(i.extends&&"string"==typeof i.extends&&(e[i.extends]?i.extends=e[i.extends].extend({options:i,components:a(a({},e),i.components||{})}):i.extends=null,i.template&&(i.render=null)),i.mixins&&(i.mixins=i.mixins.map((t=>"string"==typeof t?n[t]:t))),e[s]&&window.console.warn(`Plugin is replacing "${s}"`),t.component(s,i),e[s]=t.options.components[s]):lt.dispatch("notification/error",`Neither template or render method provided nor extending a component when loading plugin component "${s}". The component has not been registered.`)})),window.panel.plugins.use.forEach((e=>{t.use(e)}))}};function zt(t,e,s,n,i,o,r,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):i&&(l=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}const Ht={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:{type:String,default:"check"},size:{type:String,default:"default"},submitButton:{type:[String,Boolean],default:!0},theme:String,visible:Boolean},data:()=>({notification:null}),computed:{buttons(){let t=[];return this.cancelButton&&t.push({icon:"cancel",text:this.cancelButtonLabel,class:"k-dialog-button-cancel",click:this.cancel}),this.submitButtonConfig&&t.push({icon:this.icon,text:this.submitButtonLabel,theme:this.theme,class:"k-dialog-button-submit",click:this.submit}),t},cancelButtonLabel(){return!1!==this.cancelButton&&(!0===this.cancelButton||0===this.cancelButton.length?this.$t("cancel"):this.cancelButton)},submitButtonConfig(){return void 0!==this.$attrs.button?this.$attrs.button:void 0===this.submitButton||this.submitButton},submitButtonLabel(){return!0===this.submitButton||0===this.submitButton.length?this.$t("confirm"):this.submitButton}},created(){this.$events.$on("keydown.esc",this.close,!1)},destroyed(){this.$events.$off("keydown.esc",this.close,!1)},mounted(){this.visible&&this.$nextTick(this.open)},methods:{onOverlayClose(){this.notification=null,this.$emit("close"),this.$events.$off("keydown.esc",this.close),this.$store.dispatch("dialog",!1)},open(){this.$store.state.dialog||this.$store.dispatch("dialog",!0),this.notification=null,this.$refs.overlay.open(),this.$emit("open"),this.$events.$on("keydown.esc",this.close)},close(){this.$refs.overlay&&this.$refs.overlay.close()},cancel(){this.$emit("cancel"),this.close()},focus(){if(this.$refs.dialog&&this.$refs.dialog.querySelector){const t=this.$refs.dialog.querySelector(".k-dialog-button-cancel");t&&"function"==typeof t.focus&&t.focus()}},error(t){this.notification={message:t,type:"error"}},submit(){this.$emit("submit")},success(t){this.notification={message:t,type:"success"}}}},Ut={};var Kt=zt(Ht,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay",attrs:{autofocus:t.autofocus,centered:!0},on:{close:t.onOverlayClose,ready:function(e){return t.$emit("ready")}}},[s("div",{ref:"dialog",staticClass:"k-dialog",class:t.$vnode.data.staticClass,attrs:{"data-size":t.size},on:{mousedown:function(t){t.stopPropagation()}}},[t.notification?s("div",{staticClass:"k-dialog-notification",attrs:{"data-theme":t.notification.type}},[s("p",[t._v(t._s(t.notification.message))]),s("k-button",{attrs:{icon:"cancel"},on:{click:function(e){t.notification=null}}})],1):t._e(),s("div",{staticClass:"k-dialog-body scroll-y-auto"},[t._t("default")],2),t.$slots.footer||t.buttons.length?s("footer",{staticClass:"k-dialog-footer"},[t._t("footer",(function(){return[s("k-button-group",{attrs:{buttons:t.buttons}})]}))],2):t._e()])])}),[],!1,Jt,null,null,null);function Jt(t){for(let e in Ut)this[e]=Ut[e]}var Gt=function(){return Kt.exports}(),Vt={props:{autofocus:{type:Boolean,default:!0},cancelButton:{type:[String,Boolean],default:!0},icon:String,submitButton:{type:[String,Boolean],default:!0},size:String,theme:String,visible:Boolean},methods:{close(){this.$refs.dialog.close(),this.$emit("close")},error(t){this.$refs.dialog.error(t)},open(){this.$refs.dialog.open(),this.$emit("open")},success(t){this.$refs.dialog.close(),t.route&&this.$go(t.route),t.message&&this.$store.dispatch("notification/success",t.message),t.event&&("string"==typeof t.event&&(t.event=[t.event]),t.event.forEach((e=>{this.$events.$emit(e,t)}))),!1!==Object.prototype.hasOwnProperty.call(t,"emit")&&!1===t.emit||this.$emit("success")}}};const Wt={};var Yt=zt({mixins:[Vt],props:{details:[Object,Array],message:String,size:{type:String,default:"medium"}},computed:{detailsList(){return Array.isArray(this.details)?this.details:Object.values(this.details||{})}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-error-dialog",attrs:{"cancel-button":!1,size:t.size,visible:!0},on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},submit:function(e){return t.$refs.dialog.close()}}},[s("k-text",[t._v(t._s(t.message))]),t.detailsList.length?s("dl",{staticClass:"k-error-details"},[t._l(t.detailsList,(function(e,n){return[s("dt",{key:"detail-label-"+n},[t._v(" "+t._s(e.label)+" ")]),s("dd",{key:"detail-message-"+n},["object"==typeof e.message?[s("ul",t._l(e.message,(function(e,n){return s("li",{key:n},[t._v(" "+t._s(e)+" ")])})),0)]:[t._v(" "+t._s(e.message)+" ")]],2)]}))],2):t._e()],1)}),[],!1,Xt,null,null,null);function Xt(t){for(let e in Wt)this[e]=Wt[e]}var Zt=function(){return Yt.exports}();const Qt={};var te=zt({props:{code:Number,component:String,path:String,props:Object,referrer:String},methods:{async onSubmit(t){try{const e=await this.$request(this.path,{body:t,method:"POST",type:"$dialog",headers:{"X-Fiber-Referrer":this.referrer}});if(!1===e)return!1;this.$refs.dialog.close(),this.$store.dispatch("notification/success",":)"),e.event&&("string"==typeof e.event&&(e.event=[e.event]),e.event.forEach((t=>{this.$events.$emit(t,e)}))),e.dispatch&&Object.keys(e.dispatch).forEach((t=>{this.$store.dispatch(t,...e.dispatch[t])})),e.redirect?this.$go(e.redirect):this.$reload(e.reload||{})}catch(e){this.$refs.dialog.error(e)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._b({ref:"dialog",tag:"component",attrs:{visible:!0},on:{submit:t.onSubmit}},"component",t.props,!1))}),[],!1,ee,null,null,null);function ee(t){for(let e in Qt)this[e]=Qt[e]}var se=function(){return te.exports}(),ne={data:()=>({models:[],issue:null,selected:{},options:{endpoint:null,max:null,multiple:!0,parent:null,selected:[],search:!0},search:null,pagination:{limit:20,page:1,total:0}}),computed:{checkedIcon(){return!0===this.multiple?"check":"circle-filled"},items(){return this.models.map(this.item)},multiple(){return!0===this.options.multiple&&1!==this.options.max}},watch:{search(){this.updateSearch()}},created(){this.updateSearch=bt(this.updateSearch,200)},methods:{async fetch(){const t=a({page:this.pagination.page,search:this.search},this.fetchData||{});try{const e=await this.$api.get(this.options.endpoint,t);this.models=e.data,this.pagination=e.pagination,this.onFetched&&this.onFetched(e)}catch(e){this.models=[],this.issue=e.message}},async open(t,e){this.pagination.page=0,this.search=null;let s=!0;Array.isArray(t)?(this.models=t,s=!1):(this.models=[],e=t),this.options=a(a({},this.options),e),this.selected={},this.options.selected.forEach((t=>{this.$set(this.selected,t,{id:t})})),s&&await this.fetch(),this.$refs.dialog.open()},paginate(t){this.pagination.page=t.page,this.pagination.limit=t.limit,this.fetch()},submit(){this.$emit("submit",Object.values(this.selected)),this.$refs.dialog.close()},isSelected(t){return void 0!==this.selected[t.id]},item:t=>(t.link=!1,t),toggle(t){!1!==this.options.multiple&&1!==this.options.max||(this.selected={}),!0!==this.isSelected(t)?this.options.max&&this.options.max<=Object.keys(this.selected).length||this.$set(this.selected,t.id,t):this.$delete(this.selected,t.id)},toggleBtn(t){const e=this.isSelected(t);return{autofocus:!0,icon:e?this.checkedIcon:"circle-outline",tooltip:e?this.$t("remove"):this.$t("select"),theme:e?"positive":null}},updateSearch(){this.pagination.page=0,this.fetch()}}};const ie={};var oe=zt({mixins:[ne]},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-files-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[s("k-items",{attrs:{items:t.items,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.item;return[s("k-button",t._b({on:{click:function(e){return t.toggle(n)}}},"k-button",t.toggleBtn(n),!1))]}}],null,!1,4112065674)}),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"image"}},[t._v(" "+t._s(t.$t("dialog.files.empty"))+" ")])]],2)}),[],!1,re,null,null,null);function re(t){for(let e in ie)this[e]=ie[e]}var ae=function(){return oe.exports}();const le={mixins:[Vt],props:{fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!0},size:{type:String,default:"medium"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("save")},text:{type:String},theme:{type:String,default:"positive"},value:{type:Object,default:()=>({})}},data(){return{model:this.value}},computed:{hasFields(){return Object.keys(this.fields).length>0}},watch:{value(t,e){t!==e&&(this.model=t)}}},ue={};var ce=zt(le,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",t._b({ref:"dialog",on:{cancel:function(e){return t.$emit("cancel")},close:function(e){return t.$emit("close")},ready:function(e){return t.$emit("ready")},submit:function(e){return t.$refs.form.submit()}}},"k-dialog",t.$props,!1),[t.text?[s("k-text",{domProps:{innerHTML:t._s(t.text)}})]:t._e(),t.hasFields?s("k-form",{ref:"form",attrs:{value:t.model,fields:t.fields,novalidate:t.novalidate},on:{input:function(e){return t.$emit("input",e)},submit:function(e){return t.$emit("submit",e)}}}):s("k-box",{attrs:{theme:"negative"}},[t._v(" This form dialog has no fields ")])],2)}),[],!1,de,null,null,null);function de(t){for(let e in ue)this[e]=ue[e]}var pe=function(){return ce.exports}();const he={};var fe=zt({extends:pe,watch:{"model.name"(t){this.fields.code.disabled||this.onNameChanges(t)},"model.code"(t){this.fields.code.disabled||(this.model.code=this.$helper.slug(t,[this.$system.ascii]),this.onCodeChanges(this.model.code))}},methods:{onCodeChanges(t){if(!t)return this.model.locale=null;if(t.length>=2)if(-1!==t.indexOf("-")){let e=t.split("-"),s=[e[0],e[1].toUpperCase()];this.model.locale=s.join("_")}else{let e=this.$system.locales||[];e&&e[t]?this.model.locale=e[t]:this.model.locale=null}},onNameChanges(t){this.model.code=this.$helper.slug(t,[this.model.rules,this.$system.ascii]).substr(0,2)}}},undefined,undefined,!1,me,null,null,null);function me(t){for(let e in he)this[e]=he[e]}var ge=function(){return fe.exports}();const ke={};var ve=zt({mixins:[ne],data(){const t=ne.data();return l(a({},t),{model:{title:null,parent:null},options:l(a({},t.options),{parent:null})})},computed:{fetchData(){return{parent:this.options.parent}}},methods:{back(){this.options.parent=this.model.parent,this.pagination.page=1,this.fetch()},go(t){this.options.parent=t.id,this.pagination.page=1,this.fetch()},onFetched(t){this.model=t.model}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-pages-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.model?s("header",{staticClass:"k-pages-dialog-navbar"},[s("k-button",{attrs:{disabled:!t.model.id,tooltip:t.$t("back"),icon:"angle-left"},on:{click:t.back}}),s("k-headline",[t._v(t._s(t.model.title))])],1):t._e(),t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[s("k-items",{attrs:{items:t.items,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.item;return[s("k-button",t._b({on:{click:function(e){return t.toggle(n)}}},"k-button",t.toggleBtn(n),!1)),n?s("k-button",{attrs:{disabled:!n.hasChildren,tooltip:t.$t("open"),icon:"angle-right"},on:{click:function(e){return e.stopPropagation(),t.go(n)}}}):t._e()]}}],null,!1,3385025206)}),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"page"}},[t._v(" "+t._s(t.$t("dialog.pages.empty"))+" ")])]],2)}),[],!1,be,null,null,null);function be(t){for(let e in ke)this[e]=ke[e]}var ye=function(){return ve.exports}();const $e={mixins:[Vt],props:{icon:{type:String,default:"trash"},submitButton:{type:[String,Boolean],default:()=>window.panel.$t("delete")},text:String,theme:{type:String,default:"negative"}}},_e={};var we=zt($e,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-text-dialog",t._g(t._b({ref:"dialog"},"k-text-dialog",t.$props,!1),t.$listeners),[t._t("default")],2)}),[],!1,xe,null,null,null);function xe(t){for(let e in _e)this[e]=_e[e]}var Se=function(){return we.exports}();const Ce={};var Oe=zt({mixins:[Vt],props:{text:String}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",t._g(t._b({ref:"dialog"},"k-dialog",t.$props,!1),t.$listeners),[t._t("default",(function(){return[t.text?s("k-text",{domProps:{innerHTML:t._s(t.text)}}):s("k-box",{attrs:{theme:"negative"}},[t._v(" This dialog does not define any text ")])]}))],2)}),[],!1,Ee,null,null,null);function Ee(t){for(let e in Ce)this[e]=Ce[e]}var Te=function(){return Oe.exports}();const Ae={};var Le=zt({mixins:[ne],methods:{item:t=>l(a({},t),{key:t.email,info:t.info!==t.text?t.info:null,link:!1})}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-users-dialog",attrs:{size:"medium"},on:{cancel:function(e){return t.$emit("cancel")},submit:t.submit}},[t.issue?[s("k-box",{attrs:{text:t.issue,theme:"negative"}})]:[t.options.search?s("k-input",{staticClass:"k-dialog-search",attrs:{autofocus:!0,placeholder:t.$t("search")+" …",type:"text",icon:"search"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),t.items.length?[s("k-items",{attrs:{items:t.items,layout:"list",sortable:!1},on:{item:t.toggle},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.item;return[s("k-button",t._b({on:{click:function(e){return t.toggle(n)}}},"k-button",t.toggleBtn(n),!1))]}}],null,!1,409892637)}),s("k-pagination",t._b({staticClass:"k-dialog-pagination",attrs:{details:!0,dropdown:!1,align:"center"},on:{paginate:t.paginate}},"k-pagination",t.pagination,!1))]:s("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("dialog.users.empty"))+" ")])]],2)}),[],!1,Ie,null,null,null);function Ie(t){for(let e in Ae)this[e]=Ae[e]}var je=function(){return Le.exports}();const Be={};var Me=zt({inheritAttrs:!1,props:{id:String,icon:String,tab:String,tabs:Object,title:String},data:()=>({click:!1}),computed:{breadcrumb(){return this.$store.state.drawers.open},hasTabs(){return this.tabs&&Object.keys(this.tabs).length>1},index(){return this.breadcrumb.findIndex((t=>t.id===this._uid))},nested(){return this.index>0}},watch:{index(){-1===this.index&&this.close()}},destroyed(){this.$store.dispatch("drawers/close",this._uid)},methods:{close(){this.$refs.overlay.close()},goTo(t){if(t===this._uid)return!0;this.$store.dispatch("drawers/goto",t)},mouseup(){!0===this.click&&this.close(),this.click=!1},mousedown(t=!1){this.click=t,!0===this.click&&this.$store.dispatch("drawers/close")},onClose(){this.$store.dispatch("drawers/close",this._uid),this.$emit("close")},onOpen(){this.$store.dispatch("drawers/open",{id:this._uid,icon:this.icon,title:this.title}),this.$emit("open")},open(){this.$refs.overlay.open()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay",attrs:{dimmed:!1},on:{close:t.onClose,open:t.onOpen}},[s("div",{staticClass:"k-drawer",attrs:{"data-id":t.id,"data-nested":t.nested},on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!0)},mouseup:t.mouseup}},[s("div",{staticClass:"k-drawer-box",on:{mousedown:function(e){return e.stopPropagation(),t.mousedown(!1)}}},[s("header",{staticClass:"k-drawer-header"},[1===t.breadcrumb.length?s("h2",{staticClass:"k-drawer-title"},[s("k-icon",{attrs:{type:t.icon}}),t._v(" "+t._s(t.title)+" ")],1):s("ul",{staticClass:"k-drawer-breadcrumb"},t._l(t.breadcrumb,(function(e){return s("li",{key:e.id},[s("k-button",{attrs:{icon:e.icon,text:e.title},on:{click:function(s){return t.goTo(e.id)}}})],1)})),0),t.hasTabs?s("nav",{staticClass:"k-drawer-tabs"},t._l(t.tabs,(function(e){return s("k-button",{key:e.name,staticClass:"k-drawer-tab",attrs:{current:t.tab==e.name,text:e.label},on:{click:function(s){return s.stopPropagation(),t.$emit("tab",e.name)}}})})),1):t._e(),s("nav",{staticClass:"k-drawer-options"},[t._t("options"),s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"check"},on:{click:t.close}})],2)]),s("div",{staticClass:"k-drawer-body scroll-y-auto"},[t._t("default")],2)])])])}),[],!1,De,null,null,null);function De(t){for(let e in Be)this[e]=Be[e]}var Pe=function(){return Me.exports}(),Ne=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-drawer",{ref:"drawer",staticClass:"k-form-drawer",attrs:{id:t.id,icon:t.icon,tabs:t.tabs,tab:t.tab,title:t.title},on:{close:function(e){return t.$emit("close")},open:function(e){return t.$emit("open")},tab:function(e){t.tab=e}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0},{key:"default",fn:function(){return[0===Object.keys(t.fields).length?s("k-box",{attrs:{theme:"info"}},[t._v(" "+t._s(t.empty)+" ")]):s("k-form",{ref:"form",attrs:{autofocus:!0,fields:t.fields,value:t.$helper.clone(t.value)},on:{input:function(e){return t.$emit("input",e)}}})]},proxy:!0}],null,!0)})};const qe={};var Fe=zt({inheritAttrs:!1,props:{empty:{type:String,default:()=>"Missing field setup"},icon:String,id:String,tabs:Object,title:String,type:String,value:Object},data:()=>({tab:null}),computed:{fields(){const t=this.tab||null;return(this.tabs[t]||this.firstTab).fields||{}},firstTab(){return Object.values(this.tabs)[0]}},methods:{close(){this.$refs.drawer.close()},focus(t){this.$refs.form&&"function"==typeof this.$refs.form.focus&&this.$refs.form.focus(t)},open(t,e=!0){this.$refs.drawer.open(),this.tab=t||this.firstTab.name,!1!==e&&setTimeout((()=>{let t=Object.values(this.fields).filter((t=>!0===t.autofocus))[0]||null;this.focus(t)}),1)}}},Ne,[],!1,Re,null,null,null);function Re(t){for(let e in qe)this[e]=qe[e]}var ze=function(){return Fe.exports}();const He={props:{html:{type:Boolean,default:!1},limit:{type:Number,default:10},skip:{type:Array,default:()=>[]},options:Array,query:String},data:()=>({matches:[],selected:{text:null}}),methods:{close(){this.$refs.dropdown.close()},onSelect(t){this.$emit("select",t),this.$refs.dropdown.close()},search(t){if(t.length<1)return;const e=new RegExp(RegExp.escape(t),"ig");this.matches=this.options.filter((t=>!!t.text&&(-1===this.skip.indexOf(t.value)&&null!==t.text.match(e)))).slice(0,this.limit),this.$emit("search",t,this.matches),this.$refs.dropdown.open()}}},Ue={};var Ke=zt(He,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dropdown",{staticClass:"k-autocomplete"},[t._t("default"),s("k-dropdown-content",t._g({ref:"dropdown",attrs:{autofocus:!0}},t.$listeners),t._l(t.matches,(function(e,n){return s("k-dropdown-item",t._b({key:n,on:{mousedown:function(s){return t.onSelect(e)},keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"tab",9,s.key,"Tab")?null:(s.preventDefault(),t.onSelect(e))},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.preventDefault(),t.onSelect(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)?null:(e.preventDefault(),t.close.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.close.apply(null,arguments))}]}},"k-dropdown-item",e,!1),[s("span",{domProps:{innerHTML:t._s(t.html?e.text:t.$esc(e.text))}})])})),1),t._v(" "+t._s(t.query)+" ")],2)}),[],!1,Je,null,null,null);function Je(t){for(let e in Ue)this[e]=Ue[e]}var Ge=function(){return Ke.exports}();const Ve={props:{disabled:Boolean,multiple:Boolean,max:String,min:String,value:[Array,String]},data(){return this.toData(this.value)},computed:{numberOfDays(){return this.viewDt.daysInMonth()},numberOfWeeks(){return Math.ceil((this.numberOfDays+this.firstWeekday-1)/7)},firstWeekday(){const t=this.viewDt.day();return t>0?t:7},weekdays(){return[this.$t("days.mon"),this.$t("days.tue"),this.$t("days.wed"),this.$t("days.thu"),this.$t("days.fri"),this.$t("days.sat"),this.$t("days.sun")]},monthnames(){return[this.$t("months.january"),this.$t("months.february"),this.$t("months.march"),this.$t("months.april"),this.$t("months.may"),this.$t("months.june"),this.$t("months.july"),this.$t("months.august"),this.$t("months.september"),this.$t("months.october"),this.$t("months.november"),this.$t("months.december")]},months(){var t=[];return this.monthnames.forEach(((e,s)=>{const n=this.toDate(1,s);t.push({value:s,text:e,disabled:n.isBefore(this.view.min,"month")||n.isAfter(this.view.max,"month")})})),t},years(){var t=[];const e=this.view.min?this.view.min.get("year"):this.view.year-20,s=this.view.max?this.view.max.get("year"):this.view.year+20;for(var n=e;n<=s;n++)t.push({value:n,text:this.$helper.pad(n)});return t},viewDt(){const t=`${this.view.year}-${this.view.month+1}-01 00:00:00`;return this.$library.dayjs.utc(t)}},watch:{value(t){const e=this.toData(t);this.datetimes=e.datetimes,this.view=e.view}},methods:{days(t){let e=[];const s=7*(t-1)+1;for(let n=s;nthis.numberOfDays?e.push(""):e.push(t)}return e},isBetween(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;const e=this.toDate(t);return this.isFirst(t)||this.isLast(t)||e.isAfter(this.datetimes[0],"day")&&e.isBefore(this.datetimes[1],"day")},isDisabled(t){const e=this.toDate(t);return e.isBefore(this.view.min,"day")||e.isAfter(this.view.max,"day")},isFirst(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;return this.toDate(t).isSame(this.datetimes[0],"day")},isLast(t){if(""===t||0==this.multiple||this.datetimes.length<2)return!1;return this.toDate(t).isSame(this.datetimes[1],"day")},isSelected(t){if(""===t)return!1;const e=this.toDate(t);return this.datetimes.some((t=>e.isSame(t,"day")))},isToday(t){return this.toDate(t).isSame(this.toToday(),"day")},next(){let t=this.viewDt.clone().add(1,"month");this.show(t)},prev(){let t=this.viewDt.clone().subtract(1,"month");this.show(t)},mergeTime:(t,e)=>t.clone().set("second",e.get("second")).set("minute",e.get("minute")).set("hour",e.get("hour")),select(t){const e=this.datetimes[0]||this.toToday();if("today"===t){const t=this.mergeTime(this.$library.dayjs(),e);this.datetimes=[t],this.show(t)}else{let s=this.toDate(t);s=this.mergeTime(s,e),!1===this.multiple||0===this.datetimes.length||2===this.datetimes.length||s.isBefore(this.datetimes[0])?this.datetimes=[s]:this.datetimes.push(s)}const s=this.multiple?this.datetimes.map((t=>this.toISO(t))):this.toISO(this.datetimes[0]);this.$emit("input",s)},show(t){this.view.year=t.year(),this.view.month=t.month()},toData(t){const e=this.toToday(),s=this.toDatetimes(t);return{datetimes:s,view:{month:(s[0]||e).month(),year:(s[0]||e).year(),min:this.min?this.$library.dayjs.utc(this.min):null,max:this.max?this.$library.dayjs.utc(this.max):null}}},toDate(t,e=this.view.month,s=this.view.year){return this.$library.dayjs.utc(`${s}-${e+1}-${t} 00:00:00`)},toDatetimes(t){return t?"string"==typeof t?[this.$library.dayjs.utc(t)]:t.map((t=>this.$library.dayjs.utc(t))):[]},toISO:t=>t.format("YYYY-MM-DD HH:mm:ss"),toToday(){return this.$library.dayjs.utc()}}},We={};var Ye=zt(Ve,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-calendar-input"},[s("nav",[s("k-button",{attrs:{icon:"angle-left"},on:{click:t.prev}}),s("span",{staticClass:"k-calendar-selects"},[s("k-select-input",{attrs:{options:t.months,disabled:t.disabled,required:!0},model:{value:t.view.month,callback:function(e){t.$set(t.view,"month",t._n(e))},expression:"view.month"}}),s("k-select-input",{attrs:{options:t.years,disabled:t.disabled,required:!0},model:{value:t.view.year,callback:function(e){t.$set(t.view,"year",t._n(e))},expression:"view.year"}})],1),s("k-button",{attrs:{icon:"angle-right"},on:{click:t.next}})],1),s("table",{staticClass:"k-calendar-table"},[s("thead",[s("tr",t._l(t.weekdays,(function(e){return s("th",{key:"weekday_"+e},[t._v(" "+t._s(e)+" ")])})),0)]),s("tbody",t._l(t.numberOfWeeks,(function(e){return s("tr",{key:"week_"+e},t._l(t.days(e),(function(e,n){return s("td",{key:"day_"+n,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(e)&&"date","aria-selected":!!t.isSelected(e)&&"date","data-between":t.isBetween(e),"data-first":t.isFirst(e),"data-last":t.isLast(e)}},[e?s("k-button",{attrs:{disabled:t.isDisabled(e),text:e},on:{click:function(s){return t.select(e)}}}):t._e()],1)})),0)})),0),s("tfoot",[s("tr",[s("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[s("k-button",{attrs:{text:t.$t("today")},on:{click:function(e){return t.select("today")}}})],1)])])])])}),[],!1,Xe,null,null,null);function Xe(t){for(let e in We)this[e]=We[e]}var Ze=function(){return Ye.exports}();const Qe={props:{count:Number,min:Number,max:Number,required:{type:Boolean,default:!1}},computed:{valid(){return!1===this.required&&0===this.count||(!0!==this.required||0!==this.count)&&(!(this.min&&this.countthis.max))}}},ts={};var es=zt(Qe,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-counter",attrs:{"data-invalid":!t.valid}},[s("span",[t._v(t._s(t.count))]),t.min&&t.max?s("span",{staticClass:"k-counter-rules"},[t._v("("+t._s(t.min)+"–"+t._s(t.max)+")")]):t.min?s("span",{staticClass:"k-counter-rules"},[t._v("≥ "+t._s(t.min))]):t.max?s("span",{staticClass:"k-counter-rules"},[t._v("≤ "+t._s(t.max))]):t._e()])}),[],!1,ss,null,null,null);function ss(t){for(let e in ts)this[e]=ts[e]}var ns=function(){return es.exports}();const is={props:{disabled:Boolean,config:Object,fields:{type:[Array,Object],default:()=>({})},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data(){return{errors:{},listeners:l(a({},this.$listeners),{submit:this.onSubmit})}},methods:{focus(t){this.$refs.fields&&this.$refs.fields.focus&&this.$refs.fields.focus(t)},onSubmit(){this.$emit("submit",this.value)},submit(){this.$refs.submitter.click()}}},os={};var rs=zt(is,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{ref:"form",staticClass:"k-form",attrs:{method:"POST",autocomplete:"off",novalidate:""},on:{submit:function(e){return e.preventDefault(),t.onSubmit.apply(null,arguments)}}},[t._t("header"),t._t("default",(function(){return[s("k-fieldset",t._g({ref:"fields",attrs:{disabled:t.disabled,fields:t.fields,novalidate:t.novalidate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t.listeners))]})),t._t("footer"),s("input",{ref:"submitter",staticClass:"k-form-submitter",attrs:{type:"submit"}})],2)}),[],!1,as,null,null,null);function as(t){for(let e in os)this[e]=os[e]}var ls=function(){return rs.exports}();const us={props:{lock:[Boolean,Object]},data:()=>({isRefreshing:null,isLocking:null}),computed:{hasChanges(){return this.$store.getters["content/hasChanges"]()},isDisabled(){return!1===this.$store.state.content.status.enabled},isLocked(){return"lock"===this.lockState},isUnlocked(){return"unlock"===this.lockState},mode(){return null!==this.lockState?this.lockState:!0===this.hasChanges?"changes":null},lockState(){return this.supportsLocking&&this.lock?this.lock.state:null},supportsLocking(){return!1!==this.lock},theme(){return"lock"===this.mode?"negative":"unlock"===this.mode?"info":"notice"}},watch:{hasChanges:{handler(t,e){!0===this.supportsLocking&&!1===this.isLocked&&!1===this.isUnlocked&&(!0===t?(this.onLock(),this.isLocking=setInterval(this.onLock,3e4)):e&&(clearInterval(this.isLocking),this.onLock(!1)))},immediate:!0},isLocked(t){!1===t&&this.$events.$emit("model.reload")}},created(){this.supportsLocking&&(this.isRefreshing=setInterval(this.check,1e4)),this.$events.$on("keydown.cmd.s",this.onSave)},destroyed(){clearInterval(this.isRefreshing),clearInterval(this.isLocking),this.$events.$off("keydown.cmd.s",this.onSave)},methods:{check(){this.$reload({navigate:!1,only:"$view.props.lock",silent:!0})},async onLock(t=!0){const e=[this.$view.path+"/lock",null,null,!0];if(!0===t)try{await this.$api.patch(...e)}catch(s){clearInterval(this.isLocking),this.$store.dispatch("content/revert")}else clearInterval(this.isLocking),await this.$api.delete(...e)},onDownload(){let t="";const e=this.$store.getters["content/changes"]();Object.keys(e).forEach((s=>{t+=s+": \n\n"+e[s],t+="\n\n----\n\n"}));let s=document.createElement("a");s.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),s.setAttribute("download",this.$view.path+".txt"),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},async onResolve(){await this.onUnlock(!1),this.$store.dispatch("content/revert")},onRevert(){this.$refs.revert.open()},async onSave(t){if(!t)return!1;if(t.preventDefault&&t.preventDefault(),!1===this.hasChanges)return!0;try{await this.$store.dispatch("content/save"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}catch(e){if(403===e.code)return;e.details&&Object.keys(e.details).length>0?this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:e.details}):this.$store.dispatch("notification/error",{message:this.$t("error.form.notSaved"),details:[{label:"Exception: "+e.exception,message:e.message}]})}},async onUnlock(t=!0){const e=[this.$view.path+"/unlock",null,null,!0];!0===t?await this.$api.patch(...e):await this.$api.delete(...e),this.$reload({silent:!0})},revert(){this.$store.dispatch("content/revert"),this.$refs.revert.close()}}},cs={};var ds=zt(us,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"k-form-buttons",attrs:{"data-theme":t.theme}},["unlock"===t.mode?s("k-view",[s("p",{staticClass:"k-form-lock-info"},[t._v(" "+t._s(t.$t("lock.isUnlocked"))+" ")]),s("span",{staticClass:"k-form-lock-buttons"},[s("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("download"),icon:"download"},on:{click:t.onDownload}}),s("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("confirm"),icon:"check"},on:{click:t.onResolve}})],1)]):"lock"===t.mode?s("k-view",[s("p",{staticClass:"k-form-lock-info"},[s("k-icon",{attrs:{type:"lock"}}),s("span",{domProps:{innerHTML:t._s(t.$t("lock.isLocked",{email:t.$esc(t.lock.data.email)}))}})],1),t.lock.data.unlockable?s("k-button",{staticClass:"k-form-button",attrs:{text:t.$t("lock.unlock"),icon:"unlock"},on:{click:function(e){return t.onUnlock()}}}):s("k-icon",{staticClass:"k-form-lock-loader",attrs:{type:"loader"}})],1):"changes"===t.mode?s("k-view",[s("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("revert"),icon:"undo"},on:{click:t.onRevert}}),s("k-button",{staticClass:"k-form-button",attrs:{disabled:t.isDisabled,text:t.$t("save"),icon:"check"},on:{click:t.onSave}})],1):t._e(),s("k-dialog",{ref:"revert",attrs:{"submit-button":t.$t("revert"),icon:"undo",theme:"negative"},on:{submit:t.revert}},[s("k-text",{domProps:{innerHTML:t._s(t.$t("revert.confirm"))}})],1)],1)}),[],!1,ps,null,null,null);function ps(t){for(let e in cs)this[e]=cs[e]}var hs=function(){return ds.exports}();const fs={};var ms=zt({data:()=>({isOpen:!1,options:[]}),computed:{hasChanges(){return this.ids.length>0},ids(){return Object.keys(this.store).filter((t=>{var e;return Object.keys((null==(e=this.store[t])?void 0:e.changes)||{}).length>0}))},store(){return this.$store.state.content.models}},methods:{async toggle(){if(!1===this.$refs.list.isOpen)try{await this.$dropdown("changes",{body:{ids:this.ids}})((t=>{this.options=t}))}catch(t){return this.$store.dispatch("notification/success",this.$t("lock.unsaved.empty")),this.$store.dispatch("content/clear"),!1}this.$refs.list&&this.$refs.list.toggle()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.hasChanges?s("k-dropdown",{staticClass:"k-form-indicator"},[s("k-button",{staticClass:"k-form-indicator-toggle k-topbar-button",attrs:{icon:"edit"},on:{click:t.toggle}}),s("k-dropdown-content",{ref:"list",attrs:{align:"right",theme:"light"}},[s("p",{staticClass:"k-form-indicator-info"},[t._v(" "+t._s(t.$t("lock.unsaved"))+": ")]),s("hr"),t._l(t.options,(function(e){return s("k-dropdown-item",t._b({key:e.id},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])}))],2)],1):t._e()}),[],!1,gs,null,null,null);function gs(t){for(let e in fs)this[e]=fs[e]}var ks=function(){return ms.exports}(),vs={props:{after:String}},bs={props:{autofocus:Boolean}},ys={props:{before:String}},$s={props:{disabled:Boolean}},_s={props:{help:String}},ws={props:{id:{type:[Number,String],default(){return this._uid}}}},xs={props:{invalid:Boolean}},Ss={props:{label:String}},Cs={props:{name:[Number,String]}},Os={props:{required:Boolean}};const Es={mixins:[$s,_s,Ss,Cs,Os],props:{counter:[Boolean,Object],endpoints:Object,input:[String,Number],translate:Boolean,type:String}},Ts={};var As=zt({mixins:[Es],inheritAttrs:!1,computed:{labelText(){return this.label||" "}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:"k-field k-field-name-"+t.name,attrs:{"data-disabled":t.disabled,"data-translate":t.translate},on:{focusin:function(e){return t.$emit("focus",e)},focusout:function(e){return t.$emit("blur",e)}}},[t._t("header",(function(){return[s("header",{staticClass:"k-field-header"},[t._t("label",(function(){return[s("label",{staticClass:"k-field-label",attrs:{for:t.input}},[t._v(t._s(t.labelText)+" "),t.required?s("abbr",{attrs:{title:t.$t("field.required")}},[t._v("*")]):t._e()])]})),t._t("options"),t._t("counter",(function(){return[t.counter?s("k-counter",t._b({staticClass:"k-field-counter",attrs:{required:t.required}},"k-counter",t.counter,!1)):t._e()]}))],2)]})),t._t("default"),t._t("footer",(function(){return[t.help||t.$slots.help?s("footer",{staticClass:"k-field-footer"},[t._t("help",(function(){return[t.help?s("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()]}))],2):t._e()]}))],2)}),[],!1,Ls,null,null,null);function Ls(t){for(let e in Ts)this[e]=Ts[e]}var Is=function(){return As.exports}();const js={props:{config:Object,disabled:Boolean,fields:{type:[Array,Object],default:()=>[]},novalidate:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},data:()=>({errors:{}}),methods:{focus(t){if(t)return void(this.hasField(t)&&"function"==typeof this.$refs[t][0].focus&&this.$refs[t][0].focus());const e=Object.keys(this.$refs)[0];this.focus(e)},hasFieldType(t){return this.$helper.isComponent(`k-${t}-field`)},hasField(t){return this.$refs[t]&&this.$refs[t][0]},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((s=>{this.value[s.toLowerCase()]!==t.when[s]&&(e=!1)})),e},onInvalid(t,e,s,n){this.errors[n]=e,this.$emit("invalid",this.errors)},hasErrors(){return Object.keys(this.errors).length}}},Bs={};var Ms=zt(js,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("fieldset",{staticClass:"k-fieldset"},[s("k-grid",[t._l(t.fields,(function(e,n){return["hidden"!==e.type&&t.meetsCondition(e)?s("k-column",{key:e.signature,attrs:{width:e.width}},[s("k-error-boundary",[t.hasFieldType(e.type)?s("k-"+e.type+"-field",t._b({ref:n,refInFor:!0,tag:"component",attrs:{"form-data":t.value,name:n,novalidate:t.novalidate,disabled:t.disabled||e.disabled},on:{input:function(s){return t.$emit("input",t.value,e,n)},focus:function(s){return t.$emit("focus",s,e,n)},invalid:function(s,i){return t.onInvalid(s,i,e,n)},submit:function(s){return t.$emit("submit",s,e,n)}},model:{value:t.value[n],callback:function(e){t.$set(t.value,n,e)},expression:"value[fieldName]"}},"component",e,!1)):s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[t._v(" The field type "),s("strong",[t._v('"'+t._s(n)+'"')]),t._v(" does not exist ")])],1)],1)],1):t._e()]}))],2)],1)}),[],!1,Ds,null,null,null);function Ds(t){for(let e in Bs)this[e]=Bs[e]}var Ps=function(){return Ms.exports}();const Ns={mixins:[vs,ys,$s,xs],props:{autofocus:Boolean,type:String,icon:[String,Boolean],theme:String,novalidate:{type:Boolean,default:!1},value:{type:[String,Boolean,Number,Object,Array],default:null}}},qs={};var Fs=zt({mixins:[Ns],inheritAttrs:!1,data(){return{isInvalid:this.invalid,listeners:l(a({},this.$listeners),{invalid:(t,e)=>{this.isInvalid=t,this.$emit("invalid",t,e)}})}},computed:{inputProps(){return a(a({},this.$props),this.$attrs)}},methods:{blur(t){t&&t.relatedTarget&&!1===this.$el.contains(t.relatedTarget)&&this.trigger(null,"blur")},focus(t){this.trigger(t,"focus")},select(t){this.trigger(t,"select")},trigger(t,e){if(t&&t.target&&"INPUT"===t.target.tagName&&"function"==typeof t.target[e])return void t.target[e]();if(this.$refs.input&&"function"==typeof this.$refs.input[e])return void this.$refs.input[e]();const s=this.$el.querySelector("input, select, textarea");s&&"function"==typeof s[e]&&s[e]()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-input",attrs:{"data-disabled":t.disabled,"data-invalid":!t.novalidate&&t.isInvalid,"data-theme":t.theme,"data-type":t.type}},[t.$slots.before||t.before?s("span",{staticClass:"k-input-before",on:{click:t.focus}},[t._t("before",(function(){return[t._v(t._s(t.before))]}))],2):t._e(),s("span",{staticClass:"k-input-element",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t._t("default",(function(){return[s("k-"+t.type+"-input",t._g(t._b({ref:"input",tag:"component",attrs:{value:t.value}},"component",t.inputProps,!1),t.listeners))]}))],2),t.$slots.after||t.after?s("span",{staticClass:"k-input-after",on:{click:t.focus}},[t._t("after",(function(){return[t._v(t._s(t.after))]}))],2):t._e(),t.$slots.icon||t.icon?s("span",{staticClass:"k-input-icon",on:{click:t.focus}},[t._t("icon",(function(){return[s("k-icon",{attrs:{type:t.icon}})]}))],2):t._e()])}),[],!1,Rs,null,null,null);function Rs(t){for(let e in qs)this[e]=qs[e]}var zs=function(){return Fs.exports}();const Hs={};var Us=zt({props:{methods:Array},data:()=>({currentForm:null,isLoading:!1,issue:"",user:{email:"",password:"",remember:!1}}),computed:{canToggle(){return null!==this.codeMode&&!0===this.methods.includes("password")&&(!0===this.methods.includes("password-reset")||!0===this.methods.includes("code"))},codeMode(){return!0===this.methods.includes("password-reset")?"password-reset":!0===this.methods.includes("code")?"code":null},fields(){let t={email:{autofocus:!0,label:this.$t("email"),type:"email",required:!0,link:!1}};return"email-password"===this.form&&(t.password={label:this.$t("password"),type:"password",minLength:8,required:!0,autocomplete:"current-password",counter:!1}),t},form(){return this.currentForm?this.currentForm:"password"===this.methods[0]?"email-password":"email"},isResetForm(){return"password-reset"===this.codeMode&&"email"===this.form},toggleText(){return this.$t("login.toggleText."+this.codeMode+"."+this.formOpposite(this.form))}},methods:{formOpposite:t=>"email-password"===t?"email":"email-password",async login(){this.issue=null,this.isLoading=!0;let t=Object.assign({},this.user);"email"===this.currentForm&&(t.password=null),!0===this.isResetForm&&(t.remember=!1);try{await this.$api.auth.login(t),this.$reload({globals:["$system","$translation"]})}catch(e){this.issue=e.message}finally{this.isLoading=!1}},toggleForm(){this.currentForm=this.formOpposite(this.form),this.$refs.fieldset.focus("email")}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{staticClass:"k-login-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[s("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?s("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),s("div",{staticClass:"k-login-fields"},[!0===t.canToggle?s("button",{staticClass:"k-login-toggler",attrs:{type:"button"},on:{click:t.toggleForm}},[t._v(" "+t._s(t.toggleText)+" ")]):t._e(),s("k-fieldset",{ref:"fieldset",attrs:{novalidate:!0,fields:t.fields},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}})],1),s("div",{staticClass:"k-login-buttons"},[!1===t.isResetForm?s("span",{staticClass:"k-login-checkbox"},[s("k-checkbox-input",{attrs:{value:t.user.remember,label:t.$t("login.remember")},on:{input:function(e){t.user.remember=e}}})],1):t._e(),s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+(t.isResetForm?".reset":"")))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Ks,null,null,null);function Ks(t){for(let e in Hs)this[e]=Hs[e]}var Js=function(){return Us.exports}();const Gs={};var Vs=zt({props:{methods:Array,pending:Object},data:()=>({code:"",isLoadingBack:!1,isLoadingLogin:!1,issue:""}),computed:{mode(){return!0===this.methods.includes("password-reset")?"password-reset":"login"}},methods:{async back(){this.isLoadingBack=!0,this.$go("/logout")},async login(){this.issue=null,this.isLoadingLogin=!0;try{await this.$api.auth.verifyCode(this.code),this.$store.dispatch("notification/success",this.$t("welcome")),"password-reset"===this.mode?this.$go("reset-password"):this.$reload()}catch(t){this.issue=t.message}finally{this.isLoadingLogin=!1}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{staticClass:"k-login-form k-login-code-form",on:{submit:function(e){return e.preventDefault(),t.login.apply(null,arguments)}}},[s("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?s("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),s("k-user-info",{attrs:{user:t.pending.email}}),s("k-text-field",{attrs:{autofocus:!0,counter:!1,help:t.$t("login.code.text."+t.pending.challenge),label:t.$t("login.code.label."+t.mode),novalidate:!0,placeholder:t.$t("login.code.placeholder."+t.pending.challenge),required:!0,autocomplete:"one-time-code",icon:"unlock",name:"code"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),s("div",{staticClass:"k-login-buttons"},[s("k-button",{staticClass:"k-login-button k-login-back-button",attrs:{icon:"angle-left"},on:{click:t.back}},[t._v(" "+t._s(t.$t("back"))+" "),t.isLoadingBack?[t._v(" … ")]:t._e()],2),s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("login"+("password-reset"===t.mode?".reset":"")))+" "),t.isLoadingLogin?[t._v(" … ")]:t._e()],2)],1)],1)}),[],!1,Ws,null,null,null);function Ws(t){for(let e in Gs)this[e]=Gs[e]}var Ys=function(){return Vs.exports}();const Xs={props:{accept:{type:String,default:"*"},attributes:{type:Object},max:{type:Number},method:{type:String,default:"POST"},multiple:{type:Boolean,default:!0},url:{type:String}},data(){return{options:this.$props,completed:{},errors:[],files:[],total:0}},computed:{limit(){return!1===this.options.multiple?1:this.options.max}},methods:{open(t){this.params(t),setTimeout((()=>{this.$refs.input.click()}),1)},params(t){this.options=Object.assign({},this.$props,t)},select(t){this.upload(t.target.files)},drop(t,e){this.params(e),this.upload(t)},upload(t){this.$refs.dialog.open(),this.files=[...t],this.completed={},this.errors=[],this.hasErrors=!1,this.limit&&(this.files=this.files.slice(0,this.limit)),this.total=this.files.length,this.files.forEach((t=>{this.$helper.upload(t,{url:this.options.url,attributes:this.options.attributes,method:this.options.method,headers:{"X-CSRF":window.panel.$system.csrf},progress:(t,e,s)=>{this.$refs[e.name]&&this.$refs[e.name][0]&&this.$refs[e.name][0].set(s)},success:(t,e,s)=>{this.complete(e,s.data)},error:(t,e,s)=>{this.errors.push({file:e,message:s.message}),this.complete(e,s.data)}})}))},complete(t,e){if(this.completed[t.name]=e,Object.keys(this.completed).length==this.total){if(this.$refs.input.value="",this.errors.length>0)return this.$forceUpdate(),void this.$emit("error",this.files);setTimeout((()=>{this.$refs.dialog.close(),this.$emit("success",this.files,Object.values(this.completed))}),250)}}}},Zs={};var Qs=zt(Xs,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-upload"},[s("input",{ref:"input",attrs:{accept:t.options.accept,multiple:t.options.multiple,"aria-hidden":"true",type:"file",tabindex:"-1"},on:{change:t.select,click:function(t){t.stopPropagation()}}}),s("k-dialog",{ref:"dialog",staticClass:"k-upload-dialog",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},scopedSlots:t._u([{key:"footer",fn:function(){return[t.errors.length>0?[s("k-button-group",{attrs:{buttons:[{icon:"check",text:t.$t("confirm"),click:function(){return t.$refs.dialog.close()}}]}})]:t._e()]},proxy:!0}])},[t.errors.length>0?[s("k-headline",[t._v(t._s(t.$t("upload.errors")))]),s("ul",{staticClass:"k-upload-error-list"},t._l(t.errors,(function(e,n){return s("li",{key:"error-"+n},[s("p",{staticClass:"k-upload-error-filename"},[t._v(" "+t._s(e.file.name)+" ")]),s("p",{staticClass:"k-upload-error-message"},[t._v(" "+t._s(e.message)+" ")])])})),0)]:[s("k-headline",[t._v(t._s(t.$t("upload.progress")))]),s("ul",{staticClass:"k-upload-list"},t._l(t.files,(function(e,n){return s("li",{key:"file-"+n},[s("k-progress",{ref:e.name,refInFor:!0}),s("p",{staticClass:"k-upload-list-filename"},[t._v(" "+t._s(e.name)+" ")]),s("p",[t._v(t._s(t.errors[e.name]))])],1)})),0)]],2)],1)}),[],!1,tn,null,null,null);function tn(t){for(let e in Zs)this[e]=Zs[e]}var en=function(){return Qs.exports}();var sn=t=>({$from:e})=>((t,e)=>{for(let s=t.depth;s>0;s--){const n=t.node(s);if(e(n))return{pos:s>0?t.before(s):0,start:t.start(s),depth:s,node:n}}})(e,t),nn=t=>e=>{if((t=>t instanceof y)(e)){const{node:s,$from:n}=e;if(((t,e)=>Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t)(t,s))return{node:s,pos:n.pos,depth:n.depth}}},on=(t,e,s={})=>{const n=nn(e)(t.selection)||sn((t=>t.type===e))(t.selection);return Object.keys(s).length&&n?n.node.hasMarkup(e,a(a({},n.node.attrs),s)):!!n};function rn(t=null,e=null){if(!t||!e)return!1;const s=t.parent.childAfter(t.parentOffset);if(!s.node)return!1;const n=s.node.marks.find((t=>t.type===e));if(!n)return!1;let i=t.index(),o=t.start()+s.offset,r=i+1,a=o+s.node.nodeSize;for(;i>0&&n.isInSet(t.parent.child(i-1).marks);)i-=1,o-=t.parent.child(i).nodeSize;for(;r{i=[...i,...t.marks]}));const o=i.find((t=>t.type.name===e.name));return o?o.attrs:{}},getNodeAttrs:function(t,e){const{from:s,to:n}=t.selection;let i=[];t.doc.nodesBetween(s,n,(t=>{i=[...i,t]}));const o=i.reverse().find((t=>t.type.name===e.name));return o?o.attrs:{}},markInputRule:function(t,e,s){return new g(t,((t,n,i,o)=>{const r=s instanceof Function?s(n):s,{tr:a}=t,l=n.length-1;let u=o,c=i;if(n[l]){const s=i+n[0].indexOf(n[l-1]),r=s+n[l-1].length-1,d=s+n[l-1].lastIndexOf(n[l]),p=d+n[l].length,h=function(t,e,s){let n=[];return s.doc.nodesBetween(t,e,((t,e)=>{n=[...n,...t.marks.map((s=>({start:e,end:e+t.nodeSize,mark:s})))]})),n}(i,o,t).filter((t=>{const{excluded:s}=t.mark.type;return s.find((t=>t.name===e.name))})).filter((t=>t.end>s));if(h.length)return!1;ps&&a.delete(s,d),c=s,u=c+n[l].length}return a.addMark(c,u,e.create(r)),a.removeStoredMark(e),a}))},markIsActive:function(t,e){const{from:s,$from:n,to:i,empty:o}=t.selection;return o?!!e.isInSet(t.storedMarks||n.marks()):!!t.doc.rangeHasMark(s,i,e)},markPasteRule:function(t,e,s){const n=(i,o)=>{const r=[];return i.forEach((i=>{if(i.isText){const{text:n,marks:a}=i;let l,u=0;const c=!!a.filter((t=>"link"===t.type.name))[0];for(;!c&&null!==(l=t.exec(n));)if(o&&o.type.allowsMarkType(e)&&l[1]){const t=l.index,n=t+l[0].length,o=t+l[0].indexOf(l[1]),a=o+l[1].length,c=s instanceof Function?s(l):s;t>0&&r.push(i.cut(u,t)),r.push(i.cut(o,a).mark(e.create(c).addToSet(i.marks))),u=n}unew v(n(t.content),t.openStart,t.openEnd)}})},minMax:function(t=0,e=0,s=0){return Math.min(Math.max(parseInt(t,10),e),s)},nodeIsActive:on,nodeInputRule:function(t,e,s){return new g(t,((t,n,i,o)=>{const r=s instanceof Function?s(n):s,{tr:a}=t;return n[0]&&a.replaceWith(i-1,o,e.create(r)),a}))},pasteRule:function(t,e,s){const n=i=>{const o=[];return i.forEach((i=>{if(i.isText){const{text:n}=i;let r,a=0;do{if(r=t.exec(n),r){const t=r.index,n=t+r[0].length,l=s instanceof Function?s(r[0]):s;t>0&&o.push(i.cut(a,t)),o.push(i.cut(t,n).mark(e.create(l).addToSet(i.marks))),a=n}}while(r);anew v(n(t.content),t.openStart,t.openEnd)}})},removeMark:function(t){return(e,s)=>{const{tr:n,selection:i}=e;let{from:o,to:r}=i;const{$from:a,empty:l}=i;if(l){const e=rn(a,t);o=e.from,r=e.to}return n.removeMark(o,r,t),s(n)}},toggleBlockType:function(t,e,s={}){return(n,i,o)=>on(n,t,s)?$(e)(n,i,o):$(t,s)(n,i,o)},toggleList:function(t,e){return(s,n,i)=>{const{schema:o,selection:r}=s,{$from:a,$to:l}=r,u=a.blockRange(l);if(!u)return!1;const c=sn((t=>an(t,o)))(r);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===t)return _(e)(s,n,i);if(an(c.node,o)&&t.validContent(c.node.content)){const{tr:e}=s;return e.setNodeMarkup(c.pos,t),n&&n(e),!1}}return w(t)(s,n,i)}},updateMark:function(t,e){return(s,n)=>{const{tr:i,selection:o,doc:r}=s,{ranges:a,empty:l}=o;if(l){const{from:s,to:n}=rn(o.$from,t);r.rangeHasMark(s,n,t)&&i.removeMark(s,n,t),i.addMark(s,n,t.create(e))}else a.forEach((s=>{const{$to:n,$from:o}=s;r.rangeHasMark(o.pos,n.pos,t)&&i.removeMark(o.pos,n.pos,t),i.addMark(o.pos,n.pos,t.create(e))}));return n(i)}}};class un{constructor(t=[],e){t.forEach((t=>{t.bindEditor(e),t.init()})),this.extensions=t}commands({schema:t,view:e}){return this.extensions.filter((t=>t.commands)).reduce(((s,n)=>{const{name:i,type:o}=n,r={},l=n.commands(a({schema:t,utils:ln},["node","mark"].includes(o)?{type:t[`${o}s`][i]}:{})),u=(t,s)=>{r[t]=t=>{if("function"!=typeof s||!e.editable)return!1;e.focus();const n=s(t);return"function"==typeof n?n(e.state,e.dispatch,e):n}};return"object"==typeof l?Object.entries(l).forEach((([t,e])=>{u(t,e)})):u(i,l),a(a({},s),r)}),{})}buttons(t="mark"){const e={};return this.extensions.filter((e=>e.type===t)).filter((t=>t.button)).forEach((t=>{Array.isArray(t.button)?t.button.forEach((t=>{e[t.id||t.name]=t})):e[t.name]=t.button})),e}getAllowedExtensions(t){return t instanceof Array||!t?t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions:[]}getFromExtensions(t,e,s=this.extensions){return s.filter((t=>["extension"].includes(t.type))).filter((e=>e[t])).map((s=>s[t](l(a({},e),{utils:ln}))))}getFromNodesAndMarks(t,e,s=this.extensions){return s.filter((t=>["node","mark"].includes(t.type))).filter((e=>e[t])).map((s=>s[t](l(a({},e),{type:e.schema[`${s.type}s`][s.name],utils:ln}))))}inputRules({schema:t,excludedExtensions:e}){const s=this.getAllowedExtensions(e);return[...this.getFromExtensions("inputRules",{schema:t},s),...this.getFromNodesAndMarks("inputRules",{schema:t},s)].reduce(((t,e)=>[...t,...e]),[])}keymaps({schema:t}){return[...this.getFromExtensions("keys",{schema:t}),...this.getFromNodesAndMarks("keys",{schema:t})].map((t=>I(t)))}get marks(){return this.extensions.filter((t=>"mark"===t.type)).reduce(((t,{name:e,schema:s})=>l(a({},t),{[e]:s})),{})}get nodes(){return this.extensions.filter((t=>"node"===t.type)).reduce(((t,{name:e,schema:s})=>l(a({},t),{[e]:s})),{})}get options(){const{view:t}=this;return this.extensions.reduce(((e,s)=>l(a({},e),{[s.name]:new Proxy(s.options,{set(e,s,n){const i=e[s]!==n;return Object.assign(e,{[s]:n}),i&&t.updateState(t.state),!0}})})),{})}pasteRules({schema:t,excludedExtensions:e}){const s=this.getAllowedExtensions(e);return[...this.getFromExtensions("pasteRules",{schema:t},s),...this.getFromNodesAndMarks("pasteRules",{schema:t},s)].reduce(((t,e)=>[...t,...e]),[])}plugins({schema:t}){return[...this.getFromExtensions("plugins",{schema:t}),...this.getFromNodesAndMarks("plugins",{schema:t})].reduce(((t,e)=>[...t,...e]),[]).map((t=>t instanceof k?t:new k(t)))}}class cn{constructor(t={}){this.options=a(a({},this.defaults),t)}init(){return null}bindEditor(t=null){this.editor=t}get name(){return null}get type(){return"extension"}get defaults(){return{}}plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class dn extends cn{constructor(t={}){super(t)}get type(){return"node"}get schema(){return null}commands(){return{}}}class pn extends dn{get defaults(){return{inline:!1}}get name(){return"doc"}get schema(){return{content:this.options.inline?"paragraph+":"block+"}}}class hn extends dn{get button(){return{id:this.name,icon:"paragraph",label:window.panel.$t("toolbar.button.paragraph"),name:this.name}}commands({utils:t,type:e}){return{paragraph:()=>t.setBlockType(e)}}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}get name(){return"paragraph"}}class fn extends dn{get name(){return"text"}get schema(){return{group:"inline"}}}class mn extends class{emit(t,...e){this._callbacks=this._callbacks||{};const s=this._callbacks[t];return s&&s.forEach((t=>t.apply(this,e))),this}off(t,e){if(arguments.length){const s=this._callbacks?this._callbacks[t]:null;s&&(e?this._callbacks[t]=s.filter((t=>t!==e)):delete this._callbacks[t])}else this._callbacks={};return this}on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]=this._callbacks[t]||[],this._callbacks[t].push(e),this}}{constructor(t={}){super(),this.defaults={autofocus:!1,content:"",disableInputRules:!1,disablePasteRules:!1,editable:!0,element:null,extensions:[],emptyDocument:{type:"doc",content:[]},events:{},inline:!1,parseOptions:{},topNode:"doc",useBuiltInExtensions:!0},this.init(t)}blur(){this.view.dom.blur()}get builtInExtensions(){return this.options.useBuiltInExtensions?[new pn({inline:this.options.inline}),new fn,new hn]:[]}buttons(t){return this.extensions.buttons(t)}clearContent(t=!1){this.setContent(this.options.emptyDocument,t)}command(t,...e){this.commands[t]&&this.commands[t](...e)}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createDocument(t,e=this.options.parseOptions){if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof t)try{return this.schema.nodeFromJSON(t)}catch(s){return window.console.warn("Invalid content.","Passed value:",t,"Error:",s),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof t){const s=`

${t}
`,n=(new window.DOMParser).parseFromString(s,"text/html").body.firstElementChild;return j.fromSchema(this.schema).parse(n,e)}return!1}createEvents(){const t=this.options.events||{};return Object.entries(t).forEach((([t,e])=>{this.on(t,e)})),t}createExtensions(){return new un([...this.builtInExtensions,...this.options.extensions],this)}createFocusEvents(){const t=(t,e,s=!0)=>{this.focused=s,this.emit(s?"focus":"blur",{event:e,state:t.state,view:t});const n=this.state.tr.setMeta("focused",s);this.view.dispatch(n)};return new k({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,s)=>{t(e,s,!0)},blur:(e,s)=>{t(e,s,!1)}}}})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createMarks(){return this.extensions.marks}createNodes(){return this.extensions.nodes}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createPlugins(){return this.extensions.plugins({schema:this.schema})}createSchema(){return new B({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return M.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,D({rules:this.inputRules}),...this.pasteRules,...this.keymaps,I({Backspace:F}),I(R),this.createFocusEvents()]})}createView(){return new P(this.element,{dispatchTransaction:this.dispatchTransaction.bind(this),editable:()=>this.options.editable,handlePaste:(t,e)=>{if("function"==typeof this.events.paste){const t=e.clipboardData.getData("text/html"),s=e.clipboardData.getData("text/plain");if(!0===this.events.paste(e,t,s))return!0}},handleDrop:(...t)=>{this.emit("drop",...t)},state:this.createState()})}destroy(){this.view&&this.view.destroy()}dispatchTransaction(t){const e=this.state,s=this.state.apply(t);this.view.updateState(s),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks();const n={editor:this,getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t};this.emit("transaction",n),!t.docChanged&&t.getMeta("preventUpdate")||this.emit("update",n);const{from:i,to:o}=this.state.selection,r=!e||!e.selection.eq(s.selection);this.emit(s.selection.empty?"deselect":"select",l(a({},n),{from:i,hasChanged:r,to:o}))}focus(t=null){if(this.view.focused&&null===t||!1===t)return;const{from:e,to:s}=this.selectionAtPosition(t);this.setSelection(e,s),setTimeout((()=>this.view.focus()),10)}getHTML(){const t=document.createElement("div"),e=N.fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),this.options.inline&&t.querySelector("p")?t.querySelector("p").innerHTML:t.innerHTML}getJSON(){return this.state.doc.toJSON()}getMarkAttrs(t=null){return this.activeMarkAttrs[t]}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.nodes,marks:this.marks}))}init(t={}){this.options=a(a({},this.defaults),t),this.element=this.options.element,this.focused=!1,this.selection={from:0,to:0},this.events=this.createEvents(),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.plugins=this.createPlugins(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),!1!==this.options.autofocus&&this.focus(this.options.autofocus),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}isEditable(){return this.options.editable}isEmpty(){if(this.state)return 0===this.state.doc.textContent.length}get isActive(){return Object.entries(a(a({},this.activeMarks),this.activeNodes)).reduce(((t,[e,s])=>l(a({},t),{[e]:(t={})=>s(t)})),{})}removeMark(t){if(this.schema.marks[t])return ln.removeMark(this.schema.marks[t])(this.state,this.view.dispatch)}selectionAtPosition(t=null){if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){const{doc:t}=this.state;return{from:t.content.size,to:t.content.size}}return{from:t,to:t}}setActiveNodesAndMarks(){this.activeMarks=Object.values(this.schema.marks).filter((t=>ln.markIsActive(this.state,t))).map((t=>t.name)),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce(((t,[e,s])=>l(a({},t),{[e]:ln.getMarkAttrs(this.state,s)})),{}),this.activeNodes=Object.values(this.schema.nodes).filter((t=>ln.nodeIsActive(this.state,t))).map((t=>t.name)),this.activeNodeAttrs=Object.entries(this.schema.nodes).reduce(((t,[e,s])=>l(a({},t),{[e]:ln.getNodeAttrs(this.state,s)})),{})}setContent(t={},e=!1,s){const{doc:n,tr:i}=this.state,o=this.createDocument(t,s),r=q.create(n,0,n.content.size),a=i.setSelection(r).replaceSelectionWith(o,!1).setMeta("preventUpdate",!e);this.view.dispatch(a)}setSelection(t=0,e=0){const{doc:s,tr:n}=this.state,i=ln.minMax(t,0,s.content.size),o=ln.minMax(e,0,s.content.size),r=q.create(s,i,o),a=n.setSelection(r);this.view.dispatch(a)}get state(){return this.view?this.view.state:null}toggleMark(t){if(this.schema.marks[t])return ln.toggleMark(this.schema.marks[t])(this.state,this.view.dispatch)}updateMark(t,e){if(this.schema.marks[t])return ln.updateMark(this.schema.marks[t],e)(this.state,this.view.dispatch)}}const gn={};var kn=zt({data:()=>({link:{href:null,title:null,target:!1}}),computed:{fields(){return{href:{label:this.$t("url"),type:"text",icon:"url"},title:{label:this.$t("title"),type:"text",icon:"title"},target:{label:this.$t("open.newWindow"),type:"toggle",text:[this.$t("no"),this.$t("yes")]}}}},methods:{open(t){this.link=a({title:null,target:!1},t),this.link.target=Boolean(this.link.target),this.$refs.dialog.open()},submit(){this.$emit("submit",l(a({},this.link),{target:this.link.target?"_blank":null})),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.link,callback:function(e){t.link=e},expression:"link"}})}),[],!1,vn,null,null,null);function vn(t){for(let e in gn)this[e]=gn[e]}var bn=function(){return kn.exports}();const yn={};var $n=zt({data:()=>({email:{email:null,title:null}}),computed:{fields(){return{href:{label:this.$t("email"),type:"email",icon:"email"},title:{label:this.$t("title"),type:"text",icon:"title"}}}},methods:{open(t){this.email=a({title:null},t),this.$refs.dialog.open()},submit(){this.$emit("submit",this.email),this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-form-dialog",{ref:"dialog",attrs:{fields:t.fields,"submit-button":t.$t("confirm"),size:"medium"},on:{close:function(e){return t.$emit("close")},submit:t.submit},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})}),[],!1,_n,null,null,null);function _n(t){for(let e in yn)this[e]=yn[e]}var wn=function(){return $n.exports}();class xn extends cn{constructor(t={}){super(t)}command(){return()=>{}}remove(){this.editor.removeMark(this.name)}get schema(){return null}get type(){return"mark"}toggle(){return this.editor.toggleMark(this.name)}update(t){this.editor.updateMark(this.name,t)}}class Sn extends xn{get button(){return{icon:"code",label:window.panel.$t("toolbar.button.code")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:`)([^`]+)(?:`)$/,t)]}keys(){return{"Mod-`":()=>this.toggle()}}get name(){return"code"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:`)([^`]+)(?:`)/g,t)]}get schema(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}}class Cn extends xn{get button(){return{icon:"bold",label:window.panel.$t("toolbar.button.bold")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}keys(){return{"Mod-b":()=>this.toggle()}}get name(){return"bold"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong",0]}}}class On extends xn{get button(){return{icon:"italic",label:window.panel.$t("toolbar.button.italic")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/(?:^|[^_])(_([^_]+)_)$/,t),e.markInputRule(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}keys(){return{"Mod-i":()=>this.toggle()}}get name(){return"italic"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/_([^_]+)_/g,t),e.markPasteRule(/\*([^*]+)\*/g,t)]}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}}class En extends xn{get button(){return{icon:"url",label:window.panel.$t("toolbar.button.link")}}commands(){return{link:()=>{this.editor.emit("link",this.editor)},insertLink:(t={})=>{if(t.href)return this.update(t)},removeLink:()=>this.remove(),toggleLink:(t={})=>{t.href&&t.href.length>0?this.editor.command("insertLink",t):this.editor.command("removeLink")}}}get defaults(){return{target:null}}get name(){return"link"}pasteRules({type:t,utils:e}){return[e.pasteRule(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,]*)/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,s)=>{const n=this.editor.getMarkAttrs("link");n.href&&!0===s.altKey&&s.target instanceof HTMLAnchorElement&&(s.stopPropagation(),window.open(n.href,n.target))}}}]}get schema(){return{attrs:{href:{default:null},target:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]:not([href^='mailto:'])",getAttrs:t=>({href:t.getAttribute("href"),target:t.getAttribute("target"),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{rel:"noopener noreferrer"}),0]}}}class Tn extends xn{get button(){return{icon:"email",label:"Email"}}commands(){return{email:()=>{this.editor.emit("email")},insertEmail:(t={})=>{if(t.href)return this.update(t)},removeEmail:()=>this.remove(),toggleEmail:(t={})=>{t.href&&t.href.length>0?this.editor.command("insertEmail",t):this.editor.command("removeEmail")}}}get defaults(){return{target:null}}get name(){return"email"}pasteRules({type:t,utils:e}){return[e.pasteRule(/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/gi,t,(t=>({href:t})))]}plugins(){return[{props:{handleClick:(t,e,s)=>{const n=this.editor.getMarkAttrs("email");n.href&&!0===s.altKey&&s.target instanceof HTMLAnchorElement&&(s.stopPropagation(),window.open(n.href))}}}]}get schema(){return{attrs:{href:{default:null},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href^='mailto:']",getAttrs:t=>({href:t.getAttribute("href").replace("mailto:",""),title:t.getAttribute("title")})}],toDOM:t=>["a",l(a({},t.attrs),{href:"mailto:"+t.attrs.href}),0]}}}class An extends xn{get button(){return{icon:"strikethrough",label:window.panel.$t("toolbar.button.strike")}}commands(){return()=>this.toggle()}inputRules({type:t,utils:e}){return[e.markInputRule(/~([^~]+)~$/,t)]}keys(){return{"Mod-d":()=>this.toggle()}}get name(){return"strike"}pasteRules({type:t,utils:e}){return[e.markPasteRule(/~([^~]+)~/g,t)]}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:t=>"line-through"===t}],toDOM:()=>["s",0]}}}class Ln extends xn{get button(){return{icon:"underline",label:window.panel.$t("toolbar.button.underline")}}commands(){return()=>this.toggle()}keys(){return{"Mod-u":()=>this.toggle()}}get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:t=>"underline"===t}],toDOM:()=>["u",0]}}}class In extends dn{get button(){return{id:this.name,icon:"list-bullet",label:window.panel.$t("toolbar.button.ul"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:s}){return()=>s.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^\s*([-+*])\s$/,t)]}keys({type:t,schema:e,utils:s}){return{"Shift-Ctrl-8":s.toggleList(t,e.nodes.listItem)}}get name(){return"bulletList"}get schema(){return{content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}}class jn extends dn{commands({utils:t,type:e}){return()=>this.createHardBreak(t,e)}createHardBreak(t,e){return t.chainCommands(t.exitCode,((t,s)=>(s(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)))}get defaults(){return{enter:!1,text:!1}}keys({utils:t,type:e}){const s=this.createHardBreak(t,e);let n={"Mod-Enter":s,"Shift-Enter":s};return this.options.enter&&(n.Enter=s),n}get name(){return"hardBreak"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}}class Bn extends dn{get button(){return this.options.levels.map((t=>({id:`h${t}`,command:`h${t}`,icon:`h${t}`,label:window.panel.$t("toolbar.button.heading."+t),attrs:{level:t},name:this.name,when:["heading","paragraph"]})))}commands({type:t,schema:e,utils:s}){let n={toggleHeading:n=>s.toggleBlockType(t,e.nodes.paragraph,n)};return this.options.levels.forEach((i=>{n[`h${i}`]=()=>s.toggleBlockType(t,e.nodes.paragraph,{level:i})})),n}get defaults(){return{levels:[1,2,3,4,5,6]}}inputRules({type:t,utils:e}){return this.options.levels.map((s=>e.textblockTypeInputRule(new RegExp(`^(#{1,${s}})\\s$`),t,(()=>({level:s})))))}keys({type:t,utils:e}){return this.options.levels.reduce(((s,n)=>a(a({},s),{[`Shift-Ctrl-${n}`]:e.setBlockType(t,{level:n})})),{})}get name(){return"heading"}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}}))),toDOM:t=>[`h${t.attrs.level}`,0]}}}class Mn extends dn{commands({type:t}){return()=>(e,s)=>s(e.tr.replaceSelectionWith(t.create()))}inputRules({type:t,utils:e}){return[e.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,t)]}get name(){return"horizontalRule"}get schema(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}}class Dn extends dn{keys({type:t,utils:e}){return{Enter:e.splitListItem(t),"Shift-Tab":e.liftListItem(t),Tab:e.sinkListItem(t)}}get name(){return"listItem"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}}class Pn extends dn{get button(){return{id:this.name,icon:"list-numbers",label:window.panel.$t("toolbar.button.ol"),name:this.name,when:["listItem","bulletList","orderedList"]}}commands({type:t,schema:e,utils:s}){return()=>s.toggleList(t,e.nodes.listItem)}inputRules({type:t,utils:e}){return[e.wrappingInputRule(/^(\d+)\.\s$/,t,(t=>({order:+t[1]})),((t,e)=>e.childCount+e.attrs.order===+t[1]))]}keys({type:t,schema:e,utils:s}){return{"Shift-Ctrl-9":s.toggleList(t,e.nodes.listItem)}}get name(){return"orderedList"}get schema(){return{attrs:{order:{default:1}},content:"listItem+",group:"block",parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]}}}class Nn extends cn{commands(){return{undo:()=>z,redo:()=>H,undoDepth:()=>U,redoDepth:()=>K}}get defaults(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":z,"Mod-y":H,"Shift-Mod-z":H,"Mod-я":z,"Shift-Mod-я":H}}get name(){return"history"}plugins(){return[J({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}class qn extends cn{commands(){return{insertHtml:t=>(e,s)=>{let n=document.createElement("div");n.innerHTML=t.trim();const i=j.fromSchema(e.schema).parse(n);s(e.tr.replaceSelectionWith(i).scrollIntoView())}}}}class Fn extends cn{constructor(t={}){super(t)}close(){this.visible=!1,this.emit()}emit(){this.editor.emit("toolbar",{marks:this.marks,nodes:this.nodes,nodeAttrs:this.nodeAttrs,position:this.position,visible:this.visible})}init(){this.position={left:0,bottom:0},this.visible=!1,this.editor.on("blur",(()=>{this.close()})),this.editor.on("deselect",(()=>{this.close()})),this.editor.on("select",(({hasChanged:t})=>{!1!==t?this.open():this.emit()}))}get marks(){return this.editor.activeMarks}get nodes(){return this.editor.activeNodes}get nodeAttrs(){return this.editor.activeNodeAttrs}open(){this.visible=!0,this.reposition(),this.emit()}reposition(){const{from:t,to:e}=this.editor.selection,s=this.editor.view.coordsAtPos(t),n=this.editor.view.coordsAtPos(e,!0),i=this.editor.element.getBoundingClientRect();let o=(s.left+n.left)/2-i.left,r=Math.round(i.bottom-s.top);return this.position={bottom:r,left:o}}get type(){return"toolbar"}}const Rn={props:{activeMarks:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},activeNodeAttrs:{type:[Array,Object],default:()=>[]},editor:{type:Object,required:!0},marks:{type:Array},isParagraphNodeHidden:{type:Boolean,default:!1}},computed:{activeButton(){return Object.values(this.nodeButtons).find((t=>this.isButtonActive(t)))||!1},hasVisibleButtons(){const t=Object.keys(this.nodeButtons);return t.length>1||1===t.length&&!1===t.includes("paragraph")},markButtons(){return this.buttons("mark")},nodeButtons(){let t=this.buttons("node");return!0===this.isParagraphNodeHidden&&t.paragraph&&delete t.paragraph,t}},methods:{buttons(t){const e=this.editor.buttons(t);let s=this.sorting;!1!==s&&!1!==Array.isArray(s)||(s=Object.keys(e));let n={};return s.forEach((t=>{e[t]&&(n[t]=e[t])})),n},command(t,...e){this.$emit("command",t,...e)},isButtonActive(t){if("paragraph"===t.name)return 1===this.activeNodes.length&&this.activeNodes.includes(t.name);let e=!0;if(t.attrs){const s=Object.values(this.activeNodeAttrs).find((e=>JSON.stringify(e)===JSON.stringify(t.attrs)));e=Boolean(s||!1)}return!0===e&&this.activeNodes.includes(t.name)},isButtonCurrent(t){return!!this.activeButton&&this.activeButton.id===t.id},isButtonDisabled(t){if(this.activeButton&&this.activeButton.when){return!1===this.activeButton.when.includes(t.name)}return!1},needDividerAfterNode(t){let e=["paragraph"],s=Object.keys(this.nodeButtons);return(s.includes("bulletList")||s.includes("orderedList"))&&e.push("h6"),e.includes(t.id)}}},zn={};var Hn=zt(Rn,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-writer-toolbar"},[t.hasVisibleButtons?s("k-dropdown",{nativeOn:{mousedown:function(t){t.preventDefault()}}},[s("k-button",{class:{"k-writer-toolbar-button k-writer-toolbar-nodes":!0,"k-writer-toolbar-button-active":!!t.activeButton},attrs:{icon:t.activeButton.icon||"title"},on:{click:function(e){return t.$refs.nodes.toggle()}}}),s("k-dropdown-content",{ref:"nodes"},[t._l(t.nodeButtons,(function(e,n){return[s("k-dropdown-item",{key:n,attrs:{current:t.isButtonCurrent(e),disabled:t.isButtonDisabled(e),icon:e.icon},on:{click:function(s){return t.command(e.command||n)}}},[t._v(" "+t._s(e.label)+" ")]),t.needDividerAfterNode(e)?s("hr",{key:n+"-divider"}):t._e()]}))],2)],1):t._e(),t._l(t.markButtons,(function(e,n){return s("k-button",{key:n,class:{"k-writer-toolbar-button":!0,"k-writer-toolbar-button-active":t.activeMarks.includes(n)},attrs:{icon:e.icon,tooltip:e.label},on:{mousedown:function(s){return s.preventDefault(),t.command(e.command||n)}}})}))],2)}),[],!1,Un,null,null,null);function Un(t){for(let e in zn)this[e]=zn[e]}const Kn={props:{autofocus:Boolean,breaks:Boolean,code:Boolean,disabled:Boolean,emptyDocument:{type:Object,default:()=>({type:"doc",content:[]})},headings:[Array,Boolean],inline:{type:Boolean,default:!1},marks:{type:[Array,Boolean],default:!0},nodes:{type:[Array,Boolean],default:()=>["heading","bulletList","orderedList"]},paste:{type:Function,default:()=>()=>!1},placeholder:String,spellcheck:Boolean,extensions:Array,value:{type:String,default:""}}},Jn={};var Gn=zt({components:{"k-writer-email-dialog":wn,"k-writer-link-dialog":bn,"k-writer-toolbar":function(){return Hn.exports}()},mixins:[Kn],data(){return{editor:null,json:{},html:this.value,isEmpty:!0,toolbar:!1}},computed:{isParagraphNodeHidden(){return!0===Array.isArray(this.nodes)&&3!==this.nodes.length&&!1===this.nodes.includes("paragraph")}},watch:{value(t,e){t!==e&&t!==this.html&&(this.html=t,this.editor.setContent(this.html))}},mounted(){this.editor=new mn({autofocus:this.autofocus,content:this.value,editable:!this.disabled,element:this.$el,emptyDocument:this.emptyDocument,events:{link:t=>{this.$refs.linkDialog.open(t.getMarkAttrs("link"))},email:()=>{this.$refs.emailDialog.open(this.editor.getMarkAttrs("email"))},paste:this.paste,toolbar:t=>{this.toolbar=t,this.toolbar.visible&&this.$nextTick((()=>{this.onToolbarOpen()}))},update:t=>{const e=JSON.stringify(this.editor.getJSON());e!==JSON.stringify(this.json)&&(this.json=e,this.isEmpty=t.editor.isEmpty(),this.isEmpty&&(0===t.editor.activeNodes.length||t.editor.activeNodes.includes("paragraph"))&&(this.html=""),this.html=t.editor.getHTML(),this.$emit("input",this.html))}},extensions:[...this.createMarks(),...this.createNodes(),new Nn,new qn,new Fn,...this.extensions||[]],inline:this.inline}),this.isEmpty=this.editor.isEmpty(),this.json=this.editor.getJSON()},beforeDestroy(){this.editor.destroy()},methods:{filterExtensions(t,e,s){!1===e?e=[]:!0!==e&&!1!==Array.isArray(e)||(e=Object.keys(t));let n=[];return e.forEach((e=>{t[e]&&n.push(t[e])})),"function"==typeof s&&(n=s(e,n)),n},command(t,...e){this.editor.command(t,...e)},createMarks(){return this.filterExtensions({bold:new Cn,italic:new On,strike:new An,underline:new Ln,code:new Sn,link:new En,email:new Tn},this.marks)},createNodes(){const t=new jn({text:!0,enter:this.inline});return!0===this.inline?[t]:this.filterExtensions({bulletList:new In,orderedList:new Pn,heading:new Bn,horizontalRule:new Mn,listItem:new Dn},this.nodes,((e,s)=>((e.includes("bulletList")||e.includes("orderedList"))&&s.push(new Dn),s.push(t),s)))},getHTML(){return this.editor.getHTML()},focus(){this.editor.focus()},onToolbarOpen(){if(this.$refs.toolbar){const t=this.$el.clientWidth,e=this.$refs.toolbar.$el.clientWidth;let s=this.toolbar.position.left;s-e/2<0&&(s=s+(e/2-s)-20),s+e/2>t&&(s=s-(s+e/2-t)+20),s!==this.toolbar.position.left&&(this.$refs.toolbar.$el.style.left=s+"px")}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"direction",rawName:"v-direction"}],ref:"editor",staticClass:"k-writer",attrs:{"data-empty":t.isEmpty,"data-placeholder":t.placeholder,spellcheck:t.spellcheck}},[t.editor?[t.toolbar.visible?s("k-writer-toolbar",{ref:"toolbar",style:{bottom:t.toolbar.position.bottom+"px","inset-inline-start":t.toolbar.position.left+"px"},attrs:{editor:t.editor,"active-marks":t.toolbar.marks,"active-nodes":t.toolbar.nodes,"active-node-attrs":t.toolbar.nodeAttrs,"is-paragraph-node-hidden":t.isParagraphNodeHidden},on:{command:function(e){return t.editor.command(e)}}}):t._e(),s("k-writer-link-dialog",{ref:"linkDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleLink",e)}}}),s("k-writer-email-dialog",{ref:"emailDialog",on:{close:function(e){return t.editor.focus()},submit:function(e){return t.editor.command("toggleEmail",e)}}})]:t._e()],2)}),[],!1,Vn,null,null,null);function Vn(t){for(let e in Jn)this[e]=Jn[e]}var Wn=function(){return Gn.exports}();const Yn={};var Xn=zt({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-login-alert",on:{click:function(e){return t.$emit("click")}}},[s("span",[t._t("default")],2),s("k-icon",{attrs:{type:"alert"}})],1)}),[],!1,Zn,null,null,null);function Zn(t){for(let e in Yn)this[e]=Yn[e]}var Qn=function(){return Xn.exports}();const ti={mixins:[bs,$s,ws,Ss,Os],inheritAttrs:!1,props:{value:Boolean},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onChange(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||G.required}}}},ei={};var si=zt(ti,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-checkbox-input",on:{click:function(t){t.stopPropagation()}}},[s("input",{ref:"input",staticClass:"k-checkbox-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onChange(e.target.checked)}}}),s("span",{staticClass:"k-checkbox-input-icon",attrs:{"aria-hidden":"true"}},[s("svg",{attrs:{width:"12",height:"10",viewBox:"0 0 12 10",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{d:"M1 5l3.3 3L11 1","stroke-width":"2",fill:"none","fill-rule":"evenodd"}})])]),s("span",{staticClass:"k-checkbox-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,ni,null,null,null);function ni(t){for(let e in ei)this[e]=ei[e]}var ii=function(){return si.exports}();const oi={mixins:[bs,$s,ws,Os],props:{columns:Number,max:Number,min:Number,options:Array,value:{type:[Array,Object],default:()=>[]}}},ri={};var ai=zt({mixins:[oi],inheritAttrs:!1,data(){return{selected:this.valueToArray(this.value)}},watch:{value(t){this.selected=this.valueToArray(t)},selected(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t,e){if(!0===e)this.selected.push(t);else{const e=this.selected.indexOf(t);-1!==e&&this.selected.splice(e,1)}this.$emit("input",this.selected)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()},valueToArray:t=>!0===Array.isArray(t)?t:"string"==typeof t?String(t).split(","):"object"==typeof t?Object.values(t):void 0},validations(){return{selected:{required:!this.required||G.required,min:!this.min||G.minLength(this.min),max:!this.max||G.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"k-checkboxes-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,n){return s("li",{key:n},[s("k-checkbox-input",{attrs:{id:t.id+"-"+n,label:e.text,value:-1!==t.selected.indexOf(e.value)},on:{input:function(s){return t.onInput(e.value,s)}}})],1)})),0)}),[],!1,li,null,null,null);function li(t){for(let e in ri)this[e]=ri[e]}var ui=function(){return ai.exports}();const ci={mixins:[bs,$s,ws,Os],props:{display:{type:String,default:"DD.MM.YYYY"},max:String,min:String,step:{type:Object,default:()=>({size:1,unit:"day"})},type:{type:String,default:"date"},value:String}},di={};var pi=zt({mixins:[ci],inheritAttrs:!1,data(){return{input:this.toFormat(this.value),selected:null}},computed:{map:()=>({day:["D","DD"],month:["M","MM","MMM","MMMM"],year:["YY","YYYY"]}),parsed(){if(this.input)for(let t=0;t[t])):n.forEach((t=>{s=s.concat(e.map((e=>e.concat([t]))))})),t=t.concat(s),e=s,s=[]}}return t.map((t=>t.join(this.separator))).reverse()},separator(){return this.display.match(/[\W]/)[0]},tokens(){return this.display.split(/\W/)}},watch:{value(t){this.input=this.toFormat(t),this.onInvalid()}},mounted(){this.onInvalid()},methods:{emit(t){const e=this.toFormat(this.parsed,"YYYY-MM-DD HH:mm:ss")||"";this.$emit(t,e)},focus(){this.$refs.input.focus()},manipulate(t){let e;if(this.parsed){let s=this.step.unit,n=this.step.size;if(this.selected=this.toCursorIndex(),null!==this.selected){const e=this.tokens[this.selected];"a"===e.toLowerCase()?(s="hour",n=12,t="pm"===this.parts[this.selected]?"subtract":"add"):(s=this.toUnit(e),s!==this.step.unit&&(n=1))}e=this.parsed.clone()[t](n,s)}else e=this.toNearest(this.$library.dayjs()),this.selected=this.toIndex();this.input=this.toFormat(e),this.emit("update"),this.$nextTick((()=>{this.select()}))},onBlur(){this.parsed||(this.input=null),this.selected=null,this.emit("update")},onDown(){this.manipulate("subtract")},onEnter(){this.onBlur(),this.emit("enter")},onInput(){this.emit("input")},onInvalid(t,e){this.$emit("invalid",t||this.$v.$invalid,e||this.$v)},onTab(t){const e=this.toCursorIndex();null===this.selected?this.selected=e||0:e!==this.selected?this.selected=e:this.selected++,this.selected>=this.parts.length?this.selected=null:(t.preventDefault(),t.stopPropagation(),this.select())},onUp(){this.manipulate("add")},select(){if(null!==this.selected){const t=this.toRange(this.selected);this.selected>0&&t.start++,this.$refs.input.$refs.input.setSelectionRange(t.start,t.end)}},toCursorIndex(){if(0===this.$refs.input.$refs.input.selectionStart&&this.$refs.input.$refs.input.selectionEnd===String(this.input).length)return null;for(let t=0;t=this.$refs.input.$refs.input.selectionEnd)return t}},toDatetime(t){return this.$library.dayjs.utc(t)},toFormat(t,e=this.display){return t?("string"==typeof t&&(t=this.toDatetime(t)),!1===t.isValid()?null:this.toNearest(t).format(e)):null},toNearest(t,e=this.step.unit,s=this.step.size){"day"===e&&(e="date");const n=t.get(e),i=Math.round(n/s)*s;return t.set(e,i).startOf(e)},toIndex(t=this.step.unit){const e=this.map[t];for(let s=0;se.includes(t)))[0]},toUnit(t,e=!0){const s=Object.keys(this.map);let n=Object.values(this.map).findIndex((e=>e.includes(t)));const i=this.step.unit;return!0===e&&nthis.$helper.validate.datetime(this,t,this.min,"isAfter",this.step.unit)),max:!this.max||(t=>this.$helper.validate.datetime(this,t,this.max,"isBefore",this.step.unit)),required:!this.required||G.required}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-text-input",t._b({ref:"input",class:"k-"+t.type+"-input",attrs:{placeholder:t.display,spellcheck:!1,type:"text"},on:{blur:t.onBlur,input:t.onInput,invalid:t.onInvalid,focus:function(e){return t.$emit("focus")},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),e.preventDefault(),t.onDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),e.preventDefault(),t.onUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab.apply(null,arguments)}]},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}},"k-text-input",t.$props,!1))}),[],!1,hi,null,null,null);function hi(t){for(let e in di)this[e]=di[e]}var fi=function(){return pi.exports}();const mi={mixins:[ci],props:{time:{type:[Boolean,Object],default:()=>({})},value:String}},gi={};var ki=zt({mixins:[mi],inheritAttrs:!1,data(){return{input:this.toDatetime(this.value)}},computed:{dateOptions(){return{autofocus:this.autofocus,disabled:this.disabled,display:this.display,id:this.id,required:this.required,value:this.value}},timeOptions(){return l(a({},this.time),{disabled:this.disabled,required:this.required,value:this.value?this.toDatetime(this.value).format("HH:mm:ss"):null})}},watch:{value(){this.input=this.toDatetime(this.value),this.onInvalid()}},mounted(){this.onInvalid()},methods:{emit(t,e=this.input){e?this.$emit(t,e.format("YYYY-MM-DD HH:mm:ss")):this.$emit(t,"")},focus(){this.$refs.dateInput.focus()},onUpdate(t,e){const s=this.toDatetime(this.value);e=this.toDatetime(t,e,s),this.emit("update",e)},onEnter(t,e){this.onUpdate(e,t),this.emit("enter")},onInput(t,e){this.input=this.toDatetime(t,e,this.input),this.emit("input")},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},toDatetime(t,e,s){if(!t)return null;let n=this.$library.dayjs.utc(t);return"time"===e&&(n=this.$library.dayjs.utc(t,"HH:mm:ss")),!1===n.isValid()?null:e&&s?"date"===e?s.clone().utc().set("year",n.get("year")).set("month",n.get("month")).set("date",n.get("date")):"time"===e?s.clone().utc().set("hour",n.get("hour")).set("minute",n.get("minute")).set("second",n.get("second")):void 0:n}},validations(){return{value:{min:!this.min||(t=>this.$helper.validate.datetime(this,t,this.min,"isAfter",this.step.unit)),max:!this.max||(t=>this.$helper.validate.datetime(this,t,this.max,"isBefore",this.step.unit)),required:!this.required||G.required}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-datetime-input"},[s("k-date-input",t._b({ref:"dateInput",on:{input:function(e){return t.onInput(e,"date")},update:function(e){return t.onUpdate(e,"date")},enter:function(e){return t.onEnter(e,"date")},focus:function(e){return t.$emit("focus")}}},"k-date-input",t.dateOptions,!1)),t.time?[s("k-time-input",t._b({ref:"timeInput",on:{input:function(e){return t.onInput(e,"time")},update:function(e){return t.onUpdate(e,"time")},enter:function(e){return t.onEnter(e,"time")},focus:function(e){return t.$emit("focus")}}},"k-time-input",t.timeOptions,!1))]:t._e()],2)}),[],!1,vi,null,null,null);function vi(t){for(let e in gi)this[e]=gi[e]}var bi=function(){return ki.exports}();const yi={mixins:[bs,$s,ws,Cs,Os],props:{autocomplete:{type:[Boolean,String],default:"off"},maxlength:Number,minlength:Number,pattern:String,placeholder:String,preselect:Boolean,spellcheck:{type:[Boolean,String],default:"off"},type:{type:String,default:"text"},value:String}},$i={};var _i=zt({mixins:[yi],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||G.required,minLength:!this.minlength||G.minLength(this.minlength),maxLength:!this.maxlength||G.maxLength(this.maxlength),email:"email"!==this.type||G.email,url:"url"!==this.type||G.url,pattern:!this.pattern||(t=>!this.required&&!t||!this.$refs.input.validity.patternMismatch)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input"},"input",{autocomplete:t.autocomplete,autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,type:t.type,value:t.value},!1),t.listeners))}),[],!1,wi,null,null,null);function wi(t){for(let e in $i)this[e]=$i[e]}var xi=function(){return _i.exports}();const Si={mixins:[yi],props:{autocomplete:{type:String,default:"email"},placeholder:{type:String,default:()=>window.panel.$t("email.placeholder")},type:{type:String,default:"email"}}};const Ci={};var Oi=zt({extends:xi,mixins:[Si]},undefined,undefined,!1,Ei,null,null,null);function Ei(t){for(let e in Ci)this[e]=Ci[e]}var Ti=function(){return Oi.exports}();class Ai extends pn{get schema(){return{content:"bulletList|orderedList"}}}const Li={inheritAttrs:!1,props:{autofocus:Boolean,marks:{type:[Array,Boolean],default:!0},value:String},data(){return{list:this.value,html:this.value}},computed:{extensions:()=>[new Ai({inline:!0})]},watch:{value(t){t!==this.html&&(this.list=t,this.html=t)}},methods:{focus(){this.$refs.input.focus()},onInput(t){let e=(new DOMParser).parseFromString(t,"text/html").querySelector("ul, ol");e&&0!==e.textContent.trim().length?(this.list=t,this.html=t.replace(/(

|<\/p>)/gi,""),this.$emit("input",this.html)):this.$emit("input",this.list="")}}},Ii={};var ji=zt(Li,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",t._b({ref:"input",staticClass:"k-list-input",attrs:{extensions:t.extensions,nodes:["bulletList","orderedList"],value:t.list},on:{input:t.onInput}},"k-writer",t.$props,!1))}),[],!1,Bi,null,null,null);function Bi(t){for(let e in Ii)this[e]=Ii[e]}var Mi=function(){return ji.exports}();const Di={mixins:[$s,ws,Os],props:{max:Number,min:Number,layout:String,options:{type:Array,default:()=>[]},search:[Object,Boolean],separator:{type:String,default:","},sort:Boolean,value:{type:Array,required:!0,default:()=>[]}}},Pi={};var Ni=zt({mixins:[Di],inheritAttrs:!1,data(){return{state:this.value,q:null,limit:!0,scrollTop:0}},computed:{draggable(){return this.state.length>1&&!this.sort},dragOptions(){return{disabled:!this.draggable,draggable:".k-tag",delay:1}},emptyLabel(){return this.q?this.$t("search.results.none"):this.$t("options.none")},filtered(){return this.q&&this.q.length>=(this.search.min||0)?this.options.filter((t=>this.isFiltered(t))).map((t=>l(a({},t),{display:this.toHighlightedString(t.text),info:this.toHighlightedString(t.value)}))):this.options.map((t=>l(a({},t),{display:t.text,info:t.value})))},more(){return!this.max||this.state.lengththis.options.findIndex((e=>e.value===t.value));return t.sort(((t,s)=>e(t)-e(s)))},visible(){return this.limit?this.filtered.slice(0,this.search.display||this.filtered.length):this.filtered}},watch:{value(t){this.state=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$events.$on("click",this.close),this.$events.$on("keydown.cmd.s",this.close)},destroyed(){this.$events.$off("click",this.close),this.$events.$off("keydown.cmd.s",this.close)},methods:{add(t){!0===this.more&&(this.state.push(t),this.onInput())},blur(){this.close()},close(){!0===this.$refs.dropdown.isOpen&&(this.$refs.dropdown.close(),this.limit=!0)},escape(){this.q?this.q=null:this.close()},focus(){this.$refs.dropdown.open()},index(t){return this.state.findIndex((e=>e.value===t.value))},isFiltered(t){return String(t.text).match(this.regex)||String(t.value).match(this.regex)},isSelected(t){return-1!==this.index(t)},navigate(t){let e=document.activeElement;switch(t){case"prev":e&&e.previousSibling&&e.previousSibling.focus&&e.previousSibling.focus();break;case"next":e&&e.nextSibling&&e.nextSibling.focus&&e.nextSibling.focus()}},onClose(){!1===this.$refs.dropdown.isOpen&&(document.activeElement===this.$parent.$el&&(this.q=null),this.$parent.$el.focus())},onInput(){this.$emit("input",this.sorted)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOpen(){this.$nextTick((()=>{this.$refs.search&&this.$refs.search.focus&&this.$refs.search.focus(),this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop=this.scrollTop}))},remove(t){this.state.splice(this.index(t),1),this.onInput()},select(t){this.scrollTop=this.$refs.dropdown.$el.querySelector(".k-multiselect-options").scrollTop,t={text:t.text,value:t.value},this.isSelected(t)?this.remove(t):this.add(t)},toHighlightedString(t){return(t=this.$helper.string.stripHTML(t)).replace(this.regex,"$1")}},validations(){return{state:{required:!this.required||G.required,minLength:!this.min||G.minLength(this.min),maxLength:!this.max||G.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-draggable",{staticClass:"k-multiselect-input",attrs:{list:t.state,options:t.dragOptions,"data-layout":t.layout,element:"k-dropdown"},on:{end:t.onInput},nativeOn:{click:function(e){return t.$refs.dropdown.toggle.apply(null,arguments)}},scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-dropdown-content",{ref:"dropdown",on:{open:t.onOpen,close:t.onClose},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.close.apply(null,arguments))}}},[t.search?s("k-dropdown-item",{staticClass:"k-multiselect-search",attrs:{icon:"search"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"search",attrs:{placeholder:t.search.min?t.$t("search.min",{min:t.search.min}):t.$t("search")+" …"},domProps:{value:t.q},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.escape.apply(null,arguments))},input:function(e){e.target.composing||(t.q=e.target.value)}}})]):t._e(),s("div",{staticClass:"k-multiselect-options scroll-y-auto"},[t._l(t.visible,(function(e){return s("k-dropdown-item",{key:e.value,class:{"k-multiselect-option":!0,selected:t.isSelected(e),disabled:!t.more},attrs:{icon:t.isSelected(e)?"check":"circle-outline"},on:{click:function(s){return s.preventDefault(),t.select(e)}},nativeOn:{keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.preventDefault(),s.stopPropagation(),t.select(e))},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"space",32,s.key,[" ","Spacebar"])?null:(s.preventDefault(),s.stopPropagation(),t.select(e))}]}},[s("span",{domProps:{innerHTML:t._s(e.display)}}),s("span",{staticClass:"k-multiselect-value",domProps:{innerHTML:t._s(e.info)}})])})),0===t.filtered.length?s("k-dropdown-item",{staticClass:"k-multiselect-option",attrs:{disabled:!0}},[t._v(" "+t._s(t.emptyLabel)+" ")]):t._e()],2),t.visible.lengththis.onInput(t.target.value),blur:this.onBlur})}},watch:{value(t){this.number=t},number:{immediate:!0,handler(){this.onInvalid()}}},mounted(){this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{decimals(){const t=Number(this.step||0);return Math.floor(t)===t?0:-1!==t.toString().indexOf("e")?parseInt(t.toFixed(16).split(".")[1].split("").reverse().join("")).toString().length:t.toString().split(".")[1].length||0},format(t){if(isNaN(t)||""===t)return"";const e=this.decimals();return t=e?parseFloat(t).toFixed(e):Number.isInteger(this.step)?parseInt(t):parseFloat(t)},clean(){this.number=this.format(this.number)},emit(t){t=parseFloat(t),isNaN(t)&&(t=""),t!==this.value&&this.$emit("input",t)},focus(){this.$refs.input.focus()},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.number=t,this.emit(t)},onBlur(){this.clean(),this.emit(this.number)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||G.required,min:!this.min||G.minValue(this.min),max:!this.max||G.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{step:t.stepNumber,type:"number"},domProps:{value:t.number},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.ctrlKey?t.clean.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.clean.apply(null,arguments):null}]}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,Ui,null,null,null);function Ui(t){for(let e in zi)this[e]=zi[e]}var Ki=function(){return Hi.exports}();const Ji={mixins:[yi],props:{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}}};const Gi={};var Vi=zt({extends:xi,mixins:[Ji]},undefined,undefined,!1,Wi,null,null,null);function Wi(t){for(let e in Gi)this[e]=Gi[e]}var Yi=function(){return Vi.exports}();const Xi={mixins:[bs,$s,ws,Os],props:{columns:Number,options:Array,value:[String,Number,Boolean]}},Zi={};var Qi=zt({mixins:[Xi],inheritAttrs:!1,watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$el.querySelector("input").focus()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||G.required}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"k-radio-input",style:"--columns:"+t.columns},t._l(t.options,(function(e,n){return s("li",{key:n},[s("input",{staticClass:"k-radio-input-native",attrs:{id:t.id+"-"+n,name:t.id,type:"radio"},domProps:{value:e.value,checked:t.value===e.value},on:{change:function(s){return t.onInput(e.value)}}}),e.info?s("label",{attrs:{for:t.id+"-"+n}},[s("span",{staticClass:"k-radio-input-text",domProps:{innerHTML:t._s(e.text)}}),s("span",{staticClass:"k-radio-input-info",domProps:{innerHTML:t._s(e.info)}})]):s("label",{attrs:{for:t.id+"-"+n},domProps:{innerHTML:t._s(e.text)}}),e.icon?s("k-icon",{attrs:{type:e.icon}}):t._e()],1)})),0)}),[],!1,to,null,null,null);function to(t){for(let e in Zi)this[e]=Zi[e]}var eo=function(){return Qi.exports}();const so={mixins:[bs,$s,ws,Cs,Os],props:{default:[Number,String],max:{type:Number,default:100},min:{type:Number,default:0},step:{type:Number,default:1},tooltip:{type:[Boolean,Object],default:()=>({before:null,after:null})},value:[Number,String]}},no={};var io=zt({mixins:[so],inheritAttrs:!1,data(){return{listeners:l(a({},this.$listeners),{input:t=>this.onInput(t.target.value)})}},computed:{baseline(){return this.min<0?0:this.min},label(){return this.required||this.value||0===this.value?this.format(this.position):"–"},position(){return this.value||0===this.value?this.value:this.default||this.baseline}},watch:{position(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},format(t){const e=document.lang?document.lang.replace("_","-"):"en",s=this.step.toString().split("."),n=s.length>1?s[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:n}).format(t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.$emit("input",t)}},validations(){return{position:{required:!this.required||G.required,min:!this.min||G.minValue(this.min),max:!this.max||G.maxValue(this.max)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-range-input"},[s("input",t._g(t._b({ref:"input",staticClass:"k-range-input-native",style:"--min: "+t.min+"; --max: "+t.max+"; --value: "+t.position,attrs:{type:"range"},domProps:{value:t.position}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step},!1),t.listeners)),t.tooltip?s("span",{staticClass:"k-range-input-tooltip"},[t.tooltip.before?s("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),s("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?s("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])}),[],!1,oo,null,null,null);function oo(t){for(let e in no)this[e]=no[e]}var ro=function(){return io.exports}();const ao={mixins:[bs,$s,ws,Cs,Os],props:{ariaLabel:String,default:String,empty:{type:[Boolean,String],default:!0},placeholder:String,options:{type:Array,default:()=>[]},value:{type:[String,Number,Boolean],default:""}}},lo={};var uo=zt({mixins:[ao],inheritAttrs:!1,data(){return{selected:this.value,listeners:l(a({},this.$listeners),{click:t=>this.onClick(t),change:t=>this.onInput(t.target.value),input:()=>{}})}},computed:{emptyOption(){return this.placeholder||"—"},hasEmptyOption(){return!1!==this.empty&&!(this.required&&this.default)},label(){const t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value(t){this.selected=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onClick(t){t.stopPropagation(),this.$emit("click",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.selected=t,this.$emit("input",this.selected)},select(){this.focus()},text(t){let e=null;return this.options.forEach((s=>{s.value==t&&(e=s.text)})),e}},validations(){return{selected:{required:!this.required||G.required}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":""===t.selected}},[s("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{id:t.id,autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,name:t.name,required:t.required},domProps:{value:t.selected}},t.listeners),[t.hasEmptyOption?s("option",{attrs:{disabled:t.required,value:""}},[t._v(" "+t._s(t.emptyOption)+" ")]):t._e(),t._l(t.options,(function(e){return s("option",{key:e.value,attrs:{disabled:e.disabled},domProps:{value:e.value}},[t._v(" "+t._s(e.text)+" ")])}))],2),t._v(" "+t._s(t.label)+" ")])}),[],!1,co,null,null,null);function co(t){for(let e in lo)this[e]=lo[e]}var po=function(){return uo.exports}();const ho={mixins:[yi],props:{allow:{type:String,default:""},formData:{type:Object,default:()=>({})},sync:{type:String}}},fo={};var mo=zt({extends:xi,mixins:[ho],data(){return{slug:this.sluggify(this.value),slugs:this.$language?this.$language.rules:this.$system.slugs,syncValue:null}},watch:{formData:{handler(t){return!this.disabled&&(!(!this.sync||void 0===t[this.sync])&&(t[this.sync]!=this.syncValue&&(this.syncValue=t[this.sync],void this.onInput(this.sluggify(this.syncValue)))))},deep:!0,immediate:!0},value(t){(t=this.sluggify(t))!==this.slug&&(this.slug=t,this.$emit("input",this.slug))}},methods:{sluggify(t){return this.$helper.slug(t,[this.slugs,this.$system.ascii],this.allow)},onInput(t){this.slug=this.sluggify(t),this.$emit("input",this.slug)}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input",attrs:{autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.slug}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,go,null,null,null);function go(t){for(let e in fo)this[e]=fo[e]}var ko=function(){return mo.exports}();const vo={mixins:[bs,$s,ws,Cs,Os],props:{accept:{type:String,default:"all"},icon:{type:[String,Boolean],default:"tag"},layout:String,max:Number,min:Number,options:{type:Array,default:()=>[]},separator:{type:String,default:","},value:{type:Array,default:()=>[]}}},bo={};var yo=zt({mixins:[vo],inheritAttrs:!1,data(){return{tags:this.prepareTags(this.value),selected:null,newTag:null,tagOptions:this.options.map((t=>(this.icon&&this.icon.length>0&&(t.icon=this.icon),t)),this)}},computed:{dragOptions(){return{delay:1,disabled:!this.draggable,draggable:".k-tag"}},draggable(){return this.tags.length>1},skip(){return this.tags.map((t=>t.value))}},watch:{value(t){this.tags=this.prepareTags(t),this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{addString(t){if(t)if((t=t.trim()).includes(this.separator))t.split(this.separator).forEach((t=>{this.addString(t)}));else if(0!==t.length)if("options"===this.accept){const e=this.options.filter((e=>e.text===t))[0];if(!e)return;this.addTag(e)}else this.addTag({text:t,value:t})},addTag(t){this.addTagToIndex(t),this.$refs.autocomplete.close(),this.$refs.input.focus()},addTagToIndex(t){if("options"===this.accept){if(!this.options.filter((e=>e.value===t.value))[0])return}-1===this.index(t)&&(!this.max||this.tags.length=this.tags.length)return;break;case"first":e=0;break;case"last":e=this.tags.length-1;break;default:e=t}let n=this.tags[e];if(n){let t=this.$refs[n.value];if(t&&t[0])return{ref:t[0],tag:n,index:e}}return!1},index(t){return this.tags.findIndex((e=>e.value===t.value))},onInput(){this.$emit("input",this.tags)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},leaveInput(t){0===t.target.selectionStart&&t.target.selectionStart===t.target.selectionEnd&&0!==this.tags.length&&(this.$refs.autocomplete.close(),this.navigate("last"),t.preventDefault())},navigate(t){var e=this.get(t);e?(e.ref.focus(),this.selectTag(e.tag)):"next"===t&&(this.$refs.input.focus(),this.selectTag(null))},prepareTags:t=>!1===Array.isArray(t)?[]:t.map((t=>"string"==typeof t?{text:t,value:t}:t)),remove(t){const e=this.get("prev"),s=this.get("next");this.tags.splice(this.index(t),1),this.onInput(),e?(this.selectTag(e.tag),e.ref.focus()):s?this.selectTag(s.tag):(this.selectTag(null),this.$refs.input.focus())},select(){this.focus()},selectTag(t){this.selected=t},tab(t){this.newTag&&this.newTag.length>0&&(t.preventDefault(),this.addString(this.newTag))},type(t){this.newTag=t,this.$refs.autocomplete.search(t)}},validations(){return{tags:{required:!this.required||G.required,minLength:!this.min||G.minLength(this.min),maxLength:!this.max||G.maxLength(this.max)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-draggable",{directives:[{name:"direction",rawName:"v-direction"}],ref:"box",staticClass:"k-tags-input",attrs:{list:t.tags,"data-layout":t.layout,options:t.dragOptions},on:{end:t.onInput},scopedSlots:t._u([{key:"footer",fn:function(){return[s("span",{staticClass:"k-tags-input-element"},[s("k-autocomplete",{ref:"autocomplete",attrs:{html:!0,options:t.options,skip:t.skip},on:{select:t.addTag,leave:function(e){return t.$refs.input.focus()}}},[s("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.newTag,expression:"newTag",modifiers:{trim:!0}}],ref:"input",attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled||t.max&&t.tags.length>=t.max,name:t.name,autocomplete:"off",type:"text"},domProps:{value:t.newTag},on:{input:[function(e){e.target.composing||(t.newTag=e.target.value.trim())},function(e){return t.type(e.target.value)}],blur:[t.blurInput,function(e){return t.$forceUpdate()}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.blurInput.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.tab.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"backspace",void 0,e.key,void 0)||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.leaveInput.apply(null,arguments)}]}})])],1)]},proxy:!0}])},t._l(t.tags,(function(e,n){return s("k-tag",{key:n,ref:e.value,refInFor:!0,attrs:{removable:!t.disabled,name:"tag"},on:{remove:function(s){return t.remove(e)}},nativeOn:{click:function(t){t.stopPropagation()},blur:function(e){return t.selectTag(null)},focus:function(s){return t.selectTag(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.navigate("prev")},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.navigate("next")}],dblclick:function(s){return t.edit(e)}}},[s("span",{domProps:{innerHTML:t._s(e.text)}})])})),1)}),[],!1,$o,null,null,null);function $o(t){for(let e in bo)this[e]=bo[e]}var _o=function(){return yo.exports}();const wo={mixins:[yi],props:{autocomplete:{type:String,default:"tel"},type:{type:String,default:"tel"}}};const xo={};var So=zt({extends:xi,mixins:[wo]},undefined,undefined,!1,Co,null,null,null);function Co(t){for(let e in xo)this[e]=xo[e]}var Oo=function(){return So.exports}();const Eo={mixins:[bs,$s,ws,Cs,Os],props:{buttons:{type:[Boolean,Array],default:!0},endpoints:Object,font:String,maxlength:Number,minlength:Number,placeholder:String,preselect:Boolean,size:String,spellcheck:{type:[Boolean,String],default:"off"},theme:String,uploads:[Boolean,Object,Array],value:String}},To={};var Ao=zt({mixins:[Eo],inheritAttrs:!1,data:()=>({over:!1}),watch:{value(){this.onInvalid(),this.$nextTick((()=>{this.resize()}))}},mounted(){this.$nextTick((()=>{this.$library.autosize(this.$refs.input)})),this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{cancel(){this.$refs.input.focus()},dialog(t){if(!this.$refs[t+"Dialog"])throw"Invalid toolbar dialog";this.$refs[t+"Dialog"].open(this.$refs.input,this.selection())},focus(){this.$refs.input.focus()},insert(t){const e=this.$refs.input,s=e.value;setTimeout((()=>{if(e.focus(),document.execCommand("insertText",!1,t),e.value===s){const s=e.value.slice(0,e.selectionStart)+t+e.value.slice(e.selectionEnd);e.value=s,this.$emit("input",s)}})),this.resize()},insertFile(t){t&&t.length>0&&this.insert(t.map((t=>t.dragText)).join("\n\n"))},insertUpload(t,e){this.insert(e.map((t=>t.dragText)).join("\n\n")),this.$events.$emit("model.update")},onClick(){this.$refs.toolbar&&this.$refs.toolbar.close()},onCommand(t,e){"function"==typeof this[t]?"function"==typeof e?this[t](e(this.$refs.input,this.selection())):this[t](e):window.console.warn(t+" is not a valid command")},onDrop(t){if(this.uploads&&this.$helper.isUploadEvent(t))return this.$refs.fileUpload.drop(t.dataTransfer.files,{url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1});const e=this.$store.state.drag;e&&"text"===e.type&&(this.focus(),this.insert(e.data))},onFocus(t){this.$emit("focus",t)},onInput(t){this.$emit("input",t.target.value)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut(){this.$refs.input.blur(),this.over=!1},onOver(t){if(this.uploads&&this.$helper.isUploadEvent(t))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);const e=this.$store.state.drag;e&&"text"===e.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut(t){!1!==this.buttons&&"Meta"!==t.key&&"Control"!==t.key&&this.$refs.toolbar&&this.$refs.toolbar.shortcut(t.key,t)},onSubmit(t){return this.$emit("submit",t)},prepend(t){this.insert(t+" "+this.selection())},resize(){this.$library.autosize.update(this.$refs.input)},select(){this.$refs.select()},selectFile(){this.$refs.fileDialog.open({endpoint:this.endpoints.field+"/files",multiple:!1})},selection(){const t=this.$refs.input,e=t.selectionStart,s=t.selectionEnd;return t.value.substring(e,s)},uploadFile(){this.$refs.fileUpload.open({url:this.$urls.api+"/"+this.endpoints.field+"/upload",multiple:!1})},wrap(t){this.insert(t+this.selection()+t)}},validations(){return{value:{required:!this.required||G.required,minLength:!this.minlength||G.minLength(this.minlength),maxLength:!this.maxlength||G.maxLength(this.maxlength)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-textarea-input",attrs:{"data-over":t.over,"data-size":t.size,"data-theme":t.theme}},[s("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons&&!t.disabled?s("k-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,disabled:t.disabled,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),s("textarea",t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font},on:{click:t.onClick,focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit.apply(null,arguments):null},function(e){return e.metaKey?t.onShortcut.apply(null,arguments):null},function(e){return e.ctrlKey?t.onShortcut.apply(null,arguments):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))],1),s("k-toolbar-email-dialog",{ref:"emailDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),s("k-toolbar-link-dialog",{ref:"linkDialog",on:{cancel:t.cancel,submit:function(e){return t.insert(e)}}}),s("k-files-dialog",{ref:"fileDialog",on:{cancel:t.cancel,submit:function(e){return t.insertFile(e)}}}),t.uploads?s("k-upload",{ref:"fileUpload",on:{success:t.insertUpload}}):t._e()],1)}),[],!1,Lo,null,null,null);function Lo(t){for(let e in To)this[e]=To[e]}var Io=function(){return Ao.exports}();const jo={props:{display:{type:String,default:"HH:mm"},max:String,min:String,step:{type:Object,default:()=>({size:5,unit:"minute"})},type:{type:String,default:"time"}}};const Bo={};var Mo=zt({extends:fi,mixins:[jo],computed:{is12HourFormat(){return this.display.toLowerCase().includes("a")},map(){return{second:["s","ss"],minute:["m","mm"],hour:this.is12HourFormat?["h","hh"]:["H","HH"]}},patterns(){let t=fi.computed.patterns.apply(this);return this.is12HourFormat&&(t=t.map((t=>t+"a")).concat(t)),t}},methods:{emit(t){const e=this.toFormat(this.parsed,"HH:mm:ss")||"";this.$emit(t,e)},toDatetime(t){return this.$library.dayjs.utc(t,"HH:mm:ss")}}},undefined,undefined,!1,Do,null,null,null);function Do(t){for(let e in Bo)this[e]=Bo[e]}var Po=function(){return Mo.exports}();const No={props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String]},required:Boolean,value:Boolean}},qo={};var Fo=zt({mixins:[No],inheritAttrs:!1,computed:{label(){const t=this.text||[this.$t("off"),this.$t("on")];return Array.isArray(t)?this.value?t[1]:t[0]:t}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onEnter(t){"Enter"===t.key&&this.$refs.input.click()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.focus()}},validations(){return{value:{required:!this.required||G.required}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("label",{staticClass:"k-toggle-input",attrs:{"data-disabled":t.disabled}},[s("input",{ref:"input",staticClass:"k-toggle-input-native",attrs:{id:t.id,disabled:t.disabled,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return t.onInput(e.target.checked)}}}),s("span",{staticClass:"k-toggle-input-label",domProps:{innerHTML:t._s(t.label)}})])}),[],!1,Ro,null,null,null);function Ro(t){for(let e in qo)this[e]=qo[e]}var zo=function(){return Fo.exports}();const Ho={mixins:[yi],props:{autocomplete:{type:String,default:"url"},type:{type:String,default:"url"}}};const Uo={};var Ko=zt({extends:xi,mixins:[Ho]},undefined,undefined,!1,Jo,null,null,null);function Jo(t){for(let e in Uo)this[e]=Uo[e]}var Go=function(){return Ko.exports}();const Vo={mixins:[Es],inheritAttrs:!1,props:{autofocus:Boolean,empty:String,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data:()=>({opened:[]}),computed:{hasFieldsets(){return Object.keys(this.fieldsets).length},isEmpty(){return 0===this.value.length},isFull(){return null!==this.max&&this.value.length>=this.max}},methods:{focus(){this.$refs.blocks.focus()}}},Wo={};var Yo=zt(Vo,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-blocks-field",scopedSlots:t._u([{key:"options",fn:function(){return[t.hasFieldsets?s("k-dropdown",[s("k-button",{attrs:{icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"add"},on:{click:function(e){return t.$refs.blocks.choose(t.value.length)}}},[t._v(" "+t._s(t.$t("add"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"template"},on:{click:function(e){return t.$refs.blocks.copyAll()}}},[t._v(" "+t._s(t.$t("copy.all"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"download"},on:{click:function(e){return t.$refs.blocks.pasteboard()}}},[t._v(" "+t._s(t.$t("paste"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{disabled:t.isEmpty,icon:"trash"},on:{click:function(e){return t.$refs.blocks.confirmToRemoveAll()}}},[t._v(" "+t._s(t.$t("delete.all"))+" ")])],1)],1):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[s("k-blocks",t._g({ref:"blocks",attrs:{autofocus:t.autofocus,compact:!1,empty:t.empty,endpoints:t.endpoints,fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups,group:t.group,max:t.max,value:t.value},on:{close:function(e){t.opened=e},open:function(e){t.opened=e}}},t.$listeners))],1)}),[],!1,Xo,null,null,null);function Xo(t){for(let e in Wo)this[e]=Wo[e]}var Zo=function(){return Yo.exports}(),Qo={props:{counter:{type:Boolean,default:!0}},computed:{counterOptions(){var t,e;if(null===this.value||this.disabled||!1===this.counter)return!1;let s=0;return this.value&&(s=Array.isArray(this.value)?this.value.length:String(this.value).length),{count:s,min:null!=(t=this.min)?t:this.minlength,max:null!=(e=this.max)?e:this.maxlength}}}};const tr={};var er=zt({mixins:[Es,Ns,oi,Qo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-checkboxes-field",attrs:{counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"checkboxes"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,sr,null,null,null);function sr(t){for(let e in tr)this[e]=tr[e]}var nr=function(){return er.exports}();const ir={mixins:[Es,Ns,mi],inheritAttrs:!1,props:{calendar:{type:Boolean,default:!0},icon:{type:String,default:"calendar"}},data(){return{datetime:this.value}},computed:{inputType(){return!1===this.time?"date":"datetime"},listeners(){return l(a({},this.$listeners),{enter:this.onSelect,focus:this.onFocus,input:this.onInput,update:this.onUpdate})}},watch:{value(t){this.datetime=t}},methods:{focus(){this.$refs.input.focus()},onUpdate(t){this.$emit("input",t)},onFocus(){this.$refs.calendar&&this.$refs.calendar.open()},onInput(t){this.datetime=t},onSelect(t){this.onUpdate(t),this.$refs.calendar&&this.$refs.calendar.close()}}},or={};var rr=zt(ir,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,value:t.value,theme:"field"},scopedSlots:t._u([t.calendar?{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,tooltip:t.$t("date.select"),tabindex:"-1"},on:{click:t.onFocus}}),s("k-dropdown-content",{ref:"calendar",attrs:{align:"right"}},[s("k-calendar",{attrs:{value:t.datetime,min:t.min,max:t.max},on:{input:t.onSelect}})],1)],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1),t.listeners))],1)}),[],!1,ar,null,null,null);function ar(t){for(let e in or)this[e]=or[e]}var lr=function(){return rr.exports}();const ur={mixins:[Es,Ns,Si],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"email"}},computed:{mailto(){return this.value&&this.value.length>0?"mailto:"+this.value:null}},methods:{focus(){this.$refs.input.focus()}}},cr={};var dr=zt(ur,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-email-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"email"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.mailto,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,pr,null,null,null);function pr(t){for(let e in cr)this[e]=cr[e]}var hr=function(){return dr.exports}(),fr={mixins:[Es],inheritAttrs:!1,props:{empty:String,info:String,link:Boolean,layout:{type:String,default:"list"},max:Number,multiple:Boolean,parent:String,search:Boolean,size:String,text:String,value:{type:Array,default:()=>[]}},data(){return{selected:this.value}},computed:{btnIcon(){return!this.multiple&&this.selected.length>0?"refresh":"add"},btnLabel(){return!this.multiple&&this.selected.length>0?this.$t("change"):this.$t("add")},isInvalid(){return!(!this.required||0!==this.selected.length)||(!!(this.min&&this.selected.lengththis.max))},items(){return this.models.map(this.item)},more(){return!this.max||this.max>this.selected.length}},watch:{value(t){this.selected=t}},methods:{focus(){},item(t){return t.link=this.link?t.link:null,t},onInput(){this.$emit("input",this.selected)},open(){if(this.disabled)return!1;this.$refs.selector.open({endpoint:this.endpoints.field,max:this.max,multiple:this.multiple,search:this.search,selected:this.selected.map((t=>t.id))})},remove(t){this.selected.splice(t,1),this.onInput()},removeById(t){this.selected=this.selected.filter((e=>e.id!==t)),this.onInput()},select(t){0!==t.length?(this.selected=this.selected.filter((e=>t.filter((t=>t.id===e.id)).length>0)),t.forEach((t=>{0===this.selected.filter((e=>t.id===e.id)).length&&this.selected.push(t)})),this.onInput()):this.selected=[]}}};const mr={mixins:[fr],props:{uploads:[Boolean,Object,Array]},computed:{moreUpload(){return this.more&&this.uploads},options(){return this.uploads?{icon:this.btnIcon,text:this.btnLabel,options:[{icon:"check",text:this.$t("select"),click:"open"},{icon:"upload",text:this.$t("upload"),click:"upload"}]}:{options:[{icon:"check",text:this.$t("select"),click:()=>this.open()}]}},uploadParams(){return{accept:this.uploads.accept,max:this.max,multiple:this.multiple,url:this.$urls.api+"/"+this.endpoints.field+"/upload"}}},created(){this.$events.$on("file.delete",this.removeById)},destroyed(){this.$events.$off("file.delete",this.removeById)},methods:{drop(t){return!1!==this.uploads&&this.$refs.fileUpload.drop(t,this.uploadParams)},prompt(t){if(t.stopPropagation(),this.disabled)return!1;this.moreUpload?this.$refs.options.toggle():this.open()},onAction(t){if(this.moreUpload)switch(t){case"open":return this.open();case"upload":return this.$refs.fileUpload.open(this.uploadParams)}},isSelected(t){return this.selected.find((e=>e.id===t.id))},upload(t,e){!1===this.multiple&&(this.selected=[]),e.forEach((t=>{this.isSelected(t)||this.selected.push(t)})),this.onInput(),this.$events.$emit("model.update")}}},gr={};var kr=zt(mr,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-files-field",scopedSlots:t._u([t.more&&!t.disabled?{key:"options",fn:function(){return[s("k-button-group",{staticClass:"k-field-options"},[s("k-options-dropdown",t._b({ref:"options",on:{action:t.onAction}},"k-options-dropdown",t.options,!1))],1)]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[s("k-dropzone",{attrs:{disabled:!1===t.more},on:{drop:t.drop}},[t.selected.length?[s("k-items",{attrs:{items:t.selected,layout:t.layout,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.index;return[t.disabled?t._e():s("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(n)}}})]}}],null,!1,1805525116)})]:s("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"image"},on:{click:t.prompt}},[t._v(" "+t._s(t.empty||t.$t("field.files.empty"))+" ")])],2),s("k-files-dialog",{ref:"selector",on:{submit:t.select}}),s("k-upload",{ref:"fileUpload",on:{success:t.upload}})],1)}),[],!1,vr,null,null,null);function vr(t){for(let e in gr)this[e]=gr[e]}var br=function(){return kr.exports}();const yr={};var $r=zt({},(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"k-field k-gap-field"})}),[],!1,_r,null,null,null);function _r(t){for(let e in yr)this[e]=yr[e]}var wr=function(){return $r.exports}();const xr={mixins:[_s,Ss],props:{numbered:Boolean}},Sr={};var Cr=zt(xr,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-headline-field"},[s("k-headline",{attrs:{"data-numbered":t.numbered,size:"large"}},[t._v(" "+t._s(t.label)+" ")]),t.help?s("footer",{staticClass:"k-field-footer"},[t.help?s("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,Or,null,null,null);function Or(t){for(let e in Sr)this[e]=Sr[e]}var Er=function(){return Cr.exports}();const Tr={};var Ar=zt({mixins:[_s,Ss],props:{text:String,theme:{type:String,default:"info"}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-field k-info-field"},[s("k-headline",[t._v(t._s(t.label))]),s("k-box",{attrs:{theme:t.theme}},[s("k-text",{domProps:{innerHTML:t._s(t.text)}})],1),t.help?s("footer",{staticClass:"k-field-footer"},[t.help?s("k-text",{staticClass:"k-field-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1):t._e()],1)}),[],!1,Lr,null,null,null);function Lr(t){for(let e in Tr)this[e]=Tr[e]}var Ir=function(){return Ar.exports}();const jr={props:{blocks:Array,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,width:String}},Br={};var Mr=zt(jr,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-column k-layout-column",attrs:{id:t.id,"data-width":t.width,tabindex:"0"},on:{dblclick:function(e){return t.$refs.blocks.choose(t.blocks.length)}}},[s("k-blocks",{ref:"blocks",attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,value:t.blocks,group:"layout"},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{dblclick:function(t){t.stopPropagation()}}})],1)}),[],!1,Dr,null,null,null);function Dr(t){for(let e in Br)this[e]=Br[e]}const Pr={components:{"k-layout-column":function(){return Mr.exports}()},props:{attrs:[Array,Object],columns:Array,disabled:Boolean,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,settings:Object},computed:{tabs(){let t=this.settings.tabs;return Object.entries(t).forEach((([e,s])=>{Object.entries(s.fields).forEach((([s])=>{t[e].fields[s].endpoints={field:this.endpoints.field+"/fields/"+s,section:this.endpoints.section,model:this.endpoints.model}}))})),t}}},Nr={};var qr=zt(Pr,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"k-layout",attrs:{"data-selected":t.isSelected,tabindex:"0"},on:{click:function(e){return t.$emit("select")}}},[s("k-grid",{staticClass:"k-layout-columns"},t._l(t.columns,(function(e,n){return s("k-layout-column",t._b({key:e.id,attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets},on:{input:function(s){return t.$emit("updateColumn",{column:e,columnIndex:n,blocks:s})}}},"k-layout-column",e,!1))})),1),t.disabled?t._e():s("nav",{staticClass:"k-layout-toolbar"},[t.settings?s("k-button",{staticClass:"k-layout-toolbar-button",attrs:{tooltip:t.$t("settings"),icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}}):t._e(),s("k-dropdown",[s("k-button",{staticClass:"k-layout-toolbar-button",attrs:{icon:"angle-down"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"angle-up"},on:{click:function(e){return t.$emit("prepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),s("k-dropdown-item",{attrs:{icon:"angle-down"},on:{click:function(e){return t.$emit("append")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),s("hr"),t.settings?s("k-dropdown-item",{attrs:{icon:"settings"},on:{click:function(e){return t.$refs.drawer.open()}}},[t._v(" "+t._s(t.$t("settings"))+" ")]):t._e(),s("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$refs.confirmRemoveDialog.open()}}},[t._v(" "+t._s(t.$t("field.layout.delete"))+" ")])],1)],1),s("k-sort-handle")],1),t.settings?s("k-form-drawer",{ref:"drawer",staticClass:"k-layout-drawer",attrs:{tabs:t.tabs,title:t.$t("settings"),value:t.attrs,icon:"settings"},on:{input:function(e){return t.$emit("updateAttrs",e)}}}):t._e(),s("k-remove-dialog",{ref:"confirmRemoveDialog",attrs:{text:t.$t("field.layout.delete.confirm")},on:{submit:function(e){return t.$emit("remove")}}})],1)}),[],!1,Fr,null,null,null);function Fr(t){for(let e in Nr)this[e]=Nr[e]}var Rr=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.rows.length?[s("k-draggable",t._b({staticClass:"k-layouts",on:{sort:t.save}},"k-draggable",t.draggableOptions,!1),t._l(t.rows,(function(e,n){return s("k-layout",t._b({key:e.id,attrs:{disabled:t.disabled,endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,"is-selected":t.selected===e.id,settings:t.settings},on:{append:function(e){return t.selectLayout(n+1)},duplicate:function(s){return t.duplicateLayout(n,e)},prepend:function(e){return t.selectLayout(n)},remove:function(s){return t.removeLayout(e)},select:function(s){t.selected=e.id},updateAttrs:function(e){return t.updateAttrs(n,e)},updateColumn:function(s){return t.updateColumn(Object.assign({},{layout:e,layoutIndex:n},s))}}},"k-layout",e,!1))})),1),t.disabled?t._e():s("k-button",{staticClass:"k-layout-add-button",attrs:{icon:"add"},on:{click:function(e){return t.selectLayout(t.rows.length)}}})]:[s("k-empty",{staticClass:"k-layout-empty",attrs:{icon:"dashboard"},on:{click:function(e){return t.selectLayout(0)}}},[t._v(" "+t._s(t.empty||t.$t("field.layout.empty"))+" ")])],s("k-dialog",{ref:"selector",staticClass:"k-layout-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"}},[s("k-headline",[t._v(t._s(t.$t("field.layout.select")))]),s("ul",t._l(t.layouts,(function(e,n){return s("li",{key:n,staticClass:"k-layout-selector-option"},[s("k-grid",{nativeOn:{click:function(s){return t.addLayout(e)}}},t._l(e,(function(t,e){return s("k-column",{key:e,attrs:{width:t}})})),1)],1)})),0)],1)],2)};const zr={components:{"k-layout":function(){return qr.exports}()},props:{disabled:Boolean,empty:String,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,layouts:Array,max:Number,settings:Object,value:Array},data(){return{currentLayout:null,nextIndex:null,rows:this.value,selected:null}},computed:{draggableOptions(){return{id:this._uid,handle:!0,list:this.rows}}},watch:{value(){this.rows=this.value}},methods:{async addLayout(t){let e=await this.$api.post(this.endpoints.field+"/layout",{columns:t});this.rows.splice(this.nextIndex,0,e),this.layouts.length>1&&this.$refs.selector.close(),this.save()},duplicateLayout(t,e){let s=l(a({},this.$helper.clone(e)),{id:this.$helper.uuid()});s.columns=s.columns.map((t=>(t.id=this.$helper.uuid(),t.blocks=t.blocks.map((t=>(t.id=this.$helper.uuid(),t))),t))),this.rows.splice(t+1,0,s),this.save()},removeLayout(t){const e=this.rows.findIndex((e=>e.id===t.id));-1!==e&&this.$delete(this.rows,e),this.save()},save(){this.$emit("input",this.rows)},selectLayout(t){this.nextIndex=t,1!==this.layouts.length?this.$refs.selector.open():this.addLayout(this.layouts[0])},updateColumn(t){this.rows[t.layoutIndex].columns[t.columnIndex].blocks=t.blocks,this.save()},updateAttrs(t,e){this.rows[t].attrs=e,this.save()}}},Hr={};var Ur=zt(zr,Rr,[],!1,Kr,null,null,null);function Kr(t){for(let e in Hr)this[e]=Hr[e]}const Jr={};var Gr=zt({components:{"k-block-layouts":function(){return Ur.exports}()},mixins:[Es],inheritAttrs:!1,props:{empty:String,fieldsetGroups:Object,fieldsets:Object,layouts:{type:Array,default:()=>[["1/1"]]},settings:Object,value:{type:Array,default:()=>[]}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-layout-field"},"k-field",t.$props,!1),[s("k-block-layouts",t._b({on:{input:function(e){return t.$emit("input",e)}}},"k-block-layouts",t.$props,!1))],1)}),[],!1,Vr,null,null,null);function Vr(t){for(let e in Jr)this[e]=Jr[e]}var Wr=function(){return Gr.exports}();const Yr={};var Xr=zt({},(function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"k-line-field"})}),[],!1,Zr,null,null,null);function Zr(t){for(let e in Yr)this[e]=Yr[e]}var Qr=function(){return Xr.exports}();const ta={mixins:[Es,Ns],inheritAttrs:!1,props:{marks:[Array,Boolean],value:String},methods:{focus(){this.$refs.input.focus()}}},ea={};var sa=zt(ta,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-list-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[s("k-input",t._b({ref:"input",attrs:{id:t._uid,marks:t.marks,value:t.value,type:"list",theme:"field"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)}),[],!1,na,null,null,null);function na(t){for(let e in ea)this[e]=ea[e]}var ia=function(){return sa.exports}();const oa={};var ra=zt({mixins:[Es,Ns,Di,Qo],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},mounted(){this.$refs.input.$el.setAttribute("tabindex",0)},methods:{blur(t){this.$refs.input.blur(t)},focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions},on:{blur:t.blur},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.focus.apply(null,arguments))}}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,aa,null,null,null);function aa(t){for(let e in oa)this[e]=oa[e]}var la=function(){return ra.exports}();const ua={};var ca=zt({mixins:[Es,Ns,Ri],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,da,null,null,null);function da(t){for(let e in ua)this[e]=ua[e]}var pa=function(){return ca.exports}();const ha={};var fa=zt({mixins:[fr]},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-pages-field",scopedSlots:t._u([{key:"options",fn:function(){return[s("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?s("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[t.selected.length?[s("k-items",{attrs:{items:t.selected,layout:t.layout,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.index;return[t.disabled?t._e():s("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(n)}}})]}}],null,!1,1805525116)})]:s("k-empty",{attrs:{layout:t.layout,"data-invalid":t.isInvalid,icon:"page"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.pages.empty"))+" ")]),s("k-pages-dialog",{ref:"selector",on:{submit:t.select}})],2)}),[],!1,ma,null,null,null);function ma(t){for(let e in ha)this[e]=ha[e]}var ga=function(){return fa.exports}();const ka={};var va=zt({mixins:[Es,Ns,Ji,Qo],inheritAttrs:!1,props:{minlength:{type:Number,default:8},icon:{type:String,default:"key"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,ba,null,null,null);function ba(t){for(let e in ka)this[e]=ka[e]}var ya=function(){return va.exports}();const $a={};var _a=zt({mixins:[Es,Ns,Xi],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"radio"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,wa,null,null,null);function wa(t){for(let e in $a)this[e]=$a[e]}var xa=function(){return _a.exports}();const Sa={};var Ca=zt({mixins:[Ns,Es,so],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Oa,null,null,null);function Oa(t){for(let e in Sa)this[e]=Sa[e]}var Ea=function(){return Ca.exports}();const Ta={};var Aa=zt({mixins:[Es,Ns,ao],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,La,null,null,null);function La(t){for(let e in Ta)this[e]=Ta[e]}var Ia=function(){return Aa.exports}();const ja={mixins:[Es,Ns,ho],inheritAttrs:!1,props:{icon:{type:String,default:"url"},path:{type:String},wizard:{type:[Boolean,Object],default:!1}},data(){return{slug:this.value}},computed:{preview(){return void 0!==this.help?this.help:void 0!==this.path?this.path+this.value:null}},watch:{value(){this.slug=this.value}},methods:{focus(){this.$refs.input.focus()},onWizard(){this.wizard&&this.wizard.field&&this.formData[this.wizard.field]&&(this.slug=this.formData[this.wizard.field])}}},Ba={};var Ma=zt(ja,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-slug-field",attrs:{input:t._uid,help:t.preview},scopedSlots:t._u([t.wizard&&t.wizard.text?{key:"options",fn:function(){return[s("k-button",{attrs:{text:t.wizard.text,icon:"wand"},on:{click:t.onWizard}})]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,value:t.slug,theme:"field",type:"slug"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Da,null,null,null);function Da(t){for(let e in Ba)this[e]=Ba[e]}var Pa=function(){return Ma.exports}(),Na={mixins:[Es],methods:{displayText(t,e){switch(t.type){case"user":return e.email;case"date":{const s=this.$library.dayjs(e),n=!0===t.time?"YYYY-MM-DD HH:mm":"YYYY-MM-DD";return s.isValid()?s.format(n):""}case"tags":case"multiselect":return e.map((t=>t.text)).join(", ");case"checkboxes":return e.map((e=>{let s=e;return t.options.forEach((t=>{t.value===e&&(s=t.text)})),s})).join(", ");case"radio":case"select":{const s=t.options.filter((t=>t.value===e))[0];return s?s.text:null}}return"object"==typeof e&&null!==e?"…":e.toString()},previewExists(t){return this.$helper.isComponent(`k-${t}-field-preview`)},width(t){return t?this.$helper.ratio(t,"auto",!1):"auto"}}};const qa={mixins:[Na],inheritAttrs:!1,props:{columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:Object,limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:()=>[]}},data(){return{autofocus:null,items:this.makeItems(this.value),currentIndex:null,currentModel:null,trash:null,page:1}},computed:{dragOptions(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},formFields(){let t={};return Object.keys(this.fields).forEach((e=>{let s=this.fields[e];s.section=this.name,s.endpoints={field:this.endpoints.field+"+"+e,section:this.endpoints.section,model:this.endpoints.model},null===this.autofocus&&!0===s.autofocus&&(this.autofocus=e),t[e]=s})),t},more(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},isInvalid(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.max))},isSortable(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination(){let t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},paginatedItems(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value(t){t!=this.items&&(this.items=this.makeItems(t))}},methods:{add(){if(!0===this.disabled)return!1;if(null!==this.currentIndex)return this.escape(),!1;let t={};Object.keys(this.fields).forEach((e=>{const s=this.fields[e];null!==s.default?t[e]=this.$helper.clone(s.default):t[e]=null})),this.currentIndex="new",this.currentModel=t,this.createForm()},addItem(t){!0===this.prepend?this.items.unshift(t):this.items.push(t)},beforePaginate(){return this.save(this.currentModel)},close(){this.currentIndex=null,this.currentModel=null,this.$events.$off("keydown.esc",this.escape),this.$events.$off("keydown.cmd.s",this.submit),this.$store.dispatch("content/enable")},columnIsEmpty:t=>null==t||""===t||("object"==typeof t&&0===Object.keys(t).length&&t.constructor===Object||void 0!==t.length&&0===t.length),confirmRemove(t){this.close(),this.trash=t+this.pagination.offset,this.$refs.remove.open()},createForm(t){this.$events.$on("keydown.esc",this.escape),this.$events.$on("keydown.cmd.s",this.submit),this.$store.dispatch("content/disable"),this.$nextTick((()=>{this.$refs.form&&this.$refs.form.focus(t||this.autofocus)}))},duplicateItem(t){this.addItem(this.items[t+this.pagination.offset]),this.onInput()},escape(){if("new"===this.currentIndex){let t=Object.values(this.currentModel),e=!0;if(t.forEach((t=>{!1===this.columnIsEmpty(t)&&(e=!1)})),!0===e)return void this.close()}this.submit()},focus(){this.$refs.add&&this.$refs.add.focus&&this.$refs.add.focus()},indexOf(t){return this.limit?(this.page-1)*this.limit+t+1:t+1},isActive(t){return this.currentIndex===t},jump(t,e){this.open(t+this.pagination.offset,e)},makeItems(t){return!1===Array.isArray(t)?[]:this.sort(t)},onInput(){this.$emit("input",this.items)},open(t,e){this.currentIndex=t,this.currentModel=this.$helper.clone(this.items[t]),this.createForm(e)},paginate(t){this.open(t.offset)},paginateItems(t){this.page=t.page},remove(){if(null===this.trash)return!1;this.items.splice(this.trash,1),this.trash=null,this.$refs.remove.close(),this.onInput(),0===this.paginatedItems.length&&this.page>1&&this.page--,this.items=this.sort(this.items)},sort(t){return this.sortBy?t.sortBy(this.sortBy):t},async save(){if(null!==this.currentIndex&&void 0!==this.currentIndex)try{return await this.validate(this.currentModel),"new"===this.currentIndex?this.addItem(this.currentModel):this.items[this.currentIndex]=this.currentModel,this.items=this.sort(this.items),this.onInput(),!0}catch(t){throw this.$store.dispatch("notification/error",{message:this.$t("error.form.incomplete"),details:t}),t}},async submit(){try{await this.save(),this.close()}catch(t){}},async validate(t){const e=await this.$api.post(this.endpoints.field+"/validate",t);if(e.length>0)throw e;return!0},update(t,e,s){this.items[t][e]=s,this.onInput()}}},Fa={};var Ra=zt(qa,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}},scopedSlots:t._u([{key:"options",fn:function(){return[t.more&&null===t.currentIndex?s("k-button",{ref:"add",attrs:{id:t._uid,text:t.$t("add"),icon:"add"},on:{click:t.add}}):t._e()]},proxy:!0}])},"k-field",t.$props,!1),[null!==t.currentIndex?[s("div",{staticClass:"k-structure-backdrop",on:{click:t.escape}}),s("section",{staticClass:"k-structure-form"},[s("k-form",{ref:"form",staticClass:"k-structure-form-fields",attrs:{fields:t.formFields},on:{input:t.onInput,submit:t.submit},model:{value:t.currentModel,callback:function(e){t.currentModel=e},expression:"currentModel"}}),s("footer",{staticClass:"k-structure-form-buttons"},[s("k-button",{staticClass:"k-structure-form-cancel-button",attrs:{text:t.$t("cancel"),icon:"cancel"},on:{click:t.close}}),"new"!==t.currentIndex?s("k-pagination",{attrs:{dropdown:!1,total:t.items.length,limit:1,page:t.currentIndex+1,details:!0,validate:t.beforePaginate},on:{paginate:t.paginate}}):t._e(),s("k-button",{staticClass:"k-structure-form-submit-button",attrs:{text:t.$t("new"!==t.currentIndex?"confirm":"add"),icon:"check"},on:{click:t.submit}})],1)],1)]:0===t.items.length?s("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"list-bullet"},on:{click:t.add}},[t._v(" "+t._s(t.empty||t.$t("field.structure.empty"))+" ")]):[s("table",{staticClass:"k-structure-table",attrs:{"data-invalid":t.isInvalid,"data-sortable":t.isSortable}},[s("thead",[s("tr",[s("th",{staticClass:"k-structure-table-index"},[t._v(" # ")]),t._l(t.columns,(function(e,n){return s("th",{key:n+"-header",staticClass:"k-structure-table-column",style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),t.disabled?t._e():s("th")],2)]),s("k-draggable",{directives:[{name:"direction",rawName:"v-direction"}],attrs:{list:t.items,"data-disabled":t.disabled,options:t.dragOptions,handle:!0,element:"tbody"},on:{end:t.onInput}},t._l(t.paginatedItems,(function(e,n){return s("tr",{key:n,on:{click:function(t){t.stopPropagation()}}},[s("td",{staticClass:"k-structure-table-index"},[t.isSortable?s("k-sort-handle"):t._e(),s("span",{staticClass:"k-structure-table-index-number"},[t._v(t._s(t.indexOf(n)))])],1),t._l(t.columns,(function(i,o){return s("td",{key:o,staticClass:"k-structure-table-column",style:"width:"+t.width(i.width),attrs:{title:i.label,"data-align":i.align},on:{click:function(e){return t.jump(n,o)}}},[!1===t.columnIsEmpty(e[o])?[t.previewExists(i.type)?s("k-"+i.type+"-field-preview",{tag:"component",attrs:{value:e[o],column:i,field:t.fields[o]},on:{input:function(e){return t.update(n,o,e)}}}):[s("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(i.before)+" "+t._s(t.displayText(t.fields[o],e[o])||"–")+" "+t._s(i.after)+" ")])]]:t._e()],2)})),t.disabled?t._e():s("td",{staticClass:"k-structure-table-options"},[t.duplicate&&t.more&&null===t.currentIndex?[s("k-button",{key:n,ref:"actionsToggle",refInFor:!0,staticClass:"k-structure-table-options-button",attrs:{icon:"dots"},on:{click:function(e){t.$refs[n+"-actions"][0].toggle()}}}),s("k-dropdown-content",{ref:n+"-actions",refInFor:!0,attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"copy"},on:{click:function(e){return t.duplicateItem(n)}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("k-dropdown-item",{attrs:{icon:"remove"},on:{click:function(e){return t.confirmRemove(n)}}},[t._v(" "+t._s(t.$t("remove"))+" ")])],1)]:[s("k-button",{staticClass:"k-structure-table-options-button",attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.confirmRemove(n)}}})]],2)],2)})),0)],1),t.limit?s("k-pagination",t._b({on:{paginate:t.paginateItems}},"k-pagination",t.pagination,!1)):t._e(),t.disabled?t._e():s("k-dialog",{ref:"remove",attrs:{"submit-button":t.$t("delete"),theme:"negative"},on:{submit:t.remove}},[s("k-text",[t._v(t._s(t.$t("field.structure.delete.confirm")))])],1)]],2)}),[],!1,za,null,null,null);function za(t){for(let e in Fa)this[e]=Fa[e]}var Ha=function(){return Ra.exports}();const Ua={};var Ka=zt({mixins:[Es,Ns,vo,Qo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ja,null,null,null);function Ja(t){for(let e in Ua)this[e]=Ua[e]}var Ga=function(){return Ka.exports}();const Va={};var Wa=zt({mixins:[Es,Ns,wo],inheritAttrs:!1,props:{icon:{type:String,default:"phone"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,Ya,null,null,null);function Ya(t){for(let e in Va)this[e]=Va[e]}var Xa=function(){return Wa.exports}();const Za={};var Qa=zt({mixins:[Es,Ns,yi,Qo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,tl,null,null,null);function tl(t){for(let e in Za)this[e]=Za[e]}var el=function(){return Qa.exports}();const sl={};var nl=zt({mixins:[Es,Ns,Eo,Qo],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,il,null,null,null);function il(t){for(let e in sl)this[e]=sl[e]}var ol=function(){return nl.exports}();const rl={};var al=zt({mixins:[Es,Ns,jo],inheritAttrs:!1,props:{icon:{type:String,default:"clock"}},computed:{listeners(){return l(a({},this.$listeners),{update:t=>this.$emit("input",t),input:()=>{}})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"time"}},"k-input",t.$props,!1),t.listeners))],1)}),[],!1,ll,null,null,null);function ll(t){for(let e in rl)this[e]=rl[e]}var ul=function(){return al.exports}();const cl={};var dl=zt({mixins:[Es,Ns,No],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,pl,null,null,null);function pl(t){for(let e in cl)this[e]=cl[e]}var hl=function(){return dl.exports}();const fl={mixins:[Es,Ns,Ho],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}},methods:{focus(){this.$refs.input.focus()}}},ml={};var gl=zt(fl,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.value,tooltip:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,kl,null,null,null);function kl(t){for(let e in ml)this[e]=ml[e]}var vl=function(){return gl.exports}();const bl={};var yl=zt({mixins:[fr]},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-users-field",scopedSlots:t._u([{key:"options",fn:function(){return[s("k-button-group",{staticClass:"k-field-options"},[t.more&&!t.disabled?s("k-button",{staticClass:"k-field-options-button",attrs:{icon:t.btnIcon,text:t.btnLabel},on:{click:t.open}}):t._e()],1)]},proxy:!0}])},"k-field",t.$props,!1),[t.selected.length?[s("k-items",{attrs:{items:t.selected,layout:t.layout,size:t.size,sortable:!t.disabled&&t.selected.length>1},on:{sort:t.onInput,sortChange:function(e){return t.$emit("change",e)}},scopedSlots:t._u([{key:"options",fn:function(e){var n=e.index;return[t.disabled?t._e():s("k-button",{attrs:{tooltip:t.$t("remove"),icon:"remove"},on:{click:function(e){return t.remove(n)}}})]}}],null,!1,1805525116)})]:s("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"users"},on:{click:t.open}},[t._v(" "+t._s(t.empty||t.$t("field.users.empty"))+" ")]),s("k-users-dialog",{ref:"selector",on:{submit:t.select}})],2)}),[],!1,$l,null,null,null);function $l(t){for(let e in bl)this[e]=bl[e]}var _l=function(){return yl.exports}();const wl={};var xl=zt({mixins:[Es,Ns,Kn],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-field",t._b({staticClass:"k-writer-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[s("k-input",t._b({attrs:{after:t.after,before:t.before,icon:t.icon,theme:"field"}},"k-input",t.$props,!1),[s("k-writer",t._b({ref:"input",staticClass:"k-writer-field-input",attrs:{value:t.value},on:{input:function(e){return t.$emit("input",e)}}},"k-writer",t.$props,!1))],1)],1)}),[],!1,Sl,null,null,null);function Sl(t){for(let e in wl)this[e]=wl[e]}var Cl=function(){return xl.exports}();const Ol=function(t){this.command("insert",((e,s)=>{let n=[];return s.split("\n").forEach(((e,s)=>{let i="ol"===t?s+1+".":"-";n.push(i+" "+e)})),n.join("\n")}))},El={layout:["headlines","bold","italic","|","link","email","file","|","code","ul","ol"],props:{buttons:{type:[Boolean,Array],default:!0},uploads:[Boolean,Object,Array]},data(){let t={},e={},s=[],n=this.commands();return!1===this.buttons?t:(Array.isArray(this.buttons)&&(s=this.buttons),!0!==Array.isArray(this.buttons)&&(s=this.$options.layout),s.forEach(((s,i)=>{if("|"===s)t["divider-"+i]={divider:!0};else if(n[s]){let i=n[s];t[s]=i,i.shortcut&&(e[i.shortcut]=s)}})),{layout:t,shortcuts:e})},methods:{command(t,e){"function"==typeof t?t.apply(this):this.$emit("command",t,e)},close(){Object.keys(this.$refs).forEach((t=>{const e=this.$refs[t][0];e.close&&"function"==typeof e.close&&e.close()}))},fileCommandSetup(){let t={label:this.$t("toolbar.button.file"),icon:"attachment"};return!1===this.uploads?t.command="selectFile":t.dropdown={select:{label:this.$t("toolbar.button.file.select"),icon:"check",command:"selectFile"},upload:{label:this.$t("toolbar.button.file.upload"),icon:"upload",command:"uploadFile"}},t},commands(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:{h1:{label:this.$t("toolbar.button.heading.1"),icon:"title",command:"prepend",args:"#"},h2:{label:this.$t("toolbar.button.heading.2"),icon:"title",command:"prepend",args:"##"},h3:{label:this.$t("toolbar.button.heading.3"),icon:"title",command:"prepend",args:"###"}}},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",command:"wrap",args:"**",shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",command:"wrap",args:"*",shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",shortcut:"k",command:"dialog",args:"link"},email:{label:this.$t("toolbar.button.email"),icon:"email",shortcut:"e",command:"dialog",args:"email"},file:this.fileCommandSetup(),code:{label:this.$t("toolbar.button.code"),icon:"code",command:"wrap",args:"`"},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",command(){return Ol.apply(this,["ul"])}},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",command(){return Ol.apply(this,["ol"])}}}},shortcut(t,e){if(this.shortcuts[t]){const s=this.layout[this.shortcuts[t]];if(!s)return!1;e.preventDefault(),this.command(s.command,s.args)}}}},Tl={};var Al=zt(El,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"k-toolbar"},[s("div",{staticClass:"k-toolbar-wrapper"},[s("div",{staticClass:"k-toolbar-buttons"},[t._l(t.layout,(function(e,n){return[e.divider?[s("span",{key:n,staticClass:"k-toolbar-divider"})]:e.dropdown?[s("k-dropdown",{key:n},[s("k-button",{key:n,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(e){t.$refs[n+"-dropdown"][0].toggle()}}}),s("k-dropdown-content",{ref:n+"-dropdown",refInFor:!0},t._l(e.dropdown,(function(e,n){return s("k-dropdown-item",{key:n,attrs:{icon:e.icon},on:{click:function(s){return t.command(e.command,e.args)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1)]:[s("k-button",{key:n,staticClass:"k-toolbar-button",attrs:{icon:e.icon,tooltip:e.label,tabindex:"-1"},on:{click:function(s){return t.command(e.command,e.args)}}})]]}))],2)])])}),[],!1,Ll,null,null,null);function Ll(t){for(let e in Tl)this[e]=Tl[e]}var Il=function(){return Al.exports}();const jl={};var Bl=zt({data(){return{value:{email:null,text:null},fields:{email:{label:this.$t("email"),type:"email"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){const t=this.value.email||"";return this.value.text&&this.value.text.length>0?`(email: ${t} text: ${this.value.text})`:`(email: ${t})`},createMarkdown(){const t=this.value.email||"";return this.value.text&&this.value.text.length>0?`[${this.value.text}](mailto:${t})`:`<${t}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={email:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[s("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,Ml,null,null,null);function Ml(t){for(let e in jl)this[e]=jl[e]}var Dl=function(){return Bl.exports}();const Pl={};var Nl=zt({data(){return{value:{url:null,text:null},fields:{url:{label:this.$t("link"),type:"text",placeholder:this.$t("url.placeholder"),icon:"url"},text:{label:this.$t("link.text"),type:"text"}}}},computed:{kirbytext(){return this.$config.kirbytext}},methods:{open(t,e){this.value.text=e,this.$refs.dialog.open()},cancel(){this.$emit("cancel")},createKirbytext(){return this.value.text.length>0?`(link: ${this.value.url} text: ${this.value.text})`:`(link: ${this.value.url})`},createMarkdown(){return this.value.text.length>0?`[${this.value.text}](${this.value.url})`:`<${this.value.url}>`},submit(){this.$emit("submit",this.kirbytext?this.createKirbytext():this.createMarkdown()),this.value={url:null,text:null},this.$refs.dialog.close()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",attrs:{"submit-button":t.$t("insert")},on:{close:t.cancel,submit:function(e){return t.$refs.form.submit()}}},[s("k-form",{ref:"form",attrs:{fields:t.fields},on:{submit:t.submit},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,ql,null,null,null);function ql(t){for(let e in Pl)this[e]=Pl[e]}var Fl=function(){return Nl.exports}();const Rl={};var zl=zt({props:{field:Object,value:String},computed:{text(){return fi.methods.toDatetime.call(this,this.value).format(this.field.display)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("p",{staticClass:"k-date-field-preview"},[t._v(" "+t._s(t.text)+" ")])])}),[],!1,Hl,null,null,null);function Hl(t){for(let e in Rl)this[e]=Rl[e]}var Ul=function(){return zl.exports}();const Kl={};var Jl=zt({props:{column:{type:Object,default:()=>({})},value:String},computed:{link(){return this.value}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",{staticClass:"k-url-field-preview"},[t._v(" "+t._s(t.column.before)+" "),s("k-link",{attrs:{to:t.link,target:"_blank"},nativeOn:{click:function(t){t.stopPropagation()}}},[t._v(" "+t._s(t.value)+" ")]),t._v(" "+t._s(t.column.after)+" ")],1)}),[],!1,Gl,null,null,null);function Gl(t){for(let e in Kl)this[e]=Kl[e]}var Vl=function(){return Jl.exports}();const Wl={};var Yl=zt({extends:Vl,computed:{link(){return this.value&&this.value.length>0?"mailto:"+this.value:null}}},undefined,undefined,!1,Xl,null,null,null);function Xl(t){for(let e in Wl)this[e]=Wl[e]}var Zl=function(){return Yl.exports}();const Ql={};var tu=zt({props:{value:Array}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-files-field-preview"},t._l(t.value,(function(t){return s("li",{key:t.url},[s("k-link",{attrs:{title:t.filename,to:t.link},nativeOn:{click:function(t){t.stopPropagation()}}},[s("k-item-image",{attrs:{image:t.image,layout:"list"}})],1)],1)})),0):t._e()}),[],!1,eu,null,null,null);function eu(t){for(let e in Ql)this[e]=Ql[e]}var su=function(){return tu.exports}();const nu={};var iu=zt({inheritAttrs:!1,props:{value:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-list-field-preview",domProps:{innerHTML:t._s(t.value)}})}),[],!1,ou,null,null,null);function ou(t){for(let e in nu)this[e]=nu[e]}var ru=function(){return iu.exports}();const au={};var lu=zt({props:{value:Array}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-pages-field-preview"},t._l(t.value,(function(e){return s("li",{key:e.id},[s("figure",[s("k-link",{attrs:{title:e.id,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[s("k-item-image",{staticClass:"k-pages-field-preview-image",attrs:{image:e.image,layout:"list"}}),s("figcaption",[t._v(" "+t._s(e.text)+" ")])],1)],1)])})),0):t._e()}),[],!1,uu,null,null,null);function uu(t){for(let e in au)this[e]=au[e]}var cu=function(){return lu.exports}();const du={};var pu=zt({props:{field:Object,value:String},computed:{text(){return Po.methods.toDatetime.call(this,this.value).format(this.field.display)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("p",{staticClass:"k-time-field-preview"},[t._v(" "+t._s(t.text)+" ")])])}),[],!1,hu,null,null,null);function hu(t){for(let e in du)this[e]=du[e]}var fu=function(){return pu.exports}();const mu={props:{field:Object,value:Boolean,column:Object},computed:{text(){return!1!==this.column.text?this.field.text:null}}},gu={};var ku=zt(mu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{staticClass:"k-toggle-field-preview",attrs:{text:t.text,type:"toggle"},on:{input:function(e){return t.$emit("input",e)}},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})}),[],!1,vu,null,null,null);function vu(t){for(let e in gu)this[e]=gu[e]}var bu=function(){return ku.exports}();const yu={};var $u=zt({props:{value:Array}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.value?s("ul",{staticClass:"k-users-field-preview"},t._l(t.value,(function(e){return s("li",{key:e.email},[s("figure",[s("k-link",{attrs:{title:e.email,to:e.link},nativeOn:{click:function(t){t.stopPropagation()}}},[e.avatar?s("k-image",{staticClass:"k-users-field-preview-avatar",attrs:{src:e.avatar.url,back:"pattern"}}):s("k-icon",{staticClass:"k-users-field-preview-avatar",attrs:{type:"user",back:"pattern"}}),s("figcaption",[t._v(" "+t._s(e.username)+" ")])],1)],1)])})),0):t._e()}),[],!1,_u,null,null,null);function _u(t){for(let e in yu)this[e]=yu[e]}var wu=function(){return $u.exports}();const xu={};var Su=zt({inheritAttrs:!1,props:{value:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-writer-field-preview",domProps:{innerHTML:t._s(t.value)}})}),[],!1,Cu,null,null,null);function Cu(t){for(let e in xu)this[e]=xu[e]}var Ou=function(){return Su.exports}();const Eu={props:{cover:Boolean,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio)}}},Tu={};var Au=zt(Eu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-aspect-ratio",style:{"padding-bottom":t.ratioPadding},attrs:{"data-cover":t.cover}},[t._t("default")],2)}),[],!1,Lu,null,null,null);function Lu(t){for(let e in Tu)this[e]=Tu[e]}var Iu=function(){return Au.exports}();const ju={};var Bu=zt({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-bar"},[t.$slots.left?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?s("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()])}),[],!1,Mu,null,null,null);function Mu(t){for(let e in ju)this[e]=ju[e]}var Du=function(){return Bu.exports}();const Pu={props:{theme:{type:String,default:"none"},text:String,html:{type:Boolean,default:!1}}},Nu={};var qu=zt(Pu,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",t._g({staticClass:"k-box",attrs:{"data-theme":t.theme}},t.$listeners),[t._t("default",(function(){return[t.html?s("k-text",{domProps:{innerHTML:t._s(t.text)}}):s("k-text",[t._v(" "+t._s(t.text)+" ")])]}))],2)}),[],!1,Fu,null,null,null);function Fu(t){for(let e in Nu)this[e]=Nu[e]}var Ru=function(){return qu.exports}();const zu={props:{help:String,items:{type:[Array,Object],default:()=>[]},layout:{type:String,default:"list"},size:String,sortable:Boolean,pagination:{type:[Boolean,Object],default:()=>!1}},computed:{hasPagination(){return!1!==this.pagination&&(!0!==this.paginationOptions.hide&&!(this.pagination.total<=this.pagination.limit))},hasFooter(){return!(!this.hasPagination&&!this.help)},paginationOptions(){const t="object"!=typeof this.pagination?{}:this.pagination;return a({limit:10,details:!0,keys:!1,total:0,hide:!1},t)}},watch:{$props(){this.$forceUpdate()}},methods:{onOption(...t){this.$emit("action",...t),this.$emit("option",...t)}}},Hu={};var Uu=zt(zu,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-collection"},[s("k-items",{attrs:{items:t.items,layout:t.layout,size:t.size,sortable:t.sortable},on:{option:t.onOption,sort:function(e){return t.$emit("sort",e)},change:function(e){return t.$emit("change",e)}}}),t.hasFooter?s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e(),s("div",{staticClass:"k-collection-pagination"},[t.hasPagination?s("k-pagination",t._b({on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.paginationOptions,!1)):t._e()],1)],1):t._e()],1)}),[],!1,Ku,null,null,null);function Ku(t){for(let e in Hu)this[e]=Hu[e]}var Ju=function(){return Uu.exports}();const Gu={props:{width:String,sticky:Boolean}},Vu={};var Wu=zt(Gu,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-column",attrs:{"data-width":t.width,"data-sticky":t.sticky}},[s("div",[t._t("default")],2)])}),[],!1,Yu,null,null,null);function Yu(t){for(let e in Vu)this[e]=Vu[e]}var Xu=function(){return Wu.exports}();const Zu={props:{disabled:{type:Boolean,default:!1}},data:()=>({files:[],dragging:!1,over:!1}),methods:{cancel(){this.reset()},reset(){this.dragging=!1,this.over=!1},onDrop(t){return!0===this.disabled||!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.$emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave(){this.reset()},onOver(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},Qu={};var tc=zt(Zu,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)}),[],!1,ec,null,null,null);function ec(t){for(let e in Qu)this[e]=Qu[e]}var sc=function(){return tc.exports}();const nc={};var ic=zt({props:{text:String,icon:String,layout:{type:String,default:"list"}},computed:{element(){return void 0!==this.$listeners.click?"button":"div"}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.element,t._g({tag:"component",staticClass:"k-empty",attrs:{"data-layout":t.layout,type:"button"===t.element&&"button"}},t.$listeners),[t.icon?s("k-icon",{attrs:{type:t.icon}}):t._e(),s("p",[t._t("default")],2)],1)}),[],!1,oc,null,null,null);function oc(t){for(let e in nc)this[e]=nc[e]}var rc=function(){return ic.exports}();const ac={};var lc=zt({props:{details:Array,image:Object,url:String}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-file-preview"},[s("k-view",{staticClass:"k-file-preview-layout"},[s("div",{staticClass:"k-file-preview-image"},[s("k-link",{staticClass:"k-file-preview-image-link",attrs:{to:t.url,title:t.$t("open"),target:"_blank"}},[s("k-item-image",{attrs:{image:t.image,layout:"cards"}})],1)],1),s("div",{staticClass:"k-file-preview-details"},[s("ul",t._l(t.details,(function(e){return s("li",{key:e.title},[s("h3",[t._v(t._s(e.title))]),s("p",[e.link?s("k-link",{attrs:{to:e.link,tabindex:"-1",target:"_blank"}},[t._v(" /"+t._s(e.text)+" ")]):[t._v(" "+t._s(e.text)+" ")]],2)])})),0)])])],1)}),[],!1,uc,null,null,null);function uc(t){for(let e in ac)this[e]=ac[e]}var cc=function(){return lc.exports}();const dc={};var pc=zt({props:{gutter:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter}},[t._t("default")],2)}),[],!1,hc,null,null,null);function hc(t){for(let e in dc)this[e]=dc[e]}var fc=function(){return pc.exports}();const mc={props:{editable:Boolean,tab:String,tabs:{type:Array,default:()=>[]}},computed:{tabsWithBadges(){const t=Object.keys(this.$store.getters["content/changes"]());return this.tabs.map((e=>{let s=[];return Object.values(e.columns).forEach((t=>{Object.values(t.sections).forEach((t=>{"fields"===t.type&&Object.keys(t.fields).forEach((t=>{s.push(t)}))}))})),e.badge=s.filter((e=>t.includes(e.toLowerCase()))).length,e}))}}},gc={};var kc=zt(mc,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("header",{staticClass:"k-header",attrs:{"data-editable":t.editable}},[s("k-headline",{attrs:{tag:"h1",size:"huge"}},[t.editable&&t.$listeners.edit?s("span",{staticClass:"k-headline-editable",on:{click:function(e){return t.$emit("edit")}}},[t._t("default"),s("k-icon",{attrs:{type:"edit"}})],2):t._t("default")],2),t.$slots.left||t.$slots.right?s("k-bar",{staticClass:"k-header-buttons",scopedSlots:t._u([{key:"left",fn:function(){return[t._t("left")]},proxy:!0},{key:"right",fn:function(){return[t._t("right")]},proxy:!0}],null,!0)}):t._e(),s("k-tabs",{attrs:{tab:t.tab,tabs:t.tabsWithBadges,theme:"notice"}})],1)}),[],!1,vc,null,null,null);function vc(t){for(let e in gc)this[e]=gc[e]}var bc=function(){return kc.exports}();const yc={};var $c=zt({inheritAttrs:!1},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-panel",{staticClass:"k-panel-inside",attrs:{tabindex:"0"}},[s("header",{staticClass:"k-panel-header"},[s("k-topbar",{attrs:{breadcrumb:t.$view.breadcrumb,license:t.$license,menu:t.$menu,view:t.$view}})],1),s("main",{staticClass:"k-panel-view scroll-y"},[t._t("default")],2),t._t("footer")],2)}),[],!1,_c,null,null,null);function _c(t){for(let e in yc)this[e]=yc[e]}var wc=function(){return $c.exports}(),xc=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("article",t._b({staticClass:"k-item",class:!!t.layout&&"k-"+t.layout+"-item",attrs:{"data-has-figure":t.hasFigure,"data-has-info":Boolean(t.info),"data-has-label":Boolean(t.label),"data-has-options":Boolean(t.options),tabindex:"-1"},on:{click:function(e){return t.$emit("click",e)},dragstart:function(e){return t.$emit("drag",e)}}},"article",t.data,!1),[t._t("image",(function(){return[t.hasFigure?s("k-item-image",{attrs:{image:t.image,layout:t.layout,width:t.width}}):t._e()]})),t.sortable?s("k-sort-handle",{staticClass:"k-item-sort-handle"}):t._e(),s("header",{staticClass:"k-item-content"},[t._t("default",(function(){return[s("h3",{staticClass:"k-item-title"},[t.link?s("k-link",{staticClass:"k-item-title-link",attrs:{target:t.target,to:t.link}},[s("span",{domProps:{innerHTML:t._s(t.title)}})]):s("span",{domProps:{innerHTML:t._s(t.title)}})],1),t.info?s("p",{staticClass:"k-item-info",domProps:{innerHTML:t._s(t.info)}}):t._e()]}))],2),t.flag||t.options||t.$slots.options?s("footer",{staticClass:"k-item-footer"},[s("nav",{staticClass:"k-item-buttons",on:{click:function(t){t.stopPropagation()}}},[t.flag?s("k-status-icon",t._b({},"k-status-icon",t.flag,!1)):t._e(),t._t("options",(function(){return[t.options?s("k-options-dropdown",{staticClass:"k-item-options-dropdown",attrs:{options:t.options},on:{option:t.onOption}}):t._e()]}))],2)]):t._e()],2)};const Sc={inheritAttrs:!1,props:{data:Object,flag:Object,image:[Object,Boolean],info:String,label:String,layout:{type:String,default:"list"},link:{type:[Boolean,String,Function]},options:{type:[Array,Function,String]},sortable:Boolean,target:String,text:String,width:String},computed:{hasFigure(){return!1!==this.image&&Object.keys(this.image).length>0},title(){return this.text||"-"}},methods:{onOption(t){this.$emit("action",t),this.$emit("option",t)}}},Cc={};var Oc=zt(Sc,xc,[],!1,Ec,null,null,null);function Ec(t){for(let e in Cc)this[e]=Cc[e]}var Tc=function(){return Oc.exports}();const Ac={inheritAttrs:!1,props:{image:[Object,Boolean],layout:{type:String,default:"list"},width:String},computed:{back(){return this.image.back||"black"},ratio(){return"cards"===this.layout&&this.image.ratio||"1/1"},size(){switch(this.layout){case"cards":return"large";case"cardlets":return"medium";default:return"regular"}},sizes(){switch(this.width){case"1/2":case"2/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 44em, 27em";case"1/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 29.333em, 27em";case"1/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 22em, 27em";case"2/3":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 27em, 27em";case"3/4":return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 66em, 27em";default:return"(min-width: 30em) and (max-width: 65em) 59em, (min-width: 65em) 88em, 27em"}}}},Lc={};var Ic=zt(Ac,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.image?s("div",{staticClass:"k-item-figure",style:{background:t.$helper.color(t.back)}},[t.image.src?s("k-image",{staticClass:"k-item-image",attrs:{cover:t.image.cover,ratio:t.ratio,sizes:t.sizes,src:t.image.src,srcset:t.image.srcset}}):s("k-aspect-ratio",{attrs:{ratio:t.ratio}},[s("k-icon",{staticClass:"k-item-icon",attrs:{color:t.$helper.color(t.image.color),size:t.size,type:t.image.icon}})],1)],1):t._e()}),[],!1,jc,null,null,null);function jc(t){for(let e in Lc)this[e]=Lc[e]}var Bc=function(){return Ic.exports}();const Mc={inheritAttrs:!1,props:{items:{type:Array,default:()=>[]},layout:{type:String,default:"list"},image:{type:[Object,Boolean],default:()=>({})},sortable:Boolean,empty:{type:[String,Object]},size:{type:String,default:"default"}},computed:{dragOptions(){return{sort:this.sortable,disabled:!1===this.sortable,draggable:".k-draggable-item"}}},methods:{onDragStart(t,e){this.$store.dispatch("drag",{type:"text",data:e})},imageOptions(t){let e=this.image,s=t.image;return!1!==e&&!1!==s&&("object"!=typeof e&&(e={}),"object"!=typeof s&&(s={}),a(a({},s),e))}}},Dc={};var Pc=zt(Mc,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-draggable",{staticClass:"k-items",class:"k-"+t.layout+"-items",attrs:{handle:!0,options:t.dragOptions,"data-layout":t.layout,"data-size":t.size,list:t.items},on:{change:function(e){return t.$emit("change",e)},end:function(e){return t.$emit("sort",t.items,e)}}},[t._t("default",(function(){return t._l(t.items,(function(e,n){return s("k-item",t._b({key:e.id||n,class:{"k-draggable-item":t.sortable&&e.sortable},attrs:{image:t.imageOptions(e),layout:t.layout,sortable:t.sortable&&e.sortable,width:e.column},on:{click:function(s){return t.$emit("item",e,n)},drag:function(s){return t.onDragStart(s,e.dragText)},flag:function(s){return t.$emit("flag",e,n)},option:function(s){return t.$emit("option",s,e,n)}},nativeOn:{mouseover:function(s){return t.$emit("hover",s,e,n)}},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options",null,{item:e,index:n})]},proxy:!0}],null,!0)},"k-item",e,!1))}))}))],2)}),[],!1,Nc,null,null,null);function Nc(t){for(let e in Dc)this[e]=Dc[e]}var qc=function(){return Pc.exports}();const Fc={inheritAttrs:!0,props:{autofocus:{type:Boolean,default:!0},centered:{type:Boolean,default:!1},dimmed:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data:()=>({isOpen:!1,scrollTop:0}),methods:{close(){!1!==this.isOpen&&(this.isOpen=!1,this.$emit("close"),this.restoreScrollPosition(),this.$events.$off("keydown.esc",this.close))},focus(){let t=this.$refs.overlay.querySelector("\n [autofocus],\n [data-autofocus]\n ");null===t&&(t=this.$refs.overlay.querySelector("\n input,\n textarea,\n select,\n button\n ")),t&&"function"==typeof t.focus?t.focus():this.$slots.default[0]&&this.$slots.default[0].context&&"function"==typeof this.$slots.default[0].context.focus&&this.$slots.default[0].context.focus()},open(){!0!==this.isOpen&&(this.storeScrollPosition(),this.isOpen=!0,this.$emit("open"),this.$events.$on("keydown.esc",this.close),setTimeout((()=>{!0===this.autofocus&&this.focus(),document.querySelector(".k-overlay > *").addEventListener("mousedown",(t=>t.stopPropagation())),this.$emit("ready")}),1))},restoreScrollPosition(){const t=document.querySelector(".k-panel-view");t&&t.scrollTop&&(t.scrollTop=this.scrollTop)},storeScrollPosition(){const t=document.querySelector(".k-panel-view");t&&t.scrollTop?this.scrollTop=t.scrollTop:this.scrollTop=0}}},Rc={};var zc=zt(Fc,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isOpen?s("portal",[s("div",t._g({ref:"overlay",staticClass:"k-overlay",class:t.$vnode.data.staticClass,attrs:{"data-centered":t.loading||t.centered,"data-dimmed":t.dimmed,"data-loading":t.loading,dir:t.$translation.direction},on:{mousedown:t.close}},t.$listeners),[t.loading?s("k-loader",{staticClass:"k-overlay-loader"}):t._t("default",null,{close:t.close,isOpen:t.isOpen})],2)]):t._e()}),[],!1,Hc,null,null,null);function Hc(t){for(let e in Rc)this[e]=Rc[e]}var Uc=function(){return zc.exports}();const Kc={};var Jc=zt({computed:{defaultLanguage(){return!!this.$language&&this.$language.default},dialog(){return this.$helper.clone(this.$store.state.dialog)},language(){return this.$language?this.$language.code:null},role(){return this.$user?this.$user.role:null},user(){return this.$user?this.$user.id:null}},created(){this.$events.$on("drop",this.drop)},destroyed(){this.$events.$off("drop",this.drop)},methods:{drop(){this.$store.dispatch("drag",null)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-panel",attrs:{"data-dragging":t.$store.state.drag,"data-loading":t.$store.state.isLoading,"data-language":t.language,"data-language-default":t.defaultLanguage,"data-role":t.role,"data-translation":t.$translation.code,"data-user":t.user,dir:t.$translation.direction}},[t._t("default"),t.$store.state.dialog&&t.$store.state.dialog.props?[s("k-fiber-dialog",t._b({},"k-fiber-dialog",t.dialog,!1))]:t._e(),!1!==t.$store.state.fatal?s("k-fatal",{attrs:{html:t.$store.state.fatal}}):t._e(),!1===t.$system.isLocal?s("k-offline-warning"):t._e(),s("k-icons")],2)}),[],!1,Gc,null,null,null);function Gc(t){for(let e in Kc)this[e]=Kc[e]}var Vc=function(){return Jc.exports}();const Wc={};var Yc=zt({props:{tab:String,tabs:Array,theme:String},data(){return{size:null,visibleTabs:this.tabs,invisibleTabs:[]}},computed:{current(){return(this.tabs.find((t=>t.name===this.tab))||this.tabs[0]||{}).name}},watch:{tabs(t){this.visibleTabs=t,this.invisibleTabs=[],this.resize(!0)}},created(){window.addEventListener("resize",this.resize)},destroyed(){window.removeEventListener("resize",this.resize)},methods:{resize(t){if(this.tabs&&!(this.tabs.length<=1)){if(this.tabs.length<=3)return this.visibleTabs=this.tabs,void(this.invisibleTabs=[]);if(window.innerWidth>=700){if("large"===this.size&&!t)return;this.visibleTabs=this.tabs,this.invisibleTabs=[],this.size="large"}else{if("small"===this.size&&!t)return;this.visibleTabs=this.tabs.slice(0,2),this.invisibleTabs=this.tabs.slice(2),this.size="small"}}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.tabs&&t.tabs.length>1?s("div",{staticClass:"k-tabs",attrs:{"data-theme":t.theme}},[s("nav",[t._l(t.visibleTabs,(function(e){return s("k-button",{key:e.name,staticClass:"k-tab-button",attrs:{link:e.link,current:t.current===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" "),e.badge?s("span",{staticClass:"k-tabs-badge"},[t._v(" "+t._s(e.badge)+" ")]):t._e()])})),t.invisibleTabs.length?s("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{text:t.$t("more"),icon:"dots"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}}):t._e()],2),t.invisibleTabs.length?s("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{align:"right"}},t._l(t.invisibleTabs,(function(e){return s("k-dropdown-item",{key:"more-"+e.name,attrs:{link:e.link,current:t.tab===e.name,icon:e.icon,tooltip:e.label}},[t._v(" "+t._s(e.label||e.text||e.name)+" ")])})),1):t._e()],1):t._e()}),[],!1,Xc,null,null,null);function Xc(t){for(let e in Wc)this[e]=Wc[e]}var Zc=function(){return Yc.exports}();const Qc={};var td=zt({props:{align:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)}),[],!1,ed,null,null,null);function ed(t){for(let e in Qc)this[e]=Qc[e]}var sd=function(){return td.exports}();const nd={components:{draggable:V},props:{data:Object,element:String,handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},data(){return{listeners:l(a({},this.$listeners),{start:t=>{this.$store.dispatch("drag",{}),this.$listeners.start&&this.$listeners.start(t)},end:t=>{this.$store.dispatch("drag",null),this.$listeners.end&&this.$listeners.end(t)}})}},computed:{dragOptions(){let t=!1;return t=!0===this.handle?".k-sort-handle":this.handle,a({fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-view")},this.options)}}},id={};var od=zt(nd,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("draggable",t._g(t._b({staticClass:"k-draggable",attrs:{"component-data":t.data,tag:t.element,list:t.list,move:t.move},scopedSlots:t._u([{key:"footer",fn:function(){return[t._t("footer")]},proxy:!0}],null,!0)},"draggable",t.dragOptions,!1),t.listeners),[t._t("default")],2)}),[],!1,rd,null,null,null);function rd(t){for(let e in id)this[e]=id[e]}var ad=function(){return od.exports}();const ld={};var ud=zt({data:()=>({error:null}),errorCaptured(t){return this.$config.debug&&window.console.warn(t),this.error=t,!1},render(t){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):t("k-box",{attrs:{theme:"negative"}},this.error.message||this.error):this.$slots.default[0]}},undefined,undefined,!1,cd,null,null,null);function cd(t){for(let e in ld)this[e]=ld[e]}var dd=function(){return ud.exports}();const pd={};var hd=zt({props:{html:String},mounted(){try{let t=this.$refs.iframe.contentWindow.document;t.open(),t.write(this.html),t.close()}catch(t){console.error(t)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-fatal"},[s("div",{staticClass:"k-fatal-box"},[s("k-bar",{scopedSlots:t._u([{key:"left",fn:function(){return[s("k-headline",[t._v(" The JSON response could not be parsed ")])]},proxy:!0},{key:"right",fn:function(){return[s("k-button",{attrs:{icon:"cancel",text:"Close"},on:{click:function(e){return t.$store.dispatch("fatal",!1)}}})]},proxy:!0}])}),s("iframe",{ref:"iframe",staticClass:"k-fatal-iframe"})],1)])}),[],!1,fd,null,null,null);function fd(t){for(let e in pd)this[e]=pd[e]}var md=function(){return hd.exports}();const gd={};var kd=zt({props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s(t.tag,t._g({tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size}},t.$listeners),[t.link?s("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)}),[],!1,vd,null,null,null);function vd(t){for(let e in gd)this[e]=gd[e]}var bd=function(){return kd.exports}();const yd={};var $d=zt({props:{alt:String,color:String,back:String,size:String,type:String},computed:{isEmoji(){return this.$helper.string.hasEmoji(this.type)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{class:"k-icon k-icon-"+t.type,style:{background:t.$helper.color(t.back)},attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-back":t.back,"data-size":t.size}},[t.isEmoji?s("span",{staticClass:"k-icon-emoji"},[t._v(t._s(t.type))]):s("svg",{style:{color:t.$helper.color(t.color)},attrs:{viewBox:"0 0 16 16"}},[s("use",{attrs:{"xlink:href":"#icon-"+t.type}})])])}),[],!1,_d,null,null,null);function _d(t){for(let e in yd)this[e]=yd[e]}var wd=function(){return $d.exports}(),xd=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("svg",{staticClass:"k-icons",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",overflow:"hidden"}},[s("defs",t._l(t.$options.icons,(function(e,n){return s("symbol",{key:n,attrs:{id:"icon-"+n,viewBox:"0 0 16 16"},domProps:{innerHTML:t._s(e)}})})),0)])},Sd=[];const Cd={icons:window.panel.plugins.icons},Od={};var Ed=zt(Cd,xd,Sd,!1,Td,null,null,null);function Td(t){for(let e in Od)this[e]=Od[e]}var Ad=function(){return Ed.exports}();const Ld={props:{alt:String,back:String,cover:Boolean,ratio:String,sizes:String,src:String,srcset:String},data:()=>({loaded:{type:Boolean,default:!1},error:{type:Boolean,default:!1}}),computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"1/1")}},created(){let t=new Image;t.onload=()=>{this.loaded=!0,this.$emit("load")},t.onerror=()=>{this.error=!0,this.$emit("error")},t.src=this.src}},Id={};var jd=zt(Ld,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",t._g({staticClass:"k-image",attrs:{"data-ratio":t.ratio,"data-back":t.back,"data-cover":t.cover}},t.$listeners),[s("span",{style:"padding-bottom:"+t.ratioPadding},[t.loaded?s("img",{key:t.src,attrs:{alt:t.alt||"",src:t.src,srcset:t.srcset,sizes:t.sizes},on:{dragstart:function(t){t.preventDefault()}}}):t._e(),t.loaded||t.error?t._e():s("k-loader",{attrs:{position:"center",theme:"light"}}),!t.loaded&&t.error?s("k-icon",{staticClass:"k-image-error",attrs:{type:"cancel"}}):t._e()],1)])}),[],!1,Bd,null,null,null);function Bd(t){for(let e in Id)this[e]=Id[e]}var Md=function(){return jd.exports}();const Dd={};var Pd=zt({},(function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"k-loader"},[e("k-icon",{staticClass:"k-loader-icon",attrs:{type:"loader"}})],1)}),[],!1,Nd,null,null,null);function Nd(t){for(let e in Dd)this[e]=Dd[e]}var qd=function(){return Pd.exports}();const Fd={};var Rd=zt({data:()=>({offline:!1}),created(){this.$events.$on("offline",this.isOffline),this.$events.$on("online",this.isOnline)},destroyed(){this.$events.$off("offline",this.isOffline),this.$events.$off("online",this.isOnline)},methods:{isOnline(){this.offline=!1},isOffline(){this.offline=!0}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.offline?s("div",{staticClass:"k-offline-warning"},[s("p",[s("k-icon",{attrs:{type:"bolt"}}),t._v(" "+t._s(t.$t("error.offline"))+" ")],1)]):t._e()}),[],!1,zd,null,null,null);function zd(t){for(let e in Fd)this[e]=Fd[e]}var Hd=function(){return Rd.exports}();const Ud={};var Kd=zt({props:{value:{type:Number,default:0}},data(){return{state:this.value}},watch:{value(t){this.state=t}},methods:{set(t){this.state=t}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v(" "+t._s(t.state)+"% ")])}),[],!1,Jd,null,null,null);function Jd(t){for(let e in Ud)this[e]=Ud[e]}var Gd=function(){return Kd.exports}();const Vd={};var Wd=zt({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-registration"},[s("p",[t._v(t._s(t.$t("license.unregistered")))]),s("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,tooltip:t.$t("license.unregistered"),icon:"key"},on:{click:function(e){return t.$dialog("registration")}}},[t._v(" "+t._s(t.$t("license.register"))+" ")]),s("k-button",{staticClass:"k-topbar-button",attrs:{responsive:!0,link:"https://getkirby.com/buy",target:"_blank",icon:"cart"}},[t._v(" "+t._s(t.$t("license.buy"))+" ")])],1)}),[],!1,Yd,null,null,null);function Yd(t){for(let e in Vd)this[e]=Vd[e]}var Xd=function(){return Wd.exports}();const Zd={};var Qd=zt({props:{icon:{type:String,default:"sort"}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-icon",{staticClass:"k-sort-handle",attrs:{type:t.icon,"aria-hidden":"true"}})}),[],!1,tp,null,null,null);function tp(t){for(let e in Zd)this[e]=Zd[e]}var ep=function(){return Qd.exports}();const sp={props:{click:{type:Function,default:()=>{}},disabled:Boolean,responsive:Boolean,status:String,text:String,tooltip:String},computed:{icon(){return"draft"===this.status?"circle-outline":"unlisted"===this.status?"circle-half":"circle"},theme(){return"draft"===this.status?"negative":"unlisted"===this.status?"info":"positive"},title(){let t=this.tooltip||this.text;return this.disabled&&(t+=` (${this.$t("disabled")})`),t}},methods:{onClick(){this.click(),this.$emit("click")}}},np={};var ip=zt(sp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",{class:"k-status-icon k-status-icon-"+t.status,attrs:{disabled:t.disabled,icon:t.icon,responsive:t.responsive,text:t.text,theme:t.theme,tooltip:t.title},on:{click:t.onClick}})}),[],!1,op,null,null,null);function op(t){for(let e in np)this[e]=np[e]}var rp=function(){return ip.exports}();const ap={};var lp=zt({props:{align:String,size:String,theme:String}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"k-text",attrs:{"data-align":t.align,"data-size":t.size,"data-theme":t.theme}},[t._t("default")],2)}),[],!1,up,null,null,null);function up(t){for(let e in ap)this[e]=ap[e]}var cp=function(){return lp.exports}();const dp={};var pp=zt({props:{user:[Object,String]}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-user-info"},[t.user.avatar?s("k-image",{attrs:{cover:!0,src:t.user.avatar.url,ratio:"1/1"}}):s("k-icon",{attrs:{type:"user"}}),t._v(" "+t._s(t.user.name||t.user.email||t.user)+" ")],1)}),[],!1,hp,null,null,null);function hp(t){for(let e in dp)this[e]=dp[e]}var fp=function(){return pp.exports}();const mp={};var gp=zt({props:{crumbs:{type:Array,default:()=>[]},label:{type:String,default:"Breadcrumb"},view:Object},computed:{dropdown(){return this.segments.map((t=>l(a({},t),{text:t.label,icon:"angle-right"})))},segments(){return[{link:this.view.link,label:this.view.breadcrumbLabel,icon:this.view.icon,loading:this.$store.state.isLoading},...this.crumbs]}},methods:{isLast(t){return this.crumbs.length-1===t}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"k-breadcrumb",attrs:{"aria-label":t.label}},[s("k-dropdown",{staticClass:"k-breadcrumb-dropdown"},[s("k-button",{attrs:{icon:"road-sign"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),s("k-dropdown-content",{ref:"dropdown",attrs:{options:t.dropdown,theme:"light"}})],1),s("ol",t._l(t.segments,(function(e,n){return s("li",{key:n},[s("k-link",{staticClass:"k-breadcrumb-link",attrs:{title:e.text||e.label,to:e.link,"aria-current":!!t.isLast(n)&&"page"}},[e.loading?s("k-loader",{staticClass:"k-breadcrumb-icon"}):e.icon?s("k-icon",{staticClass:"k-breadcrumb-icon",attrs:{type:e.icon}}):t._e(),s("span",{staticClass:"k-breadcrumb-link-text"},[t._v(" "+t._s(e.text||e.label)+" ")])],1)],1)})),0)],1)}),[],!1,kp,null,null,null);function kp(t){for(let e in mp)this[e]=mp[e]}var vp=function(){return gp.exports}();const bp={inheritAttrs:!1,props:{autofocus:Boolean,click:Function,current:[String,Boolean],disabled:Boolean,icon:String,id:[String,Number],link:String,responsive:Boolean,rel:String,role:String,target:String,tabindex:String,text:String,theme:String,tooltip:String,type:{type:String,default:"button"}},computed:{component(){return!0===this.disabled?"k-button-disabled":this.link?"k-button-link":"k-button-native"}},methods:{focus(){this.$refs.button.focus&&this.$refs.button.focus()},tab(){this.$refs.button.tab&&this.$refs.button.tab()},untab(){this.$refs.button.untab&&this.$refs.button.untab()}}},yp={};var $p=zt(bp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.component,t._g(t._b({ref:"button",tag:"component"},"component",t.$props,!1),t.$listeners),[t.text?[t._v(" "+t._s(t.text)+" ")]:t._t("default")],2)}),[],!1,_p,null,null,null);function _p(t){for(let e in yp)this[e]=yp[e]}var wp=function(){return $p.exports}();const xp={inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String}},Sp={};var Cp=zt(xp,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Op,null,null,null);function Op(t){for(let e in Sp)this[e]=Sp[e]}var Ep=function(){return Cp.exports}();const Tp={};var Ap=zt({props:{buttons:Array}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-button-group"},[t.$slots.default?t._t("default"):t._l(t.buttons,(function(e,n){return s("k-button",t._b({key:n},"k-button",e,!1))}))],2)}),[],!1,Lp,null,null,null);function Lp(t){for(let e in Tp)this[e]=Tp[e]}var Ip=function(){return Ap.exports}();const jp={inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String}},Bp={};var Mp=zt(jp,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-link",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},t.$listeners),[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,Dp,null,null,null);function Dp(t){for(let e in Bp)this[e]=Bp[e]}var Pp=function(){return Mp.exports}(),Np={mounted(){this.$el.addEventListener("keyup",this.onTab,!0),this.$el.addEventListener("blur",this.onUntab,!0)},destroyed(){this.$el.removeEventListener("keyup",this.onTab,!0),this.$el.removeEventListener("blur",this.onUntab,!0)},methods:{focus(){this.$el.focus&&this.$el.focus()},onTab(t){9===t.keyCode&&this.$el.setAttribute("data-tabbed",!0)},onUntab(){this.$el.removeAttribute("data-tabbed")},tab(){this.$el.focus(),this.$el.setAttribute("data-tabbed",!0)},untab(){this.$el.removeAttribute("data-tabbed")}}};const qp={mixins:[Np],inheritAttrs:!1,props:{autofocus:Boolean,click:{type:Function,default:()=>{}},current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}}},Fp={};var Rp=zt(qp,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("button",t._g({staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type:t.type},on:{click:t.click}},t.$listeners),[t.icon?s("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?s("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,zp,null,null,null);function zp(t){for(let e in Fp)this[e]=Fp[e]}var Hp=function(){return Rp.exports}();const Up={};var Kp=zt({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"k-dropdown",on:{click:function(t){t.stopPropagation()}}},[t._t("default")],2)}),[],!1,Jp,null,null,null);function Jp(t){for(let e in Up)this[e]=Up[e]}var Gp=function(){return Kp.exports}();let Vp=null;const Wp={};var Yp=zt({props:{align:{type:String,default:"left"},options:[Array,Function,String],theme:{type:String,default:"dark"}},data:()=>({current:-1,dropup:!1,isOpen:!1,items:[]}),methods:{async fetchOptions(t){if(!this.options)return t(this.items);"string"==typeof this.options?this.$dropdown(this.options)(t):"function"==typeof this.options?this.options(t):Array.isArray(this.options)&&t(this.options)},onOptionClick(t){"function"==typeof t.click?t.click.call(this):t.click&&this.$emit("action",t.click)},open(){this.reset(),Vp&&Vp!==this&&Vp.close(),this.fetchOptions((t=>{this.$events.$on("keydown",this.navigate),this.$events.$on("click",this.close),this.items=t,this.isOpen=!0,Vp=this,this.onOpen(),this.$emit("open")}))},reset(){this.current=-1,this.$events.$off("keydown",this.navigate),this.$events.$off("click",this.close)},close(){this.reset(),this.isOpen=Vp=!1,this.$emit("close")},toggle(){this.isOpen?this.close():this.open()},focus(t=0){this.$children[t]&&this.$children[t].focus&&(this.current=t,this.$children[t].focus())},onOpen(){this.dropup=!1,this.$nextTick((()=>{if(this.$el){let t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,e=50,s=this.$el.getBoundingClientRect().top||0,n=this.$el.clientHeight;s+n>t-e&&n+2*ethis.$children.length-1){const t=this.$children.filter((t=>!1===t.disabled));this.current=this.$children.indexOf(t[t.length-1]);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled){this.focus(this.current);break}}break;case"Tab":for(;;){if(this.current++,this.current>this.$children.length-1){this.close(),this.$emit("leave",t.code);break}if(this.$children[this.current]&&!1===this.$children[this.current].disabled)break}}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isOpen?s("div",{staticClass:"k-dropdown-content",attrs:{"data-align":t.align,"data-dropup":t.dropup,"data-theme":t.theme}},[t._t("default",(function(){return[t._l(t.items,(function(e,n){return["-"===e?s("hr",{key:t._uid+"-item-"+n}):s("k-dropdown-item",t._b({key:t._uid+"-item-"+n,ref:t._uid+"-item-"+n,refInFor:!0,on:{click:function(s){return t.onOptionClick(e)}}},"k-dropdown-item",e,!1),[t._v(" "+t._s(e.text)+" ")])]}))]}))],2):t._e()}),[],!1,Xp,null,null,null);function Xp(t){for(let e in Wp)this[e]=Wp[e]}var Zp=function(){return Yp.exports}();const Qp={inheritAttrs:!1,props:{disabled:Boolean,icon:String,image:[String,Object],link:String,target:String,theme:String,upload:String,current:[String,Boolean]},data(){return{listeners:l(a({},this.$listeners),{click:t=>{this.$parent.close(),this.$emit("click",t)}})}},methods:{focus(){this.$refs.button.focus()},tab(){this.$refs.button.tab()}}},th={};var eh=zt(Qp,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button",t._g(t._b({ref:"button",staticClass:"k-dropdown-item"},"k-button",t.$props,!1),t.listeners),[t._t("default")],2)}),[],!1,sh,null,null,null);function sh(t){for(let e in th)this[e]=th[e]}var nh=function(){return eh.exports}();const ih={mixins:[Np],props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},data(){return{relAttr:"_blank"===this.target?"noreferrer noopener":this.rel,listeners:l(a({},this.$listeners),{click:this.onClick})}},computed:{href(){return"function"==typeof this.to?"":"/"!==this.to[0]||this.target?this.to:this.$url(this.to)}},methods:{isRoutable(t){return!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(!t.defaultPrevented&&((void 0===t.button||0===t.button)&&(!this.target&&!("string"==typeof this.href&&this.href.indexOf("://")>0))))},onClick(t){if(!0===this.disabled)return t.preventDefault(),!1;"function"==typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},oh={};var rh=zt(ih,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.to&&!t.disabled?s("a",t._g({ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title}},t.listeners),[t._t("default")],2):s("span",{staticClass:"k-link",attrs:{title:t.title,"data-disabled":""}},[t._t("default")],2)}),[],!1,ah,null,null,null);function ah(t){for(let e in oh)this[e]=oh[e]}var lh=function(){return rh.exports}();const uh={};var ch=zt({computed:{defaultLanguage(){return this.$languages.find((t=>!0===t.default))},language(){return this.$language},languages(){return this.$languages.filter((t=>!1===t.default))}},methods:{change(t){this.$emit("change",t),this.$go(this.$view.path,{query:{language:t.code}})}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.languages.length?s("k-dropdown",{staticClass:"k-languages-dropdown"},[s("k-button",{attrs:{text:t.language.name,responsive:!0,icon:"globe"},on:{click:function(e){return t.$refs.languages.toggle()}}}),t.languages?s("k-dropdown-content",{ref:"languages"},[s("k-dropdown-item",{on:{click:function(e){return t.change(t.defaultLanguage)}}},[t._v(" "+t._s(t.defaultLanguage.name)+" ")]),s("hr"),t._l(t.languages,(function(e){return s("k-dropdown-item",{key:e.code,on:{click:function(s){return t.change(e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2):t._e()],1):t._e()}),[],!1,dh,null,null,null);function dh(t){for(let e in uh)this[e]=uh[e]}var ph=function(){return ch.exports}();const hh={props:{align:{type:String,default:"right"},icon:{type:String,default:"dots"},options:{type:[Array,Function,String],default:()=>[]},text:{type:[Boolean,String],default:!0},theme:{type:String,default:"dark"}},computed:{hasSingleOption(){return Array.isArray(this.options)&&1===this.options.length}},methods:{onAction(t,e,s){this.$emit("action",t,e,s),this.$emit("option",t,e,s)},toggle(){this.$refs.options.toggle()}}},fh={};var mh=zt(hh,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.hasSingleOption?s("k-button",t._b({staticClass:"k-options-dropdown-toggle",attrs:{icon:t.options[0].icon||t.icon,tooltip:t.options[0].tooltip||t.options[0].text},on:{click:function(e){return t.onAction(t.options[0].option||t.options[0].click,t.options[0],0)}}},"k-button",t.options[0],!1),[!0===t.text?[t._v(" "+t._s(t.options[0].text)+" ")]:!1!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2):t.options.length?s("k-dropdown",{staticClass:"k-options-dropdown"},[s("k-button",{staticClass:"k-options-dropdown-toggle",attrs:{icon:t.icon,tooltip:t.$t("options")},on:{click:function(e){return t.$refs.options.toggle()}}},[t.text&&!0!==t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2),s("k-dropdown-content",{ref:"options",staticClass:"k-options-dropdown-content",attrs:{align:t.align,options:t.options},on:{action:t.onAction}})],1):t._e()}),[],!1,gh,null,null,null);function gh(t){for(let e in fh)this[e]=fh[e]}var kh=function(){return mh.exports}();const vh={props:{align:{type:String,default:"left"},details:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0},keys:{type:Boolean,default:!1},limit:{type:Number,default:10},page:{type:Number,default:1},pageLabel:{type:String,default:()=>window.panel.$t("pagination.page")},total:{type:Number,default:0},prevLabel:{type:String,default:()=>window.panel.$t("prev")},nextLabel:{type:String,default:()=>window.panel.$t("next")},validate:{type:Function,default:()=>Promise.resolve()}},data(){return{currentPage:this.page}},computed:{show(){return this.pages>1},start(){return(this.currentPage-1)*this.limit+1},end(){let t=this.start-1+this.limit;return t>this.total?this.total:t},detailsText(){return 1===this.limit?this.start+" / ":this.start+"-"+this.end+" / "},pages(){return Math.ceil(this.total/this.limit)},hasPrev(){return this.start>1},hasNext(){return this.endthis.limit},offset(){return this.start-1}},watch:{page(t){this.currentPage=parseInt(t)}},created(){!0===this.keys&&window.addEventListener("keydown",this.navigate,!1)},destroyed(){window.removeEventListener("keydown",this.navigate,!1)},methods:{async goTo(t){try{await this.validate(t),t<1&&(t=1),t>this.pages&&(t=this.pages),this.currentPage=t,this.$refs.dropdown&&this.$refs.dropdown.close(),this.$emit("paginate",{page:this.currentPage,start:this.start,end:this.end,limit:this.limit,offset:this.offset})}catch(e){}},prev(){this.goTo(this.currentPage-1)},next(){this.goTo(this.currentPage+1)},navigate(t){switch(t.code){case"ArrowLeft":this.prev();break;case"ArrowRight":this.next()}}}},bh={};var yh=zt(vh,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.show?s("nav",{staticClass:"k-pagination",attrs:{"data-align":t.align}},[t.show?s("k-button",{attrs:{disabled:!t.hasPrev,tooltip:t.prevLabel,icon:"angle-left"},on:{click:t.prev}}):t._e(),t.details?[t.dropdown?[s("k-dropdown",[s("k-button",{staticClass:"k-pagination-details",attrs:{disabled:!t.hasPages},on:{click:function(e){return t.$refs.dropdown.toggle()}}},[t.total>1?[t._v(" "+t._s(t.detailsText)+" ")]:t._e(),t._v(t._s(t.total)+" ")],2),s("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",on:{open:function(e){t.$nextTick((function(){return t.$refs.page.focus()}))}}},[s("div",{staticClass:"k-pagination-settings"},[s("label",{attrs:{for:"k-pagination-page"}},[s("span",[t._v(t._s(t.pageLabel)+":")]),s("select",{ref:"page",attrs:{id:"k-pagination-page"}},t._l(t.pages,(function(e){return s("option",{key:e,domProps:{selected:t.page===e,value:e}},[t._v(" "+t._s(e)+" ")])})),0)]),s("k-button",{attrs:{icon:"check"},on:{click:function(e){return t.goTo(t.$refs.page.value)}}})],1)])],1)]:[s("span",{staticClass:"k-pagination-details"},[t.total>1?[t._v(t._s(t.detailsText))]:t._e(),t._v(t._s(t.total)+" ")],2)]]:t._e(),t.show?s("k-button",{attrs:{disabled:!t.hasNext,tooltip:t.nextLabel,icon:"angle-right"},on:{click:t.next}}):t._e()],2):t._e()}),[],!1,$h,null,null,null);function $h(t){for(let e in bh)this[e]=bh[e]}var _h=function(){return yh.exports}(),wh=function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-button-group",{staticClass:"k-prev-next",attrs:{buttons:[Object.assign({},t.button(t.prev),{icon:"angle-left"}),Object.assign({},t.button(t.next),{icon:"angle-right"})]}})};const xh={props:{prev:{type:[Boolean,Object],default:!1},next:{type:[Boolean,Object],default:!1}},methods:{button:t=>t||{disabled:!0,link:"#"}}},Sh={};var Ch=zt(xh,wh,[],!1,Oh,null,null,null);function Oh(t){for(let e in Sh)this[e]=Sh[e]}var Eh=function(){return Ch.exports}();const Th={};var Ah=zt({props:{types:{type:Object,default:()=>({})},type:String},data(){return{isLoading:!1,hasResults:!0,items:[],currentType:this.getType(this.type),q:null,selected:-1}},watch:{q(t,e){t!==e&&this.search(this.q)},currentType(t,e){t!==e&&this.search(this.q)},type(){this.currentType=this.getType(this.type)}},created(){this.search=bt(this.search,250),this.$events.$on("keydown.cmd.shift.f",this.open)},destroyed(){this.$events.$off("keydown.cmd.shift.f",this.open)},methods:{changeType(t){this.currentType=this.getType(t),this.$nextTick((()=>{this.$refs.input.focus()}))},close(){this.$refs.overlay.close(),this.hasResults=!0,this.items=[],this.q=null},getType(t){return this.types[t]||this.types[Object.keys(this.types)[0]]},navigate(t){this.$go(t.link),this.close()},onDown(){this.selected=0&&this.select(this.selected-1)},open(){this.$refs.overlay.open()},async search(t){this.isLoading=!0,this.$refs.types&&this.$refs.types.close();try{if(null===t||""===t)throw Error("Empty query");const e=await this.$search(this.currentType.id,t);if(!1===e)throw Error("JSON parsing failed");this.items=e.results}catch(e){this.items=[]}finally{this.select(-1),this.isLoading=!1,this.hasResults=this.items.length>0}},select(t){if(this.selected=t,this.$refs.items){const e=this.$refs.items.$el.querySelectorAll(".k-item");[...e].forEach((t=>delete t.dataset.selected)),t>=0&&(e[t].dataset.selected=!0)}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-overlay",{ref:"overlay"},[s("div",{staticClass:"k-search",attrs:{role:"search"}},[s("div",{staticClass:"k-search-input"},[s("k-dropdown",{staticClass:"k-search-types"},[s("k-button",{attrs:{icon:t.currentType.icon,text:t.currentType.label},on:{click:function(e){return t.$refs.types.toggle()}}}),s("k-dropdown-content",{ref:"types"},t._l(t.types,(function(e,n){return s("k-dropdown-item",{key:n,attrs:{icon:e.icon},on:{click:function(e){return t.changeType(n)}}},[t._v(" "+t._s(e.label)+" ")])})),1)],1),s("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"}],ref:"input",attrs:{placeholder:t.$t("search")+" …","aria-label":t.$t("search"),autofocus:!0,type:"text"},domProps:{value:t.q},on:{input:[function(e){e.target.composing||(t.q=e.target.value)},function(e){t.hasResults=!0}],keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.onDown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.onUp.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onTab.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onEnter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close.apply(null,arguments)}]}}),s("k-button",{staticClass:"k-search-close",attrs:{icon:t.isLoading?"loader":"cancel",tooltip:t.$t("close")},on:{click:t.close}})],1),!t.q||t.hasResults&&!t.items.length?t._e():s("div",{staticClass:"k-search-results"},[t.items.length?s("k-items",{ref:"items",attrs:{items:t.items},on:{hover:t.onHover},nativeOn:{mouseout:function(e){return t.select(-1)}}}):t.hasResults?t._e():s("p",{staticClass:"k-search-empty"},[t._v(" "+t._s(t.$t("search.results.none"))+" ")])],1)])])}),[],!1,Lh,null,null,null);function Lh(t){for(let e in Th)this[e]=Th[e]}var Ih=function(){return Ah.exports}();const jh={props:{removable:Boolean},methods:{remove(){this.removable&&this.$emit("remove")},focus(){this.$refs.button.focus()}}},Bh={};var Mh=zt(jh,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{ref:"button",staticClass:"k-tag",attrs:{tabindex:"0"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove.apply(null,arguments))}}},[s("span",{staticClass:"k-tag-text"},[t._t("default")],2),t.removable?s("span",{staticClass:"k-tag-toggle",on:{click:t.remove}},[t._v("×")]):t._e()])}),[],!1,Dh,null,null,null);function Dh(t){for(let e in Bh)this[e]=Bh[e]}var Ph=function(){return Mh.exports}();const Nh={props:{breadcrumb:Array,license:Boolean,menu:Array,title:String,view:Object},computed:{notification(){return this.$store.state.notification.type&&"error"!==this.$store.state.notification.type?this.$store.state.notification:null}}},qh={};var Fh=zt(Nh,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-topbar"},[s("k-view",[s("div",{staticClass:"k-topbar-wrapper"},[s("k-dropdown",{staticClass:"k-topbar-menu"},[s("k-button",{staticClass:"k-topbar-button k-topbar-menu-button",attrs:{tooltip:t.$t("menu"),icon:"bars"},on:{click:function(e){return t.$refs.menu.toggle()}}},[s("k-icon",{attrs:{type:"angle-down"}})],1),s("k-dropdown-content",{ref:"menu",staticClass:"k-topbar-menu",attrs:{options:t.menu,theme:"light"}})],1),s("k-breadcrumb",{staticClass:"k-topbar-breadcrumb",attrs:{crumbs:t.breadcrumb,view:t.view}}),s("div",{staticClass:"k-topbar-signals"},[t.notification?s("k-button",{staticClass:"k-topbar-notification k-topbar-button",attrs:{text:t.notification.message,theme:"positive"},on:{click:function(e){return t.$store.dispatch("notification/close")}}}):t.license?t._e():s("k-registration"),s("k-form-indicator"),s("k-button",{staticClass:"k-topbar-button",attrs:{tooltip:t.$t("search"),icon:"search"},on:{click:function(e){return t.$refs.search.open()}}})],1)],1)]),s("k-search",{ref:"search",attrs:{type:t.$view.search||"pages",types:t.$searches}})],1)}),[],!1,Rh,null,null,null);function Rh(t){for(let e in qh)this[e]=qh[e]}var zh=function(){return Fh.exports}();const Hh={props:{empty:String,blueprint:String,lock:[Boolean,Object],parent:String,tab:Object},computed:{content(){return this.$store.getters["content/values"]()}},methods:{exists(t){return this.$helper.isComponent(`k-${t}-section`)},meetsCondition(t){if(!t.when)return!0;let e=!0;return Object.keys(t.when).forEach((s=>{this.content[s.toLowerCase()]!==t.when[s]&&(e=!1)})),e}}},Uh={};var Kh=zt(Hh,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return 0===t.tab.columns.length?s("k-box",{attrs:{html:!0,text:t.empty,theme:"info"}}):s("k-grid",{staticClass:"k-sections",attrs:{gutter:"large"}},t._l(t.tab.columns,(function(e,n){return s("k-column",{key:t.parent+"-column-"+n,attrs:{width:e.width,sticky:e.sticky}},[t._l(e.sections,(function(i,o){return[t.meetsCondition(i)?[t.exists(i.type)?s("k-"+i.type+"-section",t._b({key:t.parent+"-column-"+n+"-section-"+o+"-"+t.blueprint,tag:"component",class:"k-section k-section-name-"+i.name,attrs:{column:e.width,lock:t.lock,name:i.name,parent:t.parent,timestamp:t.$view.timestamp},on:{submit:function(e){return t.$emit("submit",e)}}},"component",i,!1)):[s("k-box",{key:t.parent+"-column-"+n+"-section-"+o,attrs:{text:t.$t("error.section.type.invalid",{type:i.type}),theme:"negative"}})]]:t._e()]}))],2)})),1)}),[],!1,Jh,null,null,null);function Jh(t){for(let e in Uh)this[e]=Uh[e]}var Gh=function(){return Kh.exports}();const Vh={};var Wh=zt({mixins:[Ft],data:()=>({headline:null,text:null,theme:null}),async created(){const t=await this.load();this.headline=t.headline,this.text=t.text,this.theme=t.theme||"info"}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"k-info-section"},[s("k-headline",{staticClass:"k-info-section-headline"},[t._v(" "+t._s(t.headline)+" ")]),s("k-box",{attrs:{theme:t.theme}},[s("k-text",{domProps:{innerHTML:t._s(t.text)}})],1)],1)}),[],!1,Yh,null,null,null);function Yh(t){for(let e in Vh)this[e]=Vh[e]}var Xh=function(){return Wh.exports}(),Zh={inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String,timestamp:Number},data:()=>({data:[],error:null,isLoading:!1,isProcessing:!1,options:{empty:null,headline:null,help:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null}}),computed:{headline(){return this.options.headline||" "},help(){return this.options.help},isInvalid(){return!!(this.options.min&&this.data.lengththis.options.max)},paginationId(){return"kirby$pagination$"+this.parent+"/"+this.name}},watch:{timestamp(){this.reload()}},methods:{items:t=>t,async load(t){t||(this.isLoading=!0),this.isProcessing=!0,null===this.pagination.page&&(this.pagination.page=localStorage.getItem(this.paginationId)||1);try{const t=await this.$api.get(this.parent+"/sections/"+this.name,{page:this.pagination.page});this.options=t.options,this.pagination=t.pagination,this.data=this.items(t.data)}catch(e){this.error=e.message}finally{this.isProcessing=!1,this.isLoading=!1}},paginate(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},async reload(){await this.load(!0)}}};const Qh={};var tf=zt({mixins:[Zh],computed:{add(){return this.options.add&&this.$permissions.pages.create}},created(){this.load(),this.$events.$on("page.changeStatus",this.reload),this.$events.$on("page.sort",this.reload)},destroyed(){this.$events.$off("page.changeStatus",this.reload),this.$events.$off("page.sort",this.reload)},methods:{create(){this.add&&this.$dialog("pages/create",{query:{parent:this.options.link||this.parent,view:this.parent,section:this.name}})},items(t){return t.map((e=>{const s=!1!==e.permissions.changeStatus;return e.flag={status:e.status,tooltip:this.$t("page.status"),disabled:!s,click:()=>{this.$dialog(e.link+"/changeStatus")}},e.sortable=e.permissions.sort&&this.options.sortable,e.deletable=t.length>this.options.min,e.column=this.column,e.options=this.$dropdown(e.link,{query:{view:"list",delete:e.deletable,sort:e.sortable}}),e.data={"data-id":e.id,"data-status":e.status,"data-template":e.template},e}))},async sort(t){let e=null;if(t.added&&(e="added"),t.moved&&(e="moved"),e){this.isProcessing=!0;const n=t[e].element,i=t[e].newIndex+1+this.pagination.offset;try{await this.$api.pages.status(n.id,"listed",i),this.$store.dispatch("notification/success",":)"),this.$events.$emit("page.sort",n)}catch(s){this.$store.dispatch("notification/error",{message:s.message,details:s.details}),await this.reload()}finally{this.isProcessing=!1}}},update(){this.reload(),this.$events.$emit("model.update")}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.isLoading?s("section",{staticClass:"k-pages-section",attrs:{"data-processing":t.isProcessing}},[s("header",{staticClass:"k-section-header"},[s("k-headline",{attrs:{link:t.options.link}},[t._v(" "+t._s(t.headline)+" "),t.options.min?s("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?s("k-button-group",{attrs:{buttons:[{text:t.$t("add"),icon:"add",click:t.create}]}}):t._e()],1),t.error?[s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[s("strong",[t._v(" "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+": ")]),t._v(" "+t._s(t.error)+" ")])],1)]:[t.data.length?s("k-collection",{attrs:{layout:t.options.layout,help:t.help,items:t.data,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{change:t.sort,paginate:t.paginate}}):[s("k-empty",t._g({attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"page"}},t.add?{click:t.create}:{}),[t._v(" "+t._s(t.options.empty||t.$t("pages.empty"))+" ")]),s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]]],2):t._e()}),[],!1,ef,null,null,null);function ef(t){for(let e in Qh)this[e]=Qh[e]}var sf=function(){return tf.exports}();const nf={};var of=zt({mixins:[Zh],computed:{add(){return!(!this.$permissions.files.create||!1===this.options.upload)&&this.options.upload}},created(){this.load(),this.$events.$on("model.update",this.reload),this.$events.$on("file.sort",this.reload)},destroyed(){this.$events.$off("model.update",this.reload),this.$events.$off("file.sort",this.reload)},methods:{action(t,e){"replace"===t&&this.replace(e)},drop(t){if(!1===this.add)return!1;this.$refs.upload.drop(t,l(a({},this.add),{url:this.$urls.api+"/"+this.add.api}))},items(t){return t.map((e=>(e.sortable=this.options.sortable,e.column=this.column,e.options=this.$dropdown(e.link,{query:{view:"list",update:this.options.sortable,delete:t.length>this.options.min}}),e.data={"data-id":e.id,"data-template":e.template},e)))},replace(t){this.$refs.upload.open({url:this.$urls.api+"/"+t.link,accept:"."+t.extension+","+t.mime,multiple:!1})},async sort(t){if(!1===this.options.sortable)return!1;this.isProcessing=!0,t=t.map((t=>t.id));try{await this.$api.patch(this.options.apiUrl+"/files/sort",{files:t,index:this.pagination.offset}),this.$store.dispatch("notification/success",":)"),this.$events.$emit("file.sort")}catch(e){this.reload(),this.$store.dispatch("notification/error",e.message)}finally{this.isProcessing=!1}},update(){this.$events.$emit("model.update")},upload(){if(!1===this.add)return!1;this.$refs.upload.open(l(a({},this.add),{url:this.$urls.api+"/"+this.add.api}))},uploaded(){this.$events.$emit("file.create"),this.$events.$emit("model.update"),this.$store.dispatch("notification/success",":)")}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.isLoading?s("section",{staticClass:"k-files-section",attrs:{"data-processing":t.isProcessing}},[s("header",{staticClass:"k-section-header"},[s("k-headline",[t._v(" "+t._s(t.headline)+" "),t.options.min?s("abbr",{attrs:{title:t.$t("section.required")}},[t._v("*")]):t._e()]),t.add?s("k-button-group",{attrs:{buttons:[{text:t.$t("add"),icon:"upload",click:t.upload}]}}):t._e()],1),t.error?[s("k-box",{attrs:{theme:"negative"}},[s("k-text",{attrs:{size:"small"}},[s("strong",[t._v(t._s(t.$t("error.section.notLoaded",{name:t.name}))+":")]),t._v(" "+t._s(t.error)+" ")])],1)]:[s("k-dropzone",{attrs:{disabled:!1===t.add},on:{drop:t.drop}},[t.data.length?s("k-collection",{attrs:{help:t.help,items:t.data,layout:t.options.layout,pagination:t.pagination,sortable:!t.isProcessing&&t.options.sortable,size:t.options.size,"data-invalid":t.isInvalid},on:{sort:t.sort,paginate:t.paginate,action:t.action}}):[s("k-empty",t._g({attrs:{layout:t.options.layout,"data-invalid":t.isInvalid,icon:"image"}},t.add?{click:t.upload}:{}),[t._v(" "+t._s(t.options.empty||t.$t("files.empty"))+" ")]),s("footer",{staticClass:"k-collection-footer"},[t.help?s("k-text",{staticClass:"k-collection-help",attrs:{theme:"help"},domProps:{innerHTML:t._s(t.help)}}):t._e()],1)]],2),s("k-upload",{ref:"upload",on:{success:t.uploaded,error:t.reload}})]],2):t._e()}),[],!1,rf,null,null,null);function rf(t){for(let e in nf)this[e]=nf[e]}var af=function(){return of.exports}();const lf={};var uf=zt({mixins:[Ft],inheritAttrs:!1,data:()=>({fields:{},isLoading:!0,issue:null}),computed:{values(){return this.$store.getters["content/values"]()}},watch:{timestamp(){this.fetch()}},created(){this.input=bt(this.input,50),this.fetch()},methods:{input(t,e,s){this.$store.dispatch("content/update",[s,t[s]])},async fetch(){try{const t=await this.load();this.fields=t.fields,Object.keys(this.fields).forEach((t=>{this.fields[t].section=this.name,this.fields[t].endpoints={field:this.parent+"/fields/"+t,section:this.parent+"/sections/"+this.name,model:this.parent}}))}catch(t){this.issue=t}finally{this.isLoading=!1}},onSubmit(t){this.$events.$emit("keydown.cmd.s",t)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.isLoading?t._e():s("section",{staticClass:"k-fields-section"},[t.issue?[s("k-headline",{staticClass:"k-fields-issue-headline"},[t._v(" Error ")]),s("k-box",{attrs:{text:t.issue.message,html:!1,theme:"negative"}})]:t._e(),s("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values,disabled:t.lock&&"lock"===t.lock.state},on:{input:t.input,submit:t.onSubmit}})],2)}),[],!1,cf,null,null,null);function cf(t){for(let e in lf)this[e]=lf[e]}var df=function(){return uf.exports}();const pf={props:{blueprint:String,next:Object,prev:Object,permissions:{type:Object,default:()=>({})},lock:{type:[Boolean,Object]},model:{type:Object,default:()=>({})},tab:{type:Object,default:()=>({columns:[]})},tabs:{type:Array,default:()=>[]}},computed:{id(){return this.model.link},isLocked(){return this.lock&&"lock"===this.lock.state}},watch:{"model.id":{handler(){this.content()},immediate:!0}},created(){this.$events.$on("model.reload",this.reload),this.$events.$on("keydown.left",this.toPrev),this.$events.$on("keydown.right",this.toNext)},destroyed(){this.$events.$off("model.reload",this.reload),this.$events.$off("keydown.left",this.toPrev),this.$events.$off("keydown.right",this.toNext)},methods:{content(){this.$store.dispatch("content/create",{id:this.id,api:this.id,content:this.model.content})},async reload(){await this.$reload(),this.content()},toPrev(t){this.prev&&"body"===t.target.localName&&this.$go(this.prev.link)},toNext(t){this.next&&"body"===t.target.localName&&this.$go(this.next.link)}}};const hf={};var ff=zt(pf,undefined,undefined,!1,mf,null,null,null);function mf(t){for(let e in hf)this[e]=hf[e]}var gf=function(){return ff.exports}();const kf={};var vf=zt({extends:gf,computed:{avatarOptions(){return[{icon:"upload",text:this.$t("change"),click:()=>this.$refs.upload.open()},{icon:"trash",text:this.$t("delete"),click:this.deleteAvatar}]},buttons(){return[{icon:"email",text:`${this.$t("email")}: ${this.model.email}`,disabled:!this.permissions.changeEmail||this.isLocked,click:()=>this.$dialog(this.id+"/changeEmail")},{icon:"bolt",text:`${this.$t("role")}: ${this.model.role}`,disabled:!this.permissions.changeRole||this.isLocked,click:()=>this.$dialog(this.id+"/changeRole")},{icon:"globe",text:`${this.$t("language")}: ${this.model.language}`,disabled:!this.permissions.changeLanguage||this.isLocked,click:()=>this.$dialog(this.id+"/changeLanguage")}]},uploadApi(){return this.$urls.api+"/"+this.id+"/avatar"}},methods:{async deleteAvatar(){await this.$api.users.deleteAvatar(this.model.id),this.avatar=null,this.$store.dispatch("notification/success",":)"),this.$reload()},onAvatar(){this.model.avatar?this.$refs.picture.toggle():this.$refs.upload.open()},uploadedAvatar(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[s("div",{staticClass:"k-user-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[s("div",{staticClass:"k-user-profile"},[s("k-view",[s("k-dropdown",[s("k-button",{staticClass:"k-user-view-image",attrs:{tooltip:t.$t("avatar"),disabled:t.isLocked},on:{click:t.onAvatar}},[t.model.avatar?s("k-image",{attrs:{cover:!0,src:t.model.avatar,ratio:"1/1"}}):s("k-icon",{attrs:{back:"gray-900",color:"gray-200",type:"user"}})],1),t.model.avatar?s("k-dropdown-content",{ref:"picture",attrs:{options:t.avatarOptions}}):t._e()],1),s("k-button-group",{attrs:{buttons:t.buttons}})],1)],1),s("k-view",[s("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[s("k-button-group",[s("k-dropdown",{staticClass:"k-user-view-options"},[s("k-button",{attrs:{disabled:t.isLocked,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),s("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),s("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.account?t._e():s("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t.model.name&&0!==t.model.name.length?[t._v(" "+t._s(t.model.name)+" ")]:s("span",{staticClass:"k-user-name-placeholder"},[t._v(t._s(t.$t("name"))+" …")])],2),s("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("user.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),s("k-upload",{ref:"upload",attrs:{url:t.uploadApi,multiple:!1,accept:"image/*"},on:{success:t.uploadedAvatar}})],1)],1)])}),[],!1,bf,null,null,null);function bf(t){for(let e in kf)this[e]=kf[e]}var yf=function(){return vf.exports}();const $f={};var _f=zt({extends:yf,prevnext:!1},undefined,undefined,!1,wf,null,null,null);function wf(t){for(let e in $f)this[e]=$f[e]}var xf=function(){return _f.exports}();const Sf={};var Cf=zt({props:{error:String,layout:String}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-"+t.layout,{tag:"component"},[s("k-view",{staticClass:"k-error-view"},[s("div",{staticClass:"k-error-view-content"},[s("k-text",[s("p",[s("k-icon",{staticClass:"k-error-view-icon",attrs:{type:"alert"}})],1),t._t("default",(function(){return[s("p",[t._v(" "+t._s(t.error)+" ")])]}))],2)],1)])],1)}),[],!1,Of,null,null,null);function Of(t){for(let e in Sf)this[e]=Sf[e]}var Ef=function(){return Cf.exports}();const Tf={};var Af=zt({extends:gf,props:{preview:Object},methods:{action(t){if("replace"===t)this.$refs.upload.open({url:this.$urls.api+"/"+this.id,accept:"."+this.model.extension+","+this.model.mime,multiple:!1})},onUpload(){this.$store.dispatch("notification/success",":)"),this.$reload()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[s("div",{staticClass:"k-file-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[s("k-file-preview",t._b({},"k-file-preview",t.preview,!1)),s("k-view",{staticClass:"k-file-content"},[s("k-header",{attrs:{editable:t.permissions.changeName&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"left",fn:function(){return[s("k-button-group",[s("k-button",{staticClass:"k-file-view-options",attrs:{link:t.preview.url,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),s("k-dropdown",{staticClass:"k-file-view-options"},[s("k-button",{attrs:{disabled:t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),s("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)},on:{action:t.action}})],1),s("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[s("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[t._v(" "+t._s(t.model.filename)+" ")]),s("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("file.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}}),s("k-upload",{ref:"upload",on:{success:t.onUpload}})],1)],1)])}),[],!1,Lf,null,null,null);function Lf(t){for(let e in Tf)this[e]=Tf[e]}var If=function(){return Af.exports}();const jf={props:{isInstallable:Boolean,isInstalled:Boolean,isOk:Boolean,requirements:Object,translations:Array},data(){return{user:{name:"",email:"",language:this.$translation.code,password:"",role:"admin"}}},computed:{fields(){return{email:{label:this.$t("email"),type:"email",link:!1,autofocus:!0,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.translations,icon:"globe",empty:!1,required:!0}}},isReady(){return this.isOk&&this.isInstallable},isComplete(){return this.isOk&&this.isInstalled}},methods:{async install(){try{await this.$api.system.install(this.user),await this.$reload({globals:["$system","$translation"]}),this.$store.dispatch("notification/success",this.$t("welcome")+"!")}catch(t){this.$store.dispatch("notification/error",t)}}}},Bf={};var Mf=zt(jf,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-panel",[s("k-view",{staticClass:"k-installation-view",attrs:{align:"center"}},[t.isComplete?s("k-text",[s("k-headline",[t._v(t._s(t.$t("installation.completed")))]),s("k-link",{attrs:{to:"/login"}},[t._v(" "+t._s(t.$t("login"))+" ")])],1):t.isReady?s("form",{on:{submit:function(e){return e.preventDefault(),t.install.apply(null,arguments)}}},[s("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("installation"))+" ")]),s("k-fieldset",{attrs:{fields:t.fields,novalidate:!0},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),s("k-button",{attrs:{text:t.$t("install"),type:"submit",icon:"check"}})],1):s("div",[s("k-headline",[t._v(" "+t._s(t.$t("installation.issues.headline"))+" ")]),s("ul",{staticClass:"k-installation-issues"},[!1===t.isInstallable?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?s("li",[s("k-icon",{attrs:{type:"alert"}}),s("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),s("k-button",{attrs:{text:t.$t("retry"),icon:"refresh"},on:{click:t.$reload}})],1)],1)],1)}),[],!1,Df,null,null,null);function Df(t){for(let e in Bf)this[e]=Bf[e]}var Pf=function(){return Mf.exports}();const Nf={};var qf=zt({props:{languages:{type:Array,default:()=>[]}},computed:{languagesCollection(){return this.languages.map((t=>l(a({},t),{image:{back:"black",color:"gray",icon:"globe"},link:()=>{this.$dialog(`languages/${t.id}/update`)},options:[{icon:"edit",text:this.$t("edit"),click(){this.$dialog(`languages/${t.id}/update`)}},{icon:"trash",text:this.$t("delete"),disabled:t.default&&1!==this.languages.length,click(){this.$dialog(`languages/${t.id}/delete`)}}]})))},primaryLanguage(){return this.languagesCollection.filter((t=>t.default))},secondaryLanguages(){return this.languagesCollection.filter((t=>!1===t.default))}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",[s("k-view",{staticClass:"k-languages-view"},[s("k-header",[t._v(" "+t._s(t.$t("view.languages"))+" "),s("k-button-group",{attrs:{slot:"left"},slot:"left"},[s("k-button",{attrs:{text:t.$t("language.create"),icon:"add"},on:{click:function(e){return t.$dialog("languages/create")}}})],1)],1),s("section",{staticClass:"k-languages"},[t.languages.length>0?[s("section",{staticClass:"k-languages-view-section"},[s("header",{staticClass:"k-languages-view-section-header"},[s("k-headline",[t._v(t._s(t.$t("languages.default")))])],1),s("k-collection",{attrs:{items:t.primaryLanguage}})],1),s("section",{staticClass:"k-languages-view-section"},[s("header",{staticClass:"k-languages-view-section-header"},[s("k-headline",[t._v(t._s(t.$t("languages.secondary")))])],1),t.secondaryLanguages.length?s("k-collection",{attrs:{items:t.secondaryLanguages}}):s("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.secondary.empty"))+" ")])],1)]:0===t.languages.length?[s("k-empty",{attrs:{icon:"globe"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.empty"))+" ")])]:t._e()],2)],1)],1)}),[],!1,Ff,null,null,null);function Ff(t){for(let e in Nf)this[e]=Nf[e]}var Rf=function(){return qf.exports}(),zf=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-panel",["login"===t.form?s("k-view",{staticClass:"k-login-view",attrs:{align:"center"}},[s("k-login-plugin",{attrs:{methods:t.methods}})],1):"code"===t.form?s("k-view",{staticClass:"k-login-code-view",attrs:{align:"center"}},[s("k-login-code",t._b({},"k-login-code",t.$props,!1))],1):t._e()],1)},Hf=[];const Uf={components:{"k-login-plugin":window.panel.plugins.login||Js},props:{methods:Array,pending:Object},computed:{form(){return this.pending.email?"code":this.$user?null:"login"}},created(){this.$store.dispatch("content/clear")}},Kf={};var Jf=zt(Uf,zf,Hf,!1,Gf,null,null,null);function Gf(t){for(let e in Kf)this[e]=Kf[e]}var Vf=function(){return Jf.exports}();const Wf={};var Yf=zt({extends:gf,props:{status:Object}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[s("k-view",{staticClass:"k-page-view",attrs:{"data-locked":t.isLocked,"data-id":t.model.id,"data-template":t.blueprint}},[s("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tab:t.tab.name,tabs:t.tabs},on:{edit:function(e){return t.$dialog(t.id+"/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[s("k-button-group",[t.permissions.preview&&t.model.previewUrl?s("k-button",{staticClass:"k-page-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}):t._e(),t.status?s("k-status-icon",{attrs:{status:t.model.status,disabled:!t.permissions.changeStatus||t.isLocked,responsive:!0,text:t.status.label},on:{click:function(e){return t.$dialog(t.id+"/changeStatus")}}}):t._e(),s("k-dropdown",{staticClass:"k-page-view-options"},[s("k-button",{attrs:{disabled:!0===t.isLocked,responsive:!0,text:t.$t("settings"),icon:"cog"},on:{click:function(e){return t.$refs.settings.toggle()}}}),s("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id)}})],1),s("k-languages-dropdown")],1)]},proxy:!0},{key:"right",fn:function(){return[t.model.id?s("k-prev-next",{attrs:{prev:t.prev,next:t.next}}):t._e()]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),s("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("page.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)],1)}),[],!1,Xf,null,null,null);function Xf(t){for(let e in Wf)this[e]=Wf[e]}var Zf=function(){return Yf.exports}();const Qf={};var tm=zt({props:{id:String},computed:{view(){return"k-"+this.id+"-plugin-view"}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",[s(t.view,{tag:"component"})],1)}),[],!1,em,null,null,null);function em(t){for(let e in Qf)this[e]=Qf[e]}var sm=function(){return tm.exports}();const nm={};var im=zt({data:()=>({isLoading:!1,issue:"",values:{password:null,passwordConfirmation:null}}),computed:{fields(){return{password:{autofocus:!0,label:this.$t("user.changePassword.new"),icon:"key",type:"password"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password"}}}},mounted(){this.$store.dispatch("title",this.$t("view.resetPassword"))},methods:{async submit(){if(!this.values.password||this.values.password.length<8)return this.issue=this.$t("error.user.password.invalid"),!1;if(this.values.password!==this.values.passwordConfirmation)return this.issue=this.$t("error.user.password.notSame"),!1;this.isLoading=!0;try{await this.$api.users.changePassword(this.$user.id,this.values.password),this.$store.dispatch("notification/success",":)"),this.$go("/")}catch(t){this.issue=t.message}finally{this.isLoading=!1}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",[s("k-view",{staticClass:"k-password-reset-view",attrs:{align:"center"}},[s("k-form",{attrs:{fields:t.fields,"submit-button":t.$t("change")},on:{submit:t.submit},scopedSlots:t._u([{key:"header",fn:function(){return[s("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("view.resetPassword"))+" ")]),t.issue?s("k-login-alert",{on:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),s("k-user-info",{attrs:{user:t.$user}})]},proxy:!0},{key:"footer",fn:function(){return[s("div",{staticClass:"k-login-buttons"},[s("k-button",{staticClass:"k-login-button",attrs:{icon:"check",type:"submit"}},[t._v(" "+t._s(t.$t("change"))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)],1)]},proxy:!0}]),model:{value:t.values,callback:function(e){t.values=e},expression:"values"}})],1)],1)}),[],!1,om,null,null,null);function om(t){for(let e in nm)this[e]=nm[e]}var rm=function(){return im.exports}();const am={};var lm=zt({extends:gf},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",{scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[s("k-view",{staticClass:"k-site-view",attrs:{"data-locked":t.isLocked,"data-id":"/","data-template":"site"}},[s("k-header",{attrs:{editable:t.permissions.changeTitle&&!t.isLocked,tabs:t.tabs,tab:t.tab.name},on:{edit:function(e){return t.$dialog("site/changeTitle")}},scopedSlots:t._u([{key:"left",fn:function(){return[s("k-button-group",[s("k-button",{staticClass:"k-site-view-preview",attrs:{link:t.model.previewUrl,responsive:!0,text:t.$t("open"),icon:"open",target:"_blank"}}),s("k-languages-dropdown")],1)]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),s("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("site.blueprint"),lock:t.lock,tab:t.tab,parent:"site"},on:{submit:function(e){return t.$emit("submit",e)}}})],1)],1)}),[],!1,um,null,null,null);function um(t){for(let e in am)this[e]=am[e]}var cm=function(){return lm.exports}();const dm={props:{debug:Boolean,license:String,php:String,plugins:Array,server:String,ssl:Boolean,version:String}},pm={};var hm=zt(dm,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",[s("k-view",{staticClass:"k-system-view"},[s("k-header",[t._v(" "+t._s(t.$t("view.system"))+" ")]),s("section",{staticClass:"k-system-view-section"},[s("header",{staticClass:"k-system-view-section-header"},[s("k-headline",[t._v("Kirby")])],1),s("ul",{staticClass:"k-system-info-box",staticStyle:{"--columns":"2"}},[s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("license")))]),s("dd",[t.$license?[t._v(" "+t._s(t.license)+" ")]:s("k-button",{staticClass:"k-system-warning",on:{click:function(e){return t.$dialog("registration")}}},[t._v(" "+t._s(t.$t("license.unregistered"))+" ")])],2)])]),s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("version")))]),s("dd",{attrs:{dir:"ltr"}},[s("k-link",{attrs:{to:"https://github.com/getkirby/kirby/releases/tag/"+t.version}},[t._v(" "+t._s(t.version)+" ")])],1)])])])]),s("section",{staticClass:"k-system-view-section"},[s("header",{staticClass:"k-system-view-section-header"},[s("k-headline",[t._v(t._s(t.$t("environment")))])],1),s("ul",{staticClass:"k-system-info-box",staticStyle:{"--columns":"4"}},[s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("debugging")))]),s("dd",{class:{"k-system-warning":t.debug}},[t._v(" "+t._s(t.debug?t.$t("on"):t.$t("off"))+" ")])])]),s("li",[s("dl",[s("dt",[t._v("SSL")]),s("dd",{class:{"k-system-warning":!t.ssl}},[t._v(" "+t._s(t.ssl?t.$t("on"):t.$t("off"))+" ")])])]),s("li",[s("dl",[s("dt",[t._v("PHP")]),s("dd",[t._v(" "+t._s(t.php)+" ")])])]),s("li",[s("dl",[s("dt",[t._v(t._s(t.$t("server")))]),s("dd",[t._v(" "+t._s(t.server||"?")+" ")])])])])]),t.plugins.length?s("section",{staticClass:"k-system-view-section"},[s("header",{staticClass:"k-system-view-section-header"},[s("k-headline",{attrs:{link:"https://getkirby.com/plugins"}},[t._v(" "+t._s(t.$t("plugins"))+" ")])],1),s("table",{staticClass:"k-system-plugins"},[s("tr",[s("th",[t._v(" "+t._s(t.$t("name"))+" ")]),s("th",{staticClass:"desk"},[t._v(" "+t._s(t.$t("author"))+" ")]),s("th",{staticClass:"desk"},[t._v(" "+t._s(t.$t("license"))+" ")]),s("th",{staticStyle:{width:"8rem"}},[t._v(" "+t._s(t.$t("version"))+" ")])]),t._l(t.plugins,(function(e){return s("tr",{key:e.name},[s("td",[e.link?s("k-link",{attrs:{to:e.link}},[t._v(" "+t._s(e.name)+" ")]):[t._v(" "+t._s(e.name)+" ")]],2),s("td",{staticClass:"desk"},[t._v(" "+t._s(e.author||"-")+" ")]),s("td",{staticClass:"desk"},[t._v(" "+t._s(e.license||"-")+" ")]),s("td",{staticStyle:{width:"8rem"}},[t._v(" "+t._s(e.version||"-")+" ")])])}))],2)]):t._e()],1)],1)}),[],!1,fm,null,null,null);function fm(t){for(let e in pm)this[e]=pm[e]}var mm=function(){return hm.exports}();const gm={};var km=zt({props:{role:Object,roles:Array,search:String,title:String,users:Object},computed:{items(){return this.users.data.map((t=>(t.options=this.$dropdown(t.link),t)))}},methods:{paginate(t){this.$reload({query:{page:t.page}})}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-inside",[s("k-view",{staticClass:"k-users-view"},[s("k-header",{scopedSlots:t._u([{key:"left",fn:function(){return[s("k-button-group",{attrs:{buttons:[{disabled:!1===t.$permissions.users.create,text:t.$t("user.create"),icon:"add",click:function(){return t.$dialog("users/create")}}]}})]},proxy:!0},{key:"right",fn:function(){return[s("k-button-group",[s("k-dropdown",[s("k-button",{attrs:{responsive:!0,text:t.$t("role")+": "+(t.role?t.role.title:t.$t("role.all")),icon:"funnel"},on:{click:function(e){return t.$refs.roles.toggle()}}}),s("k-dropdown-content",{ref:"roles",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{icon:"bolt",link:"/users"}},[t._v(" "+t._s(t.$t("role.all"))+" ")]),s("hr"),t._l(t.roles,(function(e){return s("k-dropdown-item",{key:e.id,attrs:{link:"/users/?role="+e.id,icon:"bolt"}},[t._v(" "+t._s(e.title)+" ")])}))],2)],1)],1)]},proxy:!0}])},[t._v(" "+t._s(t.$t("view.users"))+" ")]),t.users.data.length>0?[s("k-collection",{attrs:{items:t.items,pagination:t.users.pagination},on:{paginate:t.paginate}})]:0===t.users.pagination.total?[s("k-empty",{attrs:{icon:"users"}},[t._v(" "+t._s(t.$t("role.empty"))+" ")])]:t._e()],2)],1)}),[],!1,vm,null,null,null);function vm(t){for(let e in gm)this[e]=gm[e]}var bm=function(){return km.exports}();const ym={};var $m=zt({computed:{placeholder(){return this.field("code",{}).placeholder},languages(){return this.field("language",{options:[]}).options}},methods:{focus(){this.$refs.code.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-block-type-code-editor"},[s("k-input",{ref:"code",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.code,type:"textarea"},on:{input:function(e){return t.update({code:e})}}}),t.languages.length?s("div",{staticClass:"k-block-type-code-editor-language"},[s("k-icon",{attrs:{type:"code"}}),s("k-input",{ref:"language",attrs:{empty:!1,options:t.languages,value:t.content.language,type:"select"},on:{input:function(e){return t.update({language:e})}}})],1):t._e()],1)}),[],!1,_m,null,null,null);function _m(t){for(let e in ym)this[e]=ym[e]}var wm=function(){return $m.exports}(),xm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:wm});const Sm={};var Cm=zt({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-block-title",{attrs:{content:t.content,fieldset:t.fieldset},on:{dblclick:function(e){return t.$emit("open")}}})}),[],!1,Om,null,null,null);function Om(t){for(let e in Sm)this[e]=Sm[e]}var Em=function(){return Cm.exports}(),Tm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Em});const Am={};var Lm=zt({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{on:{dblclick:t.open}},[0===t.content.images.length?[s("li"),s("li"),s("li"),s("li"),s("li")]:t._l(t.content.images,(function(t){return s("li",{key:t.id},[s("img",{attrs:{src:t.url,alt:t.alt}})])}))],2)}),[],!1,Im,null,null,null);function Im(t){for(let e in Am)this[e]=Am[e]}var jm=function(){return Lm.exports}(),Bm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:jm});const Mm={};var Dm=zt({computed:{textField(){return this.field("text",{marks:!0})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-block-type-heading-input",attrs:{"data-level":t.content.level}},[s("k-writer",{ref:"input",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})],1)}),[],!1,Pm,null,null,null);function Pm(t){for(let e in Mm)this[e]=Mm[e]}var Nm=function(){return Dm.exports}(),qm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Nm});const Fm={};var Rm=zt({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},crop(){return this.content.crop||!1},src(){return"web"===this.content.location?this.content.src:!(!this.content.image[0]||!this.content.image[0].url)&&this.content.image[0].url},ratio(){return this.content.ratio||!1}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.image.placeholder")+" …","is-empty":!t.src,"empty-icon":"image"},on:{open:t.open,update:t.update}},[t.src?[t.ratio?s("k-aspect-ratio",{attrs:{ratio:t.ratio,cover:t.crop}},[s("img",{attrs:{alt:t.content.alt,src:t.src}})]):s("img",{staticClass:"k-block-type-image-auto",attrs:{alt:t.content.alt,src:t.src}})]:t._e()],2)}),[],!1,zm,null,null,null);function zm(t){for(let e in Fm)this[e]=Fm[e]}var Hm=function(){return Rm.exports}(),Um=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Hm});const Km={};var Jm=zt({},(function(){var t=this;t.$createElement;return t._self._c,t._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("hr")])}],!1,Gm,null,null,null);function Gm(t){for(let e in Km)this[e]=Km[e]}var Vm=function(){return Jm.exports}(),Wm=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Vm});const Ym={};var Xm=zt({computed:{marks(){return this.field("text",{}).marks}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-list-input",attrs:{marks:t.marks,value:t.content.text,type:"list"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,Zm,null,null,null);function Zm(t){for(let e in Ym)this[e]=Ym[e]}var Qm=function(){return Xm.exports}(),tg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Qm});const eg={};var sg=zt({computed:{placeholder(){return this.field("text",{}).placeholder}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-input",{ref:"input",staticClass:"k-block-type-markdown-input",attrs:{buttons:!1,placeholder:t.placeholder,spellcheck:!1,value:t.content.text,type:"textarea"},on:{input:function(e){return t.update({text:e})}}})}),[],!1,ng,null,null,null);function ng(t){for(let e in eg)this[e]=eg[e]}var ig=function(){return sg.exports}(),og=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ig});const rg={};var ag=zt({computed:{citationField(){return this.field("citation",{})},textField(){return this.field("text",{})}},methods:{focus(){this.$refs.text.focus()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"k-block-type-quote-editor"},[s("k-writer",{ref:"text",staticClass:"k-block-type-quote-text",attrs:{inline:!0,marks:t.textField.marks,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}}),s("k-writer",{ref:"citation",staticClass:"k-block-type-quote-citation",attrs:{inline:!0,marks:t.citationField.marks,placeholder:t.citationField.placeholder,value:t.content.citation},on:{input:function(e){return t.update({citation:e})}}})],1)}),[],!1,lg,null,null,null);function lg(t){for(let e in rg)this[e]=rg[e]}var ug=function(){return ag.exports}(),cg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ug});const dg={};var pg=zt({mixins:[Na],inheritAttrs:!1,computed:{columns(){return this.table.columns||this.fields},columnsCount(){return Object.keys(this.columns).length},fields(){return this.table.fields||{}},rows(){return this.content.rows||[]},table(){let t=null;return Object.values(this.fieldset.tabs).forEach((e=>{e.fields.rows&&(t=e.fields.rows)})),t||{}}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("table",{staticClass:"k-block-type-table-preview",on:{dblclick:t.open}},[s("tr",t._l(t.columns,(function(e,n){return s("th",{key:n,style:"width:"+t.width(e.width),attrs:{"data-align":e.align}},[t._v(" "+t._s(e.label)+" ")])})),0),0===t.rows.length?s("tr",[s("td",{attrs:{colspan:t.columnsCount}},[s("small",{staticClass:"k-block-type-table-preview-empty"},[t._v(t._s(t.$t("field.structure.empty")))])])]):t._l(t.rows,(function(e,n){return s("tr",{key:n},t._l(t.columns,(function(i,o){return s("td",{key:n+"-"+o,style:"width:"+t.width(i.width),attrs:{"data-align":i.align}},[t.previewExists(i.type)?s("k-"+i.type+"-field-preview",{tag:"component",attrs:{value:e[o],column:i,field:t.fields[o]}}):[s("p",{staticClass:"k-structure-table-text"},[t._v(" "+t._s(i.before)+" "+t._s(t.displayText(t.fields[o],e[o])||"–")+" "+t._s(i.after)+" ")])]],2)})),0)}))],2)}),[],!1,hg,null,null,null);function hg(t){for(let e in dg)this[e]=dg[e]}var fg=function(){return pg.exports}(),mg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:fg});const gg={};var kg=zt({props:{endpoints:Object},computed:{textField(){return this.field("text",{})}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("k-writer",{ref:"input",staticClass:"k-block-type-text-input",attrs:{inline:t.textField.inline,marks:t.textField.marks,nodes:t.textField.nodes,placeholder:t.textField.placeholder,value:t.content.text},on:{input:function(e){return t.update({text:e})}}})}),[],!1,vg,null,null,null);function vg(t){for(let e in gg)this[e]=gg[e]}var bg=function(){return kg.exports}(),yg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:bg});const $g={};var _g=zt({computed:{captionMarks(){return this.field("caption",{marks:!0}).marks},video(){return this.$helper.embed.video(this.content.url,!0)}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-block-figure",{attrs:{caption:t.content.caption,"caption-marks":t.captionMarks,"empty-text":t.$t("field.blocks.video.placeholder")+" …","is-empty":!t.video,"empty-icon":"video"},on:{open:t.open,update:t.update}},[s("k-aspect-ratio",{attrs:{ratio:"16/9"}},[t.video?s("iframe",{attrs:{src:t.video,referrerpolicy:"strict-origin-when-cross-origin"}}):t._e()])],1)}),[],!1,wg,null,null,null);function wg(t){for(let e in $g)this[e]=$g[e]}var xg=function(){return _g.exports}(),Sg=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:xg});const Cg={inheritAttrs:!1,props:{attrs:[Array,Object],content:[Array,Object],endpoints:Object,fieldset:Object,id:String,isBatched:Boolean,isFull:Boolean,isHidden:Boolean,isLastInBatch:Boolean,isSelected:Boolean,name:String,next:Object,prev:Object,type:String},data:()=>({skipFocus:!1}),computed:{className(){let t=["k-block-type-"+this.type];return this.fieldset.preview&&this.fieldset.preview!==this.type&&t.push("k-block-type-"+this.fieldset.preview),!1===this.wysiwyg&&t.push("k-block-type-default"),t},customComponent(){return this.wysiwyg?this.wysiwygComponent:"k-block-type-default"},isEditable(){return!1!==this.fieldset.editable},listeners(){return l(a({},this.$listeners),{confirmToRemove:this.confirmToRemove,open:this.open})},tabs(){let t=this.fieldset.tabs;return Object.entries(t).forEach((([e,s])=>{Object.entries(s.fields).forEach((([s])=>{t[e].fields[s].section=this.name,t[e].fields[s].endpoints={field:this.endpoints.field+"/fieldsets/"+this.type+"/fields/"+s,section:this.endpoints.section,model:this.endpoints.model}}))})),t},wysiwyg(){return!1!==this.wysiwygComponent},wysiwygComponent(){if(!1===this.fieldset.preview)return!1;let t;return this.fieldset.preview&&(t="k-block-type-"+this.fieldset.preview,this.$helper.isComponent(t))?t:(t="k-block-type-"+this.type,!!this.$helper.isComponent(t)&&t)}},methods:{close(){this.$refs.drawer.close()},confirmToRemove(){this.$refs.removeDialog.open()},focus(){!0!==this.skipFocus&&("function"==typeof this.$refs.editor.focus?this.$refs.editor.focus():this.$refs.container.focus())},goTo(t){t&&(this.skipFocus=!0,this.close(),this.$nextTick((()=>{t.$refs.container.focus(),t.open(),this.skipFocus=!1})))},open(){this.$refs.drawer&&this.$refs.drawer.open()},remove(){this.$refs.removeDialog.close(),this.$emit("remove",this.id)}}},Og={};var Eg=zt(Cg,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"container",staticClass:"k-block-container",class:"k-block-container-type-"+t.type,attrs:{"data-batched":t.isBatched,"data-disabled":t.fieldset.disabled,"data-hidden":t.isHidden,"data-id":t.id,"data-last-in-batch":t.isLastInBatch,"data-selected":t.isSelected,"data-translate":t.fieldset.translate,tabindex:"0"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortDown")):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey&&e.shiftKey?(e.preventDefault(),t.$emit("sortUp")):null}],focus:function(e){return t.$emit("focus")},focusin:function(e){return t.$emit("focus")}}},[s("div",{staticClass:"k-block",class:t.className},[s(t.customComponent,t._g(t._b({ref:"editor",tag:"component"},"component",t.$props,!1),t.listeners))],1),s("k-block-options",t._g({ref:"options",attrs:{"is-batched":t.isBatched,"is-editable":t.isEditable,"is-full":t.isFull,"is-hidden":t.isHidden}},t.listeners)),t.isEditable&&!t.isBatched?s("k-form-drawer",{ref:"drawer",staticClass:"k-block-drawer",attrs:{id:t.id,icon:t.fieldset.icon||"box",tabs:t.tabs,title:t.fieldset.name,value:t.content},on:{close:function(e){return t.focus()},input:function(e){return t.$emit("update",e)}},scopedSlots:t._u([{key:"options",fn:function(){return[t.isHidden?s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"hidden"},on:{click:function(e){return t.$emit("show")}}}):t._e(),s("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.prev,icon:"angle-left"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.prev)}}}),s("k-button",{staticClass:"k-drawer-option",attrs:{disabled:!t.next,icon:"angle-right"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.goTo(t.next)}}}),s("k-button",{staticClass:"k-drawer-option",attrs:{icon:"trash"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.confirmToRemove.apply(null,arguments)}}})]},proxy:!0}],null,!1,2211169536)}):t._e(),s("k-remove-dialog",{ref:"removeDialog",attrs:{text:t.$t("field.blocks.delete.confirm")},on:{submit:t.remove}})],1)}),[],!1,Tg,null,null,null);function Tg(t){for(let e in Og)this[e]=Og[e]}var Ag=function(){return Eg.exports}();const Lg={};var Ig=zt({inheritAttrs:!1,computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{close(){this.$refs.dialog.close()},open(){this.$refs.dialog.open()},onPaste(t){this.$emit("paste",t),this.close()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-block-importer",attrs:{"cancel-button":!1,"submit-button":!1,size:"large"}},[s("label",{attrs:{for:"pasteboard"},domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}}),s("textarea",{attrs:{id:"pasteboard"},on:{paste:function(e){return e.preventDefault(),t.onPaste.apply(null,arguments)}}})])}),[],!1,jg,null,null,null);function jg(t){for(let e in Lg)this[e]=Lg[e]}const Bg={components:{"k-block-pasteboard":function(){return Ig.exports}()},inheritAttrs:!1,props:{autofocus:Boolean,empty:String,endpoints:Object,fieldsets:Object,fieldsetGroups:Object,group:String,max:{type:Number,default:null},value:{type:Array,default:()=>[]}},data(){return{isMultiSelectKey:!1,batch:[],blocks:this.value,current:null,isFocussed:!1}},computed:{draggableOptions(){return{id:this._uid,handle:".k-sort-handle",list:this.blocks,move:this.move,delay:10,data:{fieldsets:this.fieldsets,isFull:this.isFull},options:{group:this.group}}},hasFieldsets(){return Object.keys(this.fieldsets).length},isEditing(){return this.$store.state.dialog||this.$store.state.drawers.open.length>0},isEmpty(){return 0===this.blocks.length},isFull(){return null!==this.max&&this.blocks.length>=this.max},selected(){return this.current},selectedOrBatched(){return this.batch.length>0?this.batch:this.selected?[this.selected]:[]}},watch:{value(){this.blocks=this.value}},created(){this.$events.$on("copy",this.copy),this.$events.$on("focus",this.onOutsideFocus),this.$events.$on("keydown",this.onKey),this.$events.$on("keyup",this.onKey),this.$events.$on("paste",this.onPaste)},destroyed(){this.$events.$off("copy",this.copy),this.$events.$off("focus",this.onOutsideFocus),this.$events.$off("keydown",this.onKey),this.$events.$off("keyup",this.onKey),this.$events.$off("paste",this.onPaste)},mounted(){!0===this.$props.autofocus&&this.focus()},methods:{append(t,e){if("string"!=typeof t){if(Array.isArray(t)){let s=this.$helper.clone(t).map((t=>(t.id=this.$helper.uuid(),t)));const n=Object.keys(this.fieldsets);if(s=s.filter((t=>n.includes(t.type))),this.max){const t=this.max-this.blocks.length;s=s.slice(0,t)}this.blocks.splice(e,0,...s),this.save()}}else this.add(t,e)},async add(t="text",e){const s=await this.$api.get(this.endpoints.field+"/fieldsets/"+t);this.blocks.splice(e,0,s),this.save(),this.$nextTick((()=>{this.focusOrOpen(s)}))},addToBatch(t){null!==this.selected&&!1===this.batch.includes(this.selected)&&(this.batch.push(this.selected),this.current=null),!1===this.batch.includes(t.id)&&this.batch.push(t.id)},choose(t){if(1===Object.keys(this.fieldsets).length){const e=Object.values(this.fieldsets)[0].type;this.add(e,t)}else this.$refs.selector.open(t)},chooseToConvert(t){this.$refs.selector.open(t,{disabled:[t.type],headline:this.$t("field.blocks.changeType"),event:"convert"})},click(t){this.$emit("click",t)},confirmToRemoveAll(){this.$refs.removeAll.open()},confirmToRemoveSelected(){this.$refs.removeSelected.open()},copy(t){if(!0===this.isEditing)return!1;if(0===this.blocks.length)return!1;if(0===this.selectedOrBatched.length)return!1;if(!0===this.isInputEvent(t))return!1;let e=[];if(this.blocks.forEach((t=>{this.selectedOrBatched.includes(t.id)&&e.push(t)})),0===e.length)return!1;this.$helper.clipboard.write(e,t),t instanceof ClipboardEvent==!1&&(this.batch=this.selectedOrBatched),this.$store.dispatch("notification/success",`${e.length} copied!`)},copyAll(){this.selectAll(),this.copy(),this.deselectAll()},async convert(t,e){const s=this.findIndex(e.id);if(-1===s)return!1;const n=t=>{let e={};return Object.values(t.tabs).forEach((t=>{e=a(a({},e),t.fields)})),e},i=this.blocks[s],o=await this.$api.get(this.endpoints.field+"/fieldsets/"+t),r=this.fieldsets[i.type],u=this.fieldsets[t];if(!u)return!1;let c=o.content;const d=n(r),p=n(u);Object.entries(p).forEach((([t,e])=>{const s=d[t];s&&s.type===e.type&&i.content[t]&&(c[t]=i.content[t])})),this.blocks[s]=l(a({},o),{id:i.id,content:c}),this.save()},deselectAll(){this.batch=[],this.current=null},async duplicate(t,e){const s=l(a({},this.$helper.clone(t)),{id:this.$helper.uuid()});this.blocks.splice(e+1,0,s),this.save()},fieldset(t){return this.fieldsets[t.type]||{icon:"box",name:t.type,tabs:{content:{fields:{}}},type:t.type}},find(t){return this.blocks.find((e=>e.id===t))},findIndex(t){return this.blocks.findIndex((e=>e.id===t))},focus(t){t&&t.id&&this.$refs["block-"+t.id]?this.$refs["block-"+t.id][0].focus():this.blocks[0]&&this.focus(this.blocks[0])},focusOrOpen(t){this.fieldsets[t.type].wysiwyg?this.focus(t):this.open(t)},hide(t){this.$set(t,"isHidden",!0),this.save()},isBatched(t){return this.batch.includes(t.id)},isInputEvent(){const t=document.querySelector(":focus");return t&&t.matches("input, textarea, [contenteditable], .k-writer")},isLastInBatch(t){const[e]=this.batch.slice(-1);return e&&t.id===e},isOnlyInstance:()=>1===document.querySelectorAll(".k-blocks").length,isSelected(t){return this.selected&&this.selected===t.id},move(t){if(t.from!==t.to){const e=t.draggedContext.element,s=t.relatedContext.component.componentData||t.relatedContext.component.$parent.componentData;if(!1===Object.keys(s.fieldsets).includes(e.type))return!1;if(!0===s.isFull)return!1}return!0},onKey(t){this.isMultiSelectKey=t.metaKey||t.ctrlKey||t.altKey},onOutsideFocus(t){const e=document.querySelector(".k-overlay:last-of-type");if(!1===this.$el.contains(t.target)&&(!e||!1===e.contains(t.target)))return this.select(null);if(e){const e=this.$el.closest(".k-layout-column");if(e&&!1===e.contains(t.target))return this.select(null)}},onPaste(t){return!0!==this.isInputEvent(t)&&(!0===this.isEditing?!(!this.$refs.selector||!0!==this.$refs.selector.isOpen())&&this.paste(t):(0!==this.selectedOrBatched.length||!0===this.isOnlyInstance())&&this.paste(t))},open(t){this.$refs["block-"+t.id]&&this.$refs["block-"+t.id][0].open()},async paste(t){const e=this.$helper.clipboard.read(t),s=await this.$api.post(this.endpoints.field+"/paste",{html:e});let n=this.selectedOrBatched[this.selectedOrBatched.length-1],i=this.findIndex(n);-1===i&&(i=this.blocks.length),this.append(s,i+1)},pasteboard(){this.$refs.pasteboard.open()},prevNext(t){if(this.blocks[t]){let e=this.blocks[t];if(this.$refs["block-"+e.id])return this.$refs["block-"+e.id][0]}},remove(t){const e=this.findIndex(t.id);-1!==e&&(this.selected&&this.selected.id===t.id&&this.select(null),this.$delete(this.blocks,e),this.save())},removeAll(){this.batch=[],this.blocks=[],this.save(),this.$refs.removeAll.close()},removeSelected(){this.batch.forEach((t=>{const e=this.findIndex(t);-1!==e&&this.$delete(this.blocks,e)})),this.deselectAll(),this.save(),this.$refs.removeSelected.close()},save(){this.$emit("input",this.blocks)},select(t,e=null){if(e&&this.isMultiSelectKey&&this.onKey(e),t&&this.isMultiSelectKey)return this.addToBatch(t),void(this.current=null);this.batch=[],this.current=t?t.id:null},selectAll(){this.batch=Object.values(this.blocks).map((t=>t.id))},show(t){this.$set(t,"isHidden",!1),this.save()},sort(t,e,s){if(s<0)return;let n=this.$helper.clone(this.blocks);n.splice(e,1),n.splice(s,0,t),this.blocks=n,this.save(),this.$nextTick((()=>{this.focus(t)}))},update(t,e){const s=this.findIndex(t.id);-1!==s&&Object.entries(e).forEach((([t,e])=>{this.$set(this.blocks[s].content,t,e)})),this.save()}}},Mg={};var Dg=zt(Bg,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"wrapper",staticClass:"k-blocks",attrs:{"data-empty":0===t.blocks.length,"data-multi-select-key":t.isMultiSelectKey},on:{focusin:function(e){t.focussed=!0},focusout:function(e){t.focussed=!1}}},[t.hasFieldsets?[s("k-draggable",t._b({staticClass:"k-blocks-list",on:{sort:t.save},scopedSlots:t._u([{key:"footer",fn:function(){return[s("k-empty",{staticClass:"k-blocks-empty",attrs:{icon:"box"},on:{click:function(e){return t.choose(t.blocks.length)}}},[t._v(" "+t._s(t.empty||t.$t("field.blocks.empty"))+" ")])]},proxy:!0}],null,!1,2413899928)},"k-draggable",t.draggableOptions,!1),t._l(t.blocks,(function(e,n){return s("k-block",t._b({key:e.id,ref:"block-"+e.id,refInFor:!0,attrs:{endpoints:t.endpoints,fieldset:t.fieldset(e),"is-batched":t.isBatched(e),"is-last-in-batch":t.isLastInBatch(e),"is-full":t.isFull,"is-hidden":!0===e.isHidden,"is-selected":t.isSelected(e),next:t.prevNext(n+1),prev:t.prevNext(n-1)},on:{append:function(e){return t.append(e,n+1)},blur:function(e){return t.select(null)},choose:function(e){return t.choose(e)},chooseToAppend:function(e){return t.choose(n+1)},chooseToConvert:function(s){return t.chooseToConvert(e)},chooseToPrepend:function(e){return t.choose(n)},copy:function(e){return t.copy()},confirmToRemoveSelected:t.confirmToRemoveSelected,duplicate:function(s){return t.duplicate(e,n)},focus:function(s){return t.select(e)},hide:function(s){return t.hide(e)},paste:function(e){return t.pasteboard()},prepend:function(e){return t.add(e,n)},remove:function(s){return t.remove(e)},sortDown:function(s){return t.sort(e,n,n+1)},sortUp:function(s){return t.sort(e,n,n-1)},show:function(s){return t.show(e)},update:function(s){return t.update(e,s)}},nativeOn:{click:function(s){return s.stopPropagation(),t.select(e,s)}}},"k-block",e,!1))})),1),s("k-block-selector",{ref:"selector",attrs:{fieldsets:t.fieldsets,"fieldset-groups":t.fieldsetGroups},on:{add:t.add,convert:t.convert,paste:function(e){return t.paste(e)}}}),s("k-remove-dialog",{ref:"removeAll",attrs:{text:t.$t("field.blocks.delete.confirm.all")},on:{submit:t.removeAll}}),s("k-remove-dialog",{ref:"removeSelected",attrs:{text:t.$t("field.blocks.delete.confirm.selected")},on:{submit:t.removeSelected}}),s("k-block-pasteboard",{ref:"pasteboard",on:{paste:function(e){return t.paste(e)}}})]:[s("k-box",{attrs:{theme:"info"}},[t._v(" No fieldsets yet ")])]],2)}),[],!1,Pg,null,null,null);function Pg(t){for(let e in Mg)this[e]=Mg[e]}var Ng=function(){return Dg.exports}();const qg={inheritAttrs:!1,props:{caption:String,captionMarks:[Boolean,Array],cover:{type:Boolean,default:!0},isEmpty:Boolean,emptyIcon:String,emptyText:String,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio||"16/9")}}},Fg={};var Rg=zt(qg,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("figure",{staticClass:"k-block-figure"},[t.isEmpty?s("k-button",{staticClass:"k-block-figure-empty",attrs:{icon:t.emptyIcon,text:t.emptyText},on:{click:function(e){return t.$emit("open")}}}):s("span",{staticClass:"k-block-figure-container",on:{dblclick:function(e){return t.$emit("open")}}},[t._t("default")],2),t.caption?s("figcaption",[s("k-writer",{attrs:{inline:!0,marks:t.captionMarks,value:t.caption},on:{input:function(e){return t.$emit("update",{caption:e})}}})],1):t._e()],1)}),[],!1,zg,null,null,null);function zg(t){for(let e in Fg)this[e]=Fg[e]}var Hg=function(){return Rg.exports}();const Ug={props:{isBatched:Boolean,isEditable:Boolean,isFull:Boolean,isHidden:Boolean},methods:{open(){this.$refs.options.open()}}},Kg={};var Jg=zt(Ug,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dropdown",{staticClass:"k-block-options"},[t.isBatched?[s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("copy"),icon:"template"},nativeOn:{mousedown:function(e){return e.preventDefault(),t.$emit("copy")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("remove"),icon:"trash"},nativeOn:{mousedown:function(e){return e.preventDefault(),t.$emit("confirmToRemoveSelected")}}})]:[t.isEditable?s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("edit"),icon:"edit"},on:{click:function(e){return t.$emit("open")}}}):t._e(),s("k-button",{staticClass:"k-block-options-button",attrs:{disabled:t.isFull,tooltip:t.$t("insert.after"),icon:"add"},on:{click:function(e){return t.$emit("chooseToAppend")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("delete"),icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}}),s("k-button",{staticClass:"k-block-options-button",attrs:{tooltip:t.$t("more"),icon:"dots"},on:{click:function(e){return t.$refs.options.toggle()}}}),s("k-button",{staticClass:"k-block-options-button k-sort-handle",attrs:{tooltip:t.$t("sort"),icon:"sort"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.$emit("sortUp"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.$emit("sortDown"))}]}}),s("k-dropdown-content",{ref:"options",attrs:{align:"right"}},[s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-up"},on:{click:function(e){return t.$emit("chooseToPrepend")}}},[t._v(" "+t._s(t.$t("insert.before"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"angle-down"},on:{click:function(e){return t.$emit("chooseToAppend")}}},[t._v(" "+t._s(t.$t("insert.after"))+" ")]),s("hr"),t.isEditable?s("k-dropdown-item",{attrs:{icon:"edit"},on:{click:function(e){return t.$emit("open")}}},[t._v(" "+t._s(t.$t("edit"))+" ")]):t._e(),s("k-dropdown-item",{attrs:{icon:"refresh"},on:{click:function(e){return t.$emit("chooseToConvert")}}},[t._v(" "+t._s(t.$t("field.blocks.changeType"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"template"},on:{click:function(e){return t.$emit("copy")}}},[t._v(" "+t._s(t.$t("copy"))+" ")]),s("k-dropdown-item",{attrs:{icon:"download"},on:{click:function(e){return t.$emit("paste")}}},[t._v(" "+t._s(t.$t("paste.after"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:t.isHidden?"preview":"hidden"},on:{click:function(e){return t.$emit(t.isHidden?"show":"hide")}}},[t._v(" "+t._s(!0===t.isHidden?t.$t("show"):t.$t("hide"))+" ")]),s("k-dropdown-item",{attrs:{disabled:t.isFull,icon:"copy"},on:{click:function(e){return t.$emit("duplicate")}}},[t._v(" "+t._s(t.$t("duplicate"))+" ")]),s("hr"),s("k-dropdown-item",{attrs:{icon:"trash"},on:{click:function(e){return t.$emit("confirmToRemove")}}},[t._v(" "+t._s(t.$t("delete"))+" ")])],1)]],2)}),[],!1,Gg,null,null,null);function Gg(t){for(let e in Kg)this[e]=Kg[e]}var Vg=function(){return Jg.exports}();const Wg={};var Yg=zt({inheritAttrs:!1,props:{endpoint:String,fieldsets:Object,fieldsetGroups:Object},data(){return{dialogIsOpen:!1,disabled:[],headline:null,payload:null,event:"add",groups:this.createGroups()}},computed:{shortcut(){return this.$helper.keyboard.metaKey()+"+v"}},methods:{add(t){this.$emit(this.event,t,this.payload),this.$refs.dialog.close()},close(){this.$refs.dialog.close()},createGroups(){let t={},e=0;const s=this.fieldsetGroups||{blocks:{label:this.$t("field.blocks.fieldsets.label"),sets:Object.keys(this.fieldsets)}};return Object.keys(s).forEach((n=>{let i=s[n];i.open=!1!==i.open,i.fieldsets=i.sets.filter((t=>this.fieldsets[t])).map((t=>(e++,l(a({},this.fieldsets[t]),{index:e})))),0!==i.fieldsets.length&&(t[n]=i)})),t},isOpen(){return this.dialogIsOpen},navigate(t){const e=this.$refs["fieldset-"+t];e&&e[0]&&e[0].focus()},onClose(){this.dialogIsOpen=!1,this.$events.$off("paste",this.close)},onOpen(){this.dialogIsOpen=!0,this.$events.$on("paste",this.close)},open(t,e={}){const s=a({event:"add",disabled:[],headline:null},e);this.event=s.event,this.disabled=s.disabled,this.headline=s.headline,this.payload=t,this.$refs.dialog.open()}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("k-dialog",{ref:"dialog",staticClass:"k-block-selector",attrs:{"cancel-button":!1,"submit-button":!1,size:"medium"},on:{open:t.onOpen,close:t.onClose}},[t.headline?s("k-headline",[t._v(" "+t._s(t.headline)+" ")]):t._e(),t._l(t.groups,(function(e,n){return s("details",{key:n,attrs:{open:e.open}},[s("summary",[t._v(t._s(e.label))]),s("div",{staticClass:"k-block-types"},t._l(e.fieldsets,(function(e){return s("k-button",{key:e.name,ref:"fieldset-"+e.index,refInFor:!0,attrs:{disabled:t.disabled.includes(e.type),icon:e.icon||"box",text:e.name},on:{keydown:[function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"up",38,s.key,["Up","ArrowUp"])?null:t.navigate(e.index-1)},function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"down",40,s.key,["Down","ArrowDown"])?null:t.navigate(e.index+1)}],click:function(s){return t.add(e.type)}}})})),1)])})),s("p",{staticClass:"k-clipboard-hint",domProps:{innerHTML:t._s(t.$t("field.blocks.fieldsets.paste",{shortcut:t.shortcut}))}})],2)}),[],!1,Xg,null,null,null);function Xg(t){for(let e in Wg)this[e]=Wg[e]}var Zg=function(){return Yg.exports}();const Qg={};var tk=zt({inheritAttrs:!1,props:{fieldset:Object,content:Object},computed:{icon(){return this.fieldset.icon||"box"},label(){if(!this.fieldset.label||0===this.fieldset.label.length)return!1;if(this.fieldset.label===this.fieldset.name)return!1;const t=this.$helper.string.template(this.fieldset.label,this.content);return"…"!==t&&t},name(){return this.fieldset.name}}},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",t._g({staticClass:"k-block-title"},t.$listeners),[s("k-icon",{staticClass:"k-block-icon",attrs:{type:t.icon}}),s("span",{staticClass:"k-block-name"},[t._v(" "+t._s(t.name)+" ")]),t.label?s("span",{staticClass:"k-block-label"},[t._v(" "+t._s(t.label)+" ")]):t._e()],1)}),[],!1,ek,null,null,null);function ek(t){for(let e in Qg)this[e]=Qg[e]}var sk=function(){return tk.exports}();const nk={};var ik=zt({inheritAttrs:!1,props:{content:[Object,Array],fieldset:Object},methods:{field(t,e=null){let s=null;return Object.values(this.fieldset.tabs).forEach((e=>{e.fields[t]&&(s=e.fields[t])})),s||e},open(){this.$emit("open")},update(t){this.$emit("update",a(a({},this.content),t))}}},undefined,undefined,!1,ok,null,null,null);function ok(t){for(let e in nk)this[e]=nk[e]}var rk=function(){return ik.exports}();u.component("k-block",Ag),u.component("k-blocks",Ng),u.component("k-block-figure",Hg),u.component("k-block-options",Vg),u.component("k-block-selector",Zg),u.component("k-block-title",sk),u.component("k-block-type",rk);const ak={"./Types/Code.vue":xm,"./Types/Default.vue":Tm,"./Types/Gallery.vue":Bm,"./Types/Heading.vue":qm,"./Types/Image.vue":Um,"./Types/Line.vue":Wm,"./Types/List.vue":tg,"./Types/Markdown.vue":og,"./Types/Quote.vue":cg,"./Types/Table.vue":mg,"./Types/Text.vue":yg,"./Types/Video.vue":Sg};Object.keys(ak).map((t=>{const e=t.match(/\/([a-zA-Z]*)\.vue/)[1].toLowerCase();let s=ak[t].default;s.extends=rk,u.component("k-block-type-"+e,s)})),u.component("k-dialog",Gt),u.component("k-error-dialog",Zt),u.component("k-fiber-dialog",se),u.component("k-files-dialog",ae),u.component("k-form-dialog",pe),u.component("k-language-dialog",ge),u.component("k-pages-dialog",ye),u.component("k-remove-dialog",Se),u.component("k-text-dialog",Te),u.component("k-users-dialog",je),u.component("k-drawer",Pe),u.component("k-form-drawer",ze),u.component("k-calendar",Ze),u.component("k-counter",ns),u.component("k-autocomplete",Ge),u.component("k-form",ls),u.component("k-form-buttons",hs),u.component("k-form-indicator",ks),u.component("k-field",Is),u.component("k-fieldset",Ps),u.component("k-input",zs),u.component("k-login",Js),u.component("k-login-code",Ys),u.component("k-upload",en),u.component("k-writer",Wn),u.component("k-login-alert",Qn),u.component("k-checkbox-input",ii),u.component("k-checkboxes-input",ui),u.component("k-date-input",fi),u.component("k-datetime-input",bi),u.component("k-email-input",Ti),u.component("k-list-input",Mi),u.component("k-multiselect-input",Fi),u.component("k-number-input",Ki),u.component("k-password-input",Yi),u.component("k-radio-input",eo),u.component("k-range-input",ro),u.component("k-select-input",po),u.component("k-slug-input",ko),u.component("k-tags-input",_o),u.component("k-tel-input",Oo),u.component("k-text-input",xi),u.component("k-textarea-input",Io),u.component("k-time-input",Po),u.component("k-toggle-input",zo),u.component("k-url-input",Go),u.component("k-blocks-field",Zo),u.component("k-checkboxes-field",nr),u.component("k-date-field",lr),u.component("k-email-field",hr),u.component("k-files-field",br),u.component("k-gap-field",wr),u.component("k-headline-field",Er),u.component("k-info-field",Ir),u.component("k-layout-field",Wr),u.component("k-line-field",Qr),u.component("k-list-field",ia),u.component("k-multiselect-field",la),u.component("k-number-field",pa),u.component("k-pages-field",ga),u.component("k-password-field",ya),u.component("k-radio-field",xa),u.component("k-range-field",Ea),u.component("k-select-field",Ia),u.component("k-slug-field",Pa),u.component("k-structure-field",Ha),u.component("k-tags-field",Ga),u.component("k-text-field",el),u.component("k-textarea-field",ol),u.component("k-tel-field",Xa),u.component("k-time-field",ul),u.component("k-toggle-field",hl),u.component("k-url-field",vl),u.component("k-users-field",_l),u.component("k-writer-field",Cl),u.component("k-toolbar",Il),u.component("k-toolbar-email-dialog",Dl),u.component("k-toolbar-link-dialog",Fl),u.component("k-date-field-preview",Ul),u.component("k-email-field-preview",Zl),u.component("k-files-field-preview",su),u.component("k-list-field-preview",ru),u.component("k-pages-field-preview",cu),u.component("k-toggle-field-preview",bu),u.component("k-time-field-preview",fu),u.component("k-url-field-preview",Vl),u.component("k-users-field-preview",wu),u.component("k-writer-field-preview",Ou),u.component("k-aspect-ratio",Iu),u.component("k-bar",Du),u.component("k-box",Ru),u.component("k-collection",Ju),u.component("k-column",Xu),u.component("k-dropzone",sc),u.component("k-empty",rc),u.component("k-file-preview",cc),u.component("k-grid",fc),u.component("k-header",bc),u.component("k-inside",wc),u.component("k-item",Tc),u.component("k-item-image",Bc),u.component("k-items",qc),u.component("k-overlay",Uc),u.component("k-panel",Vc),u.component("k-tabs",Zc),u.component("k-view",sd),u.component("k-draggable",ad),u.component("k-error-boundary",dd),u.component("k-fatal",md),u.component("k-headline",bd),u.component("k-icon",wd),u.component("k-icons",Ad),u.component("k-image",Md),u.component("k-loader",qd),u.component("k-offline-warning",Hd),u.component("k-progress",Gd),u.component("k-registration",Xd),u.component("k-status-icon",rp),u.component("k-sort-handle",ep),u.component("k-text",cp),u.component("k-user-info",fp),u.component("k-breadcrumb",vp),u.component("k-button",wp),u.component("k-button-disabled",Ep),u.component("k-button-group",Ip),u.component("k-button-link",Pp),u.component("k-button-native",Hp),u.component("k-dropdown",Gp),u.component("k-dropdown-content",Zp),u.component("k-dropdown-item",nh),u.component("k-languages-dropdown",ph),u.component("k-link",lh),u.component("k-options-dropdown",kh),u.component("k-pagination",_h),u.component("k-prev-next",Eh),u.component("k-search",Ih),u.component("k-tag",Ph),u.component("k-topbar",zh),u.component("k-sections",Gh),u.component("k-info-section",Xh),u.component("k-pages-section",sf),u.component("k-files-section",af),u.component("k-fields-section",df),u.component("k-account-view",xf),u.component("k-error-view",Ef),u.component("k-file-view",If),u.component("k-installation-view",Pf),u.component("k-languages-view",Rf),u.component("k-login-view",Vf),u.component("k-page-view",Zf),u.component("k-plugin-view",sm),u.component("k-reset-password-view",rm),u.component("k-site-view",cm),u.component("k-system-view",mm),u.component("k-users-view",bm),u.component("k-user-view",yf);u.config.productionTip=!1,u.config.devtools=!0,u.use(dt),u.use(Pt),u.use(qt),u.use(Rt),u.use(pt),u.use(Nt),u.use(gt),u.use(et,lt),u.use(W),u.use(Y),new u({store:lt,created(){window.panel.$vue=window.panel.app=this,window.panel.plugins.created.forEach((t=>t(this))),this.$store.dispatch("content/init")},render:t=>t(ct)}).$mount("#app"); diff --git a/kirby/panel/dist/js/plugins.js b/kirby/panel/dist/js/plugins.js index aeafda1..23e3981 100644 --- a/kirby/panel/dist/js/plugins.js +++ b/kirby/panel/dist/js/plugins.js @@ -56,11 +56,6 @@ window.panel.plugin = function (plugin, parts) { window.panel.plugins["created"].push(parts["created"]); } - // Views - resolve(parts, "views", function (name, options) { - window.panel.plugins["views"][name] = options; - }); - // Login if (parts.login) { window.panel.plugins.login = parts.login; diff --git a/kirby/panel/dist/js/vendor.js b/kirby/panel/dist/js/vendor.js index 4b975f1..a21ec89 100644 --- a/kirby/panel/dist/js/vendor.js +++ b/kirby/panel/dist/js/vendor.js @@ -1,30 +1,19 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0010":function(t,e,n){"use strict";n.d(e,"a",(function(){return N})),n.d(e,"b",(function(){return C})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return O})),n.d(e,"e",(function(){return k}));var r=n("0ac0"),o=n("304a"),i=n("5313");function a(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function s(t,e,n){var o=t.selection,a=o.$cursor;if(!a||(n?!n.endOfTextblock("backward",t):a.parentOffset>0))return!1;var s=l(a);if(!s){var u=a.blockRange(),f=u&&Object(r["j"])(u);return null!=f&&(e&&e(t.tr.lift(u,f).scrollIntoView()),!0)}var p=s.nodeBefore;if(!p.type.spec.isolating&&S(t,s,e))return!0;if(0==a.parent.content.size&&(c(p,"end")||i["c"].isSelectable(p))){if(e){var d=t.tr.deleteRange(a.before(),a.after());d.setSelection(c(p,"end")?i["f"].findFrom(d.doc.resolve(d.mapping.map(s.pos,-1)),-1):i["c"].create(d.doc,s.pos-p.nodeSize)),e(d.scrollIntoView())}return!0}return!(!p.isAtom||s.depth!=a.depth-1)&&(e&&e(t.tr.delete(s.pos-p.nodeSize,s.pos).scrollIntoView()),!0)}function c(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0;return!1}function u(t,e,n){var r=t.selection,o=r.$head,a=r.empty,s=o;if(!a)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;s=l(o)}var c=s&&s.nodeBefore;return!(!c||!i["c"].isSelectable(c))&&(e&&e(t.tr.setSelection(i["c"].create(t.doc,s.pos-c.nodeSize)).scrollIntoView()),!0)}function l(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function f(t,e,n){var r=t.selection,o=r.$cursor;if(!o||(n?!n.endOfTextblock("forward",t):o.parentOffset=0;e--){var n=t.node(e);if(t.index(e)+11&&o.after()!=o.end(-1)){var i=o.before();if(Object(r["f"])(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}var a=o.blockRange(),s=a&&Object(r["j"])(a);return null!=s&&(e&&e(t.tr.lift(a,s).scrollIntoView()),!0)}function b(t,e){var n=t.selection,a=n.$from,s=n.$to;if(t.selection instanceof i["c"]&&t.selection.node.isBlock)return!(!a.parentOffset||!Object(r["f"])(t.doc,a.pos))&&(e&&e(t.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(e){var c=s.parentOffset==s.parent.content.size,u=t.tr;t.selection instanceof i["g"]&&u.deleteSelection();var l=0==a.depth?null:v(a.node(-1).contentMatchAt(a.indexAfter(-1))),f=c&&l?[{type:l}]:null,p=Object(r["f"])(u.doc,u.mapping.map(a.pos),1,f);f||p||!Object(r["f"])(u.doc,u.mapping.map(a.pos),1,l&&[{type:l}])||(f=[{type:l}],p=!0),p&&(u.split(u.mapping.map(a.pos),1,f),c||a.parentOffset||a.parent.type==l||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o["c"].from(l.create(),a.parent))||u.setNodeMarkup(u.mapping.map(a.before()),l)),e(u.scrollIntoView())}return!0}function w(t,e){return e&&e(t.tr.setSelection(new i["a"](t.doc))),!0}function x(t,e,n){var o=e.nodeBefore,i=e.nodeAfter,a=e.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&e.parent.canReplace(a-1,a)?(n&&n(t.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(a,a+1)||!i.isTextblock&&!Object(r["e"])(t.doc,e.pos))&&(n&&n(t.tr.clearIncompatible(e.pos,o.type,o.contentMatchAt(o.childCount)).join(e.pos).scrollIntoView()),!0))}function S(t,e,n){var a,s,c=e.nodeBefore,u=e.nodeAfter;if(c.type.spec.isolating||u.type.spec.isolating)return!1;if(x(t,e,n))return!0;if(e.parent.canReplace(e.index(),e.index()+1)&&(a=(s=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&s.matchType(a[0]||u.type).validEnd){if(n){for(var l=e.pos+u.nodeSize,f=o["c"].empty,p=a.length-1;p>=0;p--)f=o["c"].from(a[p].create(null,f));f=o["c"].from(c.copy(f));var d=t.tr.step(new r["b"](e.pos-1,l,e.pos,l,new o["j"](f,1,0),a.length,!0)),h=l+2*a.length;Object(r["e"])(d.doc,h)&&d.join(h),n(d.scrollIntoView())}return!0}var v=i["f"].findFrom(e,1),m=v&&v.$from.blockRange(v.$to),g=m&&Object(r["j"])(m);return null!=g&&g>=e.depth&&(n&&n(t.tr.lift(m,g).scrollIntoView()),!0)}function O(t,e){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,t,e).scrollIntoView()),!0)}}function _(t,e,n){for(var r=function(r){var o=e[r],i=o.$from,a=o.$to,s=0==i.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},o=0;ot)break;var l=this.ranges[s+o],f=this.ranges[s+i],p=c+l;if(t<=p){var d=l?t==c?-1:t==p?1:e:e,h=c+r+(d<0?0:f);if(n)return h;var v=t==(e<0?c:p)?null:a(s/3,t-c);return new u(h,e<0?t!=c:t!=p,v)}r+=f-l}return n?t+r:new u(t+r)},l.prototype.touches=function(t,e){for(var n=0,r=s(e),o=this.inverted?2:1,i=this.inverted?1:2,a=0;at)break;var u=this.ranges[a+o],l=c+u;if(t<=l&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1},l.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},f.prototype.invert=function(){var t=new f;return t.appendMappingInverted(this),t},f.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;no&&s0},d.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(d.prototype,h);var m=Object.create(null),g=function(){};g.prototype.apply=function(t){return v()},g.prototype.getMap=function(){return l.empty},g.prototype.invert=function(t){return v()},g.prototype.map=function(t){return v()},g.prototype.merge=function(t){return null},g.prototype.toJSON=function(){return v()},g.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=m[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},g.jsonID=function(t,e){if(t in m)throw new RangeError("Duplicate use of step JSON ID "+t);return m[t]=e,e.prototype.jsonID=t,e};var y=function(t,e){this.doc=t,this.failed=e};y.ok=function(t){return new y(t,null)},y.fail=function(t){return new y(null,t)},y.fromReplace=function(t,e,n,o){try{return y.ok(t.replace(e,n,o))}catch(i){if(i instanceof r["h"])return y.fail(i.message);throw i}};var b=function(t){function e(e,n,r,o){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&x(t,this.from,this.to)?y.fail("Structure replace would overwrite content"):y.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new l([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure!=this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?r["j"].empty:new r["j"](t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var o=this.slice.size+t.slice.size==0?r["j"].empty:new r["j"](this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),o,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,r["j"].fromJSON(t,n.slice),!!n.structure)},e}(g);g.jsonID("replace",b);var w=function(t){function e(e,n,r,o,i,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(x(t,this.from,this.gapFrom)||x(t,this.gapTo,this.to)))return y.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return y.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?y.fromReplace(t,this.from,this.to,n):y.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new l([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,r["j"].fromJSON(t,n.slice),n.insert,!!n.structure)},e}(g);function x(t,e,n){var r=t.resolve(e),o=n-e,i=r.depth;while(o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount)i--,o--;if(o>0){var a=r.node(i).maybeChild(r.indexAfter(i));while(o>0){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function S(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function O(t){for(var e=t.parent,n=e.content.cutByIndex(t.startIndex,t.endIndex),r=t.depth;;--r){var o=t.$from.node(r),i=t.$from.index(r),a=t.$to.indexAfter(r);if(ri;s--,c--){var u=o.node(s),l=o.index(s);if(u.type.spec.isolating)return!1;var f=u.content.cutByIndex(l,u.childCount),p=r&&r[c]||u;if(p!=u&&(f=f.replaceChild(0,p.type.create(p.attrs))),!u.canReplace(l+1,u.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)}function T(t,e){var n=t.resolve(e),r=n.index();return $(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function $(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function D(t,e,n){void 0===n&&(n=-1);for(var r=t.resolve(e),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&$(i,a)&&r.node(o).canReplace(s,s+1))return e;if(0==o)break;e=n<0?r.before(o):r.after(o)}}function N(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s=0;s--){var c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(c>0?1:0);if(1==a?r.node(s).canReplace(u,u,o):r.node(s).contentMatchAt(u).findWrapping(o.firstChild.type))return 0==c?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}function j(t,e,n){for(var o=[],i=0;ie;p--)d||n.index(p)>0?(d=!0,l=r["c"].from(n.node(p).copy(l)),f++):c--;for(var h=r["c"].empty,v=0,m=i,g=!1;m>e;m--)g||o.after(m+1)=0;o--)n=r["c"].from(e[o].type.create(e[o].attrs,n));var i=t.start,a=t.end;return this.step(new w(i,a,i,a,new r["j"](n,0,0),e.length,!0))},d.prototype.setBlockType=function(t,e,n,o){var i=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,o)&&E(i.doc,i.mapping.slice(a).map(e),n)){i.clearIncompatible(i.mapping.slice(a).map(e,1),n);var s=i.mapping.slice(a),c=s.map(e,1),u=s.map(e+t.nodeSize,1);return i.step(new w(c,u,c+1,u-1,new r["j"](r["c"].from(n.create(o,null,t.marks)),0,0),1,!0)),!1}})),this},d.prototype.setNodeMarkup=function(t,e,n,o){var i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var a=e.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(t,t+i.nodeSize,a);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new w(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new r["j"](r["c"].from(a),0,0),1,!0))},d.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var o=this.doc.resolve(t),i=r["c"].empty,a=r["c"].empty,s=o.depth,c=o.depth-e,u=e-1;s>c;s--,u--){i=r["c"].from(o.node(s).copy(i));var l=n&&n[u];a=r["c"].from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}return this.step(new b(t,t,new r["j"](i.append(a),e,e),!0))},d.prototype.join=function(t,e){void 0===e&&(e=1);var n=new b(t-e,t+e,r["j"].empty,!0);return this.step(n)};var I=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),o=t.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r["j"](j(n.content,(function(t,n){return n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),i),n.openStart,n.openEnd);return y.fromReplace(t,this.from,this.to,a)},e.prototype.invert=function(){return new R(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(g);g.jsonID("addMark",I);var R=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),o=new r["j"](j(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return y.fromReplace(t,this.from,this.to,o)},e.prototype.invert=function(){return new I(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(g);function L(t,e,n,o){if(void 0===n&&(n=e),void 0===o&&(o=r["j"].empty),e==n&&!o.size)return null;var i=t.resolve(e),a=t.resolve(n);return z(i,a,o)?new b(e,n,o):new F(i,a,o).fit()}function z(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}g.jsonID("removeMark",R),d.prototype.addMark=function(t,e,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,c,u){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&u.type.allowsMarkType(n.type)){for(var f=Math.max(c,t),p=Math.min(c+r.nodeSize,e),d=n.addToSet(l),h=0;h=0;d--)this.step(i[d]);return this},d.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=r["j"].empty);var o=L(this.doc,t,e,n);return o&&this.step(o),this},d.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new r["j"](r["c"].from(n),0,0))},d.prototype.delete=function(t,e){return this.replace(t,e,r["j"].empty)},d.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var F=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}this.placed=r["c"].empty;for(var a=t.depth;a>0;a--)this.placed=r["c"].from(t.node(a).copy(this.placed))},B={depth:{configurable:!0}};function V(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(V(t.firstChild.content,e-1,n)))}function q(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(q(t.lastChild.content,e-1,n)))}function H(t,e){for(var n=0;n1&&(o=o.replaceChild(0,W(o.firstChild,e-1,1==o.childCount?n-1:0))),e>0&&(o=t.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r["c"].empty,!0)))),t.copy(o)}function U(t,e,n,r,o){var i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!K(n,i.content,a)?s:null}function K(t,e,n){for(var r=n;ro){var s=i.contentMatchAt(0),c=s.fillBefore(t).append(t);t=c.append(s.matchFragment(c).fillBefore(r["c"].empty,!0))}return t}function Y(t,e){for(var n=[],r=Math.min(t.depth,e.depth),o=r;o>=0;o--){var i=t.start(o);if(ie.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;i==e.start(o)&&n.push(o)}return n}B.depth.get=function(){return this.frontier.length-1},F.prototype.fit=function(){while(this.unplaced.size){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(e<0?this.$to:o.doc.resolve(e));if(!i)return null;var a=this.placed,s=o.depth,c=i.depth;while(s&&c&&1==a.childCount)a=a.firstChild.content,s--,c--;var u=new r["j"](a,s,c);return e>-1?new w(o.pos,e,this.$to.pos,this.$to.end(),u,n):u.size||o.pos!=this.$to.pos?new b(o.pos,i.pos,u):void 0},F.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--){var n=void 0,o=void 0;e?(o=H(this.unplaced.content,e-1).firstChild,n=o.content):n=this.unplaced.content;for(var i=n.firstChild,a=this.depth;a>=0;a--){var s=this.frontier[a],c=s.type,u=s.match,l=void 0,f=void 0;if(1==t&&(i?u.matchType(i.type)||(f=u.fillBefore(r["c"].from(i),!1)):c.compatibleContent(o.type)))return{sliceDepth:e,frontierDepth:a,parent:o,inject:f};if(2==t&&i&&(l=u.findWrapping(i.type)))return{sliceDepth:e,frontierDepth:a,parent:o,wrap:l};if(o&&u.matchType(o.type))break}}},F.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,o=t.openEnd,i=H(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r["j"](e,n+1,Math.max(o,i.size+n>=e.size-o?n+1:0)),!0)},F.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,o=t.openEnd,i=H(e,n);if(i.childCount<=1&&n>0){var a=e.size-n<=n+i.size;this.unplaced=new r["j"](V(e,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r["j"](V(e,n,1),n,o)},F.prototype.placeNodes=function(t){var e=t.sliceDepth,n=t.frontierDepth,o=t.parent,i=t.inject,a=t.wrap;while(this.depth>n)this.closeFrontierNode();if(a)for(var s=0;s1||0==l||y.content.size)&&(h=b,p.push(W(y.mark(v.allowedMarks(y.marks)),1==f?l:0,f==u.childCount?g:-1)))}var w=f==u.childCount;w||(g=-1),this.placed=q(this.placed,n,r["c"].from(p)),this.frontier[n].match=h,w&&g<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var x=0,S=u;x1&&o==this.$to.end(--r))++o;return o},F.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e=0;s--){var c=this.frontier[s],u=c.match,l=c.type,f=U(t,s,l,u,!0);if(!f||f.childCount)continue t}return{depth:e,fit:a,move:i?t.doc.resolve(t.after(e+1)):t}}}},F.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;while(this.depth>e.depth)this.closeFrontierNode();e.fit.childCount&&(this.placed=q(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},F.prototype.openFrontierNode=function(t,e,n){var o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=q(this.placed,this.depth,r["c"].from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},F.prototype.closeFrontierNode=function(){var t=this.frontier.pop(),e=t.match.fillBefore(r["c"].empty,!0);e.childCount&&(this.placed=q(this.placed,this.frontier.length,e))},Object.defineProperties(F.prototype,B),d.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var o=this.doc.resolve(t),i=this.doc.resolve(e);if(z(o,i,n))return this.step(new b(t,e,n));var a=Y(o,this.doc.resolve(e));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var c=o.depth,u=o.pos-1;c>0;c--,u--){var l=o.node(c).type.spec;if(l.defining||l.isolating)break;a.indexOf(c)>-1?s=c:o.before(c)==u&&a.splice(1,0,-c)}for(var f=a.indexOf(s),p=[],d=n.openStart,h=n.content,v=0;;v++){var m=h.firstChild;if(p.push(m),v==n.openStart)break;h=m.content}d>0&&p[d-1].type.spec.defining&&o.node(f).type!=p[d-1].type?d-=1:d>=2&&p[d-1].isTextblock&&p[d-2].type.spec.defining&&o.node(f).type!=p[d-2].type&&(d-=2);for(var g=n.openStart;g>=0;g--){var y=(g+d+1)%(n.openStart+1),w=p[y];if(w)for(var x=0;x=0;M--){if(this.replace(t,e,n),this.steps.length>C)break;var E=a[M];M<0||(t=o.before(E),e=i.after(E))}return this},d.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var o=N(this.doc,t,n.type);null!=o&&(t=e=o)}return this.replaceRange(t,e,new r["j"](r["c"].from(n),0,0))},d.prototype.deleteRange=function(t,e){for(var n=this.doc.resolve(t),r=this.doc.resolve(e),o=Y(n,r),i=0;i0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(t-n.start(c)==n.depth-c&&e>n.end(c)&&r.end(c)-e!=r.depth-c)return this.delete(n.before(c),e);return this.delete(t,e)}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"0ecf":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";return function(t,e,n){var r=e.prototype;n.utc=function(t){return new e({date:t,utc:!0,args:arguments})},r.utc=function(t){var e=n(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),"minute"):e},r.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var i=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else i.call(this)};var a=r.utcOffset;r.utcOffset=function(t,e){var n=this.$utils().u;if(n(t))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;var r=Math.abs(t)<=16?60*t:t,o=this;if(e)return o.$offset=r,o.$u=0===t,o;if(0!==t){var i=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(r+i,"minute")).$offset=r,o.$x.$localOffset=i}else o=this.utc();return o};var s=r.format;r.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return s.call(this,e)},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var c=r.toDate;r.toDate=function(t){return"s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var u=r.diff;r.diff=function(t,e,r){if(this.$u===t.$u)return u.call(this,t,e,r);var o=this.local(),i=n(t).local();return u.call(o,i,e,r)}}}))},1331:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);e.default=o},"19e9":function(t,e,n){var r,o,i; /*! - autosize 4.0.2 - license: MIT - http://www.jacklmoore.com/autosize -*/(function(n,a){o=[t,e],r=a,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})(0,(function(t,e){"use strict";var n="function"===typeof Map?new Map:function(){var t=[],e=[];return{has:function(e){return t.indexOf(e)>-1},get:function(n){return e[t.indexOf(n)]},set:function(n,r){-1===t.indexOf(n)&&(t.push(n),e.push(r))},delete:function(n){var r=t.indexOf(n);r>-1&&(t.splice(r,1),e.splice(r,1))}}}(),r=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(c){r=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function o(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!n.has(t)){var e=null,o=null,i=null,a=function(){t.clientWidth!==o&&p()},s=function(e){window.removeEventListener("resize",a,!1),t.removeEventListener("input",p,!1),t.removeEventListener("keyup",p,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",p,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),n.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",p,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",p,!1),t.addEventListener("autosize:update",p,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",n.set(t,{destroy:s,update:p}),c()}function c(){var n=window.getComputedStyle(t,null);"vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),p()}function u(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function l(t){var e=[];while(t&&t.parentNode&&t.parentNode instanceof Element)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}function f(){if(0!==t.scrollHeight){var n=l(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",o=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){f();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(o1?a:a.$sub[0]:null;return{output:i,params:s}}},computed:{run:function(){var t=this,e=this.lazyParentModel(),n=Array.isArray(e)&&e.__ob__;if(n){var r=e.__ob__.dep;r.depend();var o=r.constructor.target;if(!this._indirectWatcher){var i=o.constructor;this._indirectWatcher=new i(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var a=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===a)return this._indirectWatcher.depend(),o.value;this._lastModel=a,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t[y]?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t[y]&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),a=e.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:u({},S,{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!==typeof this.validations[t]}}),computed:u({},w,{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=d(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=d(O,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=d(_,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),o=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},u({},e))}}:{};return Object.defineProperties({},u({},e,o,{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n,r))},children:function(){var t=this;return i(this.nestedKeys.map((function(e){return l(t,e)}))).concat(i(this.ruleKeys.map((function(e){return f(t,e)})))).filter(Boolean)}})}),s=a.extend({methods:{isNested:function(t){return"undefined"!==typeof this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),c=a.extend({computed:{keys:function(){var t=this.getModel();return v(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(g(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,e=this.validations,n=this.getModel(),o=u({},e);delete o["$trackBy"];var i={};return this.keys.map((function(e){var s=t.tracker(e);return i.hasOwnProperty(s)?null:(i[s]=!0,(0,r.h)(a,s,{validations:o,prop:e,lazyParentModel:t.getModelLazy,model:n[e],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),l=function(t,e){if("$each"===e)return(0,r.h)(c,e,{validations:t.validations[e],lazyParentModel:t.lazyParentModel,prop:e,lazyModel:t.getModel,rootModel:t.rootModel});var n=t.validations[e];if(Array.isArray(n)){var o=t.rootModel,i=d(n,(function(t){return function(){return g(o,o.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,r.h)(s,e,{validations:i,lazyParentModel:p,prop:e,lazyModel:p,rootModel:o})}return(0,r.h)(a,e,{validations:n,lazyParentModel:t.getModel,prop:e,lazyModel:t.getModelKey,rootModel:t.rootModel})},f=function(t,e){return(0,r.h)(n,e,{rule:t.validations[e],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return k={VBase:e,Validation:a},k},M=null;function E(t){if(M)return M;var e=t.constructor;while(e.super)e=e.super;return M=e,e}var A=function(t,e){var n=E(t),o=C(n),i=o.Validation,a=o.VBase,s=new a({computed:{children:function(){var n="function"===typeof e?e.call(t):e;return[(0,r.h)(i,"$v",{validations:n,lazyParentModel:p,prop:"$v",model:t,rootModel:t})]}}});return s},T={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=A(this,t)),{}},beforeCreate:function(){var t=this.$options,e=t.validations;e&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function $(t){t.mixin(T)}e.validationMixin=T;var D=$;e.default=D},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),a=n("6eeb"),s=n("ce4e"),c=n("e893"),u=n("94ca");t.exports=function(t,e){var n,l,f,p,d,h,v=t.target,m=t.global,g=t.stat;if(l=m?r:g?r[v]||s(v,{}):(r[v]||{}).prototype,l)for(f in e){if(d=e[f],t.noTargetGet?(h=o(l,f),p=h&&h.value):p=l[f],n=u(m?f:v+(g?".":"#")+f,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),a(l,f,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},"2a12":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"maxLength",max:t},(function(e){return!(0,r.req)(e)||(0,r.len)(e)<=t}))};e.default=o},"2f62":function(t,e,n){"use strict";(function(t){ -/*! - * vuex v3.5.1 - * (c) 2020 Evan You - * @license MIT - */ -function n(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}var r="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},o=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){o.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){o.emit("vuex:action",t,e)}),{prepend:!0}))}function a(t,e){return t.filter(e)[0]}function s(t,e){if(void 0===e&&(e=[]),null===t||"object"!==typeof t)return t;var n=a(e,(function(e){return e.original===t}));if(n)return n.copy;var r=Array.isArray(t)?[]:{};return e.push({original:t,copy:r}),Object.keys(t).forEach((function(n){r[n]=s(t[n],e)})),r}function c(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function u(t){return null!==t&&"object"===typeof t}function l(t){return t&&"function"===typeof t.then}function f(t,e){return function(){return t(e)}}var p=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},d={namespaced:{configurable:!0}};d.namespaced.get=function(){return!!this._rawModule.namespaced},p.prototype.addChild=function(t,e){this._children[t]=e},p.prototype.removeChild=function(t){delete this._children[t]},p.prototype.getChild=function(t){return this._children[t]},p.prototype.hasChild=function(t){return t in this._children},p.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},p.prototype.forEachChild=function(t){c(this._children,t)},p.prototype.forEachGetter=function(t){this._rawModule.getters&&c(this._rawModule.getters,t)},p.prototype.forEachAction=function(t){this._rawModule.actions&&c(this._rawModule.actions,t)},p.prototype.forEachMutation=function(t){this._rawModule.mutations&&c(this._rawModule.mutations,t)},Object.defineProperties(p.prototype,d);var h=function(t){this.register([],t,!1)};function v(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;v(t.concat(r),e.getChild(r),n.modules[r])}}h.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},h.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},h.prototype.update=function(t){v([],this.root,t)},h.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new p(e,n);if(0===t.length)this.root=o;else{var i=this.get(t.slice(0,-1));i.addChild(t[t.length-1],o)}e.modules&&c(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},h.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},h.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return e.hasChild(n)};var m;var g=function(t){var e=this;void 0===t&&(t={}),!m&&"undefined"!==typeof window&&window.Vue&&$(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new h(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m,this._makeLocalGettersCache=Object.create(null);var o=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(t,e){return s.call(o,t,e)},this.commit=function(t,e,n){return c.call(o,t,e,n)},this.strict=r;var u=this._modules.root.state;S(this,u,[],this._modules.root),x(this,u),n.forEach((function(t){return t(e)}));var l=void 0!==t.devtools?t.devtools:m.config.devtools;l&&i(this)},y={state:{configurable:!0}};function b(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function w(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;S(t,n,[],t._modules.root,!0),x(t,n,e)}function x(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};c(o,(function(e,n){i[n]=f(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=m.config.silent;m.config.silent=!0,t._vm=new m({data:{$$state:e},computed:i}),m.config.silent=a,t.strict&&E(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),m.nextTick((function(){return r.$destroy()})))}function S(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!i&&!o){var s=A(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){m.set(s,c,r.state)}))}var u=r.context=O(t,a,n);r.forEachMutation((function(e,n){var r=a+n;k(t,r,e,u)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,o=e.handler||e;C(t,r,o,u)})),r.forEachGetter((function(e,n){var r=a+n;M(t,r,e,u)})),r.forEachChild((function(r,i){S(t,e,n.concat(i),r,o)}))}function O(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=T(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=T(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return _(t,e)}},state:{get:function(){return A(t.state,n)}}}),o}function _(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function k(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push((function(e){n.call(t,r.state,e)}))}function C(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push((function(e){var o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return l(o)||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}function M(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function E(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function A(t,e){return e.reduce((function(t,e){return t[e]}),t)}function T(t,e,n){return u(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function $(t){m&&t===m||(m=t,n(m))}y.state.get=function(){return this._vm._data.$$state},y.state.set=function(t){0},g.prototype.commit=function(t,e,n){var r=this,o=T(t,e,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},g.prototype.dispatch=function(t,e){var n=this,r=T(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(u){0}var c=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(u){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(u){0}e(t)}))}))}},g.prototype.subscribe=function(t,e){return b(t,this._subscribers,e)},g.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return b(n,this._actionSubscribers,e)},g.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},g.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},g.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),S(this,this.state,t,this._modules.get(t),n.preserveState),x(this,this.state)},g.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=A(e.state,t.slice(0,-1));m.delete(n,t[t.length-1])})),w(this)},g.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},g.prototype.hotUpdate=function(t){this._modules.update(t),w(this,!0)},g.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(g.prototype,y);var D=z((function(t,e){var n={};return R(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=F(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),N=z((function(t,e){var n={};return R(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=F(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),P=z((function(t,e){var n={};return R(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||F(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),j=z((function(t,e){var n={};return R(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=F(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),I=function(t){return{mapState:D.bind(null,t),mapGetters:P.bind(null,t),mapMutations:N.bind(null,t),mapActions:j.bind(null,t)}};function R(t){return L(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function L(t){return Array.isArray(t)||u(t)}function z(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function F(t,e,n){var r=t._modulesNamespaceMap[n];return r}function B(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var i=t.actionFilter;void 0===i&&(i=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var c=t.logMutations;void 0===c&&(c=!0);var u=t.logActions;void 0===u&&(u=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var f=s(t.state);"undefined"!==typeof l&&(c&&t.subscribe((function(t,i){var a=s(i);if(n(t,f,a)){var c=H(),u=o(t),p="mutation "+t.type+c;V(l,p,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",r(f)),l.log("%c mutation","color: #03A9F4; font-weight: bold",u),l.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),q(l)}f=a})),u&&t.subscribeAction((function(t,n){if(i(t,n)){var r=H(),o=a(t),s="action "+t.type+r;V(l,s,e),l.log("%c action","color: #03A9F4; font-weight: bold",o),q(l)}})))}}function V(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(o){t.log(e)}}function q(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function H(){var t=new Date;return" @ "+U(t.getHours(),2)+":"+U(t.getMinutes(),2)+":"+U(t.getSeconds(),2)+"."+U(t.getMilliseconds(),3)}function W(t,e){return new Array(e+1).join(t)}function U(t,e){return W("0",e-t.toString().length)+t}var K={Store:g,install:$,version:"3.5.1",mapState:D,mapMutations:N,mapGetters:P,mapActions:j,createNamespacedHelpers:I,createLogger:B};e["a"]=K}).call(this,n("c8ba"))},"304a":function(t,e,n){"use strict";function r(t){this.content=t}n.d(e,"a",(function(){return dt})),n.d(e,"b",(function(){return Tt})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return lt})),n.d(e,"f",(function(){return R})),n.d(e,"g",(function(){return P})),n.d(e,"h",(function(){return h})),n.d(e,"i",(function(){return ft})),n.d(e,"j",(function(){return v})),r.prototype={constructor:r,find:function(t){for(var e=0;e>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};var o=r,i=o;function a(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){var c=a(o.content,i.content,n+1);if(null!=c)return c}n+=o.nodeSize}else n+=o.nodeSize}}function s(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=t.child(--o),c=e.child(--i),u=a.nodeSize;if(a!=c){if(!a.sameMarkup(c))return{a:n,b:r};if(a.isText&&a.text!=c.text){var l=0,f=Math.min(a.text.length,c.text.length);while(lt&&!1!==n(s,r+a,o,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,t-u),Math.min(s.content.size,e-u),n,r+u)}a=c}},c.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},c.prototype.textBetween=function(t,e,n,r){var o="",i=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(o+=a.text.slice(Math.max(t,s)-s,e-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},c.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(var o=0,i=0;it&&((ie)&&(a=a.isText?a.cut(Math.max(0,t-i),Math.min(a.text.length,e-i)):a.cut(Math.max(0,t-i-1),Math.min(a.content.size,e-i-1))),n.push(a),r+=a.nodeSize),i=s}return new c(n,r)},c.prototype.cutByIndex=function(t,e){return t==e?c.empty:0==t&&e==this.content.length?this:new c(this.content.slice(t,e))},c.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new c(r,o)},c.prototype.addToStart=function(t){return new c([t].concat(this.content),this.size+t.nodeSize)},c.prototype.addToEnd=function(t){return new c(this.content.concat(t),this.size+t.nodeSize)},c.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;ethis.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t||e>0?f(n+1,i):f(n,r);r=i}},c.prototype.toString=function(){return"<"+this.toStringInner()+">"},c.prototype.toStringInner=function(){return this.content.join(", ")},c.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},c.fromJSON=function(t,e){if(!e)return c.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new c(e.map(t.nodeFromJSON))},c.fromArray=function(t){if(!t.length)return c.empty;for(var e,n=0,r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e},d.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return w(t,e,n,0)}function w(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function _(t,e,n,r){var o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(O(t.nodeAfter,r),i++));for(var s=i;so&&S(t,e,o+1),a=r.depth>o&&S(n,r,o+1),s=[];return _(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(x(i,a),O(k(i,C(t,e,n,r,o+1)),s)):(i&&O(k(i,M(t,e,o+1)),s),_(e,n,o,s),a&&O(k(a,M(n,r,o+1)),s)),_(r,null,o,s),new c(s)}function M(t,e,n){var r=[];if(_(null,t,n,r),t.depth>n){var o=S(t,e,n+1);O(k(o,M(t,e,n+1)),r)}return _(e,null,n,r),new c(r)}function E(t,e){for(var n=e.depth-t.openStart,r=e.node(n),o=r.copy(t.content),i=n-1;i>=0;i--)o=e.node(i).copy(c.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}m.size.get=function(){return this.content.size-this.openStart-this.openEnd},v.prototype.insertAt=function(t,e){var n=y(this.content,t+this.openStart,e,null);return n&&new v(n,this.openStart,this.openEnd)},v.prototype.removeBetween=function(t,e){return new v(g(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},v.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},v.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},v.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},v.fromJSON=function(t,e){if(!e)return v.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new v(c.fromJSON(t,e.content),n,r)},v.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new v(t,n,r)},Object.defineProperties(v.prototype,m),v.empty=new v(c.empty,0,0);var A=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},T={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};A.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},T.parent.get=function(){return this.node(this.depth)},T.doc.get=function(){return this.node(0)},A.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},A.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},A.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},A.prototype.start=function(t){return t=this.resolveDepth(t),0==t?0:this.path[3*t-1]+1},A.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},A.prototype.before=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},A.prototype.after=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},T.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},T.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},T.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},A.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},A.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new P(this,t,n)},A.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},A.prototype.max=function(t){return t.pos>this.pos?t:this},A.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,o=e,i=t;;){var a=i.content.findIndex(o),s=a.index,c=a.offset,u=o-c;if(n.push(i,s,r+c),!u)break;if(i=i.child(s),i.isText)break;o=u-1,r+=c+1}return new A(e,n,o)},A.resolveCached=function(t,e){for(var n=0;n<$.length;n++){var r=$[n];if(r.pos==e&&r.doc==t)return r}var o=$[D]=A.resolve(t,e);return D=(D+1)%N,o},Object.defineProperties(A.prototype,T);var $=[],D=0,N=12,P=function(t,e,n){this.$from=t,this.$to=e,this.depth=n},j={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};j.start.get=function(){return this.$from.before(this.depth+1)},j.end.get=function(){return this.$to.after(this.depth+1)},j.parent.get=function(){return this.$from.node(this.depth)},j.startIndex.get=function(){return this.$from.index(this.depth)},j.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(P.prototype,j);var I=Object.create(null),R=function(t,e,n,r){this.type=t,this.attrs=e,this.content=n||c.empty,this.marks=r||d.none},L={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};L.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},L.childCount.get=function(){return this.content.childCount},R.prototype.child=function(t){return this.content.child(t)},R.prototype.maybeChild=function(t){return this.content.maybeChild(t)},R.prototype.forEach=function(t){this.content.forEach(t)},R.prototype.nodesBetween=function(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)},R.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},L.textContent.get=function(){return this.textBetween(0,this.content.size,"")},R.prototype.textBetween=function(t,e,n,r){return this.content.textBetween(t,e,n,r)},L.firstChild.get=function(){return this.content.firstChild},L.lastChild.get=function(){return this.content.lastChild},R.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},R.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},R.prototype.hasMarkup=function(t,e,n){return this.type==t&&p(this.attrs,e||t.defaultAttrs||I)&&d.sameSet(this.marks,n||d.none)},R.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},R.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},R.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},R.prototype.slice=function(t,e,n){if(void 0===e&&(e=this.content.size),void 0===n&&(n=!1),t==e)return v.empty;var r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),a=r.start(i),s=r.node(i),c=s.content.cut(r.pos-a,o.pos-a);return new v(c,r.depth-i,o.depth-i)},R.prototype.replace=function(t,e,n){return b(this.resolve(t),this.resolve(e),n)},R.prototype.nodeAt=function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,o=n.offset;if(e=e.maybeChild(r),!e)return null;if(o==t||e.isText)return e;t-=o+1}},R.prototype.childAfter=function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},R.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),n=e.index,r=e.offset;if(rt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},L.isBlock.get=function(){return this.type.isBlock},L.isTextblock.get=function(){return this.type.isTextblock},L.inlineContent.get=function(){return this.type.inlineContent},L.isInline.get=function(){return this.type.isInline},L.isText.get=function(){return this.type.isText},L.isLeaf.get=function(){return this.type.isLeaf},L.isAtom.get=function(){return this.type.isAtom},R.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),F(this.marks,t)},R.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},R.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=c.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var s=r;s=0;n--)e=t[n].type.name+"("+e+")";return e}var B=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},V={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};B.parse=function(t,e){var n=new q(t,e);if(null==n.next)return B.empty;var r=W(n);n.next&&n.err("Unexpected trailing text");var o=et(Z(r));return nt(o,n),o},B.prototype.matchType=function(t){for(var e=0;e>1},B.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},B.prototype.toString=function(){var t=[];function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(B.prototype,V),B.empty=new B(!0);var q=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},H={next:{configurable:!0}};function W(t){var e=[];do{e.push(U(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function U(t){var e=[];do{e.push(K(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function K(t){for(var e=X(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=Y(t,e)}return e}function J(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function Y(t,e){var n=J(t),r=n;return t.eat(",")&&(r="}"!=t.next?J(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function G(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(e)>-1&&o.push(a)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}function X(t){if(t.eat("(")){var e=W(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=G(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}function Z(t){var e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){var o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach((function(t){return t.to=e}))}function i(t,e){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(i(n,e))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=i(t.exprs[a],e);if(a==t.exprs.length-1)return s;o(s,e=n())}else{if("star"==t.type){var c=n();return r(e,c),o(i(t.expr,c),c),[r(c)]}if("plus"==t.type){var u=n();return o(i(t.expr,e),u),o(i(t.expr,u),u),[r(u)]}if("opt"==t.type)return[r(e)].concat(i(t.expr,e));if("range"==t.type){for(var l=e,f=0;f-1&&o[i+1];tt(t,r).forEach((function(t){a||o.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var i=e[r.join(",")]=new B(r.indexOf(t.length-1)>-1),a=0;a-1},at.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var ft=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=i.from(t.nodes),this.spec.marks=i.from(t.marks),this.nodes=at.compile(this.spec.nodes,this),this.marks=lt.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=n[a]||(n[a]=B.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==s?null:s?pt(this,s.split(" ")):""!=s&&o.inlineContent?null:[]}for(var c in this.marks){var u=this.marks[c],l=u.spec.excludes;u.excluded=null==l?[u]:""==l?[]:pt(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function pt(t,e){for(var n=[],r=0;r-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}ft.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof at))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},ft.prototype.text=function(t,e){var n=this.nodes.text;return new z(n,n.defaultAttrs,t,d.setFrom(e))},ft.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},ft.prototype.nodeFromJSON=function(t){return R.fromJSON(this,t)},ft.prototype.markFromJSON=function(t){return d.fromJSON(this,t)},ft.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var dt=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};dt.prototype.parse=function(t,e){void 0===e&&(e={});var n=new St(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},dt.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new St(this,e,!0);return n.addAll(t,null,e.from,e.to),v.maxOpen(n.finish())},dt.prototype.matchTag=function(t,e){for(var n=0;nt.length&&(61!=o.style.charCodeAt(t.length)||o.style.slice(t.length+1)!=e))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},dt.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r=0;e--)if(this.stashMarks[e].type==t)return this.stashMarks.splice(e,1)[0]},xt.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=0;r--){var o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},St.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},St.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Ot.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},St.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(t,s){for(;t>=0;t--){var c=n[t];if(""==c){if(t==n.length-1||0==t)continue;for(;s>=i;s--)if(a(t-1,s))return!0;return!1}var u=s>0||0==s&&o?e.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;s--}return!0};return a(n.length-1,this.open)},St.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},St.prototype.addPendingMark=function(t){var e=At(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},St.prototype.removePendingMark=function(t,e){for(var n=this.open;n>=0;n--){var r=this.nodes[n],o=r.pendingMarks.lastIndexOf(t);if(o>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var i=r.popFromStashMark(t.type);i&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(St.prototype,Ot);var Tt=function(t,e){this.nodes=t||{},this.marks=e||{}};function $t(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Dt(t){return t.document||window.document}Tt.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=Dt(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);var n=0,a=0;while(n=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},Tt.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&Tt.renderSpec(Dt(n),r(t,e))},Tt.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],c=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var u in c=2,s)if(null!=s[u]){var l=u.indexOf(" ");l>0?a.setAttributeNS(u.slice(0,l),u.slice(l+1),s[u]):a.setAttribute(u,s[u])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=Tt.renderSpec(t,p,n),h=d.dom,v=d.contentDOM;if(a.appendChild(h),v){if(i)throw new RangeError("Multiple content holes");i=v}}return{dom:a,contentDOM:i}},Tt.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Tt(this.nodesFromSchema(t),this.marksFromSchema(t)))},Tt.nodesFromSchema=function(t){var e=$t(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Tt.marksFromSchema=function(t){return $t(t.marks)}},3360:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};e.default=o},"3a54":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.regex)("alphaNum",/^[a-zA-Z0-9]*$/);e.default=o},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"45b8":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.regex)("numeric",/^[0-9]*$/);e.default=o},"46bc":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"maxValue",max:t},(function(e){return!(0,r.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};e.default=o},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),a=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){while(u>l)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5313:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return k})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return A})),n.d(e,"e",(function(){return D})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return u}));var r=n("304a"),o=n("0ac0"),i=Object.create(null),a=function(t,e,n){this.ranges=n||[new c(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var t=this.ranges,e=0;e=0;o--){var i=e<0?v(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):v(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},a.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new d(t.node(0))},a.atStart=function(t){return v(t,t,0,0,1)||new d(t)},a.atEnd=function(t){return v(t,t,t.content.size,t.childCount,-1)||new d(t)},a.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},a.jsonID=function(t,e){if(t in i)throw new RangeError("Duplicate use of selection JSON ID "+t);return i[t]=e,e.prototype.jsonID=t,e},a.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var c=function(t,e){this.$from=t,this.$to=e},u=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=n.resolve(r.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,n){if(void 0===n&&(n=r["j"].empty),t.prototype.replace.call(this,e,n),n==r["j"].empty){var o=this.$from.marksAcross(this.$to);o&&e.ensureMarks(o)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new l(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,o,!0)||t.findFrom(r,-o,!0);if(!a)return t.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i?n=r:(n=(t.findFrom(n,-o,!0)||t.findFrom(n,o,!0)).$anchor,n.pos0?0:1);o>0?a=0;a+=o){var s=e.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(t,n-(o<0?s.nodeSize:0))}else{var c=v(t,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}}function m(t,e,n){var r=t.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=y,this},e.prototype.ensureMarks=function(t){return r["d"].sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(this.updated&y)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=this.updated&~y,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r["d"].none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=n==e?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=b,this},n.scrolledIntoView.get=function(){return(this.updated&b)>0},Object.defineProperties(e.prototype,n),e}(o["d"]);function x(t,e){return e&&t?t.bind(e):t}var S=function(t,e,n){this.name=t,this.init=x(e.init,n),this.apply=x(e.apply,n)},O=[new S("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new S("selection",{init:function(t,e){return t.selection||a.atStart(e.doc)},apply:function(t){return t.selection}}),new S("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new S("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],_=function(t,e){var n=this;this.schema=t,this.fields=O.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new S(t.key,t.spec.state,t))}))},k=function(t){this.config=t},C={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};C.schema.get=function(){return this.config.schema},C.plugins.get=function(){return this.config.plugins},k.prototype.apply=function(t){return this.applyTransaction(t).state},k.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&M.splice(e,1)},Object.defineProperties(k.prototype,C);var M=[];function E(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=E(o,e,{})),n[r]=o}return n}var A=function(t){this.props={},t.props&&E(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:$("plugin")};A.prototype.getState=function(t){return t[this.key]};var T=Object.create(null);function $(t){return t in T?t+"$"+ ++T[t]:(T[t]=0,t+"$")}var D=function(t){void 0===t&&(t="key"),this.key=$(t)};D.prototype.get=function(t){return t.config.pluginsByKey[this.key]},D.prototype.getState=function(t){return t[this.key]}},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},"576a":function(t,e,n){"use strict";n.d(e,"a",(function(){return Ln}));var r=n("5313"),o=n("304a"),i=n("0ac0"),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var l=a.ie=!!(c||u||s);a.ie_version=c?document.documentMode||6:u?+u[1]:s?+s[1]:null,a.gecko=!l&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var f=!l&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!f,a.chrome_version=f&&+f[1],a.ios=!l&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.safari=/Apple Computer/.test(navigator.vendor),a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},d=function(t){var e=t.parentNode;return e&&11==e.nodeType?e.host:e},h=null,v=function(t,e,n){var r=h||(h=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},m=function(t,e,n,r){return n&&(y(t,e,n,r,-1)||y(t,e,n,r,1))},g=/^(img|br|input|textarea|hr)$/i;function y(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:b(t))){var i=t.parentNode;if(1!=i.nodeType||x(t)||g.test(t.nodeName)||"false"==t.contentEditable)return!1;e=p(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(t=t.childNodes[e+(o<0?-1:0)],"false"==t.contentEditable)return!1;e=o<0?b(t):0}}}function b(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function w(t,e,n){for(var r=0==e,o=e==b(t);r||o;){if(t==n)return!0;var i=p(t);if(t=t.parentNode,!t)return!1;r=r&&0==i,o=o&&i==b(t)}}function x(t){for(var e,n=t;n;n=n.parentNode)if(e=n.pmViewDesc)break;return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var S=function(t){var e=t.isCollapsed;return e&&a.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function O(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function _(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function k(t,e){return"number"==typeof t?t:t[e]}function C(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.left+t.clientWidth,top:e.top,bottom:e.top+t.clientHeight}}function M(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,a=n||t.dom;;a=d(a)){if(!a)break;if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,c=s?_(i):C(a),u=0,l=0;if(e.topc.bottom-k(r,"bottom")&&(l=e.bottom-c.bottom+k(o,"bottom")),e.leftc.right-k(r,"right")&&(u=e.right-c.right+k(o,"right")),u||l)if(s)i.defaultView.scrollBy(u,l);else{var f=a.scrollLeft,p=a.scrollTop;l&&(a.scrollTop+=l),u&&(a.scrollLeft+=u);var h=a.scrollLeft-f,v=a.scrollTop-p;e={left:e.left-h,top:e.top-v,right:e.right-h,bottom:e.bottom-v}}if(s)break}}}function E(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){e=s,n=c.top;break}}}return{refDOM:e,refTop:n,stack:A(t.dom)}}function A(t){for(var e=[],n=t.ownerDocument;t;t=d(t))if(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t==n)break;return e}function T(t){var e=t.refDOM,n=t.refTop,r=t.stack,o=e?e.getBoundingClientRect().top:0;$(r,0==o?0:o-n)}function $(t,e){for(var n=0;n=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var d=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=u+1)}}return n&&3==n.nodeType?j(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:P(n,r)}function j(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function I(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function R(t,e){var n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(o,i,a)}function z(t,e,n,r){for(var o=-1,i=e;;){if(i==t.dom)break;var a=t.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:t.docView.posFromDOM(e,n)}function F(t,e,n){var r=t.childNodes.length;if(r&&n.tope.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=z(t,o,i,e))}null==l&&(l=L(t,f,e));var v=t.docView.nearestDesc(f,!0);return{pos:l,inside:v?v.posAtStart-v.border:-1}}function V(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var q=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function H(t,e,n){var r=t.docView.domFromPos(e),o=r.node,i=r.offset,s=t.state.doc.resolve(e),c=s.parent.inlineContent,u=a.webkit||a.gecko;if(3==o.nodeType&&u&&q.test(o.nodeValue)){var l=V(v(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0&&i==b(o)&&o!=h)i=p(o)+1,o=o.parentNode}if(3==o.nodeType)return n<0?W(V(v(o,i-1,i),1),!1):W(V(v(o,i,i+1),-1),!0);if(!c){if(i&&(n<0||i==b(o))){var m=o.childNodes[i-1];if(1==m.nodeType)return U(m.getBoundingClientRect(),!1)}if(i=0)}if(i&&(n<0||i==b(o))){var y=o.childNodes[i-1],w=3==y.nodeType?v(y,b(y)-(u?0:1)):1==y.nodeType&&"BR"!=y.nodeName?y:null;if(w)return W(V(w,1),!1)}if(i=0)}function W(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function U(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function K(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function J(t,e,n){var r=e.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return K(t,e,(function(){for(var e=t.docView.domFromPos(o.pos),r=e.node;;){var i=t.docView.nearestDesc(r,!0);if(!i)break;if(i.node.isBlock){r=i.dom;break}r=i.dom.parentNode}for(var a=H(t,o.pos,1),s=r.firstChild;s;s=s.nextSibling){var c=void 0;if(1==s.nodeType)c=s.getClientRects();else{if(3!=s.nodeType)continue;c=v(s,0,s.nodeValue.length).getClientRects()}for(var u=0;ul.top&&("up"==n?l.bottoma.bottom-1))return!1}}return!0}))}var Y=/[\u0590-\u08ac]/;function G(t,e,n){var r=e.selection,o=r.$head;if(!o.parent.isTextblock)return!1;var i=o.parentOffset,a=!i,s=i==o.parent.content.size,c=getSelection();return Y.test(o.parent.textContent)&&c.modify?K(t,e,(function(){var e=c.getRangeAt(0),r=c.focusNode,i=c.focusOffset,a=c.caretBidiLevel;c.modify("move",n,"character");var s=o.depth?t.docView.domAfterPos(o.before()):t.dom,u=!s.contains(1==c.focusNode.nodeType?c.focusNode:c.focusNode.parentNode)||r==c.focusNode&&i==c.focusOffset;return c.removeAllRanges(),c.addRange(e),null!=a&&(c.caretBidiLevel=a),u})):"left"==n||"backward"==n?a:s}var X=null,Z=null,Q=!1;function tt(t,e,n){return X==e&&Z==n?Q:(X=e,Z=n,Q="up"==n||"down"==n?J(t,e,n):G(t,e,n))}var et=0,nt=1,rt=2,ot=3,it=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=et},at={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};it.prototype.matchesWidget=function(){return!1},it.prototype.matchesMark=function(){return!1},it.prototype.matchesNode=function(){return!1},it.prototype.matchesHack=function(){return!1},at.beforePosition.get=function(){return!1},it.prototype.parseRule=function(){return null},it.prototype.stopEvent=function(){return!1},at.size.get=function(){for(var t=0,e=0;e0:s)?this.posAtEnd:this.posAtStart},it.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;n=!1}}},it.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},it.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1},it.prototype.descAt=function(t){for(var e=0,n=0;e=u&&e<=c-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,u);t=i;for(var l=a;l>0;l--){var f=this.children[l-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=p(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(var d=a+1;dc&&ie){var y=f;f=p,p=y}var b=document.createRange();b.setEnd(p.node,p.offset),b.setStart(f.node,f.offset),d.removeAllRanges(),d.addRange(b)}}},it.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},at.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},it.prototype.markDirty=function(t,e){for(var n=0,r=0;r=n:tn){var a=n+o.border,s=i-o.border;if(t>=a&&e<=s)return this.dirty=t==n||e==i?rt:nt,void(t!=a||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-a):o.dirty=ot);o.dirty=ot}n=i}this.dirty=rt},it.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?rt:nt;e.dirty0&&(i=Dt(i,0,t,r));for(var s=0;s=0&&!s&&c.syncToMarks(a==n.node.childCount?o["d"].none:n.node.child(a).marks,r,t),c.placeWidget(e,t,i)}),(function(e,n,o,a){c.syncToMarks(e.marks,r,t),c.findNodeMatch(e,n,o,a)||c.updateNextNode(e,n,o,t,a)||c.addNode(e,n,o,t,i),i+=e.nodeSize})),c.syncToMarks(st,r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==rt)&&(s&&this.protectLocalComposition(t,s),mt(this.contentDOM,this.children,t),a.ios&&At(this.dom))},e.prototype.localCompositionNode=function(t,e){var n=t.state.selection,o=n.from,i=n.to;if(!(!(t.state.selection instanceof r["g"])||oe+this.node.content.size)){var a=t.root.getSelection(),s=Tt(a.focusNode,a.focusOffset);if(s&&this.dom.contains(s.parentNode)){var c=s.nodeValue,u=$t(this.node.content,c,o-e,i-e);return u<0?null:{node:s,pos:u,text:c}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new ut(this,i,n,o);t.compositionNodes.push(a),this.children=Dt(this.children,r,r+o.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(this.dirty==ot||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=et},e.prototype.updateOuterDeco=function(t){if(!Ot(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=wt(this.dom,this.nodeDOM,bt(this.outerDeco,this.node,e),bt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},Object.defineProperties(e.prototype,n),e}(it);function pt(t,e,n,r,o){return St(r,e,t),new ft(null,t,e,n,r,r,r,o,0)}var dt=function(t){function e(e,n,r,o,i,a,s){t.call(this,e,n,r,o,i,null,a,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){var t=this.nodeDOM.parentNode;while(t&&t!=this.dom&&!t.pmIsDeco)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(this.dirty==ot||this.dirty!=et&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==et&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=et,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e}(ft),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return this.dirty==et},e}(it),vt=function(t){function e(e,n,r,o,i,a,s,c,u,l){t.call(this,e,n,r,o,i,a,s,u,l),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(this.dirty==ot)return!1;if(this.spec.update){var i=this.spec.update(e,n);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(ft);function mt(t,e,n){for(var r=t.firstChild,o=!1,i=0;i0&&o>=0;o--){var i=e[o],a=i.node;if(a){if(a!=t.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}function Mt(t,e){return t.type.side-e.type.side}function Et(t,e,n,r){var o=e.locals(t),i=0;if(0!=o.length)for(var a=0,s=[],c=null,u=0;;){if(ai)s.push(o[a++]);var m=i+d.nodeSize;if(d.isText){var g=m;a0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];t=t.childNodes[e-1],e=b(t)}else{if(!(1==t.nodeType&&e=n){var l=c.lastIndexOf(e,r-s);if(l>=0&&l+e.length+s>=n)return s+l}}}return-1}function Dt(t,e,n,r,o){for(var i=[],a=0,s=0;a=n||l<=e?i.push(c):(un&&i.push(c.slice(n-u,c.size,r)))}return i}function Nt(t,e){var n=t.root.getSelection(),o=t.state.doc;if(!n.focusNode)return null;var i=t.docView.nearestDesc(n.focusNode),a=i&&0==i.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var c,u,l=o.resolve(s);if(S(n)){c=l;while(i&&!i.node)i=i.parent;if(i&&i.node.isAtom&&r["c"].isSelectable(i.node)&&i.parent&&(!i.node.isInline||!w(n.focusNode,n.focusOffset,i.dom))){var f=i.posBefore;u=new r["c"](s==f?l:o.resolve(f))}}else{var p=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;c=o.resolve(p)}if(!u){var d="pointer"==e||t.state.selection.head=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},kt.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n>1,i=Math.min(o,t.length);while(r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=lt.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},kt.prototype.findNodeMatch=function(t,e,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(i&&i.matchesNode(t,e,n))o=a.indexOf(i);else for(var s=this.index,c=Math.min(a.length,s+5);s-1&&s+this.preMatchOffset!=o)return!1;var c=a.dom,u=this.lock&&(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&a.dirty!=ot&&Ot(e,a.outerDeco));if(!u&&a.update(t,e,n,r))return this.destroyBetween(this.index,i),a.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},kt.prototype.addNode=function(t,e,n,r,o){this.top.children.splice(this.index++,0,ft.create(this.top,t,e,n,r,o)),this.changed=!0},kt.prototype.placeWidget=function(t,e,n){var r=this.index0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?t.doc.resolve(e>0?a.after():a.before()):null:a;return s&&r["f"].findFrom(s,e)}function Jt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Yt(t,e,n){var o=t.state.selection;if(!(o instanceof r["g"])){if(o instanceof r["c"]&&o.node.isInline)return Jt(t,new r["g"](e>0?o.$to:o.$from));var i=Kt(t.state,e);return!!i&&Jt(t,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var s=Kt(t.state,e);return!!(s&&s instanceof r["c"])&&Jt(t,s)}if(!(a.mac&&n.indexOf("m")>-1)){var c,u=o.$head,l=u.textOffset?null:e<0?u.nodeBefore:u.nodeAfter;if(!l||l.isText)return!1;var f=e<0?u.pos-l.nodeSize:u.pos;return!!(l.isAtom||(c=t.docView.descAt(f))&&!c.contentDOM)&&(r["c"].isSelectable(l)?Jt(t,new r["c"](e<0?t.state.doc.resolve(u.pos-l.nodeSize):u)):!!a.webkit&&Jt(t,new r["g"](t.state.doc.resolve(e<0?f:f+l.nodeSize))))}}function Gt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Xt(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Zt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(Xt(c))o=n,i=--r;else{if(3!=c.nodeType)break;n=c,r=n.nodeValue.length}}else{if(te(n))break;var u=n.previousSibling;while(u&&Xt(u))o=n.parentNode,i=p(u),u=u.previousSibling;if(u)n=u,r=Gt(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}s?ee(t,e,n,r):o&&ee(t,e,o,i)}}function Qt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,a=Gt(n);;)if(r-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var c=Kt(t.state,e);if(c&&c instanceof r["c"])return Jt(t,c)}if(!i.parent.inlineContent){var u=r["f"].findFrom(e<0?i:s,e);return!u||Jt(t,u)}return!1}function re(t,e){if(!(t.state.selection instanceof r["g"]))return!0;var n=t.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!o.textOffset&&(e<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var c=t.state.tr;return e<0?c.delete(o.pos-s.nodeSize,o.pos):c.delete(o.pos,o.pos+s.nodeSize),t.dispatch(c),!0}return!1}function oe(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function ie(t){if(a.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;oe(t,o,!0),setTimeout((function(){return oe(t,o,!1)}),20)}}}function ae(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function se(t,e){var n=e.keyCode,r=ae(e);return 8==n||a.mac&&72==n&&"c"==r?re(t,-1)||Zt(t):46==n||a.mac&&68==n&&"c"==r?re(t,1)||Qt(t):13==n||27==n||(37==n?Yt(t,-1,r)||Zt(t):39==n?Yt(t,1,r)||Qt(t):38==n?ne(t,-1,r)||Zt(t):40==n?ie(t)||ne(t,1,r)||Qt(t):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function ce(t,e,n){var r=t.docView.parseRange(e,n),i=r.node,s=r.fromOffset,c=r.toOffset,u=r.from,l=r.to,f=t.root.getSelection(),p=null,d=f.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(p=[{node:d,offset:f.anchorOffset}],S(f)||p.push({node:f.focusNode,offset:f.focusOffset})),a.chrome&&8===t.lastKeyCode)for(var h=c;h>s;h--){var v=i.childNodes[h-1],m=v.pmViewDesc;if("BR"==v.nodeType&&!m){c=h;break}if(!m||m.size)break}var g=t.state.doc,y=t.someProp("domParser")||o["a"].fromSchema(t.state.schema),b=g.resolve(u),w=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:ue,context:b});if(p&&null!=p[0].pos){var O=p[0].pos,_=p[1]&&p[1].pos;null==_&&(_=O),w={anchor:O+u,head:_+u}}return{doc:x,sel:w,from:u,to:l}}function ue(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(a.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||a.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function le(t,e,n,o,i){if(e<0){var s=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,c=Nt(t,s);if(c&&!t.state.selection.eq(c)){var u=t.state.tr.setSelection(c);"pointer"==s?u.setMeta("pointer",!0):"key"==s&&u.scrollIntoView(),t.dispatch(u)}}else{var l=t.state.doc.resolve(e),f=l.sharedDepth(n);e=l.before(f+1),n=t.state.doc.resolve(n).after(f+1);var p,d,h=t.state.selection,v=ce(t,e,n),m=t.state.doc,g=m.slice(v.from,v.to);8===t.lastKeyCode&&Date.now()-100t.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),a.ie&&a.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>v.from&&"  "==v.doc.textBetween(y.start-v.from-1,y.start-v.from+1)&&(y.start--,y.endA--,y.endB--);var w,x=v.doc.resolveNoCache(y.start-v.from),S=v.doc.resolveNoCache(y.endB-v.from),_=x.sameParent(S)&&x.parent.inlineContent;if((a.ios&&t.lastIOSEnter>Date.now()-225&&(!_||i.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!_&&x.posy.start&&de(m,y.start,y.endA,x,S)&&t.someProp("handleKeyDown",(function(e){return e(t,O(8,"Backspace"))})))a.android&&a.chrome&&t.domObserver.suppressSelectionUpdates();else{a.android&&!_&&x.start()!=S.start()&&0==S.parentOffset&&x.depth==S.depth&&v.sel&&v.sel.anchor==v.sel.head&&v.sel.head==y.endA&&(y.endB-=2,S=v.doc.resolveNoCache(y.endB-v.from),setTimeout((function(){t.someProp("handleKeyDown",(function(e){return e(t,O(13,"Enter"))}))}),20));var k,C,M,E,A=y.start,T=y.endA;if(_)if(x.pos==S.pos)a.ie&&a.ie_version<=11&&0==x.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Pt(t)}),20)),k=t.state.tr.delete(A,T),C=m.resolve(y.start).marksAcross(m.resolve(y.endA));else if(y.endA==y.endB&&(E=m.resolve(y.start))&&(M=pe(x.parent.content.cut(x.parentOffset,S.parentOffset),E.parent.content.cut(E.parentOffset,y.endA-E.start()))))k=t.state.tr,"add"==M.type?k.addMark(A,T,M.mark):k.removeMark(A,T,M.mark);else if(x.parent.child(x.index()).isText&&x.index()==S.index()-(S.textOffset?0:1)){var $=x.parent.textBetween(x.parentOffset,S.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,A,T,$)})))return;k=t.state.tr.insertText($,A,T)}if(k||(k=t.state.tr.replace(A,T,v.doc.slice(y.start-v.from,y.endB-v.from))),v.sel){var D=fe(t,k.doc,v.sel);D&&!(a.chrome&&a.android&&t.composing&&D.empty&&(D.head==A||D.head==k.mapping.map(T)-1)||a.ie&&D.empty&&D.head==A)&&k.setSelection(D)}C&&k.ensureMarks(C),t.dispatch(k.scrollIntoView())}}}function fe(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:qt(t,e.resolve(n.anchor),e.resolve(n.head))}function pe(t,e){for(var n,r,i,a=t.firstChild.marks,s=e.firstChild.marks,c=a,u=s,l=0;ln||he(a,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount))r--,o++,e=!1;if(n){var i=t.node(r).maybeChild(t.indexAfter(r));while(i&&!i.isLeaf)i=i.firstChild,o++}return o}function ve(t,e,n,r,o){var i=t.findDiffStart(e,n);if(null==i)return null;var a=t.findDiffEnd(e,n+t.size,n+e.size),s=a.a,c=a.b;if("end"==o){var u=Math.max(0,i-Math.min(s,c));r-=s+u-i}if(s=s?i-r:0;i-=l,c=i+(c-s),s=i}else if(c=c?i-r:0;i-=f,s=i+(s-c),c=i}return{start:i,endA:s,endB:c}}function me(t,e){var n=[],r=e.content,i=e.openStart,a=e.openEnd;while(i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount){i--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var c=t.someProp("clipboardSerializer")||o["b"].fromSchema(t.state.schema),u=Ce(),l=u.createElement("div");l.appendChild(c.serializeFragment(r,{document:u}));var f,p=l.firstChild;while(p&&1==p.nodeType&&(f=_e[p.nodeName.toLowerCase()])){for(var d=f.length-1;d>=0;d--){var h=u.createElement(f[d]);while(l.firstChild)h.appendChild(l.firstChild);l.appendChild(h)}p=l.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n));var v=t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n");return{dom:l,text:v}}function ge(t,e,n,r,i){var a,s,c=i.parent.type.spec.code;if(!n&&!e)return null;var u=e&&(r||c||!n);if(u){if(t.someProp("transformPastedText",(function(t){e=t(e,c||r)})),c)return new o["j"](o["c"].from(t.state.schema.text(e)),0,0);var l=t.someProp("clipboardTextParser",(function(t){return t(e,i,r)}));l?s=l:(a=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){a.appendChild(document.createElement("p")).textContent=t})))}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),a=Me(n);var f=a&&a.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+) (.*)/.exec(f.getAttribute("data-pm-slice"));if(!s){var d=t.someProp("clipboardParser")||t.someProp("domParser")||o["a"].fromSchema(t.state.schema);s=d.parseSlice(a,{preserveWhitespace:!(!u&&!p),context:i})}return s=p?Ee(Oe(s,+p[1],+p[2]),p[3]):o["j"].maxOpen(ye(s.content,i),!1),t.someProp("transformPasted",(function(t){s=t(s)})),s}function ye(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n),i=r.contentMatchAt(e.index(n)),a=void 0,s=[];if(t.forEach((function(t){if(s){var e,n=i.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&a.length&&we(n,a,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=xe(s[s.length-1],a.length));var r=be(t,n);s.push(r),i=i.matchType(r.type,r.attrs),a=n}}})),s)return{v:o["c"].from(s)}},r=e.depth;r>=0;r--){var i=n(r);if(i)return i.v}return t}function be(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,o["c"].from(t));return t}function we(t,e,n,r,i){if(i=n&&(c=e<0?s.contentMatchAt(0).fillBefore(c,t.childCount>1||a<=i).append(c):c.append(s.contentMatchAt(s.childCount).fillBefore(o["c"].empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(c))}function Oe(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Ce().createElement("div"),o=/(?:]*>)*<([a-z][^>\s]+)/i.exec(t),i=0;(n=o&&_e[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""),i=n.length),r.innerHTML=t;for(var a=0;a=0;c-=2){var u=r.nodes[n[c]];if(!u||u.hasRequiredAttrs())break;i=o["c"].from(u.create(n[c+1],i)),a++,s++}return new o["j"](i,a,s)}var Ae={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Te=a.ie&&a.ie_version<=11,$e=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};$e.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},$e.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var De=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;et.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new $e,Te&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};De.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},De.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},De.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ae),Te&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},De.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Wt(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var c=0;c1){var l=s.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var f=l[0],p=l[1];f.parentNode&&f.parentNode.parentNode==p.parentNode?p.remove():f.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),Pe(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Pt(this.view))}},De.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){var r=t.previousSibling,o=t.nextSibling;if(a.ie&&a.ie_version<=11&&t.addedNodes.length)for(var i=0;ii.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var c=a(s);if(c)return c.v}return!1}function Ke(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Je(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&r["c"].isSelectable(o))&&(Ke(t,new r["c"](n),"pointer"),!0)}function Ye(t,e){if(-1==e)return!1;var n,o,i=t.state.selection;i instanceof r["c"]&&(n=i.node);for(var a=t.state.doc.resolve(e),s=a.depth+1;s>0;s--){var c=s>a.depth?a.nodeAfter:a.node(s);if(r["c"].isSelectable(c)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(Ke(t,r["c"].create(t.state.doc,o),"pointer"),!0)}function Ge(t,e,n,r,o){return Ue(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?Ye(t,n):Je(t,n))}function Xe(t,e,n,r){return Ue(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function Ze(t,e,n,r){return Ue(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||Qe(t,n)}function Qe(t,e){var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Ke(t,r["g"].create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(e),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Ke(t,r["g"].create(n,s+1,s+1+a.content.size),"pointer");else{if(!r["c"].isSelectable(a))continue;Ke(t,r["c"].create(n,s),"pointer")}return!0}}function tn(t){return cn(t)}Ie.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!rn(t,e))if(t.domObserver.forceFlush(),t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!a.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||se(t,e)?e.preventDefault():Le(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,O(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},Ie.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},Ie.keypress=function(t,e){if(!(rn(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||a.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof r["g"])||!n.$from.sameParent(n.$to)){var o=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,o)}))||t.dispatch(t.state.tr.insertText(o).scrollIntoView()),e.preventDefault()}}};var en=a.mac?"metaKey":"ctrlKey";je.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=tn(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&We(e,t.lastClick)&&!e[en]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(He(e));i&&("singleClick"==o?t.mouseDown=new nn(t,i,e,n):("doubleClick"==o?Xe:Ze)(t,i.pos,i.inside,e)?e.preventDefault():Le(t,"pointer"))};var nn=function(t,e,n,o){var i,s,c=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=o,this.selectNode=n[en],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),s=e.inside;else{var u=t.state.doc.resolve(e.pos);i=u.parent,s=u.depth?u.before():0}this.mightDrag=null;var l=o?null:n.target,f=l?t.docView.nearestDesc(l,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||t.state.selection instanceof r["c"]&&s==t.state.selection.from)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Le(t,"pointer")};function rn(t,e){return!!t.composing||!!(a.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}nn.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},nn.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(He(t))),this.allowDefault||!e?Le(this.view,"pointer"):Ge(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r["g"])&&(e.pos==this.view.state.selection.from||e.pos==this.view.state.selection.to)?(Ke(this.view,r["f"].near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Le(this.view,"pointer")}},nn.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),Le(this.view,"pointer")},je.touchdown=function(t){tn(t),Le(t,"pointer")},je.contextmenu=function(t){return tn(t)};var on=a.android?5e3:-1;function an(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return cn(t)}),e))}function sn(t){t.composing=!1;while(t.compositionNodes.length>0)t.compositionNodes.pop().markParentsDirty()}function cn(t,e){if(t.domObserver.forceFlush(),sn(t),e||t.docView.dirty){var n=Nt(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}function un(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}Ie.compositionstart=Ie.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),cn(t,!0),t.markCursor=null;else if(cn(t),a.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}t.composing=!0}an(t,on)},Ie.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,an(t,20))};var ln=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function fn(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}function pn(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?dn(t,r.value,null,e):dn(t,r.textContent,r.innerHTML,e)}),50)}}function dn(t,e,n,r){var i=ge(t,e,n,t.shiftKey,t.state.selection.$from);if(!t.someProp("handlePaste",(function(e){return e(t,r,i||o["j"].empty)}))&&i){var a=fn(i),s=a?t.state.tr.replaceSelectionWith(a,t.shiftKey):t.state.tr.replaceSelection(i);t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}je.copy=Ie.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=ln?null:e.clipboardData,i=n.content(),a=me(t,i),s=a.dom,c=a.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",c)):un(t,s),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Ie.paste=function(t,e){var n=ln?null:e.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(dn(t,o,r,e),e.preventDefault()):pn(t,e)};var hn=function(t,e){this.slice=t,this.move=e},vn=a.mac?"altKey":"ctrlKey";for(var mn in je.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var o=t.state.selection,i=o.empty?null:t.posAtCoords(He(e));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r["c"]?o.to-1:o.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(r["c"].create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var a=t.docView.nearestDesc(e.target,!0);if(!a||!a.node.type.spec.draggable||a==t.docView)return;t.dispatch(t.state.tr.setSelection(r["c"].create(t.state.doc,a.posBefore)))}var s=t.state.selection.content(),c=me(t,s),u=c.dom,l=c.text;e.dataTransfer.clearData(),e.dataTransfer.setData(ln?"Text":"text/html",u.innerHTML),ln||e.dataTransfer.setData("text/plain",l),t.dragging=new hn(s,!e[vn])}},je.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},Ie.dragover=Ie.dragenter=function(t,e){return e.preventDefault()},Ie.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var a=t.posAtCoords(He(e));if(a){var s=t.state.doc.resolve(a.pos);if(s){var c=n&&n.slice||ge(t,e.dataTransfer.getData(ln?"Text":"text/plain"),ln?null:e.dataTransfer.getData("text/html"),!1,s),u=n&&!e[vn];if(t.someProp("handleDrop",(function(n){return n(t,e,c||o["j"].empty,u)})))e.preventDefault();else if(c){e.preventDefault();var l=c?Object(i["g"])(t.state.doc,s.pos,c):s.pos;null==l&&(l=s.pos);var f=t.state.tr;u&&f.deleteSelection();var p=f.mapping.map(l),d=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,h=f.doc;if(d?f.replaceRangeWith(p,p,c.content.firstChild):f.replaceRange(p,p,c),!f.doc.eq(h)){var v=f.doc.resolve(p);if(d&&r["c"].isSelectable(c.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(c.content.firstChild))f.setSelection(new r["c"](v));else{var m=f.mapping.map(l);f.mapping.maps[f.mapping.maps.length-1].forEach((function(t,e,n,r){return m=r})),f.setSelection(qt(t,v,f.doc.resolve(m)))}t.focus(),t.dispatch(f.setMeta("uiEvent","drop"))}}}}}},je.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&Pt(t)}),20))},je.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},je.beforeinput=function(t,e){if(a.chrome&&a.android&&"deleteContentBackward"==e.inputType){var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,O(8,"Backspace"))})))){var e=t.state.selection,r=e.$cursor;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())}}),50)}},Ie)je[mn]=Ie[mn];function gn(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var yn=function(t,e){this.spec=e||_n,this.side=this.spec.side||0,this.toDOM=t};yn.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos,a=o.deleted;return a?null:new xn(i-n,i-n,this)},yn.prototype.valid=function(){return!0},yn.prototype.eq=function(t){return this==t||t instanceof yn&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&gn(this.spec,t.spec))};var bn=function(t,e){this.spec=e||_n,this.attrs=t};bn.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new xn(o,i,this)},bn.prototype.valid=function(t,e){return e.from=t&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;st){var c=this.children[s]+1;this.children[s+2].findInner(t-c,e-c,n,r+c,o)}},kn.prototype.map=function(t,e,n){return this==Cn||0==t.maps.length?this:this.mapInner(t,e,0,0,n||_n)},kn.prototype.mapInner=function(t,e,n,r,o){for(var i,a=0;aa&&u.to=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,a=i+e.content.size,s=0;si&&c.type instanceof bn){var u=Math.max(i,c.from)-i,l=Math.min(a,c.to)-i;uc+i||(e>=s[a]+i?s[a+1]=-1:n>=o&&(u=r-n-(e-t))&&(s[a]+=u,s[a+1]+=u))}},u=0;u=r.content.size){l=!0;continue}var h=n.map(t[f+1]+i,-1),v=h-o,m=r.content.findIndex(d),g=m.index,y=m.offset,b=r.maybeChild(g);if(b&&y==d&&y+b.nodeSize==v){var w=s[f+2].mapInner(n,b,p+1,t[f]+i+1,a);w!=Cn?(s[f]=d,s[f+1]=v,s[f+2]=w):(s[f+1]=-2,l=!0)}else l=!0}if(l){var x=Tn(s,t,e||[],n,o,i,a),S=Nn(x,r,0,a);e=S.local;for(var O=0;On&&a.to0)e++;t.splice(e,0,n)}function Rn(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Cn&&e.push(r)})),t.cursorWrapper&&e.push(kn.create(t.state.doc,[t.cursorWrapper.deco])),Mn.from(e)}Mn.prototype.forChild=function(t,e){if(e.isLeaf)return kn.empty;for(var n=[],r=0;ro.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(t.doc,l,u);!p&&t.selection.eq(o.selection)||(s=!0);var d="preserve"==f&&s&&null==this.dom.style.overflowAnchor&&E(this);if(s){this.domObserver.stop();var h=p&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&qn(o.selection,t.selection);if(p){var v=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(t.doc,l,u,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=pt(t.doc,l,u,this.dom,this)),v&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&Ut(this))?Pt(this,h):(Bt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==f)this.dom.scrollTop=0;else if("to selection"==f){var m=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof r["c"]?M(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),m):M(this,this.coordsAtPos(t.selection.head,1),m))}else d&&T(d)},Ln.prototype.destroyPluginViews=function(){var t;while(t=this.pluginViews.pop())t.destroy&&t.destroy()},Ln.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e=e?t:""+Array(e+1-r.length).join(n)+t},h={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+d(r,2,"0")+":"+d(o,2,"0")},m:function t(e,n){if(e.date()=t}))};e.default=o},6235:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.regex)("alpha",/^[a-zA-Z]*$/);e.default=o},6417:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"not"},(function(e,n){return!(0,r.req)(e)||!t.call(this,e,n)}))};e.default=o},"665f":function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return m})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return d}));var r=n("0ac0"),o=n("304a"),i=["ol",0],a=["ul",0],s=["li",0],c={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1}}}],toDOM:function(t){return 1==t.attrs.order?i:["ol",{start:t.attrs.order},0]}},u={parseDOM:[{tag:"ul"}],toDOM:function(){return a}},l={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function f(t,e){var n={};for(var r in t)n[r]=t[r];for(var o in e)n[o]=e[o];return n}function p(t,e,n){return t.append({ordered_list:f(c,{content:"list_item+",group:n}),bullet_list:f(u,{content:"list_item+",group:n}),list_item:f(l,{content:e})})}function d(t,e){return function(n,i){var a=n.selection,s=a.$from,c=a.$to,u=s.blockRange(c),l=!1,f=u;if(!u)return!1;if(u.depth>=2&&s.node(u.depth-1).type.compatibleContent(t)&&0==u.startIndex){if(0==s.index(u.depth-1))return!1;var p=n.doc.resolve(u.start-2);f=new o["g"](p,p,u.depth),u.endIndex=0;c--)s=o["c"].from(n[c].type.create(n[c].attrs,s));t.step(new r["b"](e.start-(i?2:0),e.end,e.start,e.end,new o["j"](s,0,0),n.length,!0));for(var u=0,l=0;l0,p=a.depth-(f?1:2);p>=a.depth-3;p--)l=o["c"].from(a.node(p).copy(l));l=l.append(o["c"].from(t.createAndFill()));var d=e.tr.replace(a.before(f?null:-1),a.after(-3),new o["j"](l,f?3:2,2));d.setSelection(e.selection.constructor.near(d.doc.resolve(a.pos+(f?3:2)))),n(d.scrollIntoView())}return!0}var h=s.pos==a.end()?u.contentMatchAt(0).defaultType:null,v=e.tr.delete(a.pos,s.pos),m=h&&[null,{type:h}];return!!Object(r["f"])(v.doc,a.pos,2,m)&&(n&&n(v.split(a.pos,2,m).scrollIntoView()),!0)}}function m(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));return!!a&&(!n||(o.node(a.depth-1).type==t?g(e,n,t,a):y(e,n,a)))}}function g(t,e,n,i){var a=t.tr,s=i.end,c=i.$to.end(i.depth);return su;c--)s-=a.child(c).nodeSize,i.delete(s-1,s+1);var l=i.doc.resolve(n.start),f=l.nodeAfter,p=0==n.startIndex,d=n.endIndex==a.childCount,h=l.node(-1),v=l.index(-1);if(!h.canReplace(v+(p?0:1),v+1,f.content.append(d?o["c"].empty:o["c"].from(a))))return!1;var m=l.pos,g=m+f.nodeSize;return i.step(new r["b"](m-(p?1:0),g+(d?1:0),m+1,g-1,new o["j"]((p?o["c"].empty:o["c"].from(a.copy(o["c"].empty))).append(d?o["c"].empty:o["c"].from(a.copy(o["c"].empty))),p?0:1,d?0:1),p?0:1)),e(i.scrollIntoView()),!0}function b(t){return function(e,n){var i=e.selection,a=i.$from,s=i.$to,c=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type==t}));if(!c)return!1;var u=c.startIndex;if(0==u)return!1;var l=c.parent,f=l.child(u-1);if(f.type!=t)return!1;if(n){var p=f.lastChild&&f.lastChild.type==l.type,d=o["c"].from(p?t.create():null),h=new o["j"](o["c"].from(t.create(null,o["c"].from(l.type.create(null,d)))),p?3:1,0),v=c.start,m=c.end;n(e.tr.step(new r["b"](v-(p?3:1),m,v,m,h,1,!0)).scrollIntoView())}return!0}}},"69f3":function(t,e,n){var r,o,i,a=n("7f9a"),s=n("da84"),c=n("861d"),u=n("9112"),l=n("5135"),f=n("c6cd"),p=n("f772"),d=n("d012"),h=s.WeakMap,v=function(t){return i(t)?o(t):r(t,{})},m=function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var g=f.state||(f.state=new h),y=g.get,b=g.has,w=g.set;r=function(t,e){return e.facade=t,w.call(g,t,e),e},o=function(t){return y.call(g,t)||{}},i=function(t){return b.call(g,t)}}else{var x=p("state");d[x]=!0,r=function(t,e){return e.facade=t,u(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:r,get:o,has:i,enforce:v,getterFor:m}},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),a=n("ce4e"),s=n("8925"),c=n("69f3"),u=c.get,l=c.enforce,f=String(String).split("String");(t.exports=function(t,e,n,s){var c,u=!!s&&!!s.unsafe,p=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),c=l(n),c.source||(c.source=f.join("string"==typeof e?e:""))),t!==r?(u?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"772d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[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]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i,i=(0,r.regex)("url",o);e.default=i},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"78ef":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"withParams",{enumerable:!0,get:function(){return r.default}}),e.regex=e.ref=e.len=e.req=void 0;var r=o(n("8750"));function o(t){return t&&t.__esModule?t:{default:t}}function i(t){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var a=function(t){if(Array.isArray(t))return!!t.length;if(void 0===t||null===t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===i(t)){for(var e in t)return!0;return!1}return!!String(t).length};e.req=a;var s=function(t){return Array.isArray(t)?t.length:"object"===i(t)?Object.keys(t).length:String(t).length};e.len=s;var c=function(t,e,n){return"function"===typeof t?t.call(e,n):n[t]};e.ref=c;var u=function(t,e){return(0,r.default)({type:t},(function(t){return!a(t)||e.test(t)}))};e.regex=u},"7f06":function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=i&&(c||+i[1]<57)||s&&c,f=0;f<10;f++)r[48+f]=r[96+f]=String(f);for(f=1;f<=24;f++)r[f+111]="F"+f;for(f=65;f<=90;f++)r[f]=String.fromCharCode(f+32),o[f]=String.fromCharCode(f);for(var p in r)o.hasOwnProperty(p)||(o[p]=r[p]);function d(t){var e=l&&(t.ctrlKey||t.altKey||t.metaKey)||(a||u)&&t.shiftKey&&t.key&&1==t.key.length,n=!e&&t.key||(t.shiftKey?o:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}var h=n("5313"),v="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function m(t){var e,n,r,o,i=t.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(o=r[n.keyCode])&&o!=i){var c=e[y(o,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}else if(a&&n.shiftKey){var u=e[y(i,n,!0)];if(u&&u(t.state,t.dispatch,t))return!0}return!1}}},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"82f1":function(t,e,n){"use strict";var r=n("a026"),o=n("ee2b");function i(t){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var a={selector:"vue-portal-target-".concat(o())},s=function(t){return a.selector=t},c="undefined"!==typeof window&&void 0!==("undefined"===typeof document?"undefined":i(document)),u=r["a"].extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?e.length<2&&!e[0].text?e:t(this.tag||"DIV",e):t()},destroyed:function(){var t=this.$el;t.parentNode.removeChild(t)}}),l=r["a"].extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(a.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(c)return document.querySelector(this.selector)},insertTargetEl:function(){if(c){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new u({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",l),e.defaultSelector&&s(e.defaultSelector)}"undefined"!==typeof window&&window.Vue&&window.Vue===r["a"]&&r["a"].use(f),e["a"]=f},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8726:function(t,e,n){"use strict";n.d(e,"a",(function(){return M})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return $})),n.d(e,"d",(function(){return E})),n.d(e,"e",(function(){return T}));var r=200,o=function(){};o.prototype.append=function(t){return t.length?(t=o.from(t),!this.length&&t||t.length=e?o.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},o.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},o.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},o.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},o.from=function(t){return t instanceof o?t:t&&t.length?new i(t):o.empty};var i=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=r)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=r)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(o);o.empty=new i([]);var a=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(o),s=o,c=s,u=n("0ac0"),l=n("5313"),f=500,p=function(t,e){this.items=t,this.eventCount=e};function d(t,e){var n;return t.forEach((function(t,r){if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}p.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){var a=this.items.get(i-1);if(a.selection){--i;break}}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);var s,c,u=t.tr,l=[],f=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void f.push(t);if(r){f.push(new h(t.map));var a,d=t.step.map(r.slice(o));d&&u.maybeStep(d).doc&&(a=u.mapping.maps[u.mapping.maps.length-1],l.push(new h(a,null,null,l.length+f.length))),o--,a&&r.appendMap(a,o)}else u.maybeStep(t.step);return t.selection?(s=r?t.selection.map(r.slice(o)):t.selection,c=new p(n.items.slice(0,i).append(f.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:c,transform:u,selection:s}},p.prototype.addTransform=function(t,e,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,c=0;cm&&(a=d(a,v),i-=v),new p(a.append(o),i)},p.prototype.remapping=function(t,e){var n=new u["a"];return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},p.prototype.addMaps=function(t){return 0==this.eventCount?this:new p(this.items.append(t.map((function(t){return new h(t)}))),this.eventCount)},p.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var c=o.maps[r];if(e.step){var u=t.steps[r].invert(t.docs[r]),l=e.selection&&e.selection.map(o.slice(s+1,r));l&&a++,n.push(new h(c,u,l))}else n.push(new h(c))}}),r);for(var c=[],u=e;uf&&(d=d.compress(this.items.length-n.length)),d},p.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},p.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=t)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(e.slice(n)),c=s&&s.getMap();if(n--,c&&e.appendMap(c,n),s){var u=i.selection&&i.selection.map(e.slice(n));u&&o++;var l,f=new h(c.invert(),s,u),p=r.length-1;(l=r.length&&r[p].merge(f))?r[p]=l:r.push(f)}}else i.map&&n--}),this.items.length,0),new p(c.from(r.reverse()),o)},p.empty=new p(c.empty,0);var h=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};h.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new h(e.getMap().invert(),e,this.selection)}};var v=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},m=20;function g(t,e,n,r){var o,i=n.getMeta(k);if(i)return i.historyState;n.getMeta(C)&&(t=new v(t.done,t.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(a&&a.getMeta(k))return a.getMeta(k).redo?new v(t.done.addTransform(n,null,r,_(e)),t.undone,b(n.mapping.maps[n.steps.length-1]),t.prevTime):new v(t.done,t.undone.addTransform(n,null,r,_(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new v(t.done.rebased(n,o),t.undone.rebased(n,o),w(t.prevRanges,n.mapping),t.prevTime):new v(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),w(t.prevRanges,n.mapping),t.prevTime);var s=0==t.prevTime||!a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!y(n,t.prevRanges)),c=a?w(t.prevRanges,n.mapping):b(n.mapping.maps[n.steps.length-1]);return new v(t.done.addTransform(n,s?e.selection.getBookmark():null,r,_(e)),p.empty,c,n.time)}function y(t,e){if(!e)return!1;if(!t.docChanged)return!0;var n=!1;return t.mapping.maps[0].forEach((function(t,r){for(var o=0;o=e[o]&&(n=!0)})),n}function b(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function w(t,e){if(!t)return null;for(var n=[],r=0;r=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function T(t){return t.replace(/\/\//g,"/")}var $=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},D=X,N=L,P=z,j=V,I=G,R=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function L(t,e){var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";while(null!=(n=R.exec(t))){var c=n[0],u=n[1],l=n.index;if(a+=t.slice(i,l),i=l+c.length,u)a+=u[1];else{var f=t[i],p=n[2],d=n[3],h=n[4],v=n[5],m=n[6],g=n[7];a&&(r.push(a),a="");var y=null!=p&&null!=f&&f!==p,b="+"===m||"*"===m,w="?"===m||"*"===m,x=n[2]||s,S=h||v;r.push({name:d||o++,prefix:p||"",delimiter:x,optional:w,repeat:b,partial:y,asterisk:!!g,pattern:S?H(S):g?".*":"[^"+q(x)+"]+?"})}}return i1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)O.on=x,O.attrs={href:c,"aria-current":y};else{var k=st(this.$slots.default);if(k){k.isStatic=!1;var C=k.data=o({},k.data);for(var M in C.on=C.on||{},C.on){var E=C.on[M];M in x&&(C.on[M]=Array.isArray(E)?E:[E])}for(var A in x)A in C.on?C.on[A].push(x[A]):C.on[A]=b;var T=k.data.attrs=o({},k.data.attrs);T.href=c,T["aria-current"]=y}else O.on=x}return t(this.tag,O,this.$slots.default)}};function at(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function st(t){if(t)for(var e,n=0;n-1&&(s.params[p]=n.params[p]);return s.path=Q(u.path,s.params,'named route "'+c+'"'),l(u,s,a)}if(s.path){s.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}var zt={redirected:2,aborted:4,cancelled:8,duplicated:16};function Ft(t,e){return Ht(t,e,zt.redirected,'Redirected when going from "'+t.fullPath+'" to "'+Ut(e)+'" via a navigation guard.')}function Bt(t,e){var n=Ht(t,e,zt.duplicated,'Avoided redundant navigation to current location: "'+t.fullPath+'".');return n.name="NavigationDuplicated",n}function Vt(t,e){return Ht(t,e,zt.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function qt(t,e){return Ht(t,e,zt.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}function Ht(t,e,n,r){var o=new Error(r);return o._isRouter=!0,o.from=t,o.to=e,o.type=n,o}var Wt=["params","query","hash"];function Ut(t){if("string"===typeof t)return t;if("path"in t)return t.path;var e={};return Wt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}function Kt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Jt(t,e){return Kt(t)&&t._isRouter&&(null==e||t.type===e)}function Yt(t){return function(e,n,r){var o=!1,i=0,a=null;Gt(t,(function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){o=!0,i++;var c,u=te((function(e){Qt(e)&&(e=e.default),t.resolved="function"===typeof e?e:et.extend(e),n.components[s]=e,i--,i<=0&&r()})),l=te((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Kt(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(p){l(p)}if(c)if("function"===typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"===typeof f.then&&f.then(u,l)}}})),o||r()}}function Gt(t,e){return Xt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Xt(t){return Array.prototype.concat.apply([],t)}var Zt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Qt(t){return t.__esModule||Zt&&"Module"===t[Symbol.toStringTag]}function te(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var ee=function(t,e){this.router=t,this.base=ne(e),this.current=g,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function ne(t){if(!t)if(ut){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function re(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=jt&&n;r&&this.listeners.push(Ot());var o=function(){var n=t.current,o=pe(t.base);t.current===g&&o===t._startLocation||t.transitionTo(o,(function(t){r&&_t(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){It(T(r.base+t.fullPath)),_t(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){Rt(T(r.base+t.fullPath)),_t(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(pe(this.base)!==this.current.fullPath){var e=T(this.base+this.current.fullPath);t?It(e):Rt(e)}},e.prototype.getCurrentLocation=function(){return pe(this.base)},e}(ee);function pe(t){var e=window.location.pathname;return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var de=function(t){function e(e,n,r){t.call(this,e,n),r&&he(this.base)||ve()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=jt&&n;r&&this.listeners.push(Ot());var o=function(){var e=t.current;ve()&&t.transitionTo(me(),(function(n){r&&_t(t.router,n,e,!0),jt||be(n.fullPath)}))},i=jt?"popstate":"hashchange";window.addEventListener(i,o),this.listeners.push((function(){window.removeEventListener(i,o)}))}},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){ye(t.fullPath),_t(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){be(t.fullPath),_t(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;me()!==e&&(t?ye(e):be(e))},e.prototype.getCurrentLocation=function(){return me()},e}(ee);function he(t){var e=pe(t);if(!/^\/#/.test(e))return window.location.replace(T(t+"/#"+e)),!0}function ve(){var t=me();return"/"===t.charAt(0)||(be("/"+t),!1)}function me(){var t=window.location.href,e=t.indexOf("#");return e<0?"":(t=t.slice(e+1),t)}function ge(t){var e=window.location.href,n=e.indexOf("#"),r=n>=0?e.slice(0,n):e;return r+"#"+t}function ye(t){jt?It(ge(t)):window.location.hash=t}function be(t){jt?Rt(ge(t)):window.location.replace(ge(t))}var we=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Jt(t,zt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(ee),xe=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ht(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!jt&&!1!==t.fallback,this.fallback&&(e="hash"),ut||(e="abstract"),this.mode=e,e){case"history":this.history=new fe(this,t.base);break;case"hash":this.history=new de(this,t.base,this.fallback);break;case"abstract":this.history=new we(this,t.base);break;default:0}},Se={currentRoute:{configurable:!0}};function Oe(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function _e(t,e,n){var r="hash"===n?"#"+e:e;return t?T(t+"/"+r):r}xe.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Se.currentRoute.get=function(){return this.history&&this.history.current},xe.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof fe||n instanceof de){var r=function(t){var r=n.current,o=e.options.scrollBehavior,i=jt&&o;i&&"fullPath"in t&&_t(e,t,r,!1)},o=function(t){n.setupListeners(),r(t)};n.transitionTo(n.getCurrentLocation(),o,o)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},xe.prototype.beforeEach=function(t){return Oe(this.beforeHooks,t)},xe.prototype.beforeResolve=function(t){return Oe(this.resolveHooks,t)},xe.prototype.afterEach=function(t){return Oe(this.afterHooks,t)},xe.prototype.onReady=function(t,e){this.history.onReady(t,e)},xe.prototype.onError=function(t){this.history.onError(t)},xe.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},xe.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},xe.prototype.go=function(t){this.history.go(t)},xe.prototype.back=function(){this.go(-1)},xe.prototype.forward=function(){this.go(1)},xe.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},xe.prototype.resolve=function(t,e,n){e=e||this.history.current;var r=tt(t,e,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,s=_e(a,i,this.mode);return{location:r,route:o,href:s,normalizedTo:r,resolved:o}},xe.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==g&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(xe.prototype,Se),xe.install=ct,xe.version="3.4.9",xe.isNavigationFailure=Jt,xe.NavigationFailureType=zt,ut&&window.Vue&&window.Vue.use(xe),e["a"]=xe},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"91d3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,r.withParams)({type:"macAddress"},(function(e){if(!(0,r.req)(e))return!0;if("string"!==typeof e)return!1;var n="string"===typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(i)}))};e.default=o;var i=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)}},"94ca":function(t,e,n){var r=n("d039"),o=/#|\.prototype\./,i=function(t,e){var n=s[a(t)];return n==u||n!=c&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},"9bf2":function(t,e,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),a=n("c04e"),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a026:function(t,e,n){"use strict";(function(t){ -/*! - * Vue.js v2.6.12 - * (c) 2014-2020 Evan You + * Vue.js v2.6.14 + * (c) 2014-2021 Evan You * Released under the MIT License. */ -var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function l(t){return"[object Object]"===u.call(t)}function f(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var w=Object.prototype.hasOwnProperty;function x(t,e){return w.call(t,e)}function S(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var O=/-(\w)/g,_=S((function(t){return t.replace(O,(function(t,e){return e?e.toUpperCase():""}))})),k=S((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,M=S((function(t){return t.replace(C,"-$1").toLowerCase()}));function E(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function A(t,e){return t.bind(e)}var T=Function.prototype.bind?A:E;function $(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function D(t,e){for(var n in e)t[n]=e[n];return t}function N(t){for(var e={},n=0;n0,ot=et&&et.indexOf("edge/")>0,it=(et&&et.indexOf("android"),et&&/iphone|ipad|ipod|ios/.test(et)||"ios"===tt),at=(et&&/chrome\/\d+/.test(et),et&&/phantomjs/.test(et),et&&et.match(/firefox\/(\d+)/)),st={}.watch,ct=!1;if(Z)try{var ut={};Object.defineProperty(ut,"passive",{get:function(){ct=!0}}),window.addEventListener("test-passive",null,ut)}catch(Xu){}var lt=function(){return void 0===G&&(G=!Z&&!Q&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),G},ft=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function pt(t){return"function"===typeof t&&/native code/.test(t.toString())}var dt,ht="undefined"!==typeof Symbol&&pt(Symbol)&&"undefined"!==typeof Reflect&&pt(Reflect.ownKeys);dt="undefined"!==typeof Set&&pt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var vt=P,mt=0,gt=function(){this.id=mt++,this.subs=[]};gt.prototype.addSub=function(t){this.subs.push(t)},gt.prototype.removeSub=function(t){b(this.subs,t)},gt.prototype.depend=function(){gt.target&>.target.addDep(this)},gt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===M(t)){var c=ne(String,o.type);(c<0||s0&&(a=Ae(a,(e||"")+"_"+n),Ee(a[0])&&Ee(u)&&(l[c]=_t(u.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?Ee(u)?l[c]=_t(u.text+a):""!==a&&l.push(_t(a)):Ee(a)&&Ee(u)?l[c]=_t(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function Te(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function $e(t){var e=De(t.$options.inject,t);e&&($t(!1),Object.keys(e).forEach((function(n){It(t,n,e[n])})),$t(!0))}function De(t,e){if(t){for(var n=Object.create(null),r=ht?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Ie(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=Re(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),K(o,"$stable",a),K(o,"$key",s),K(o,"$hasNormal",i),o}function Ie(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Me(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Re(t,e){return function(){return t[e]}}function Le(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?$(n):n;for(var r=$(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Gn=function(){return Xn.now()})}function Zn(){var t,e;for(Yn=Gn(),Un=!0,Vn.sort((function(t,e){return t.id-e.id})),Kn=0;KnKn&&Vn[n].id>t.id)n--;Vn.splice(n+1,0,t)}else Vn.push(t);Wn||(Wn=!0,me(Zn))}}var rr=0,or=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++rr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new dt,this.newDepIds=new dt,this.expression="","function"===typeof e?this.getter=e:(this.getter=Y(e),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};or.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Xu){if(!this.user)throw Xu;re(Xu,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ye(t),wt(),this.cleanupDeps()}return t},or.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},or.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},or.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():nr(this)},or.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Xu){re(Xu,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},or.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},or.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},or.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var ir={enumerable:!0,configurable:!0,get:P,set:P};function ar(t,e,n){ir.get=function(){return this[e][n]},ir.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ir)}function sr(t){t._watchers=[];var e=t.$options;e.props&&cr(t,e.props),e.methods&&mr(t,e.methods),e.data?ur(t):jt(t._data={},!0),e.computed&&pr(t,e.computed),e.watch&&e.watch!==st&&gr(t,e.watch)}function cr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||$t(!1);var a=function(i){o.push(i);var a=Zt(i,e,n,t);It(r,i,a),i in t||ar(t,"_props",i)};for(var s in e)a(s);$t(!0)}function ur(t){var e=t.$options.data;e=t._data="function"===typeof e?lr(e,t):e||{},l(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&x(r,i)||U(i)||ar(t,"_data",i)}jt(e,!0)}function lr(t,e){bt();try{return t.call(e,e)}catch(Xu){return re(Xu,e,"data()"),{}}finally{wt()}}var fr={lazy:!0};function pr(t,e){var n=t._computedWatchers=Object.create(null),r=lt();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new or(t,a||P,P,fr)),o in t||dr(t,o,i)}}function dr(t,e,n){var r=!lt();"function"===typeof n?(ir.get=r?hr(e):vr(n),ir.set=P):(ir.get=n.get?r&&!1!==n.cache?hr(e):vr(n.get):P,ir.set=n.set||P),Object.defineProperty(t,e,ir)}function hr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),gt.target&&e.depend(),e.value}}function vr(t){return function(){return t.call(this,this)}}function mr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?P:T(e[n],t)}function gr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=$(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Mr(t){t.mixin=function(t){return this.options=Gt(this.options,t),this}}function Er(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Gt(n.options,t),a["super"]=n,a.options.props&&Ar(a),a.options.computed&&Tr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,V.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=D({},a.options),o[r]=a,a}}function Ar(t){var e=t.options.props;for(var n in e)ar(t.prototype,"_props",n)}function Tr(t){var e=t.options.computed;for(var n in e)dr(t.prototype,n,e[n])}function $r(t){V.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function Dr(t){return t&&(t.Ctor.options.name||t.tag)}function Nr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function Pr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=Dr(a.componentOptions);s&&!e(s)&&jr(n,i,r,o)}}}function jr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,b(n,e)}xr(kr),br(kr),$n(kr),jn(kr),wn(kr);var Ir=[String,RegExp,Array],Rr={name:"keep-alive",abstract:!0,props:{include:Ir,exclude:Ir,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)jr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){Pr(t,(function(t){return Nr(e,t)}))})),this.$watch("exclude",(function(e){Pr(t,(function(t){return!Nr(e,t)}))}))},render:function(){var t=this.$slots.default,e=kn(t),n=e&&e.componentOptions;if(n){var r=Dr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Nr(i,r))||a&&r&&Nr(a,r))return e;var s=this,c=s.cache,u=s.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[l]?(e.componentInstance=c[l].componentInstance,b(u,l),u.push(l)):(c[l]=e,u.push(l),this.max&&u.length>parseInt(this.max)&&jr(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Lr={KeepAlive:Rr};function zr(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:vt,extend:D,mergeOptions:Gt,defineReactive:It},t.set=Rt,t.delete=Lt,t.nextTick=me,t.observable=function(t){return jt(t),t},t.options=Object.create(null),V.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,D(t.options.components,Lr),Cr(t),Mr(t),Er(t),$r(t)}zr(kr),Object.defineProperty(kr.prototype,"$isServer",{get:lt}),Object.defineProperty(kr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(kr,"FunctionalRenderContext",{value:Qe}),kr.version="2.6.12";var Fr=m("style,class"),Br=m("input,textarea,option,select,progress"),Vr=function(t,e,n){return"value"===n&&Br(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},qr=m("contenteditable,draggable,spellcheck"),Hr=m("events,caret,typing,plaintext-only"),Wr=function(t,e){return Gr(e)||"false"===e?"false":"contenteditable"===t&&Hr(e)?e:"true"},Ur=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Kr="http://www.w3.org/1999/xlink",Jr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Yr=function(t){return Jr(t)?t.slice(6,t.length):""},Gr=function(t){return null==t||!1===t};function Xr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Zr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Zr(e,n.data));return Qr(e.staticClass,e.class)}function Zr(t,e){return{staticClass:to(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return o(t)||o(e)?to(t,eo(e)):""}function to(t,e){return t?e?t+" "+e:t:e||""}function eo(t){return Array.isArray(t)?no(t):c(t)?ro(t):"string"===typeof t?t:""}function no(t){for(var e,n="",r=0,i=t.length;r-1?lo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:lo[t]=/HTMLUnknownElement/.test(e.toString())}var po=m("text,number,password,search,email,tel,url");function ho(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function vo(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function mo(t,e){return document.createElementNS(oo[t],e)}function go(t){return document.createTextNode(t)}function yo(t){return document.createComment(t)}function bo(t,e,n){t.insertBefore(e,n)}function wo(t,e){t.removeChild(e)}function xo(t,e){t.appendChild(e)}function So(t){return t.parentNode}function Oo(t){return t.nextSibling}function _o(t){return t.tagName}function ko(t,e){t.textContent=e}function Co(t,e){t.setAttribute(e,"")}var Mo=Object.freeze({createElement:vo,createElementNS:mo,createTextNode:go,createComment:yo,insertBefore:bo,removeChild:wo,appendChild:xo,parentNode:So,nextSibling:Oo,tagName:_o,setTextContent:ko,setStyleScope:Co}),Eo={create:function(t,e){Ao(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Ao(t,!0),Ao(e))},destroy:function(t){Ao(t,!0)}};function Ao(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?b(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var To=new xt("",{},[]),$o=["create","activate","update","remove","destroy"];function Do(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&No(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function No(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||po(r)&&po(i)}function Po(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function jo(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;e<$o.length;++e)for(a[$o[e]]=[],n=0;nv?(f=r(n[y+1])?null:n[y+1].elm,O(t,f,n,h,y,i)):h>y&&k(e,p,v)}function E(t,e,n,r){for(var i=n;i-1?Uo(t,e,n):Ur(e)?Gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):qr(e)?t.setAttribute(e,Wr(e,n)):Jr(e)?Gr(n)?t.removeAttributeNS(Kr,Yr(e)):t.setAttributeNS(Kr,e,n):Uo(t,e,n)}function Uo(t,e,n){if(Gr(n))t.removeAttribute(e);else{if(nt&&!rt&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Ko={create:Ho,update:Ho};function Jo(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Xr(e),c=n._transitionClasses;o(c)&&(s=to(s,eo(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Yo,Go,Xo,Zo,Qo,ti,ei={create:Jo,update:Jo},ni=/[\w).+\-_$\]]/;function ri(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0;h--)if(v=t.charAt(h)," "!==v)break;v&&ni.test(v)||(u=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&m(),i)for(r=0;r-1?{exp:t.slice(0,Zo),key:'"'+t.slice(Zo+1)+'"'}:{exp:t,key:null};Go=t,Zo=Qo=ti=0;while(!Si())Xo=xi(),Oi(Xo)?ki(Xo):91===Xo&&_i(Xo);return{exp:t.slice(0,Qo),key:t.slice(Qo+1,ti)}}function xi(){return Go.charCodeAt(++Zo)}function Si(){return Zo>=Yo}function Oi(t){return 34===t||39===t}function _i(t){var e=1;Qo=Zo;while(!Si())if(t=xi(),Oi(t))ki(t);else if(91===t&&e++,93===t&&e--,0===e){ti=Zo;break}}function ki(t){var e=t;while(!Si())if(t=xi(),t===e)break}var Ci,Mi="__r",Ei="__c";function Ai(t,e,n){n;var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return yi(t,r,o),!1;if("select"===i)Di(t,r,o);else if("input"===i&&"checkbox"===a)Ti(t,r,o);else if("input"===i&&"radio"===a)$i(t,r,o);else if("input"===i||"textarea"===i)Ni(t,r,o);else{if(!H.isReservedTag(i))return yi(t,r,o),!1}return!0}function Ti(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null",i=hi(t,"true-value")||"true",a=hi(t,"false-value")||"false";si(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),pi(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+bi(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+bi(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+bi(e,"$$c")+"}",null,!0)}function $i(t,e,n){var r=n&&n.number,o=hi(t,"value")||"null";o=r?"_n("+o+")":o,si(t,"checked","_q("+e+","+o+")"),pi(t,"change",bi(e,o),null,!0)}function Di(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = "+o+";";a=a+" "+bi(e,i),pi(t,"change",a,null,!0)}function Ni(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?Mi:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=bi(e,l);c&&(f="if($event.target.composing)return;"+f),si(t,"value","("+e+")"),pi(t,u,f,null,!0),(s||a)&&pi(t,"blur","$forceUpdate()")}function Pi(t){if(o(t[Mi])){var e=nt?"change":"input";t[e]=[].concat(t[Mi],t[e]||[]),delete t[Mi]}o(t[Ei])&&(t.change=[].concat(t[Ei],t.change||[]),delete t[Ei])}function ji(t,e,n){var r=Ci;return function o(){var i=e.apply(null,arguments);null!==i&&Li(t,o,n,r)}}var Ii=ce&&!(at&&Number(at[1])<=53);function Ri(t,e,n,r){if(Ii){var o=Yn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ci.addEventListener(t,e,ct?{capture:n,passive:r}:n)}function Li(t,e,n,r){(r||Ci).removeEventListener(t,e._wrapper||e,n)}function zi(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ci=e.elm,Pi(n),Se(n,o,Ri,Li,ji,e.context),Ci=void 0}}var Fi,Bi={create:zi,update:zi};function Vi(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=D({},c)),s)n in c||(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);qi(a,u)&&(a.value=u)}else if("innerHTML"===n&&ao(a.tagName)&&r(a.innerHTML)){Fi=Fi||document.createElement("div"),Fi.innerHTML=""+i+"";var l=Fi.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(l.firstChild)a.appendChild(l.firstChild)}else if(i!==s[n])try{a[n]=i}catch(Xu){}}}}function qi(t,e){return!t.composing&&("OPTION"===t.tagName||Hi(t,e)||Wi(t,e))}function Hi(t,e){var n=!0;try{n=document.activeElement!==t}catch(Xu){}return n&&t.value!==e}function Wi(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var Ui={create:Vi,update:Vi},Ki=S((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function Ji(t){var e=Yi(t.style);return t.staticStyle?D(t.staticStyle,e):e}function Yi(t){return Array.isArray(t)?N(t):"string"===typeof t?Ki(t):t}function Gi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=Ji(o.data))&&D(r,n)}(n=Ji(t.data))&&D(r,n);var i=t;while(i=i.parent)i.data&&(n=Ji(i.data))&&D(r,n);return r}var Xi,Zi=/^--/,Qi=/\s*!important$/,ta=function(t,e,n){if(Zi.test(e))t.style.setProperty(e,n);else if(Qi.test(n))t.style.setProperty(M(e),n.replace(Qi,""),"important");else{var r=na(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(ia).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function sa(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ia).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function ca(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&D(e,ua(t.name||"v")),D(e,t),e}return"string"===typeof t?ua(t):void 0}}var ua=S((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),la=Z&&!rt,fa="transition",pa="animation",da="transition",ha="transitionend",va="animation",ma="animationend";la&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(da="WebkitTransition",ha="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(va="WebkitAnimation",ma="webkitAnimationEnd"));var ga=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function ya(t){ga((function(){ga(t)}))}function ba(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),aa(t,e))}function wa(t,e){t._transitionClasses&&b(t._transitionClasses,e),sa(t,e)}function xa(t,e,n){var r=Oa(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===fa?ha:ma,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=fa,l=a,f=i.length):e===pa?u>0&&(n=pa,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?fa:pa:null,f=n?n===fa?i.length:c.length:0);var p=n===fa&&Sa.test(r[da+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:p}}function _a(t,e){while(t.length1}function Ta(t,e){!0!==e.data.show&&Ca(e)}var $a=Z?{create:Ta,activate:Ta,remove:function(t,e){!0!==t.data.show?Ma(t,e):e()}}:{},Da=[Ko,ei,Bi,Ui,oa,$a],Na=Da.concat(qo),Pa=jo({nodeOps:Mo,modules:Na});rt&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&Va(t,"input")}));var ja={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Oe(n,"postpatch",(function(){ja.componentUpdated(t,e,n)})):Ia(t,e,n.context),t._vOptions=[].map.call(t.options,za)):("textarea"===n.tag||po(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Fa),t.addEventListener("compositionend",Ba),t.addEventListener("change",Ba),rt&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Ia(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,za);if(o.some((function(t,e){return!L(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return La(t,o)})):e.value!==e.oldValue&&La(e.value,o);i&&Va(t,"change")}}}};function Ia(t,e,n){Ra(t,e,n),(nt||ot)&&setTimeout((function(){Ra(t,e,n)}),0)}function Ra(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(L(za(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function La(t,e){return e.every((function(e){return!L(e,t)}))}function za(t){return"_value"in t?t._value:t.value}function Fa(t){t.target.composing=!0}function Ba(t){t.target.composing&&(t.target.composing=!1,Va(t.target,"input"))}function Va(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function qa(t){return!t.componentInstance||t.data&&t.data.transition?t:qa(t.componentInstance._vnode)}var Ha={bind:function(t,e,n){var r=e.value;n=qa(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Ca(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=qa(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Ca(n,(function(){t.style.display=t.__vOriginalDisplay})):Ma(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},Wa={model:ja,show:Ha},Ua={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ka(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ka(kn(e.children)):t}function Ja(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[_(i)]=o[i];return e}function Ya(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Ga(t){while(t=t.parent)if(t.data.transition)return!0}function Xa(t,e){return e.key===t.key&&e.tag===t.tag}var Za=function(t){return t.tag||_n(t)},Qa=function(t){return"show"===t.name},ts={name:"transition",props:Ua,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Za),n.length)){0;var r=this.mode;0;var o=n[0];if(Ga(this.$vnode))return o;var i=Ka(o);if(!i)return o;if(this._leaving)return Ya(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Ja(this),u=this._vnode,l=Ka(u);if(i.data.directives&&i.data.directives.some(Qa)&&(i.data.show=!0),l&&l.data&&!Xa(i,l)&&!_n(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=D({},c);if("out-in"===r)return this._leaving=!0,Oe(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Ya(t,o);if("in-out"===r){if(_n(i))return u;var p,d=function(){p()};Oe(c,"afterEnter",d),Oe(c,"enterCancelled",d),Oe(f,"delayLeave",(function(t){p=t}))}}return o}}},es=D({tag:String,moveClass:String},Ua);delete es.mode;var ns={props:es,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Nn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ja(this),s=0;sc&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=ri(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Os=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,_s="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+W.source+"]*",ks="((?:"+_s+"\\:)?"+_s+")",Cs=new RegExp("^<"+ks),Ms=/^\s*(\/?)>/,Es=new RegExp("^<\\/"+ks+"[^>]*>"),As=/^]+>/i,Ts=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},js=/&(?:lt|gt|quot|amp|#39);/g,Is=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Rs=m("pre,textarea",!0),Ls=function(t,e){return t&&Rs(t)&&"\n"===e[0]};function zs(t,e){var n=e?Is:js;return t.replace(n,(function(t){return Ps[t]}))}function Fs(t,e){var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||j,s=e.canBeLeftOpenTag||j,c=0;while(t){if(n=t,r&&Ds(r)){var u=0,l=r.toLowerCase(),f=Ns[l]||(Ns[l]=new RegExp("([\\s\\S]*?)(]*>)","i")),p=t.replace(f,(function(t,n,r){return u=r.length,Ds(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ls(l,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-p.length,t=p,C(l,c-u,c)}else{var d=t.indexOf("<");if(0===d){if(Ts.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),c,c+h+3),O(h+3);continue}}if($s.test(t)){var v=t.indexOf("]>");if(v>=0){O(v+2);continue}}var m=t.match(As);if(m){O(m[0].length);continue}var g=t.match(Es);if(g){var y=c;O(g[0].length),C(g[1],y,c);continue}var b=_();if(b){k(b),Ls(b.tagName,t)&&O(1);continue}}var w=void 0,x=void 0,S=void 0;if(d>=0){x=t.slice(d);while(!Es.test(x)&&!Cs.test(x)&&!Ts.test(x)&&!$s.test(x)){if(S=x.indexOf("<",1),S<0)break;d+=S,x=t.slice(d)}w=t.substring(0,d)}d<0&&(w=t),w&&O(w.length),e.chars&&w&&e.chars(w,c-w.length,c)}if(t===n){e.chars&&e.chars(t);break}}function O(e){c+=e,t=t.substring(e)}function _(){var e=t.match(Cs);if(e){var n,r,o={tagName:e[1],attrs:[],start:c};O(e[0].length);while(!(n=t.match(Ms))&&(r=t.match(Os)||t.match(Ss)))r.start=c,O(r[0].length),r.end=c,o.attrs.push(r);if(n)return o.unarySlash=n[1],O(n[0].length),o.end=c,o}}function k(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&xs(n)&&C(r),s(n)&&r===n&&C(n));for(var u=a(n)||!!c,l=t.attrs.length,f=new Array(l),p=0;p=0;a--)if(o[a].lowerCasedTag===s)break}else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}C()}var Bs,Vs,qs,Hs,Ws,Us,Ks,Js,Ys=/^@|^v-on:/,Gs=/^v-|^@|^:|^#/,Xs=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qs=/^\(|\)$/g,tc=/^\[.*\]$/,ec=/:(.*)$/,nc=/^:|^\.|^v-bind:/,rc=/\.[^.\]]+(?=[^\]]*$)/g,oc=/^v-slot(:|$)|^#/,ic=/[\r\n]/,ac=/\s+/g,sc=S(ys.decode),cc="_empty_";function uc(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:Tc(e),rawAttrsMap:{},parent:n,children:[]}}function lc(t,e){Bs=e.warn||ii,Us=e.isPreTag||j,Ks=e.mustUseProp||j,Js=e.getTagNamespace||j;var n=e.isReservedTag||j;(function(t){return!!t.component||!n(t.tag)}),qs=ai(e.modules,"transformNode"),Hs=ai(e.modules,"preTransformNode"),Ws=ai(e.modules,"postTransformNode"),Vs=e.delimiters;var r,o,i=[],a=!1!==e.preserveWhitespace,s=e.whitespace,c=!1,u=!1;function l(t){if(f(t),c||t.processed||(t=dc(t,e)),i.length||t===r||r.if&&(t.elseif||t.else)&&xc(r,{exp:t.elseif,block:t}),o&&!t.forbidden)if(t.elseif||t.else)bc(t,o);else{if(t.slotScope){var n=t.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[n]=t}o.children.push(t),t.parent=o}t.children=t.children.filter((function(t){return!t.slotScope})),f(t),t.pre&&(c=!1),Us(t.tag)&&(u=!1);for(var a=0;a|^function(?:\s+[\w$]+)?\s*\(/,tu=/\([^)]*?\);*$/,eu=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,nu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ru={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},ou=function(t){return"if("+t+")return null;"},iu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ou("$event.target !== $event.currentTarget"),ctrl:ou("!$event.ctrlKey"),shift:ou("!$event.shiftKey"),alt:ou("!$event.altKey"),meta:ou("!$event.metaKey"),left:ou("'button' in $event && $event.button !== 0"),middle:ou("'button' in $event && $event.button !== 1"),right:ou("'button' in $event && $event.button !== 2")};function au(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=su(t[i]);t[i]&&t[i].dynamic?o+=i+","+a+",":r+='"'+i+'":'+a+","}return r="{"+r.slice(0,-1)+"}",o?n+"_d("+r+",["+o.slice(0,-1)+"])":n+r}function su(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return su(t)})).join(",")+"]";var e=eu.test(t.value),n=Qc.test(t.value),r=eu.test(t.value.replace(tu,""));if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(iu[s])i+=iu[s],nu[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=ou(["ctrl","shift","alt","meta"].filter((function(t){return!c[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);a.length&&(o+=cu(a)),i&&(o+=i);var u=e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":r?"return "+t.value:t.value;return"function($event){"+o+u+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function cu(t){return"if(!$event.type.indexOf('key')&&"+t.map(uu).join("&&")+")return null;"}function uu(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=nu[t],r=ru[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function lu(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function fu(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}var pu={on:lu,bind:fu,cloak:P},du=function(t){this.options=t,this.warn=t.warn||ii,this.transforms=ai(t.modules,"transformCode"),this.dataGenFns=ai(t.modules,"genData"),this.directives=D(D({},pu),t.directives);var e=t.isReservedTag||j;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function hu(t,e){var n=new du(e),r=t?vu(t,n):'_c("div")';return{render:"with(this){return "+r+"}",staticRenderFns:n.staticRenderFns}}function vu(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return mu(t,e);if(t.once&&!t.onceProcessed)return gu(t,e);if(t.for&&!t.forProcessed)return wu(t,e);if(t.if&&!t.ifProcessed)return yu(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return Pu(t,e);var n;if(t.component)n=ju(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=xu(t,e));var o=t.inlineTemplate?null:Eu(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}function Cu(t){return 1===t.type&&("slot"===t.tag||t.children.some(Cu))}function Mu(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return yu(t,e,Mu,"null");if(t.for&&!t.forProcessed)return wu(t,e,Mu);var r=t.slotScope===cc?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Eu(t,e)||"undefined")+":undefined":Eu(t,e)||"undefined":vu(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function Eu(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||vu)(a,e)+s}var c=n?Au(i,e.maybeComponent):0,u=o||$u;return"["+i.map((function(t){return u(t,e)})).join(",")+"]"+(c?","+c:"")}}function Au(t,e){for(var n=0,r=0;r':'

',Bu.innerHTML.indexOf(" ")>0}var Uu=!!Z&&Wu(!1),Ku=!!Z&&Wu(!0),Ju=S((function(t){var e=ho(t);return e&&e.innerHTML})),Yu=kr.prototype.$mount;function Gu(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}kr.prototype.$mount=function(t,e){if(t=t&&ho(t),t===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"===typeof r)"#"===r.charAt(0)&&(r=Ju(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=Gu(t));if(r){0;var o=Hu(r,{outputSourceRange:!1,shouldDecodeNewlines:Uu,shouldDecodeNewlinesForHref:Ku,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Yu.call(this,t,e)},kr.compile=Hu,e["a"]=kr}).call(this,n("c8ba"))},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},aa47:function(t,e,n){"use strict"; +var t=Object.freeze({});function e(t){return null==t}function n(t){return null!=t}function r(t){return!0===t}function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return null!==t&&"object"==typeof t}var a=Object.prototype.toString;function s(t){return"[object Object]"===a.call(t)}function c(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function l(t){return n(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function u(t){return null==t?"":Array.isArray(t)||s(t)&&t.toString===a?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function g(t,e){return m.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var b=/-(\w)/g,w=y((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),x=y((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),S=/\B([A-Z])/g,k=y((function(t){return t.replace(S,"-$1").toLowerCase()}));var _=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function C(t,e){for(var n in e)t[n]=e[n];return t}function M(t){for(var e={},n=0;n0,Y=q&&q.indexOf("edge/")>0;q&&q.indexOf("android");var U=q&&/iphone|ipad|ipod|ios/.test(q)||"ios"===H;q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q);var X,G=q&&q.match(/firefox\/(\d+)/),Z={}.watch,Q=!1;if(V)try{var tt={};Object.defineProperty(tt,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,tt)}catch(xy){}var et=function(){return void 0===X&&(X=!V&&!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),X},nt=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,it="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);ot="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var at=D,st=0,ct=function(){this.id=st++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){v(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(i&&!g(o,"default"))a=!1;else if(""===a||a===k(t)){var c=Lt(String,o.type);(c<0||s0&&(ue((s=fe(s,(i||"")+"_"+a))[0])&&ue(l)&&(u[c]=vt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):o(s)?ue(l)?u[c]=vt(l.text+s):""!==s&&u.push(vt(s)):ue(s)&&ue(l)?u[c]=vt(l.text+s.text):(r(t._isVList)&&n(s.tag)&&e(s.key)&&n(i)&&(s.key="__vlist"+i+"_"+a+"__"),u.push(s)));return u}function pe(t,e){if(t){for(var n=Object.create(null),r=it?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==t&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},e)e[c]&&"$"!==c[0]&&(o[c]=ge(n,c,e[c]))}else o={};for(var l in n)l in o||(o[l]=ye(n,l));return e&&Object.isExtensible(e)&&(e._normalized=o),F(o,"$stable",a),F(o,"$key",s),F(o,"$hasNormal",i),o}function ge(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:le(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function be(t,e){var r,o,a,s,c;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),o=0,a=t.length;odocument.createEvent("Event").timeStamp&&(fn=function(){return pn.now()})}function dn(){var t,e;for(un=fn(),cn=!0,rn.sort((function(t,e){return t.id-e.id})),ln=0;lnln&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,te(dn))}}(this)},vn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Vt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},vn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:D,set:D};function gn(t,e,n){mn.get=function(){return this[e][n]},mn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,mn)}function yn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&xt(!1);var i=function(i){o.push(i);var a=Rt(i,e,n,t);_t(r,i,a),i in t||gn(t,"_props",i)};for(var a in e)i(a);xt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?D:_(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;s(e=t._data="function"==typeof e?function(t,e){ut();try{return t.call(e,e)}catch(xy){return Bt(xy,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&g(r,i)||z(i)||gn(t,"_data",i)}kt(e,!0)}(t):kt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=et();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;r||(n[o]=new vn(t,a||D,D,bn)),o in t||wn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==Z&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===a.call(n)&&t.test(e));var n}function Tn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&An(n,i,r,o)}}}function An(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,v(n,e)}Cn.prototype._init=function(e){var n=this;n._uid=_n++,n._isVue=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Pt(On(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=de(n._renderChildren,o),e.$scopedSlots=t,e._c=function(t,n,r,o){return Be(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Be(e,t,n,r,o,!0)};var i=r&&r.data;_t(e,"$attrs",i&&i.attrs||t,null,!0),_t(e,"$listeners",n._parentListeners||t,null,!0)}(n),nn(n,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(xt(!1),Object.keys(e).forEach((function(n){_t(t,n,e[n])})),xt(!0))}(n),yn(n),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(n),nn(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Ot,t.prototype.$delete=Ct,t.prototype.$watch=function(t,e,n){var r=this;if(s(e))return kn(r,t,e,n);(n=n||{}).user=!0;var o=new vn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'+o.expression+'"';ut(),Vt(e,r,[o.value],r,i),ft()}return function(){o.teardown()}}}(Cn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?O(n):n;for(var r=O(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&An(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)An(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Tn(t,(function(t){return $n(e,t)}))})),this.$watch("exclude",(function(e){Tn(t,(function(t){return!$n(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Je(t),n=e&&e.componentOptions;if(n){var r=Dn(n),o=this.include,i=this.exclude;if(o&&(!r||!$n(o,r))||i&&r&&$n(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,v(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Pn={KeepAlive:Nn};!function(t){var e={get:function(){return R}};Object.defineProperty(t,"config",e),t.util={warn:at,extend:C,mergeOptions:Pt,defineReactive:_t},t.set=Ot,t.delete=Ct,t.nextTick=te,t.observable=function(t){return kt(t),t},t.options=Object.create(null),P.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,C(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pt(this.options,t),this}}(t),Mn(t),function(t){P.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&s(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cn),Object.defineProperty(Cn.prototype,"$isServer",{get:et}),Object.defineProperty(Cn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cn,"FunctionalRenderContext",{value:Pe}),Cn.version="2.6.14";var In=p("style,class"),Rn=p("input,textarea,option,select,progress"),jn=function(t,e,n){return"value"===n&&Rn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zn=p("contenteditable,draggable,spellcheck"),Fn=p("events,caret,typing,plaintext-only"),Ln=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Bn="http://www.w3.org/1999/xlink",Vn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Wn=function(t){return Vn(t)?t.slice(6,t.length):""},Hn=function(t){return null==t||!1===t};function qn(t){for(var e=t.data,r=t,o=t;n(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Jn(o.data,e));for(;n(r=r.parent);)r&&r.data&&(e=Jn(e,r.data));return function(t,e){if(n(t)||n(e))return Kn(t,Yn(e));return""}(e.staticClass,e.class)}function Jn(t,e){return{staticClass:Kn(t.staticClass,e.staticClass),class:n(t.class)?[t.class,e.class]:e.class}}function Kn(t,e){return t?e?t+" "+e:t:e||""}function Yn(t){return Array.isArray(t)?function(t){for(var e,r="",o=0,i=t.length;o-1?br(t,e,n):Ln(e)?Hn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zn(e)?t.setAttribute(e,function(t,e){return Hn(e)||"false"===e?"false":"contenteditable"===t&&Fn(e)?e:"true"}(e,n)):Vn(e)?Hn(n)?t.removeAttributeNS(Bn,Wn(e)):t.setAttributeNS(Bn,e,n):br(t,e,n)}function br(t,e,n){if(Hn(n))t.removeAttribute(e);else{if(J&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var wr={create:gr,update:gr};function xr(t,r){var o=r.elm,i=r.data,a=t.data;if(!(e(i.staticClass)&&e(i.class)&&(e(a)||e(a.staticClass)&&e(a.class)))){var s=qn(r),c=o._transitionClasses;n(c)&&(s=Kn(s,Yn(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var Sr,kr,_r,Or,Cr,Mr,Dr={create:xr,update:xr},$r=/[\w).+\-_$\]]/;function Tr(t){var e,n,r,o,i,a=!1,s=!1,c=!1,l=!1,u=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(v=t.charAt(h));h--);v&&$r.test(v)||(l=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&m(),i)for(r=0;r-1?{exp:t.slice(0,Or),key:'"'+t.slice(Or+1)+'"'}:{exp:t,key:null};kr=t,Or=Cr=Mr=0;for(;!Kr();)Yr(_r=Jr())?Xr(_r):91===_r&&Ur(_r);return{exp:t.slice(0,Cr),key:t.slice(Cr+1,Mr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Jr(){return kr.charCodeAt(++Or)}function Kr(){return Or>=Sr}function Yr(t){return 34===t||39===t}function Ur(t){var e=1;for(Cr=Or;!Kr();)if(Yr(t=Jr()))Xr(t);else if(91===t&&e++,93===t&&e--,0===e){Mr=Or;break}}function Xr(t){for(var e=t;!Kr()&&(t=Jr())!==e;);}var Gr;function Zr(t,e,n){var r=Gr;return function o(){var i=e.apply(null,arguments);null!==i&&eo(t,o,n,r)}}var Qr=Jt&&!(G&&Number(G[1])<=53);function to(t,e,n,r){if(Qr){var o=un,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Gr.addEventListener(t,e,Q?{capture:n,passive:r}:n)}function eo(t,e,n,r){(r||Gr).removeEventListener(t,e._wrapper||e,n)}function no(t,r){if(!e(t.data.on)||!e(r.data.on)){var o=r.data.on||{},i=t.data.on||{};Gr=r.elm,function(t){if(n(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}n(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),ae(o,i,to,eo,Zr,r.context),Gr=void 0}}var ro,oo={create:no,update:no};function io(t,r){if(!e(t.data.domProps)||!e(r.data.domProps)){var o,i,a=r.elm,s=t.data.domProps||{},c=r.data.domProps||{};for(o in n(c.__ob__)&&(c=r.data.domProps=C({},c)),s)o in c||(a[o]="");for(o in c){if(i=c[o],"textContent"===o||"innerHTML"===o){if(r.children&&(r.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o&&"PROGRESS"!==a.tagName){a._value=i;var l=e(i)?"":String(i);ao(a,l)&&(a.value=l)}else if("innerHTML"===o&&Gn(a.tagName)&&e(a.innerHTML)){(ro=ro||document.createElement("div")).innerHTML=""+i+"";for(var u=ro.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(i!==s[o])try{a[o]=i}catch(xy){}}}}function ao(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(xy){}return n&&t.value!==e}(t,e)||function(t,e){var r=t.value,o=t._vModifiers;if(n(o)){if(o.number)return f(r)!==f(e);if(o.trim)return r.trim()!==e.trim()}return r!==e}(t,e))}var so={create:io,update:io},co=y((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function lo(t){var e=uo(t.style);return t.staticStyle?C(t.staticStyle,e):e}function uo(t){return Array.isArray(t)?M(t):"string"==typeof t?co(t):t}var fo,po=/^--/,ho=/\s*!important$/,vo=function(t,e,n){if(po.test(e))t.style.setProperty(e,n);else if(ho.test(n))t.style.setProperty(k(e),n.replace(ho,""),"important");else{var r=go(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(wo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function So(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ko(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&C(e,_o(t.name||"v")),C(e,t),e}return"string"==typeof t?_o(t):void 0}}var _o=y((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Oo=V&&!K,Co="transition",Mo="transitionend",Do="animation",$o="animationend";Oo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Co="WebkitTransition",Mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Do="WebkitAnimation",$o="webkitAnimationEnd"));var To=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ao(t){To((function(){To(t)}))}function Eo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xo(t,e))}function No(t,e){t._transitionClasses&&v(t._transitionClasses,e),So(t,e)}function Po(t,e,n){var r=Ro(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?Mo:$o,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout((function(){c0&&(n="transition",u=a,f=i.length):"animation"===e?l>0&&(n="animation",u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:"transition"===n&&Io.test(r[Co+"Property"])}}function jo(t,e){for(;t.length1}function Wo(t,e){!0!==e.data.show&&Fo(e)}var Ho=function(t){var i,a,s={},c=t.modules,l=t.nodeOps;for(i=0;ih?b(t,e(o[g+1])?null:o[g+1].elm,o,d,g,i):d>g&&x(r,p,h)}(p,v,g,i,u):n(g)?(n(t.text)&&l.setTextContent(p,""),b(p,null,g,0,g.length-1,i)):n(v)?x(v,0,v.length-1):n(t.text)&&l.setTextContent(p,""):t.text!==o.text&&l.setTextContent(p,o.text),n(h)&&n(d=h.hook)&&n(d=d.postpatch)&&d(t,o)}}}function O(t,e,o){if(r(o)&&n(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i-1,a.selected!==i&&(a.selected=i);else if(A(Uo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Yo(t,e){return e.every((function(e){return!A(e,t)}))}function Uo(t){return"_value"in t?t._value:t.value}function Xo(t){t.target.composing=!0}function Go(t){t.target.composing&&(t.target.composing=!1,Zo(t.target,"input"))}function Zo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Qo(t){return!t.componentInstance||t.data&&t.data.transition?t:Qo(t.componentInstance._vnode)}var ti={model:qo,show:{bind:function(t,e,n){var r=e.value,o=(n=Qo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Fo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Qo(n)).data&&n.data.transition?(n.data.show=!0,r?Fo(n,(function(){t.style.display=t.__vOriginalDisplay})):Lo(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},ei={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ni(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ni(Je(e.children)):t}function ri(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[w(i)]=o[i];return e}function oi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ii=function(t){return t.tag||ve(t)},ai=function(t){return"show"===t.name},si={name:"transition",props:ei,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ii)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var a=ni(i);if(!a)return i;if(this._leaving)return oi(t,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ri(this),l=this._vnode,u=ni(l);if(a.data.directives&&a.data.directives.some(ai)&&(a.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,u)&&!ve(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=C({},c);if("out-in"===r)return this._leaving=!0,se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),oi(t,i);if("in-out"===r){if(ve(a))return l;var p,d=function(){p()};se(c,"afterEnter",d),se(c,"enterCancelled",d),se(f,"delayLeave",(function(t){p=t}))}}return i}}},ci=C({tag:String,moveClass:String},ei);delete ci.mode;var li={props:ci,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ze(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ri(this),s=0;s-1?tr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:tr[t]=/HTMLUnknownElement/.test(e.toString())},C(Cn.options.directives,ti),C(Cn.options.components,di),Cn.prototype.__patch__=V?Ho:D,Cn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=ht),nn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new vn(t,r,D,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&V?nr(t):void 0,e)},V&&setTimeout((function(){R.devtools&&nt&&nt.emit("init",Cn)}),0);var hi=/\{\{((?:.|\r?\n)+?)\}\}/g,vi=/[-.*+?^${}()|[\]\/\\]/g,mi=y((function(t){var e=t[0].replace(vi,"\\$&"),n=t[1].replace(vi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var gi={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Br(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=Lr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var yi,bi={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Br(t,"style");n&&(t.staticStyle=JSON.stringify(co(n)));var r=Lr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},wi=function(t){return(yi=yi||document.createElement("div")).innerHTML=t,yi.textContent},xi=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Si=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ki=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_i=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oi=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ci="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+j.source+"]*",Mi="((?:"+Ci+"\\:)?"+Ci+")",Di=new RegExp("^<"+Mi),$i=/^\s*(\/?)>/,Ti=new RegExp("^<\\/"+Mi+"[^>]*>"),Ai=/^]+>/i,Ei=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},ji=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Fi=p("pre,textarea",!0),Li=function(t,e){return t&&Fi(t)&&"\n"===e[0]};function Bi(t,e){var n=e?zi:ji;return t.replace(n,(function(t){return Ri[t]}))}var Vi,Wi,Hi,qi,Ji,Ki,Yi,Ui,Xi=/^@|^v-on:/,Gi=/^v-|^@|^:|^#/,Zi=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Qi=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ta=/^\(|\)$/g,ea=/^\[.*\]$/,na=/:(.*)$/,ra=/^:|^\.|^v-bind:/,oa=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,aa=/[\r\n]/,sa=/[ \f\t\r\n]+/g,ca=y(wi);function la(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ma(e),rawAttrsMap:{},parent:n,children:[]}}function ua(t,e){Vi=e.warn||Er,Ki=e.isPreTag||$,Yi=e.mustUseProp||$,Ui=e.getTagNamespace||$,e.isReservedTag,Hi=Nr(e.modules,"transformNode"),qi=Nr(e.modules,"preTransformNode"),Ji=Nr(e.modules,"postTransformNode"),Wi=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function l(t){if(u(t),s||t.processed||(t=fa(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&da(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,l=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),l&&l.if&&da(l,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,l;t.children=t.children.filter((function(t){return!t.slotScope})),u(t),t.pre&&(s=!1),Ki(t.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=t.replace(f,(function(t,n,r){return l=r.length,Pi(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),Li(u,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-p.length,t=p,C(u,c-l,c)}else{var d=t.indexOf("<");if(0===d){if(Ei.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),c,c+h+3),k(h+3);continue}}if(Ni.test(t)){var v=t.indexOf("]>");if(v>=0){k(v+2);continue}}var m=t.match(Ai);if(m){k(m[0].length);continue}var g=t.match(Ti);if(g){var y=c;k(g[0].length),C(g[1],y,c);continue}var b=_();if(b){O(b),Li(b.tagName,t)&&k(1);continue}}var w=void 0,x=void 0,S=void 0;if(d>=0){for(x=t.slice(d);!(Ti.test(x)||Di.test(x)||Ei.test(x)||Ni.test(x)||(S=x.indexOf("<",1))<0);)d+=S,x=t.slice(d);w=t.substring(0,d)}d<0&&(w=t),w&&k(w.length),e.chars&&w&&e.chars(w,c-w.length,c)}if(t===n){e.chars&&e.chars(t);break}}function k(e){c+=e,t=t.substring(e)}function _(){var e=t.match(Di);if(e){var n,r,o={tagName:e[1],attrs:[],start:c};for(k(e[0].length);!(n=t.match($i))&&(r=t.match(Oi)||t.match(_i));)r.start=c,k(r[0].length),r.end=c,o.attrs.push(r);if(n)return o.unarySlash=n[1],k(n[0].length),o.end=c,o}}function O(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&ki(n)&&C(r),s(n)&&r===n&&C(n));for(var l=a(n)||!!c,u=t.attrs.length,f=new Array(u),p=0;p=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=o.length-1;l>=a;l--)e.end&&e.end(o[l].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}C()}(t,{warn:Vi,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,u,f){var p=r&&r.ns||Ui(t);J&&"svg"===p&&(i=function(t){for(var e=[],n=0;nc&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var l=Tr(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=o+r[0].length}return c-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),Fr(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+qr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+qr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+qr(e,"$$c")+"}",null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Lr(t,"value")||"null";Pr(t,"checked","_q("+e+","+(o=r?"_n("+o+")":o)+")"),Fr(t,"change",qr(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,l=i?"change":"range"===r?"__r":"input",u="$event.target.value";s&&(u="$event.target.value.trim()");a&&(u="_n("+u+")");var f=qr(e,u);c&&(f="if($event.target.composing)return;"+f);Pr(t,"value","("+e+")"),Fr(t,l,f,null,!0),(s||a)&&Fr(t,"blur","$forceUpdate()")}(t,r,o);else if(!R.isReservedTag(i))return Hr(t,r,o),!1;return!0},text:function(t,e){e.value&&Pr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Pr(t,"innerHTML","_s("+e.value+")",e)}},Oa={expectHTML:!0,modules:wa,directives:_a,isPreTag:function(t){return"pre"===t},isUnaryTag:xi,mustUseProp:jn,canBeLeftOpenTag:Si,isReservedTag:Zn,getTagNamespace:Qn,staticKeys:(xa=wa,xa.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(","))},Ca=y((function(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Ma(t,e){t&&(Sa=Ca(e.staticKeys||""),ka=e.isReservedTag||$,Da(t),$a(t,!1))}function Da(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||d(t.tag)||!ka(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Sa)))}(t),1===t.type){if(!ka(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,Aa=/\([^)]*?\);*$/,Ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Na={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Pa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ia=function(t){return"if("+t+")return null;"},Ra={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ia("$event.target !== $event.currentTarget"),ctrl:Ia("!$event.ctrlKey"),shift:Ia("!$event.shiftKey"),alt:Ia("!$event.altKey"),meta:Ia("!$event.metaKey"),left:Ia("'button' in $event && $event.button !== 0"),middle:Ia("'button' in $event && $event.button !== 1"),right:Ia("'button' in $event && $event.button !== 2")};function ja(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=za(t[i]);t[i]&&t[i].dynamic?o+=i+","+a+",":r+='"'+i+'":'+a+","}return r="{"+r.slice(0,-1)+"}",o?n+"_d("+r+",["+o.slice(0,-1)+"])":n+r}function za(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return za(t)})).join(",")+"]";var e=Ea.test(t.value),n=Ta.test(t.value),r=Ea.test(t.value.replace(Aa,""));if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(Ra[s])i+=Ra[s],Na[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=Ia(["ctrl","shift","alt","meta"].filter((function(t){return!c[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Fa).join("&&")+")return null;"}(a)),i&&(o+=i),"function($event){"+o+(e?"return "+t.value+".apply(null, arguments)":n?"return ("+t.value+").apply(null, arguments)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function Fa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Na[t],r=Pa[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var La={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:D},Ba=function(t){this.options=t,this.warn=t.warn||Er,this.transforms=Nr(t.modules,"transformCode"),this.dataGenFns=Nr(t.modules,"genData"),this.directives=C(C({},La),t.directives);var e=t.isReservedTag||$;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Va(t,e){var n=new Ba(e);return{render:"with(this){return "+(t?"script"===t.tag?"null":Wa(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Wa(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Ha(t,e);if(t.once&&!t.onceProcessed)return qa(t,e);if(t.for&&!t.forProcessed)return Ya(t,e);if(t.if&&!t.ifProcessed)return Ja(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Za(t,e),o="_t("+n+(r?",function(){return "+r+"}":""),i=t.attrs||t.dynamicAttrs?es((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=","+i);a&&(o+=(i?"":",null")+","+a);return o+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Za(e,n,!0);return"_c("+t+","+Ua(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Ua(t,e));var o=t.inlineTemplate?null:Za(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Va(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+es(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Xa(t){return 1===t.type&&("slot"===t.tag||t.children.some(Xa))}function Ga(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ja(t,e,Ga,"null");if(t.for&&!t.forProcessed)return Ya(t,e,Ga);var r="_empty_"===t.slotScope?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Za(t,e)||"undefined")+":undefined":Za(t,e)||"undefined":Wa(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function Za(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||Wa)(a,e)+s}var c=n?function(t,e){for(var n=0,r=0;r':'
',ss.innerHTML.indexOf(" ")>0}var fs=!!V&&us(!1),ps=!!V&&us(!0),ds=y((function(t){var e=nr(t);return e&&e.innerHTML})),hs=Cn.prototype.$mount;Cn.prototype.$mount=function(t,e){if((t=t&&nr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ds(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=ls(r,{outputSourceRange:!1,shouldDecodeNewlines:fs,shouldDecodeNewlinesForHref:ps,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return hs.call(this,t,e)},Cn.compile=ls;var vs=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function ms(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=ms(t[n],e)})),o}function gs(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function ys(t){return null!==t&&"object"==typeof t}var bs=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},ws={namespaced:{configurable:!0}};ws.namespaced.get=function(){return!!this._rawModule.namespaced},bs.prototype.addChild=function(t,e){this._children[t]=e},bs.prototype.removeChild=function(t){delete this._children[t]},bs.prototype.getChild=function(t){return this._children[t]},bs.prototype.hasChild=function(t){return t in this._children},bs.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},bs.prototype.forEachChild=function(t){gs(this._children,t)},bs.prototype.forEachGetter=function(t){this._rawModule.getters&&gs(this._rawModule.getters,t)},bs.prototype.forEachAction=function(t){this._rawModule.actions&&gs(this._rawModule.actions,t)},bs.prototype.forEachMutation=function(t){this._rawModule.mutations&&gs(this._rawModule.mutations,t)},Object.defineProperties(bs.prototype,ws);var xs,Ss=function(t){this.register([],t,!1)};function ks(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;ks(t.concat(r),e.getChild(r),n.modules[r])}}Ss.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},Ss.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},Ss.prototype.update=function(t){ks([],this.root,t)},Ss.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new bs(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&gs(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},Ss.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},Ss.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var _s=function(t){var e=this;void 0===t&&(t={}),!xs&&"undefined"!=typeof window&&window.Vue&&Es(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Ss(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new xs,this._makeLocalGettersCache=Object.create(null);var o=this,i=this.dispatch,a=this.commit;this.dispatch=function(t,e){return i.call(o,t,e)},this.commit=function(t,e,n){return a.call(o,t,e,n)},this.strict=r;var s=this._modules.root.state;$s(this,s,[],this._modules.root),Ds(this,s),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:xs.config.devtools)&&function(t){vs&&(t._devtoolHook=vs,vs.emit("vuex:init",t),vs.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){vs.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){vs.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},Os={state:{configurable:!0}};function Cs(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Ms(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;$s(t,n,[],t._modules.root,!0),Ds(t,n,e)}function Ds(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};gs(o,(function(e,n){i[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=xs.config.silent;xs.config.silent=!0,t._vm=new xs({data:{$$state:e},computed:i}),xs.config.silent=a,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),xs.nextTick((function(){return r.$destroy()})))}function $s(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!i&&!o){var s=Ts(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){xs.set(s,c,r.state)}))}var l=r.context=function(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return Ts(t.state,n)}}}),o}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,o=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var o,i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,r,o,l)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,l)})),r.forEachChild((function(r,i){$s(t,e,n.concat(i),r,o)}))}function Ts(t,e){return e.reduce((function(t,e){return t[e]}),t)}function As(t,e,n){return ys(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function Es(t){xs&&t===xs|| +/*! + * vuex v3.6.2 + * (c) 2021 Evan You + * @license MIT + */ +function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(xs=t)}Os.state.get=function(){return this._vm._data.$$state},Os.state.set=function(t){},_s.prototype.commit=function(t,e,n){var r=this,o=As(t,e,n),i=o.type,a=o.payload,s={type:i,payload:a},c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},_s.prototype.dispatch=function(t,e){var n=this,r=As(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(xy){}var c=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(xy){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(xy){}e(t)}))}))}},_s.prototype.subscribe=function(t,e){return Cs(t,this._subscribers,e)},_s.prototype.subscribeAction=function(t,e){return Cs("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},_s.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},_s.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},_s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),$s(this,this.state,t,this._modules.get(t),n.preserveState),Ds(this,this.state)},_s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=Ts(e.state,t.slice(0,-1));xs.delete(n,t[t.length-1])})),Ms(this)},_s.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},_s.prototype.hotUpdate=function(t){this._modules.update(t),Ms(this,!0)},_s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(_s.prototype,Os);var Ns=zs((function(t,e){var n={};return js(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=Fs(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),Ps=zs((function(t,e){var n={};return js(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=Fs(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),Is=zs((function(t,e){var n={};return js(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||Fs(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),Rs=zs((function(t,e){var n={};return js(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=Fs(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n}));function js(t){return function(t){return Array.isArray(t)||ys(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function zs(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function Fs(t,e,n){return t._modulesNamespaceMap[n]}function Ls(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(xy){t.log(e)}}function Bs(t){try{t.groupEnd()}catch(xy){t.log("—— log end ——")}}function Vs(){var t=new Date;return" @ "+Ws(t.getHours(),2)+":"+Ws(t.getMinutes(),2)+":"+Ws(t.getSeconds(),2)+"."+Ws(t.getMilliseconds(),3)}function Ws(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}var Hs={Store:_s,install:Es,version:"3.6.2",mapState:Ns,mapMutations:Ps,mapGetters:Is,mapActions:Rs,createNamespacedHelpers:function(t){return{mapState:Ns.bind(null,t),mapGetters:Is.bind(null,t),mapMutations:Ps.bind(null,t),mapActions:Rs.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var i=t.actionFilter;void 0===i&&(i=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var c=t.logActions;void 0===c&&(c=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var u=ms(t.state);void 0!==l&&(s&&t.subscribe((function(t,i){var a=ms(i);if(n(t,u,a)){var s=Vs(),c=o(t),f="mutation "+t.type+s;Ls(l,f,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),l.log("%c mutation","color: #03A9F4; font-weight: bold",c),l.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),Bs(l)}u=a})),c&&t.subscribeAction((function(t,n){if(i(t,n)){var r=Vs(),o=a(t),s="action "+t.type+r;Ls(l,s,e),l.log("%c action","color: #03A9F4; font-weight: bold",o),Bs(l)}})))}}};function qs(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}var Js,Ks,Ys="function"==typeof Map?new Map:(Js=[],Ks=[],{has:function(t){return Js.indexOf(t)>-1},get:function(t){return Ks[Js.indexOf(t)]},set:function(t,e){-1===Js.indexOf(t)&&(Js.push(t),Ks.push(e))},delete:function(t){var e=Js.indexOf(t);e>-1&&(Js.splice(e,1),Ks.splice(e,1))}}),Us=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(xy){Us=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function Xs(t){var e=Ys.get(t);e&&e.destroy()}function Gs(t){var e=Ys.get(t);e&&e.update()}var Zs=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((Zs=function(t){return t}).destroy=function(t){return t},Zs.update=function(t){return t}):((Zs=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Ys.has(t)){var e,n=null,r=null,o=null,i=function(){t.clientWidth!==r&&l()},a=function(e){window.removeEventListener("resize",i,!1),t.removeEventListener("input",l,!1),t.removeEventListener("keyup",l,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",l,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),Ys.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",l,!1),window.addEventListener("resize",i,!1),t.addEventListener("input",l,!1),t.addEventListener("autosize:update",l,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",Ys.set(t,{destroy:a,update:l}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),l()}function s(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function c(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function l(){c();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r=e?t:""+Array(e+1-r.length).join(n)+t},y={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()68?1900:2e3)},s=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(t.indexOf(r(o,0,e))>-1){n=o>12;break}}else n=t===(e?"pm":"PM");return n},f={A:[o,function(t){this.afternoon=u(t,!1)}],a:[o,function(t){this.afternoon=u(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[o,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[o,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,s("year")],Z:c,ZZ:c};function p(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var i=r&&r.toUpperCase();return n||o[r]||t[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),s=a.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var r=p(e)(t),o=r.year,i=r.month,a=r.day,s=r.hours,c=r.minutes,l=r.seconds,u=r.milliseconds,f=r.zone,d=new Date,h=a||(o||i?1:d.getDate()),v=o||d.getFullYear(),m=0;o&&!i||(m=i>0?i-1:d.getMonth());var g=s||0,y=c||0,b=l||0,w=u||0;return f?new Date(Date.UTC(v,m,h,g,y,b,w+60*f.offset*1e3)):n?new Date(Date.UTC(v,m,h,g,y,b,w)):new Date(v,m,h,g,y,b,w)}catch(x){return new Date("")}}(e,s,r),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),u&&e!=this.format(s)&&(this.$d=new Date("")),i={}}else if(s instanceof Array)for(var d=s.length,h=1;h<=d;h+=1){a[1]=s[h-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}h===d&&(this.$d=new Date(""))}else o.call(this,t)}}}(),ic={exports:{}},ac=ic.exports=function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(t){return new o({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var c=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&null===(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r)))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+c,t)).$offset=a,s.$x.$localOffset=c}else s=this.utc();return s};var u=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return p.call(this,t,e,n);var r=this.local(),o=i(t).local();return p.call(r,o,e,n)}}}();function sc(t){return(sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var cc={selector:"vue-portal-target-".concat(((t=21)=>{let e="",n=t;for(;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e})())},lc=function(t){return cc.selector=t},uc="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":sc(document)),fc=Cn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),pc=Cn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(cc.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(uc)return document.querySelector(this.selector)},insertTargetEl:function(){if(uc){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(uc){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new fc({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function dc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",pc),e.defaultSelector&&lc(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Cn&&Cn.use(dc);var hc={},vc={};function mc(t){return null==t}function gc(t){return null!=t}function yc(t,e){return e.tag===t.tag&&e.key===t.key}function bc(t){var e=t.tag;t.vm=new e({data:t.args})}function wc(t,e,n){var r,o,i={};for(r=e;r<=n;++r)gc(o=t[r].key)&&(i[o]=r);return i}function xc(t,e,n){for(;e<=n;++e)bc(t[e])}function Sc(t,e,n){for(;e<=n;++e){var r=t[e];gc(r)&&(r.vm.$destroy(),r.vm=null)}}function kc(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;ns?xc(e,a,u):a>u&&Sc(t,i,s)}(t,e):gc(e)?xc(e,0,e.length-1):gc(t)&&Sc(t,0,t.length-1)},vc.h=function(t,e,n){return{tag:t,key:e,args:n}};var _c={};function Oc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cc(t){return(Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(_c,"__esModule",{value:!0}),_c.pushParams=$c,_c.popParams=Tc,_c.withParams=function(t,e){if("object"===Cc(t)&&void 0!==e)return n=t,r=e,Ec((function(t){return function(){t(n);for(var e=arguments.length,o=new Array(e),i=0;i1?s:s.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var o=r.constructor;this._indirectWatcher=new o(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var i=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===i)return this._indirectWatcher.depend(),r.value;this._lastModel=i,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t.__isVuelidateAsyncVm?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t.__isVuelidateAsyncVm&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),d=i.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:o({},h,{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:o({},p,{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=c(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=c(v,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=c(m,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),i=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},o({},e))}}:{};return Object.defineProperties({},o({},e,i,{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n,r))},children:function(){var t=this;return r(this.nestedKeys.map((function(e){return w(t,e)}))).concat(r(this.ruleKeys.map((function(e){return x(t,e)})))).filter(Boolean)}})}),y=d.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),b=d.extend({computed:{keys:function(){var t=this.getModel();return u(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(f(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,n=this.validations,r=this.getModel(),i=o({},n);delete i.$trackBy;var a={};return this.keys.map((function(n){var o=t.tracker(n);return a.hasOwnProperty(o)?null:(a[o]=!0,(0,e.h)(d,o,{validations:i,prop:n,lazyParentModel:t.getModelLazy,model:r[n],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),w=function(t,n){if("$each"===n)return(0,e.h)(b,n,{validations:t.validations[n],lazyParentModel:t.lazyParentModel,prop:n,lazyModel:t.getModel,rootModel:t.rootModel});var r=t.validations[n];if(Array.isArray(r)){var o=t.rootModel,i=c(r,(function(t){return function(){return f(o,o.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,e.h)(y,n,{validations:i,lazyParentModel:s,prop:n,lazyModel:s,rootModel:o})}return(0,e.h)(d,n,{validations:r,lazyParentModel:t.getModel,prop:n,lazyModel:t.getModelKey,rootModel:t.rootModel})},x=function(t,n){return(0,e.h)(a,n,{rule:t.validations[n],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return g={VBase:i,Validation:d}},b=null;var w=function(t,n){var r=function(t){if(b)return b;for(var e=t.constructor;e.super;)e=e.super;return b=e,e}(t),o=y(r),i=o.Validation;return new(0,o.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(t):n;return[(0,e.h)(i,"$v",{validations:r,lazyParentModel:s,prop:"$v",model:t,rootModel:t})]}}})},x={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=w(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function S(t){t.mixin(x)}t.validationMixin=x;var k=S;t.default=k}(hc);var Nc=tc(hc);function Pc(t){this.content=t}Pc.prototype={constructor:Pc,find:function(t){for(var e=0;e>1}},Pc.from=function(t){if(t instanceof Pc)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Pc(e)};var Ic=Pc;function Rc(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=Rc(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function jc(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=t.child(--o),s=e.child(--i),c=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var l=0,u=Math.min(a.text.length,s.text.length);lt&&!1!==n(s,r+a,o,i)&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,t-l),Math.min(s.content.size,e-l),n,r+l)}a=c}},zc.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},zc.prototype.textBetween=function(t,e,n,r){var o="",i=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(o+=a.text.slice(Math.max(t,s)-s,e-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},zc.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(var o=0,i=0;it&&((ie)&&(a=a.isText?a.cut(Math.max(0,t-i),Math.min(a.text.length,e-i)):a.cut(Math.max(0,t-i-1),Math.min(a.content.size,e-i-1))),n.push(a),r+=a.nodeSize),i=s}return new zc(n,r)},zc.prototype.cutByIndex=function(t,e){return t==e?zc.empty:0==t&&e==this.content.length?this:new zc(this.content.slice(t,e))},zc.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new zc(r,o)},zc.prototype.addToStart=function(t){return new zc([t].concat(this.content),this.size+t.nodeSize)},zc.prototype.addToEnd=function(t){return new zc(this.content.concat(t),this.size+t.nodeSize)},zc.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;ethis.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?Bc(n+1,o):Bc(n,r);r=o}},zc.prototype.toString=function(){return"<"+this.toStringInner()+">"},zc.prototype.toStringInner=function(){return this.content.join(", ")},zc.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},zc.fromJSON=function(t,e){if(!e)return zc.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new zc(e.map(t.nodeFromJSON))},zc.fromArray=function(t){if(!t.length)return zc.empty;for(var e,n=0,r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e},Wc.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new Hc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Hc("Inconsistent open depths");return Xc(t,e,n,0)}function Xc(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0;o--)r=e.node(o).copy(zc.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return el(i,nl(t,s.start,s.end,e,r))}var c=t.parent,l=c.content;return el(c,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}return el(i,rl(t,e,r))}function Gc(t,e){if(!e.type.compatibleContent(t.type))throw new Hc("Cannot join "+e.type.name+" onto "+t.type.name)}function Zc(t,e,n){var r=t.node(n);return Gc(r,e.node(n)),r}function Qc(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function tl(t,e,n,r){var o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Qc(t.nodeAfter,r),i++));for(var s=i;so&&Zc(t,e,o+1),a=r.depth>o&&Zc(n,r,o+1),s=[];return tl(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(Gc(i,a),Qc(el(i,nl(t,e,n,r,o+1)),s)):(i&&Qc(el(i,rl(t,e,o+1)),s),tl(e,n,o,s),a&&Qc(el(a,rl(n,r,o+1)),s)),tl(r,null,o,s),new zc(s)}function rl(t,e,n){var r=[];(tl(null,t,n,r),t.depth>n)&&Qc(el(Zc(t,e,n+1),rl(t,e,n+1)),r);return tl(e,null,n,r),new zc(r)}Jc.size.get=function(){return this.content.size-this.openStart-this.openEnd},qc.prototype.insertAt=function(t,e){var n=Yc(this.content,t+this.openStart,e,null);return n&&new qc(n,this.openStart,this.openEnd)},qc.prototype.removeBetween=function(t,e){return new qc(Kc(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},qc.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},qc.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},qc.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},qc.fromJSON=function(t,e){if(!e)return qc.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new qc(zc.fromJSON(t,e.content),n,r)},qc.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new qc(t,n,r)},Object.defineProperties(qc.prototype,Jc),qc.empty=new qc(zc.empty,0,0);var ol=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},il={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};ol.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},il.parent.get=function(){return this.node(this.depth)},il.doc.get=function(){return this.node(0)},ol.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},ol.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},ol.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},ol.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},ol.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},ol.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},ol.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},il.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},il.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},il.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},ol.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},ol.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new ll(this,t,n)},ol.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},ol.prototype.max=function(t){return t.pos>this.pos?t:this},ol.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,o=e,i=t;;){var a=i.content.findIndex(o),s=a.index,c=a.offset,l=o-c;if(n.push(i,s,r+c),!l)break;if((i=i.child(s)).isText)break;o=l-1,r+=c+1}return new ol(e,n,o)},ol.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},dl.isBlock.get=function(){return this.type.isBlock},dl.isTextblock.get=function(){return this.type.isTextblock},dl.inlineContent.get=function(){return this.type.inlineContent},dl.isInline.get=function(){return this.type.isInline},dl.isText.get=function(){return this.type.isText},dl.isLeaf.get=function(){return this.type.isLeaf},dl.isAtom.get=function(){return this.type.isAtom},pl.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),vl(this.marks,t)},pl.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},pl.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=zc.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var s=r;s=0;n--)e=t[n].type.name+"("+e+")";return e}var ml=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},gl={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};ml.parse=function(t,e){var n=new yl(t,e);if(null==n.next)return ml.empty;var r=wl(n);n.next&&n.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return n(Cl(t,0));function n(r){var o=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];Cl(t,r).forEach((function(t){a||o.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var i=e[r.join(",")]=new ml(r.indexOf(t.length-1)>-1),a=0;a>1},ml.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},ml.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(ml.prototype,gl),ml.empty=new ml(!0);var yl=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},bl={next:{configurable:!0}};function wl(t){var e=[];do{e.push(xl(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function xl(t){var e=[];do{e.push(Sl(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Sl(t){for(var e=function(t){if(t.eat("(")){var e=wl(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(e)>-1&&o.push(a)}0==o.length&&t.err("No node type or group '"+e+"' found");return o}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=_l(t,e)}return e}function kl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function _l(t,e){var n=kl(t),r=n;return t.eat(",")&&(r="}"!=t.next?kl(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ol(t,e){return e-t}function Cl(t,e){var n=[];return function e(r){var o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(var i=0;i-1},Tl.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var Il=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=Ic.from(t.nodes),this.spec.marks=Ic.from(t.marks),this.nodes=Tl.compile(this.spec.nodes,this),this.marks=Pl.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=ml.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?Rl(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var c=this.marks[s],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:Rl(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Rl(t,e){for(var n=[],r=0;r-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}Il.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof Tl))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},Il.prototype.text=function(t,e){var n=this.nodes.text;return new hl(n,n.defaultAttrs,t,Wc.setFrom(e))},Il.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},Il.prototype.nodeFromJSON=function(t){return pl.fromJSON(this,t)},Il.prototype.markFromJSON=function(t){return Wc.fromJSON(this,t)},Il.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var jl=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};jl.prototype.parse=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},jl.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!0);return n.addAll(t,null,e.from,e.to),qc.maxOpen(n.finish())},jl.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var a=i.getAttrs(e);if(!1===a)continue;i.attrs=a}return i}}},jl.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Vl.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=0;r--){var o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},Wl.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Wl.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Hl.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},Wl.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(t,s){for(;t>=0;t--){var c=n[t];if(""==c){if(t==n.length-1||0==t)continue;for(;s>=i;s--)if(a(t-1,s))return!0;return!1}var l=s>0||0==s&&o?e.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;s--}return!0};return a(n.length-1,this.open)},Wl.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Wl.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var o=r.popFromStashMark(t);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(Wl.prototype,Hl);var Yl=function(t,e){this.nodes=t||{},this.marks=e||{}};function Ul(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Xl(t){return t.document||window.document}Yl.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=Xl(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);for(var n=0,a=0;n=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},Yl.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&Yl.renderSpec(Xl(n),r(t,e))},Yl.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],c=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var l in c=2,s)if(null!=s[l]){var u=l.indexOf(" ");u>0?a.setAttributeNS(l.slice(0,u),l.slice(u+1),s[l]):a.setAttribute(l,s[l])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=Yl.renderSpec(t,p,n),h=d.dom,v=d.contentDOM;if(a.appendChild(h),v){if(i)throw new RangeError("Multiple content holes");i=v}}return{dom:a,contentDOM:i}},Yl.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Yl(this.nodesFromSchema(t),this.marksFromSchema(t)))},Yl.nodesFromSchema=function(t){var e=Ul(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Yl.marksFromSchema=function(t){return Ul(t.marks)};var Gl=Math.pow(2,16);function Zl(t){return 65535&t}var Ql=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},tu=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};tu.prototype.recover=function(t){var e=0,n=Zl(t);if(!this.inverted)for(var r=0;rt)break;var c=this.ranges[a+o],l=this.ranges[a+i],u=s+c;if(t<=u){var f=s+r+((c?t==s?-1:t==u?1:e:e)<0?0:l);if(n)return f;var p=t==(e<0?s:u)?null:a/3+(t-s)*Gl;return new Ql(f,e<0?t!=s:t!=u,p)}r+=l-c}return n?t+r:new Ql(t+r)},tu.prototype.touches=function(t,e){for(var n=0,r=Zl(e),o=this.inverted?2:1,i=this.inverted?1:2,a=0;at)break;var c=this.ranges[a+o];if(t<=s+c&&a==3*r)return!0;n+=this.ranges[a+i]-c}return!1},tu.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},eu.prototype.invert=function(){var t=new eu;return t.appendMappingInverted(this),t},eu.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;no&&a0},ru.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(ru.prototype,ou);var au=Object.create(null),su=function(){};su.prototype.apply=function(t){return iu()},su.prototype.getMap=function(){return tu.empty},su.prototype.invert=function(t){return iu()},su.prototype.map=function(t){return iu()},su.prototype.merge=function(t){return null},su.prototype.toJSON=function(){return iu()},su.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=au[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},su.jsonID=function(t,e){if(t in au)throw new RangeError("Duplicate use of step JSON ID "+t);return au[t]=e,e.prototype.jsonID=t,e};var cu=function(t,e){this.doc=t,this.failed=e};cu.ok=function(t){return new cu(t,null)},cu.fail=function(t){return new cu(null,t)},cu.fromReplace=function(t,e,n,r){try{return cu.ok(t.replace(e,n,r))}catch(xy){if(xy instanceof Hc)return cu.fail(xy.message);throw xy}};var lu=function(t){function e(e,n,r,o){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&fu(t,this.from,this.to)?cu.fail("Structure replace would overwrite content"):cu.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new tu([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?qc.empty:new qc(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?qc.empty:new qc(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,qc.fromJSON(t,n.slice),!!n.structure)},e}(su);su.jsonID("replace",lu);var uu=function(t){function e(e,n,r,o,i,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(fu(t,this.from,this.gapFrom)||fu(t,this.gapTo,this.to)))return cu.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return cu.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?cu.fromReplace(t,this.from,this.to,n):cu.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new tu([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,qc.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(su);function fu(t,e,n){for(var r=t.resolve(e),o=n-e,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function pu(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function du(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(ni;s--,c--){var l=o.node(s),u=o.index(s);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(u,l.childCount),p=r&&r[c]||l;if(p!=l&&(f=f.replaceChild(0,p.type.create(p.attrs))),!l.canReplace(u+1,l.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)}function gu(t,e){var n,r,o=t.resolve(e),i=o.index();return n=o.nodeBefore,r=o.nodeAfter,n&&r&&!n.isLeaf&&n.canAppend(r)&&o.parent.canReplace(i,i+1)}function yu(t,e,n){for(var r=[],o=0;oe;f--)p||n.index(f)>0?(p=!0,l=zc.from(n.node(f).copy(l)),u++):s--;for(var d=zc.empty,h=0,v=o,m=!1;v>e;v--)m||r.after(v+1)=0;r--)n=zc.from(e[r].type.create(e[r].attrs,n));var o=t.start,i=t.end;return this.step(new uu(o,i,o,i,new qc(n,0,0),e.length,!0))},ru.prototype.setBlockType=function(t,e,n,r){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(i).map(e),n)){o.clearIncompatible(o.mapping.slice(i).map(e,1),n);var a=o.mapping.slice(i),s=a.map(e,1),c=a.map(e+t.nodeSize,1);return o.step(new uu(s,c,s+1,c-1,new qc(zc.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},ru.prototype.setNodeMarkup=function(t,e,n,r){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var i=e.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,i);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new uu(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new qc(zc.from(i),0,0),1,!0))},ru.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),o=zc.empty,i=zc.empty,a=r.depth,s=r.depth-e,c=e-1;a>s;a--,c--){o=zc.from(r.node(a).copy(o));var l=n&&n[c];i=zc.from(l?l.type.create(l.attrs,i):r.node(a).copy(i))}return this.step(new lu(t,t,new qc(o.append(i),e,e),!0))},ru.prototype.join=function(t,e){void 0===e&&(e=1);var n=new lu(t-e,t+e,qc.empty,!0);return this.step(n)};var bu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new qc(yu(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new wu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);su.jsonID("addMark",bu);var wu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new qc(yu(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new bu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);function xu(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}su.jsonID("removeMark",wu),ru.prototype.addMark=function(t,e,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(c,t),p=Math.min(c+r.nodeSize,e),d=n.addToSet(u),h=0;h=0;p--)this.step(o[p]);return this},ru.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=qc.empty);var r=function(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=qc.empty),e==n&&!r.size)return null;var o=t.resolve(e),i=t.resolve(n);return xu(o,i,r)?new lu(e,n,r):new Su(o,i,r).fit()}(this.doc,t,e,n);return r&&this.step(r),this},ru.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new qc(zc.from(n),0,0))},ru.prototype.delete=function(t,e){return this.replace(t,e,qc.empty)},ru.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var Su=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}this.placed=zc.empty;for(var i=t.depth;i>0;i--)this.placed=zc.from(t.node(i).copy(this.placed))},ku={depth:{configurable:!0}};function _u(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(_u(t.firstChild.content,e-1,n)))}function Ou(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ou(t.lastChild.content,e-1,n)))}function Cu(t,e){for(var n=0;n1&&(r=r.replaceChild(0,Mu(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(zc.empty,!0)))),t.copy(r)}function Du(t,e,n,r,o){var i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(t,e,n){for(var r=n;rr){var a=o.contentMatchAt(0),s=a.fillBefore(t).append(t);t=s.append(a.matchFragment(s).fillBefore(zc.empty,!0))}return t}function Tu(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}ku.depth.get=function(){return this.frontier.length-1},Su.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var c=new qc(i,a,s);return e>-1?new uu(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new lu(r.pos,o.pos,c):void 0},Su.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=Cu(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,c=void 0,l=void 0;if(1==t&&(r?s.matchType(r.type)||(l=s.fillBefore(zc.from(r),!1)):a.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:l};if(2==t&&r&&(c=s.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:c};if(n&&s.matchType(n.type))break}},Su.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Cu(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new qc(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)},Su.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Cu(e,n);if(o.childCount<=1&&n>0){var i=e.size-n<=n+o.size;this.unplaced=new qc(_u(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new qc(_u(e,n,1),n,r)},Su.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,o=t.inject,i=t.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a1||0==l||g.content.size)&&(d=y,f.push(Mu(g.mark(h.allowedMarks(g.marks)),1==u?l:0,u==c.childCount?m:-1)))}var b=u==c.childCount;b||(m=-1),this.placed=Ou(this.placed,n,zc.from(f)),this.frontier[n].match=d,b&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,x=c;w1&&r==this.$to.end(--n);)++r;return r},Su.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e=0;s--){var c=this.frontier[s],l=c.match,u=Du(t,s,c.type,l,!0);if(!u||u.childCount)continue t}return{depth:e,fit:a,move:i?t.doc.resolve(t.after(e+1)):t}}}},Su.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Ou(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},Su.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Ou(this.placed,this.depth,zc.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},Su.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(zc.empty,!0);t.childCount&&(this.placed=Ou(this.placed,this.frontier.length,t))},Object.defineProperties(Su.prototype,ku),ru.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),o=this.doc.resolve(e);if(xu(r,o,n))return this.step(new lu(t,e,n));var i=Tu(r,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var a=-(r.depth+1);i.unshift(a);for(var s=r.depth,c=r.pos-1;s>0;s--,c--){var l=r.node(s).type.spec;if(l.defining||l.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==c&&i.splice(1,0,-s)}for(var u=i.indexOf(a),f=[],p=n.openStart,d=n.content,h=0;;h++){var v=d.firstChild;if(f.push(v),h==n.openStart)break;d=v.content}p>0&&f[p-1].type.spec.defining&&r.node(u).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&r.node(u).type!=f[p-2].type&&(p-=2);for(var m=n.openStart;m>=0;m--){var g=(m+p+1)%(n.openStart+1),y=f[g];if(y)for(var b=0;b=0&&(this.replace(t,e,n),!(this.steps.length>_));O--){var C=i[O];C<0||(t=r.before(C),e=o.after(C))}return this},ru.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=function(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(t-n.start(c)==n.depth-c&&e>n.end(c)&&r.end(c)-e!=r.depth-c)return this.delete(n.before(c),e);return this.delete(t,e)};var Au=Object.create(null),Eu=function(t,e,n){this.ranges=n||[new Pu(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Nu={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Nu.anchor.get=function(){return this.$anchor.pos},Nu.head.get=function(){return this.$head.pos},Nu.from.get=function(){return this.$from.pos},Nu.to.get=function(){return this.$to.pos},Nu.$from.get=function(){return this.ranges[0].$from},Nu.$to.get=function(){return this.ranges[0].$to},Nu.empty.get=function(){for(var t=this.ranges,e=0;e=0;o--){var i=e<0?Bu(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):Bu(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},Eu.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Fu(t.node(0))},Eu.atStart=function(t){return Bu(t,t,0,0,1)||new Fu(t)},Eu.atEnd=function(t){return Bu(t,t,t.content.size,t.childCount,-1)||new Fu(t)},Eu.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Au[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},Eu.jsonID=function(t,e){if(t in Au)throw new RangeError("Duplicate use of selection JSON ID "+t);return Au[t]=e,e.prototype.jsonID=t,e},Eu.prototype.getBookmark=function(){return Iu.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Eu.prototype,Nu),Eu.prototype.visible=!0;var Pu=function(t,e){this.$from=t,this.$to=e},Iu=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=n.resolve(r.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,n){if(void 0===n&&(n=qc.empty),t.prototype.replace.call(this,e,n),n==qc.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Ru(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,o,!0)||t.findFrom(r,-o,!0);if(!a)return t.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(t.findFrom(n,-o,!0)||t.findFrom(n,o,!0)).$anchor).pos0?0:1);o>0?a=0;a+=o){var s=e.child(a);if(s.isAtom){if(!i&&ju.isSelectable(s))return ju.create(t,n-(o<0?s.nodeSize:0))}else{var c=Bu(t,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}}function Vu(t,e,n){var r=t.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return Wc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Wc.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=n==e?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(Eu.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(ru);function Hu(t,e){return e&&t?t.bind(e):t}var qu=function(t,e,n){this.name=t,this.init=Hu(e.init,n),this.apply=Hu(e.apply,n)},Ju=[new qu("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new qu("selection",{init:function(t,e){return t.selection||Eu.atStart(e.doc)},apply:function(t){return t.selection}}),new qu("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new qu("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Ku=function(t,e){var n=this;this.schema=t,this.fields=Ju.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new qu(t.key,t.spec.state,t))}))},Yu=function(t){this.config=t},Uu={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Uu.schema.get=function(){return this.config.schema},Uu.plugins.get=function(){return this.config.plugins},Yu.prototype.apply=function(t){return this.applyTransaction(t).state},Yu.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&Xu.splice(e,1)},Object.defineProperties(Yu.prototype,Uu);var Xu=[];function Gu(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=Gu(o,e,{})),n[r]=o}return n}var Zu=function(t){this.props={},t.props&&Gu(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:tf("plugin")};Zu.prototype.getState=function(t){return t[this.key]};var Qu=Object.create(null);function tf(t){return t in Qu?t+"$"+ ++Qu[t]:(Qu[t]=0,t+"$")}var ef=function(t){void 0===t&&(t="key"),this.key=tf(t)};ef.prototype.get=function(t){return t.config.pluginsByKey[this.key]},ef.prototype.getState=function(t){return t[this.key]};var nf={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var rf=/Edge\/(\d+)/.exec(navigator.userAgent),of=/MSIE \d/.test(navigator.userAgent),af=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);nf.mac=/Mac/.test(navigator.platform);var sf=nf.ie=!!(of||af||rf);nf.ie_version=of?document.documentMode||6:af?+af[1]:rf?+rf[1]:null,nf.gecko=!sf&&/gecko\/(\d+)/i.test(navigator.userAgent),nf.gecko_version=nf.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var cf=!sf&&/Chrome\/(\d+)/.exec(navigator.userAgent);nf.chrome=!!cf,nf.chrome_version=cf&&+cf[1],nf.safari=!sf&&/Apple Computer/.test(navigator.vendor),nf.ios=nf.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),nf.android=/Android \d/.test(navigator.userAgent),nf.webkit="webkitFontSmoothing"in document.documentElement.style,nf.webkit_version=nf.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var lf=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},uf=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},ff=null,pf=function(t,e,n){var r=ff||(ff=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},df=function(t,e,n,r){return n&&(vf(t,e,n,r,-1)||vf(t,e,n,r,1))},hf=/^(img|br|input|textarea|hr)$/i;function vf(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:mf(t))){var i=t.parentNode;if(1!=i.nodeType||gf(t)||hf.test(t.nodeName)||"false"==t.contentEditable)return!1;e=lf(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?mf(t):0}}}function mf(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function gf(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var yf=function(t){var e=t.isCollapsed;return e&&nf.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function bf(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function wf(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function xf(t,e){return"number"==typeof t?t:t[e]}function Sf(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function kf(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,a=n||t.dom;a;a=uf(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,c=s?wf(i):Sf(a),l=0,u=0;if(e.topc.bottom-xf(r,"bottom")&&(u=e.bottom-c.bottom+xf(o,"bottom")),e.leftc.right-xf(r,"right")&&(l=e.right-c.right+xf(o,"right")),l||u)if(s)i.defaultView.scrollBy(l,u);else{var f=a.scrollLeft,p=a.scrollTop;u&&(a.scrollTop+=u),l&&(a.scrollLeft+=l);var d=a.scrollLeft-f,h=a.scrollTop-p;e={left:e.left-d,top:e.top-h,right:e.right-d,bottom:e.bottom-h}}if(s)break}}function _f(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=uf(t));return e}function Of(t,e){for(var n=0;n=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var d=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:Mf(n,r)}function Df(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function $f(t,e,n){var r=t.childNodes.length;if(r&&n.tope.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(t,e,n,r){for(var o=-1,i=e;i!=t.dom;){var a=t.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:t.docView.posFromDOM(e,n)}(t,o,i,e))}null==l&&(l=function(t,e,n){var r=Mf(e,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(o,i,a)}(t,u,e));var v=t.docView.nearestDesc(u,!0);return{pos:l,inside:v?v.posAtStart-v.border:-1}}function Af(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var Ef=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Nf(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),o=r.node,i=r.offset,a=nf.webkit||nf.gecko;if(3==o.nodeType){if(!a||!Ef.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(s--,l=1):n<0?s--:c++,Pf(Af(pf(o,s,c),l),l<0)}var u=Af(pf(o,i,i),n);if(nf.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0)}if(i&&(n<0||i==mf(o))){var v=o.childNodes[i-1],m=3==v.nodeType?pf(v,mf(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return Pf(Af(m,1),!1)}if(i=0)}function Pf(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function If(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Rf(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}var jf=/[\u0590-\u08ac]/;var zf=null,Ff=null,Lf=!1;function Bf(t,e,n){return zf==e&&Ff==n?Lf:(zf=e,Ff=n,Lf="up"==n||"down"==n?function(t,e,n){var r=e.selection,o="up"==n?r.$from:r.$to;return Rf(t,e,(function(){for(var e=t.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var i=Nf(t,o.pos,1),a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=pf(a,0,a.nodeValue.length).getClientRects()}for(var c=0;cl.top+1&&("up"==n?i.top-l.top>2*(l.bottom-i.top):l.bottom-i.bottom>2*(i.bottom-l.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){var r=e.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=t.root.getSelection();return jf.test(r.parent.textContent)&&s.modify?Rf(t,e,(function(){var e=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var c=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(e),null!=a&&(s.caretBidiLevel=a),c})):"left"==n||"backward"==n?i:a}(t,e,n))}var Vf=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},Wf={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Vf.prototype.matchesWidget=function(){return!1},Vf.prototype.matchesMark=function(){return!1},Vf.prototype.matchesNode=function(){return!1},Vf.prototype.matchesHack=function(t){return!1},Vf.prototype.parseRule=function(){return null},Vf.prototype.stopEvent=function(){return!1},Wf.size.get=function(){for(var t=0,e=0;elf(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){s=!1;break}if(c.parentNode.firstChild!=c)break}if(null==s&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){s=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Vf.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;n=!1}}},Vf.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},Vf.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1},Vf.prototype.descAt=function(t){for(var e=0,n=0;et||i instanceof Gf){r=t-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof qf&&s.widget.type.side>=0;n--);if(e<=0){for(var c,l=!0;(c=n?this.children[n-1]:null)&&c.dom.parentNode!=this.contentDOM;n--,l=!1);return c&&e&&l&&!c.border&&!c.domAtom?c.domFromPos(c.size,e):{node:this.contentDOM,offset:c?lf(c.dom)+1:0}}for(var u,f=!0;(u=n=l&&e<=c-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,l);t=i;for(var u=a;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=lf(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(var p=a+1;ps&&ie){var S=u;u=f,f=S}var k=document.createRange();k.setEnd(f.node,f.offset),k.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(k)}}},Vf.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},Wf.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Vf.prototype.markDirty=function(t,e){for(var n=0,r=0;r=n:tn){var a=n+o.border,s=i-o.border;if(t>=a&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=a||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-a):o.dirty=3);o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM?2:3}n=i}this.dirty=2},Vf.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty0&&(i=up(i,0,t,r));for(var s=0;s-1?i:null,s=i&&i.pos<0,c=new cp(this,a&&a.node);!function(t,e,n,r){var o=e.locals(t),i=0;if(0==o.length){for(var a=0;ai;)l.push(o[c++]);var y=i+v.nodeSize;if(v.isText){var b=y;c=0&&!a&&c.syncToMarks(i==n.node.childCount?Wc.none:n.node.child(i).marks,r,t),c.placeWidget(e,t,o)}),(function(e,n,a,l){var u;c.syncToMarks(e.marks,r,t),c.findNodeMatch(e,n,a,l)||s&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(e,n,a,u,t)||c.updateNextNode(e,n,a,t,l)||c.addNode(e,n,a,t,o),o+=e.nodeSize})),c.syncToMarks(Hf,r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(a&&this.protectLocalComposition(t,a),Qf(this.contentDOM,this.children,t),nf.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var n=t.state.selection,r=n.from,o=n.to;if(!(!(t.state.selection instanceof Iu)||re+this.node.content.size)){var i=t.root.getSelection(),a=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=mf(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n){var u=c.lastIndexOf(e,r-s);if(u>=0&&u+e.length+s>=n)return s+u}}}return-1}(this.node.content,s,r-e,o-e);return c<0?null:{node:a,pos:c,text:s}}return{node:a,pos:-1}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new Jf(this,i,n,o);t.compositionNodes.push(a),this.children=up(this.children,r,r+o.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!ap(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=rp(this.dom,this.nodeDOM,np(this.outerDeco,this.node,e),np(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(Vf);function Uf(t,e,n,r,o){return ip(r,e,t),new Yf(null,t,e,n,r,r,r,o,0)}var Xf=function(t){function e(e,n,r,o,i,a,s){t.call(this,e,n,r,o,i,null,a,s)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e.prototype.markDirty=function(e,n){t.prototype.markDirty.call(this,e,n),this.dom==this.nodeDOM||0!=e&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(Yf),Gf=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,n),e}(Vf),Zf=function(t){function e(e,n,r,o,i,a,s,c,l,u){t.call(this,e,n,r,o,i,a,s,l,u),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(Yf);function Qf(t,e,n){for(var r=t.firstChild,o=!1,i=0;i0&&r>0;r--){var i=e[r-1],a=i.node;if(a){if(a!=t.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(t.node.content,t.children)};function lp(t,e){return t.type.side-e.type.side}function up(t,e,n,r,o){for(var i=[],a=0,s=0;a=n||u<=e?i.push(c):(ln&&i.push(c.slice(n-l,c.size,r)))}return i}function fp(t,e){var n=t.root.getSelection(),r=t.state.doc;if(!n.focusNode)return null;var o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,c,l=r.resolve(a);if(yf(n)){for(s=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&ju.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,n){for(var r=0==e,o=e==mf(t);r||o;){if(t==n)return!0;var i=lf(t);if(!(t=t.parentNode))return!1;r=r&&0==i,o=o&&i==mf(t)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;c=new ju(a==u?l:r.resolve(u))}}else{var f=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(f<0)return null;s=r.resolve(f)}c||(c=wp(t,s,l,"pointer"==e||t.state.selection.head>1,i=Math.min(o,t.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=Kf.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},cp.prototype.findNodeMatch=function(t,e,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var a=this.index;a0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return a&&Eu.findFrom(a,e)}function kp(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _p(t,e,n){var r=t.state.selection;if(!(r instanceof Iu)){if(r instanceof ju&&r.node.isInline)return kp(t,new Iu(e>0?r.$to:r.$from));var o=Sp(t.state,e);return!!o&&kp(t,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=Sp(t.state,e);return!!(i&&i instanceof ju)&&kp(t,i)}if(!(nf.mac&&n.indexOf("m")>-1)){var a,s=r.$head,c=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!c||c.isText)return!1;var l=e<0?s.pos-c.nodeSize:s.pos;return!!(c.isAtom||(a=t.docView.descAt(l))&&!a.contentDOM)&&(ju.isSelectable(c)?kp(t,new ju(e<0?t.state.doc.resolve(s.pos-c.nodeSize):s)):!!nf.webkit&&kp(t,new Iu(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function Op(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Cp(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Mp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,a=!1;for(nf.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Cp(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if($p(n))break;for(var c=n.previousSibling;c&&Cp(c);)o=n.parentNode,i=lf(c),c=c.previousSibling;if(c)r=Op(n=c);else{if((n=n.parentNode)==t.dom)break;r=0}}a?Tp(t,e,n,r):o&&Tp(t,e,o,i)}}function Dp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,a=Op(n);;)if(r-1)return!1;if(nf.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=Sp(t.state,e);if(a&&a instanceof ju)return kp(t,a)}if(!o.parent.inlineContent){var s=e<0?o:i,c=r instanceof Fu?Eu.near(s,e):Eu.findFrom(s,e);return!!c&&kp(t,c)}return!1}function Ep(t,e){if(!(t.state.selection instanceof Iu))return!0;var n=t.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=t.state.tr;return e<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),t.dispatch(s),!0}return!1}function Np(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Pp(t,e){var n=e.keyCode,r=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||nf.mac&&72==n&&"c"==r?Ep(t,-1)||Mp(t):46==n||nf.mac&&68==n&&"c"==r?Ep(t,1)||Dp(t):13==n||27==n||(37==n?_p(t,-1,r)||Mp(t):39==n?_p(t,1,r)||Dp(t):38==n?Ap(t,-1,r)||Mp(t):40==n?function(t){if(nf.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Np(t,o,!0),setTimeout((function(){return Np(t,o,!1)}),20)}}}(t)||Ap(t,1,r)||Dp(t):r==(nf.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ip(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(nf.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||nf.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function Rp(t,e,n,r,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=fp(t,i);if(a&&!t.state.selection.eq(a)){var s=t.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),t.dispatch(s)}}else{var c=t.state.doc.resolve(e),l=c.sharedDepth(n);e=c.before(l+1),n=t.state.doc.resolve(n).after(l+1);var u=t.state.selection,f=function(t,e,n){var r=t.docView.parseRange(e,n),o=r.node,i=r.fromOffset,a=r.toOffset,s=r.from,c=r.to,l=t.root.getSelection(),u=null,f=l.anchorNode;if(f&&t.dom.contains(1==f.nodeType?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],yf(l)||u.push({node:l.focusNode,offset:l.focusOffset})),nf.chrome&&8===t.lastKeyCode)for(var p=a;p>i;p--){var d=o.childNodes[p-1],h=d.pmViewDesc;if("BR"==d.nodeName&&!h){a=p;break}if(!h||h.size)break}var v=t.state.doc,m=t.someProp("domParser")||jl.fromSchema(t.state.schema),g=v.resolve(s),y=null,b=m.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:a,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:u,ruleFromNode:Ip,context:g});if(u&&null!=u[0].pos){var w=u[0].pos,x=u[1]&&u[1].pos;null==x&&(x=w),y={anchor:w+s,head:x+s}}return{doc:b,sel:y,from:s,to:c}}(t,e,n);if(nf.chrome&&t.cursorWrapper&&f.sel&&f.sel.anchor==t.cursorWrapper.deco.from){var p=t.cursorWrapper.deco.type.toDOM.nextSibling,d=p&&p.nodeValue?p.nodeValue.length:1;f.sel={anchor:f.sel.anchor+d,head:f.sel.anchor+d}}var h,v,m=t.state.doc,g=m.slice(f.from,f.to);8===t.lastKeyCode&&Date.now()-100=s?i-r:0)+(c-s),s=i}else if(c=c?i-r:0)+(s-c),c=i}return{start:i,endA:s,endB:c}}(g.content,f.doc.content,f.from,h,v);if(!y){if(!(r&&u instanceof Iu&&!u.empty&&u.$head.sameParent(u.$anchor))||t.composing||f.sel&&f.sel.anchor!=f.sel.head){if((nf.ios&&t.lastIOSEnter>Date.now()-225||nf.android)&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,bf(13,"Enter"))})))return void(t.lastIOSEnter=0);if(f.sel){var b=jp(t,t.state.doc,f.sel);b&&!b.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(b))}return}y={start:u.from,endA:u.to,endB:u.to}}t.domChangeCount++,t.state.selection.fromt.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),nf.ie&&nf.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>f.from&&"  "==f.doc.textBetween(y.start-f.from-1,y.start-f.from+1)&&(y.start--,y.endA--,y.endB--);var w,x=f.doc.resolveNoCache(y.start-f.from),S=f.doc.resolveNoCache(y.endB-f.from),k=x.sameParent(S)&&x.parent.inlineContent;if((nf.ios&&t.lastIOSEnter>Date.now()-225&&(!k||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!k&&x.posy.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||zp(r,!0,!1)n||zp(a,!0,!1)e.content.size?null:wp(t,e.resolve(n.anchor),e.resolve(n.head))}function zp(t,e,n){for(var r=t.depth,o=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n)for(var i=t.node(r).maybeChild(t.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Fp(t,e){for(var n=[],r=e.content,o=e.openStart,i=e.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=t.someProp("clipboardSerializer")||Yl.fromSchema(t.state.schema),c=Kp(),l=c.createElement("div");l.appendChild(s.serializeFragment(r,{document:c}));for(var u,f=l.firstChild;f&&1==f.nodeType&&(u=qp[f.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var d=c.createElement(u[p]);l.firstChild;)d.appendChild(l.firstChild);l.appendChild(d),"tbody"!=u[p]&&(o++,i++)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function Lp(t,e,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!e)return null;var c=e&&(r||s||!n);if(c){if(t.someProp("transformPastedText",(function(t){e=t(e,s||r)})),s)return new qc(zc.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0);var l=t.someProp("clipboardTextParser",(function(t){return t(e,o,r)}));if(l)a=l;else{var u=o.marks(),f=t.state.schema,p=Yl.fromSchema(f);i=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){i.appendChild(document.createElement("p")).appendChild(p.serializeNode(f.text(t,u)))}))}}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),i=function(t){var e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Kp().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);(n=o&&qp[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""));if(r.innerHTML=t,n)for(var i=0;i=0;s-=2){var c=r.nodes[n[s]];if(!c||c.hasRequiredAttrs())break;o=zc.from(c.create(n[s+1],o)),i++,a++}return new qc(o,i,a)}(function(t,e,n){e=0;r--){var o=n(r);if(o)return o.v}return t}(a.content,o),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function Bp(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,zc.from(t));return t}function Vp(t,e,n,r,o){if(o=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,t.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(zc.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}var qp={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Jp=null;function Kp(){return Jp||(Jp=document.implementation.createHTMLDocument("title"))}var Yp={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Up=nf.ie&&nf.ie_version<=11,Xp=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Xp.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Xp.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var Gp=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;et.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Xp,Up&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Gp.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},Gp.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Gp.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Yp),Up&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Gp.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&xp(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s1){var l=a.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var u=l[0],f=l[1];u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(Zp)return;Zp=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||dp(this.view),this.currentSelection.set(e))}},Gp.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(var r=0;ri.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var c=a(s);if(c)return c.v}return!1}function ad(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function sd(t,e,n,r,o){return id(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?function(t,e){if(-1==e)return!1;var n,r,o=t.state.selection;o instanceof ju&&(n=o.node);for(var i=t.state.doc.resolve(e),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(ju.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(ad(t,ju.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&ju.isSelectable(r))&&(ad(t,new ju(n),"pointer"),!0)}(t,n))}function cd(t,e,n,r){return id(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function ld(t,e,n,r){return id(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||function(t,e,n){if(0!=n.button)return!1;var r=t.state.doc;if(-1==e)return!!r.inlineContent&&(ad(t,Iu.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(e),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ad(t,Iu.create(r,s+1,s+1+a.content.size),"pointer");else{if(!ju.isSelectable(a))continue;ad(t,ju.create(r,s),"pointer")}return!0}}(t,n,r)}function ud(t){return gd(t)}td.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!dd(t,e))if(229!=e.keyCode&&t.domObserver.forceFlush(),t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!nf.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Pp(t,e)?e.preventDefault():ed(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,bf(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},td.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},td.keypress=function(t,e){if(!(dd(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||nf.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof Iu&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,r)}))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var fd=nf.mac?"metaKey":"ctrlKey";Qp.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=ud(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(e,t.lastClick)&&!e[fd]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(od(e));i&&("singleClick"==o?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new pd(t,i,e,n)):("doubleClick"==o?cd:ld)(t,i.pos,i.inside,e)?e.preventDefault():ed(t,"pointer"))};var pd=function(t,e,n,r){var o,i,a=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=r,this.selectNode=n[fd],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{var s=t.state.doc.resolve(e.pos);o=s.parent,i=s.depth?s.before():0}this.mightDrag=null;var c=r?null:n.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var u=t.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||u instanceof ju&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&nf.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){a.view.mouseDown==a&&a.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ed(t,"pointer")};function dd(t,e){return!!t.composing||!!(nf.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}pd.prototype.done=function(){var t=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return dp(t.view)})),this.view.mouseDown=null},pd.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(od(t))),this.allowDefault||!e?ed(this.view,"pointer"):sd(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||nf.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||nf.chrome&&!(this.view.state.selection instanceof Iu)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ad(this.view,Eu.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):ed(this.view,"pointer")}},pd.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),ed(this.view,"pointer"),0==t.buttons&&this.done()},Qp.touchdown=function(t){ud(t),ed(t,"pointer")},Qp.contextmenu=function(t){return ud(t)};var hd=nf.android?5e3:-1;function vd(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return gd(t)}),e))}function md(t){var e;for(t.composing&&(t.composing=!1,t.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function gd(t,e){if(t.domObserver.forceFlush(),md(t),e||t.docView.dirty){var n=fp(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}td.compositionstart=td.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),gd(t,!0),t.markCursor=null;else if(gd(t),nf.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}t.composing=!0}vd(t,hd)},td.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,vd(t,20))};var yd=nf.ie&&nf.ie_version<15||nf.ios&&nf.webkit_version<604;function bd(t,e,n,r){var o=Lp(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,o||qc.empty)})))return!0;if(!o)return!1;var i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),a=i?t.state.tr.replaceSelectionWith(i,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Qp.copy=td.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=yd?null:e.clipboardData,i=Fp(t,n.content()),a=i.dom,s=i.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},td.paste=function(t,e){var n=yd?null:e.clipboardData;n&&bd(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bd(t,r.value,null,e):bd(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)};var wd=function(t,e){this.slice=t,this.move=e},xd=nf.mac?"altKey":"ctrlKey";for(var Sd in Qp.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var r=t.state.selection,o=r.empty?null:t.posAtCoords(od(e));if(o&&o.pos>=r.from&&o.pos<=(r instanceof ju?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(ju.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);i&&i.node.type.spec.draggable&&i!=t.docView&&t.dispatch(t.state.tr.setSelection(ju.create(t.state.doc,i.posBefore)))}var a=t.state.selection.content(),s=Fp(t,a),c=s.dom,l=s.text;e.dataTransfer.clearData(),e.dataTransfer.setData(yd?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",yd||e.dataTransfer.setData("text/plain",l),t.dragging=new wd(a,!e[xd])}},Qp.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},td.dragover=td.dragenter=function(t,e){return e.preventDefault()},td.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(od(e));if(r){var o=t.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?t.someProp("transformPasted",(function(t){i=t(i)})):i=Lp(t,e.dataTransfer.getData(yd?"Text":"text/plain"),yd?null:e.dataTransfer.getData("text/html"),!1,o);var a=n&&!e[xd];if(t.someProp("handleDrop",(function(n){return n(t,e,i||qc.empty,a)})))e.preventDefault();else if(i){e.preventDefault();var s=i?function(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var o=n.content,i=0;i=0;s--){var c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(c>0?1:0),u=r.node(s),f=!1;if(1==a)f=u.canReplace(l,l,o);else{var p=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(l,l,p[0])}if(f)return 0==c?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}(t.state.doc,o.pos,i):o.pos;null==s&&(s=o.pos);var c=t.state.tr;a&&c.deleteSelection();var l=c.mapping.map(s),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,f=c.doc;if(u?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(f)){var p=c.doc.resolve(l);if(u&&ju.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new ju(p));else{var d=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,n,r){return d=r})),c.setSelection(wp(t,p,c.doc.resolve(d)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Qp.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&dp(t)}),20))},Qp.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},Qp.beforeinput=function(t,e){if(nf.chrome&&nf.android&&"deleteContentBackward"==e.inputType){var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,bf(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},td)Qp[Sd]=td[Sd];function kd(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var _d=function(t,e){this.spec=e||Td,this.side=this.spec.side||0,this.toDOM=t};_d.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Md(i-n,i-n,this)},_d.prototype.valid=function(){return!0},_d.prototype.eq=function(t){return this==t||t instanceof _d&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&kd(this.spec,t.spec))};var Od=function(t,e){this.spec=e||Td,this.attrs=t};Od.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Md(o,i,this)},Od.prototype.valid=function(t,e){return e.from=t&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;st){var c=this.children[s]+1;this.children[s+2].findInner(t-c,e-c,n,r+c,o)}},Ad.prototype.map=function(t,e,n){return this==Ed||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Td)},Ad.prototype.mapInner=function(t,e,n,r,o){for(var i,a=0;ac+i||(e>=s[a]+i?s[a+1]=-1:n>=o&&(l=r-n-(e-t))&&(s[a]+=l,s[a+1]+=l))}},l=0;l=r.content.size){u=!0;continue}var h=n.map(t[f+1]+i,-1)-o,v=r.content.findIndex(d),m=v.index,g=v.offset,y=r.maybeChild(m);if(y&&g==d&&g+y.nodeSize==h){var b=s[f+2].mapInner(n,y,p+1,t[f]+i+1,a);b!=Ed?(s[f]=d,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,u=!0)}else u=!0}if(u){var w=function(t,e,n,r,o,i,a){function s(t,e){for(var i=0;ia&&l.to=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,a=i+e.content.size,s=0;si&&c.type instanceof Od){var l=Math.max(i,c.from)-i,u=Math.min(a,c.to)-i;ln&&a.to0;)e++;t.splice(e,0,n)}function Bd(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Ed&&e.push(r)})),t.cursorWrapper&&e.push(Ad.create(t.state.doc,[t.cursorWrapper.deco])),Nd.from(e)}Nd.prototype.map=function(t,e){var n=this.members.map((function(n){return n.map(t,e,Td)}));return Nd.from(n)},Nd.prototype.forChild=function(t,e){if(e.isLeaf)return Ad.empty;for(var n=[],r=0;rr.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,c,s);!u&&t.selection.eq(r.selection)||(i=!0);var f,p,d,h,v,m,g,y,b,w,x,S="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){e=s,n=c.top;break}}}return{refDOM:e,refTop:n,stack:_f(t.dom)}}(this);if(i){this.domObserver.stop();var k=u&&(nf.ie||nf.chrome)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&(h=r.selection,v=t.selection,m=Math.min(h.$anchor.sharedDepth(h.head),v.$anchor.sharedDepth(v.head)),h.$anchor.start(m)!=v.$anchor.start(m));if(u){var _=nf.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,c,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Uf(t.doc,c,s,this.dom,this)),_&&!this.trackWrites&&(k=!0)}k||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(f=this,p=f.docView.domFromPos(f.state.selection.anchor,0),d=f.root.getSelection(),df(p.node,p.offset,d.anchorNode,d.anchorOffset)))?dp(this,k):(yp(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==l)this.dom.scrollTop=0;else if("to selection"==l){var O=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof ju?kf(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),O):kf(this,this.coordsAtPos(t.selection.head,1),O))}else S&&(y=(g=S).refDOM,b=g.refTop,w=g.stack,x=y?y.getBoundingClientRect().top:0,Of(w,0==x?0:x-b))},Vd.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Vd.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Gd="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Zd="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Qd="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),th="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),eh="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nh=Gd&&(th||+Gd[1]<57)||Qd&&th,rh=0;rh<10;rh++)Ud[48+rh]=Ud[96+rh]=String(rh);for(rh=1;rh<=24;rh++)Ud[rh+111]="F"+rh;for(rh=65;rh<=90;rh++)Ud[rh]=String.fromCharCode(rh+32),Xd[rh]=String.fromCharCode(rh);for(var oh in Ud)Xd.hasOwnProperty(oh)||(Xd[oh]=Ud[oh]);var ih="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function ah(t){var e,n,r,o,i=t.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(r=Ud[n.keyCode])&&r!=o){var s=e[sh(r,n,!0)];if(s&&s(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){var c=e[sh(o,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function uh(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function fh(t,e,n){for(;t;t="start"==e?t.firstChild:t.lastChild){if(t.isTextblock)return!0;if(n&&1!=t.childCount)return!1}return!1}function ph(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function dh(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1=0;u--)l=zc.from(r[u].create(null,l));l=zc.from(i.copy(l));var f=t.tr.step(new uu(e.pos-1,c,e.pos,c,new qc(l,1,0),r.length,!0)),p=c+2*r.length;gu(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}var d=Eu.findFrom(e,1),h=d&&d.$from.blockRange(d.$to),v=h&&du(h);if(null!=v&&v>=e.depth)return n&&n(t.tr.lift(h,v).scrollIntoView()),!0;if(s&&fh(a,"start",!0)&&fh(i,"end")){for(var m=i,g=[];g.push(m),!m.isTextblock;)m=m.lastChild;for(var y=a,b=1;!y.isTextblock;y=y.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){for(var w=zc.empty,x=g.length-1;x>=0;x--)w=zc.from(g[x].copy(w));n(t.tr.step(new uu(e.pos-g.length,e.pos+a.nodeSize,e.pos+b,e.pos+a.nodeSize-b,new qc(w,g.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function gh(t,e){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,t,e).scrollIntoView()),!0)}}function yh(t,e){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(t,e,n){for(var r=function(r){var o=e[r],i=o.$from,a=o.$to,s=0==i.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o0))return!1;var o=ph(r);if(!o){var i=r.blockRange(),a=i&&du(i);return null!=a&&(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&mh(t,o,e))return!0;if(0==r.parent.content.size&&(fh(s,"end")||ju.isSelectable(s))){if(e){var c=t.tr.deleteRange(r.before(),r.after());c.setSelection(fh(s,"end")?Eu.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ju.create(c.doc,o.pos-s.nodeSize)),e(c.scrollIntoView())}return!0}return!(!s.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;i=ph(o)}var a=i&&i.nodeBefore;return!(!a||!ju.isSelectable(a))&&(e&&e(t.tr.setSelection(ju.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)})),xh=bh(uh,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset1&&n.after()!=n.end(-1)){var r=n.before();if(mu(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&du(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}),(function(t,e){var n=t.selection,r=n.$from,o=n.$to;if(t.selection instanceof ju&&t.selection.node.isBlock)return!(!r.parentOffset||!mu(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(e){var i=o.parentOffset==o.parent.content.size,a=t.tr;(t.selection instanceof Iu||t.selection instanceof Fu)&&a.deleteSelection();var s=0==r.depth?null:hh(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=i&&s?[{type:s}]:null,l=mu(a.doc,a.mapping.map(r.pos),1,c);if(c||l||!mu(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(c=[{type:s}],l=!0),l&&(a.split(a.mapping.map(r.pos),1,c),!i&&!r.parentOffset&&r.parent.type!=s)){var u=a.mapping.map(r.before()),f=a.doc.resolve(u);r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}e(a.scrollIntoView())}return!0})),"Mod-Enter":vh,Backspace:wh,"Mod-Backspace":wh,Delete:xh,"Mod-Delete":xh,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new Fu(t.doc))),!0}},kh={"Ctrl-h":Sh.Backspace,"Alt-Backspace":Sh["Mod-Backspace"],"Ctrl-d":Sh.Delete,"Ctrl-Alt-Backspace":Sh["Mod-Delete"],"Alt-Delete":Sh["Mod-Delete"],"Alt-d":Sh["Mod-Delete"]};for(var _h in Sh)kh[_h]=Sh[_h];var Oh=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?kh:Sh,Ch=function(t,e){var n;this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,o){var i=n;if(e[1]){var a=e[0].lastIndexOf(e[1]);i+=e[0].slice(a+e[1].length);var s=(r+=a)-o;s>0&&(i=e[0].slice(a-s,a)+i,r=o)}return t.tr.insertText(i,r,o)}):e};function Mh(t){var e=t.rules,n=new Zu({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return Dh(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection.$cursor;r&&Dh(t,r.pos,r.pos,"",e,n)}))}}},isInputRules:!0});return n}function Dh(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var c=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,l=0;l=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){var l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else a.delete(i.from,i.to);e(a)}return!0}}return!1}function Th(t,e,n,r){return new Ch(t,(function(t,o,i,a){var s=n instanceof Function?n(o):n,c=t.tr.delete(i,a),l=c.doc.resolve(i).blockRange(),u=l&&hu(l,e,s);if(!u)return null;c.wrap(l,u);var f=c.doc.resolve(i-1).nodeBefore;return f&&f.type==e&&gu(c.doc,i-1)&&(!r||r(o,f))&&c.join(i-1),c}))}function Ah(t,e,n){return new Ch(t,(function(t,r,o,i){var a=t.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,s):null}))}new Ch(/--$/,"—"),new Ch(/\.\.\.$/,"…"),new Ch(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Ch(/"$/,"”"),new Ch(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new Ch(/'$/,"’");var Eh=["ol",0],Nh=["ul",0],Ph=["li",0],Ih={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1}}}],toDOM:function(t){return 1==t.attrs.order?Eh:["ol",{start:t.attrs.order},0]}},Rh={parseDOM:[{tag:"ul"}],toDOM:function(){return Nh}},jh={parseDOM:[{tag:"li"}],toDOM:function(){return Ph},defining:!0};function zh(t,e){var n={};for(var r in t)n[r]=t[r];for(var o in e)n[o]=e[o];return n}function Fh(t,e,n){return t.append({ordered_list:zh(Ih,{content:"list_item+",group:n}),bullet_list:zh(Rh,{content:"list_item+",group:n}),list_item:zh(jh,{content:e})})}function Lh(t,e){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),c=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var u=n.doc.resolve(s.start-2);l=new ll(u,u,s.depth),s.endIndex=0;a--)i=zc.from(n[a].type.create(n[a].attrs,i));t.step(new uu(e.start-(r?2:0),e.end,e.start,e.end,new qc(i,0,0),n.length,!0));for(var s=0,c=0;c=o.depth-3;u--)c=zc.from(o.node(u).copy(c));var f=o.indexAfter(-1)-1)return!1;t.isTextblock&&0==t.content.size&&(h=e+1)})),h>-1&&d.setSelection(e.selection.constructor.near(d.doc.resolve(h))),n(d.scrollIntoView())}return!0}var v=i.pos==o.end()?s.contentMatchAt(0).defaultType:null,m=e.tr.delete(o.pos,i.pos),g=v&&[null,{type:v}];return!!mu(m.doc,o.pos,2,g)&&(n&&n(m.split(o.pos,2,g).scrollIntoView()),!0)}}function Vh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));return!!a&&(!n||(o.node(a.depth-1).type==t?function(t,e,n,r){var o=t.tr,i=r.end,a=r.$to.end(r.depth);is;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var c=r.doc.resolve(n.start),l=c.nodeAfter;if(r.mapping.map(n.end)!=n.start+c.nodeAfter.nodeSize)return!1;var u=0==n.startIndex,f=n.endIndex==o.childCount,p=c.node(-1),d=c.index(-1);if(!p.canReplace(d+(u?0:1),d+1,l.content.append(f?zc.empty:zc.from(o))))return!1;var h=c.pos,v=h+l.nodeSize;return r.step(new uu(h-(u?1:0),v+(f?1:0),h+1,v-1,new qc((u?zc.empty:zc.from(o.copy(zc.empty))).append(f?zc.empty:zc.from(o.copy(zc.empty))),u?0:1,f?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,n,a)))}}function Wh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var c=a.parent,l=c.child(s-1);if(l.type!=t)return!1;if(n){var u=l.lastChild&&l.lastChild.type==c.type,f=zc.from(u?t.create():null),p=new qc(zc.from(t.create(null,zc.from(c.type.create(null,f)))),u?3:1,0),d=a.start,h=a.end;n(e.tr.step(new uu(d-(u?3:1),h,d,h,p,1,!0)).scrollIntoView())}return!0}}var Hh=function(){};Hh.prototype.append=function(t){return t.length?(t=Hh.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Hh.prototype.prepend=function(t){return t.length?Hh.from(t).append(this):this},Hh.prototype.appendInner=function(t){return new Jh(this,t)},Hh.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Hh.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Hh.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Hh.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Hh.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},Hh.from=function(t){return t instanceof Hh?t:t&&t.length?new qh(t):Hh.empty};var qh=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Hh);Hh.empty=new qh([]);var Jh=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Hh),Kh=Hh,Yh=function(t,e){this.items=t,this.eventCount=e};Yh.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,c=t.tr,l=[],u=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void u.push(t);if(r){u.push(new Uh(t.map));var f,p=t.step.map(r.slice(o));p&&c.maybeStep(p).doc&&(f=c.mapping.maps[c.mapping.maps.length-1],l.push(new Uh(f,null,null,l.length+u.length))),o--,f&&r.appendMap(f,o)}else c.maybeStep(t.step);return t.selection?(a=r?t.selection.map(r.slice(o)):t.selection,s=new Yh(n.items.slice(0,i).append(u.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:c,selection:a}},Yh.prototype.addTransform=function(t,e,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,c=0;cGh&&(d=v,(p=a).forEach((function(t,e){if(t.selection&&0==d--)return h=e,!1})),a=p.slice(h),i-=v),new Yh(a.append(o),i)},Yh.prototype.remapping=function(t,e){var n=new eu;return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},Yh.prototype.addMaps=function(t){return 0==this.eventCount?this:new Yh(this.items.append(t.map((function(t){return new Uh(t)}))),this.eventCount)},Yh.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var c=o.maps[r];if(e.step){var l=t.steps[r].invert(t.docs[r]),u=e.selection&&e.selection.map(o.slice(s+1,r));u&&a++,n.push(new Uh(c,l,u))}else n.push(new Uh(c))}}),r);for(var c=[],l=e;l500&&(f=f.compress(this.items.length-n.length)),f},Yh.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},Yh.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=t)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(e.slice(n)),c=s&&s.getMap();if(n--,c&&e.appendMap(c,n),s){var l=i.selection&&i.selection.map(e.slice(n));l&&o++;var u,f=new Uh(c.invert(),s,l),p=r.length-1;(u=r.length&&r[p].merge(f))?r[p]=u:r.push(f)}}else i.map&&n--}),this.items.length,0),new Yh(Kh.from(r.reverse()),o)},Yh.empty=new Yh(Kh.empty,0);var Uh=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};Uh.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new Uh(e.getMap().invert(),e,this.selection)}};var Xh=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},Gh=20;function Zh(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function Qh(t,e){if(!t)return null;for(var n=[],r=0;r=e[o]&&(n=!0)})),n}(n,t.prevRanges)),c=a?Qh(t.prevRanges,n.mapping):Zh(n.mapping.maps[n.steps.length-1]);return new Xh(t.done.addTransform(n,s?e.selection.getBookmark():null,r,rv(e)),Yh.empty,c,n.time)}(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput:function(t,e){var n="historyUndo"==e.inputType?sv(t.state,t.dispatch):"historyRedo"==e.inputType&&cv(t.state,t.dispatch);return n&&e.preventDefault(),n}}}})}function sv(t,e){var n=ov.getState(t);return!(!n||0==n.done.eventCount)&&(e&&tv(n,t,e,!1),!0)}function cv(t,e){var n=ov.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&tv(n,t,e,!0),!0)}function lv(t){var e=ov.getState(t);return e?e.done.eventCount:0}function uv(t){var e=ov.getState(t);return e?e.undone.eventCount:0}var fv={},pv={},dv={},hv={};Object.defineProperty(hv,"__esModule",{value:!0}),hv.default=void 0;var vv=_c.withParams;hv.default=vv,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.default}}),t.regex=t.ref=t.len=t.req=void 0;var e,n=(e=hv)&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){if(Array.isArray(t))return!!t.length;if(null==t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===r(t)){for(var e in t)return!0;return!1}return!!String(t).length};t.req=o;t.len=function(t){return Array.isArray(t)?t.length:"object"===r(t)?Object.keys(t).length:String(t).length};t.ref=function(t,e,n){return"function"==typeof t?t.call(e,n):n[t]};t.regex=function(t,e){return(0,n.default)({type:t},(function(t){return!o(t)||e.test(t)}))}}(dv),Object.defineProperty(pv,"__esModule",{value:!0}),pv.default=void 0;var mv=(0,dv.regex)("alpha",/^[a-zA-Z]*$/);pv.default=mv;var gv={};Object.defineProperty(gv,"__esModule",{value:!0}),gv.default=void 0;var yv=(0,dv.regex)("alphaNum",/^[a-zA-Z0-9]*$/);gv.default=yv;var bv={};Object.defineProperty(bv,"__esModule",{value:!0}),bv.default=void 0;var wv=(0,dv.regex)("numeric",/^[0-9]*$/);bv.default=wv;var xv={};Object.defineProperty(xv,"__esModule",{value:!0}),xv.default=void 0;var Sv=dv;xv.default=function(t,e){return(0,Sv.withParams)({type:"between",min:t,max:e},(function(n){return!(0,Sv.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};var kv={};Object.defineProperty(kv,"__esModule",{value:!0}),kv.default=void 0;var _v=(0,dv.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/);kv.default=_v;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.default=void 0;var Cv=dv,Mv=(0,Cv.withParams)({type:"ipAddress"},(function(t){if(!(0,Cv.req)(t))return!0;if("string"!=typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(Dv)}));Ov.default=Mv;var Dv=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255},$v={};Object.defineProperty($v,"__esModule",{value:!0}),$v.default=void 0;var Tv=dv;$v.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,Tv.withParams)({type:"macAddress"},(function(e){if(!(0,Tv.req)(e))return!0;if("string"!=typeof e)return!1;var n="string"==typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(Av)}))};var Av=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)},Ev={};Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.default=void 0;var Nv=dv;Ev.default=function(t){return(0,Nv.withParams)({type:"maxLength",max:t},(function(e){return!(0,Nv.req)(e)||(0,Nv.len)(e)<=t}))};var Pv={};Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.default=void 0;var Iv=dv;Pv.default=function(t){return(0,Iv.withParams)({type:"minLength",min:t},(function(e){return!(0,Iv.req)(e)||(0,Iv.len)(e)>=t}))};var Rv={};Object.defineProperty(Rv,"__esModule",{value:!0}),Rv.default=void 0;var jv=dv,zv=(0,jv.withParams)({type:"required"},(function(t){return(0,jv.req)("string"==typeof t?t.trim():t)}));Rv.default=zv;var Fv={};Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.default=void 0;var Lv=dv;Fv.default=function(t){return(0,Lv.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,Lv.ref)(t,this,n)||(0,Lv.req)(e)}))};var Bv={};Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.default=void 0;var Vv=dv;Bv.default=function(t){return(0,Vv.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,Vv.ref)(t,this,n)||(0,Vv.req)(e)}))};var Wv={};Object.defineProperty(Wv,"__esModule",{value:!0}),Wv.default=void 0;var Hv=dv;Wv.default=function(t){return(0,Hv.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,Hv.ref)(t,this,n)}))};var qv={};Object.defineProperty(qv,"__esModule",{value:!0}),qv.default=void 0;var Jv=(0,dv.regex)("url",/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[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]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i);qv.default=Jv;var Kv={};Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.default=void 0;var Yv=dv;Kv.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};var Uv={};Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.default=void 0;var Xv=dv;Uv.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};var Gv={};Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.default=void 0;var Zv=dv;Gv.default=function(t){return(0,Zv.withParams)({type:"not"},(function(e,n){return!(0,Zv.req)(e)||!t.call(this,e,n)}))};var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.default=void 0;var tm=dv;Qv.default=function(t){return(0,tm.withParams)({type:"minValue",min:t},(function(e){return!(0,tm.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t}))};var em={};Object.defineProperty(em,"__esModule",{value:!0}),em.default=void 0;var nm=dv;em.default=function(t){return(0,nm.withParams)({type:"maxValue",max:t},(function(e){return!(0,nm.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};var rm={};Object.defineProperty(rm,"__esModule",{value:!0}),rm.default=void 0;var om=(0,dv.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);rm.default=om;var im={};Object.defineProperty(im,"__esModule",{value:!0}),im.default=void 0;var am=(0,dv.regex)("decimal",/^[-]?\d*(\.\d+)?$/); /**! * Sortable 1.10.2 * @author RubaXa * @author owenm * @license MIT */ -function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}function c(t,e){if(null==t)return{};var n,r,o=s(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function u(t){return l(t)||f(t)||p()}function l(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function k(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function C(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&_(t,e):_(t,e))||r&&t===n)return t;if(t===n)break}while(t=k(t))}return null}var M,E=/\s+/g;function A(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(E," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(E," ")}}function T(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function $(t,e){var n="";if("string"===typeof t)n=t;else do{var r=T(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function D(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o=i:o<=i,!a)return r;if(r===N())break;r=B(r,!1)}return!1}function I(t,e,n){var r=0,o=0,i=t.children;while(o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=c(n,["evt"]);nt.pluginEvent.bind(Zt)(t,e,a({dragEl:at,parentEl:st,ghostEl:ct,rootEl:ut,nextEl:lt,lastDownEl:ft,cloneEl:pt,cloneHidden:dt,dragStarted:Ct,putSortable:bt,activeSortable:Zt.active,originalEvent:r,oldIndex:ht,oldDraggableIndex:mt,newIndex:vt,newDraggableIndex:gt,hideGhostForTarget:Jt,unhideGhostForTarget:Yt,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(t){it({sortable:e,name:t,originalEvent:r})}},o))};function it(t){rt(a({putSortable:bt,cloneEl:pt,targetEl:at,rootEl:ut,oldIndex:ht,oldDraggableIndex:mt,newIndex:vt,newDraggableIndex:gt},t))}var at,st,ct,ut,lt,ft,pt,dt,ht,vt,mt,gt,yt,bt,wt,xt,St,Ot,_t,kt,Ct,Mt,Et,At,Tt,$t=!1,Dt=!1,Nt=[],Pt=!1,jt=!1,It=[],Rt=!1,Lt=[],zt="undefined"!==typeof document,Ft=b,Bt=m||v?"cssFloat":"float",Vt=zt&&!w&&!b&&"draggable"in document.createElement("div"),qt=function(){if(zt){if(v)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ht=function(t,e){var n=T(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=I(t,0,e),i=I(t,1,e),a=o&&T(o),s=i&&T(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+P(o).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+P(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a["float"]&&"none"!==a["float"]){var l="left"===a["float"]?"left":"right";return!i||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Bt]||i&&"none"===n[Bt]&&c+u>r)?"vertical":"horizontal"},Wt=function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===s||r+i/2===a+c/2},Ut=function(t,e){var n;return Nt.some((function(r){if(!R(r)){var o=P(r),i=r[G].options.emptyInsertThreshold,a=t>=o.left-i&&t<=o.right+i,s=e>=o.top-i&&e<=o.bottom+i;return i&&a&&s?n=r:void 0}})),n},Kt=function(t){function e(t,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"===typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},o=t.group;o&&"object"==r(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Jt=function(){!qt&&ct&&T(ct,"display","none")},Yt=function(){!qt&&ct&&T(ct,"display","")};zt&&document.addEventListener("click",(function(t){if(Dt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Dt=!1,!1}),!0);var Gt=function(t){if(at){t=t.touches?t.touches[0]:t;var e=Ut(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[G]._onDragOver(n)}}},Xt=function(t){at&&at.parentNode[G]._isOutsideThisEl(t.target)};function Zt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[G]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ht(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Zt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in nt.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Kt(e),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Vt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?S(t,"pointerdown",this._onTapStart):(S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Nt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,X())}function Qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function te(t,e,n,r,o,i,a,s){var c,u,l=t[G],f=l.options.onMove;return!window.CustomEvent||v||m?(c=document.createEvent("Event"),c.initEvent("move",!0,!0)):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||P(e),c.willInsertAfter=s,c.originalEvent=a,t.dispatchEvent(c),f&&(u=f.call(l,c,a)),u}function ee(t){t.draggable=!1}function ne(){Rt=!1}function re(t,e,n){var r=P(R(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}function oe(t,e,n,r,o,i,a,s){var c=r?t.clientY:t.clientX,u=r?n.height:n.width,l=r?n.top:n.left,f=r?n.bottom:n.right,p=!1;if(!a)if(s&&Atl+u*i/2:cf-At)return-Et}else if(c>l+u*(1-o)/2&&cf-u*i/2)?c>l+u/2?1:-1:0}function ie(t){return L(at)=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){at&&ee(at),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;O(t,"mouseup",this._disableDelayedDrag),O(t,"touchend",this._disableDelayedDrag),O(t,"touchcancel",this._disableDelayedDrag),O(t,"mousemove",this._delayedDragTouchMoveHandler),O(t,"touchmove",this._delayedDragTouchMoveHandler),O(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?S(document,"pointermove",this._onTouchMove):S(document,e?"touchmove":"mousemove",this._onTouchMove):(S(at,"dragend",this),S(ut,"dragstart",this._onDragStart));try{document.selection?ce((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if($t=!1,ut&&at){ot("dragStarted",this,{evt:e}),this.nativeDraggable&&S(document,"dragover",Xt);var n=this.options;!t&&A(at,n.dragClass,!1),A(at,n.ghostClass,!0),Zt.active=this,t&&this._appendGhost(),it({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(xt){this._lastX=xt.clientX,this._lastY=xt.clientY,Jt();var t=document.elementFromPoint(xt.clientX,xt.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(xt.clientX,xt.clientY),t===e)break;e=t}if(at.parentNode[G]._isOutsideThisEl(t),e)do{if(e[G]){var n=void 0;if(n=e[G]._onDragOver({clientX:xt.clientX,clientY:xt.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Yt()}},_onTouchMove:function(t){if(wt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=ct&&$(ct,!0),a=ct&&i&&i.a,s=ct&&i&&i.d,c=Ft&&Tt&&z(Tt),u=(o.clientX-wt.clientX+r.x)/(a||1)+(c?c[0]-It[0]:0)/(a||1),l=(o.clientY-wt.clientY+r.y)/(s||1)+(c?c[1]-It[1]:0)/(s||1);if(!Zt.active&&!$t){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(it({rootEl:st,name:"add",toEl:st,fromEl:ut,originalEvent:t}),it({sortable:this,name:"remove",toEl:st,originalEvent:t}),it({rootEl:st,name:"sort",toEl:st,fromEl:ut,originalEvent:t}),it({sortable:this,name:"sort",toEl:st,originalEvent:t})),bt&&bt.save()):vt!==ht&&vt>=0&&(it({sortable:this,name:"update",toEl:st,originalEvent:t}),it({sortable:this,name:"sort",toEl:st,originalEvent:t})),Zt.active&&(null!=vt&&-1!==vt||(vt=ht,gt=mt),it({sortable:this,name:"end",toEl:st,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){ot("nulling",this),ut=at=st=ct=lt=pt=ft=dt=wt=xt=Ct=vt=gt=ht=mt=Mt=Et=bt=yt=Zt.dragged=Zt.ghost=Zt.clone=Zt.active=null,Lt.forEach((function(t){t.checked=!0})),Lt.length=St=Ot=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":at&&(this._onDragOver(t),Qt(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r1&&(Ne.forEach((function(t){r.addAnimationState({target:t,rect:Ie?P(t):o}),Y(t),t.fromRect=o,e.removeAnimationState(t)})),Ie=!1,ze(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,r=t.insertion,o=t.activeSortable,i=t.parentEl,a=t.putSortable,s=this.options;if(r){if(n&&o._hideClone(),je=!1,s.animation&&Ne.length>1&&(Ie||!n&&!o.options.sort&&!a)){var c=P(Te,!1,!0,!0);Ne.forEach((function(t){t!==Te&&(J(t,c),i.appendChild(t))})),Ie=!0}if(!n)if(Ie||Be(),Ne.length>1){var u=De;o._showClone(e),o.options.animation&&!De&&u&&Pe.forEach((function(t){o.addAnimationState({target:t,rect:$e}),t.fromRect=$e,t.thisAnimationDuration=null}))}else o._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,r=t.activeSortable;if(Ne.forEach((function(t){t.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){$e=i({},e);var o=$(Te,!0);$e.top-=o.f,$e.left-=o.e}},dragOverAnimationComplete:function(){Ie&&(Ie=!1,Be())},drop:function(t){var e=t.originalEvent,n=t.rootEl,r=t.parentEl,o=t.sortable,i=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,c=s||this.sortable;if(e){var u=this.options,l=r.children;if(!Re)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),A(Te,u.selectedClass,!~Ne.indexOf(Te)),~Ne.indexOf(Te))Ne.splice(Ne.indexOf(Te),1),Ee=null,rt({sortable:o,rootEl:n,name:"deselect",targetEl:Te,originalEvt:e});else{if(Ne.push(Te),rt({sortable:o,rootEl:n,name:"select",targetEl:Te,originalEvt:e}),e.shiftKey&&Ee&&o.el.contains(Ee)){var f,p,d=L(Ee),h=L(Te);if(~d&&~h&&d!==h)for(h>d?(p=d,f=h):(p=h,f=d+1);p1){var v=P(Te),m=L(Te,":not(."+this.options.selectedClass+")");if(!je&&u.animation&&(Te.thisAnimationDuration=null),c.captureAnimationState(),!je&&(u.animation&&(Te.fromRect=v,Ne.forEach((function(t){if(t.thisAnimationDuration=null,t!==Te){var e=Ie?P(t):v;t.fromRect=e,c.addAnimationState({target:t,rect:e})}}))),Be(),Ne.forEach((function(t){l[m]?r.insertBefore(t,l[m]):r.appendChild(t),m++})),a===L(Te))){var g=!1;Ne.forEach((function(t){t.sortableIndex===L(t)||(g=!0)})),g&&i("update")}Ne.forEach((function(t){Y(t)})),c.animateAll()}Ae=c}(n===r||s&&"clone"!==s.lastPutMode)&&Pe.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=Re=!1,Pe.length=0},destroyGlobal:function(){this._deselectMultiDrag(),O(document,"pointerup",this._deselectMultiDrag),O(document,"mouseup",this._deselectMultiDrag),O(document,"touchend",this._deselectMultiDrag),O(document,"keydown",this._checkKeyDown),O(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(("undefined"===typeof Re||!Re)&&Ae===this.sortable&&(!t||!C(t.target,this.options.draggable,this.sortable.el,!1))&&(!t||0===t.button))while(Ne.length){var e=Ne[0];A(e,this.options.selectedClass,!1),Ne.shift(),rt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},i(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[G];e&&e.options.multiDrag&&!~Ne.indexOf(t)&&(Ae&&Ae!==e&&(Ae.multiDrag._deselectMultiDrag(),Ae=e),A(t,e.options.selectedClass,!0),Ne.push(t))},deselect:function(t){var e=t.parentNode[G],n=Ne.indexOf(t);e&&e.options.multiDrag&&~n&&(A(t,e.options.selectedClass,!1),Ne.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return Ne.forEach((function(r){var o;e.push({multiDragElement:r,index:r.sortableIndex}),o=Ie&&r!==Te?-1:Ie?L(r,":not(."+t.options.selectedClass+")"):L(r),n.push({multiDragElement:r,index:o})})),{items:u(Ne),clones:[].concat(Pe),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),"ctrl"===t?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function ze(t,e){Ne.forEach((function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)}))}function Fe(t,e){Pe.forEach((function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)}))}function Be(){Ne.forEach((function(t){t!==Te&&t.parentNode&&t.parentNode.removeChild(t)}))}Zt.mount(new ye),Zt.mount(ke,_e),e["default"]=Zt},aa82:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,r.ref)(t,this,n)||(0,r.req)(e)}))};e.default=o},b5ae:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"alpha",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"alphaNum",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"numeric",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"between",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"email",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ipAddress",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"macAddress",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"maxLength",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"minLength",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"required",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"requiredIf",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"requiredUnless",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"sameAs",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"url",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"minValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"maxValue",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"decimal",{enumerable:!0,get:function(){return O.default}}),e.helpers=void 0;var r=C(n("6235")),o=C(n("3a54")),i=C(n("45b8")),a=C(n("ec11")),s=C(n("5d75")),c=C(n("c99d")),u=C(n("91d3")),l=C(n("2a12")),f=C(n("5db3")),p=C(n("d4f4")),d=C(n("aa82")),h=C(n("e652")),v=C(n("b6cb")),m=C(n("772d")),g=C(n("d294")),y=C(n("3360")),b=C(n("6417")),w=C(n("eb66")),x=C(n("46bc")),S=C(n("1331")),O=C(n("c301")),_=k(n("78ef"));function k(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}function C(t){return t&&t.__esModule?t:{default:t}}e.helpers=_},b6cb:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,r.ref)(t,this,n)}))};e.default=o},b76a:function(t,e,n){(function(e,r){t.exports=r(n("aa47"))})("undefined"!==typeof self&&self,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),s=n("84f2"),c=n("41a0"),u=n("7f20"),l=n("38fd"),f=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",m=function(){return this};t.exports=function(t,e,n,g,y,b,w){c(n,e,g);var x,S,O,_=function(t){if(!p&&t in E)return E[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",C=y==v,M=!1,E=t.prototype,A=E[f]||E[d]||y&&E[y],T=A||_(y),$=y?C?_("entries"):T:void 0,D="Array"==e&&E.entries||A;if(D&&(O=l(D.call(new t)),O!==Object.prototype&&O.next&&(u(O,k,!0),r||"function"==typeof O[f]||a(O,f,m))),C&&A&&A.name!==v&&(M=!0,T=function(){return A.call(this)}),r&&!w||!p&&!M&&E[f]||a(E,f,T),s[e]=T,s[k]=m,y)if(x={values:C?T:_(v),keys:b?T:_(h),entries:$},w)for(S in x)S in E||i(E,S,x[S]);else o(o.P+o.F*(p||M),e,x);return x}},"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),s=n("2b4c"),c=n("520a"),u=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=s(t),d=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e})):void 0;if(!d||!h||"replace"===t&&!l||"split"===t&&!f){var v=/./[p],m=n(a,p,""[t],(function(t,e,n,r,o){return e.exec===c?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=m[0],y=m[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),c="toString",u=(""+s).split(c);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(t){return o(r(t))}}))},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,s="lastIndex",c=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[s]||0!==e[s]}(),u=void 0!==/()??/.exec("")[1],l=c||u;l&&(a=function(t){var e,n,a,l,f=this;return u&&(n=new RegExp("^"+f.source+"$(?!\\s)",r.call(f))),c&&(e=f[s]),a=o.call(f,t),c&&a&&(f[s]=f.global?a.index+a[0].length:e),u&&a&&a.length>1&&i.call(a[0],n,(function(){for(l=1;l1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(t,e,n){"use strict";var r=n("0d58"),o=n("2621"),i=n("52a7"),a=n("4bf8"),s=n("626a"),c=Object.assign;t.exports=!c||n("79e5")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){var n=a(t),c=arguments.length,u=1,l=o.f,f=i.f;while(c>u){var p,d=s(arguments[u++]),h=l?r(d).concat(l(d)):r(d),v=h.length,m=0;while(v>m)f.call(d,p=h[m++])&&(n[p]=d[p])}return n}:c},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(e,n){e.exports=t},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),a=n("4588"),s=n("0390"),c=n("5f1b"),u=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,v){return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var f=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var g=f.global;if(g){var y=f.unicode;f.lastIndex=0}var b=[];while(1){var w=c(f,p);if(null===w)break;if(b.push(w),!g)break;var x=String(w[0]);""===x&&(f.lastIndex=s(p,i(f.lastIndex),y))}for(var S="",O=0,_=0;_=O&&(S+=p.slice(O,C)+$,O=C+k.length)}return S+p.slice(O)}];function m(t,e,r,i,a,s){var c=r+t.length,u=i.length,l=d;return void 0!==a&&(a=o(a),l=p),n.call(s,l,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return n;if(l>u){var p=f(l/10);return 0===p?n:p<=u?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}s=i[l-1]}return void 0===s?"":s}))}}))},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),s=n("32e9"),c=n("84f2"),u=n("2b4c"),l=u("iterator"),f=u("toStringTag"),p=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;vl)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return c}));n("a481");function r(){return"undefined"!==typeof window?window.console:t.console}var o=r();function i(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var a=/-(\w)/g,s=i((function(t){return t.replace(a,(function(t,e){return e?e.toUpperCase():""}))}));function c(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function u(t,e,n){var r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",s=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d");function o(t){if(Array.isArray(t))return t}function i(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)if(n.push(a.value),e&&n.length===e)break}catch(c){o=!0,i=c}finally{try{r||null==s["return"]||s["return"]()}finally{if(o)throw i}}return n}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=i?o.length:o.indexOf(t)}));return n?a.filter((function(t){return-1!==t})):a}function w(t,e){var n=this;this.$nextTick((function(){return n.$emit(t.toLowerCase(),e)}))}function x(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),w.call(e,t,n)}}function S(t){return["transition-group","TransitionGroup"].includes(t)}function O(t){if(!t||1!==t.length)return!1;var e=u(t,1),n=e[0].componentOptions;return!!n&&S(n.tag)}function _(t,e,n){return t[n]||(e[n]?e[n]():void 0)}function k(t,e,n){var r=0,o=0,i=_(e,n,"header");i&&(r=i.length,t=t?[].concat(d(i),d(t)):d(i));var a=_(e,n,"footer");return a&&(o=a.length,t=t?[].concat(d(t),d(a)):d(a)),{children:t,headerOffset:r,footerOffset:o}}function C(t,e){var n=null,r=function(t,e){n=g(n,t,e)},o=Object.keys(t).filter((function(t){return"id"===t||t.startsWith("data-")})).reduce((function(e,n){return e[n]=t[n],e}),{});if(r("attrs",o),!e)return n;var i=e.on,a=e.props,s=e.attrs;return r("on",i),r("props",a),Object.assign(n.attrs,s),n}var M=["Start","Add","Remove","Update","End"],E=["Choose","Unchoose","Sort","Filter","Clone"],A=["Move"].concat(M,E).map((function(t){return"on"+t})),T=null,$={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},D={name:"draggable",inheritAttrs:!1,props:$,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(t){var e=this.$slots.default;this.transitionMode=O(e);var n=k(e,this.$slots,this.$scopedSlots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var a=C(this.$attrs,this.componentData);return t(this.getTag(),a,r)},created:function(){null!==this.list&&null!==this.value&&m["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&m["b"].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&m["b"].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var e={};M.forEach((function(n){e["on"+n]=x.call(t,n)})),E.forEach((function(n){e["on"+n]=w.bind(t,n)}));var n=Object.keys(this.$attrs).reduce((function(e,n){return e[Object(m["a"])(n)]=t.$attrs[n],e}),{}),r=Object.assign({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new v.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var t=this._vnode.fnOptions;return t&&t.functional},getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(m["a"])(e);-1===A.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick((function(){t.visibleIndexes=b(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)}))},getUnderlyingVm:function(t){var e=y(this.getChildrenNodes()||[],t);if(-1===e)return null;var n=this.realList[e];return{index:e,element:n}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&S(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e},emitChanges:function(t){var e=this;this.$nextTick((function(){e.$emit("change",t)}))},alterList:function(t){if(this.list)t(this.list);else{var e=d(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments,e=function(e){return e.splice.apply(e,d(t))};this.alterList(e)},updatePosition:function(t,e){var n=function(n){return n.splice(e,0,n.splice(t,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,r=this.getUnderlyingPotencialDraggableComponent(e);if(!r)return{component:r};var o=r.realList,i={list:o,component:r};if(e!==n&&o&&r.getUnderlyingVm){var a=r.getUnderlyingVm(n);if(a)return Object.assign(a,i)}return i},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){var e=this.getChildrenNodes();e[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),T=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(m["d"])(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var r={element:e,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(t){if(Object(m["c"])(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(m["d"])(t.clone)},onDragUpdate:function(t){Object(m["d"])(t.item),Object(m["c"])(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=d(e.to.children).filter((function(t){return"none"!==t.style["display"]})),r=n.indexOf(e.related),o=t.component.getVmIndex(r),i=-1!==n.indexOf(T);return i||!e.willInsertAfter?o:o+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});var a=Object.assign({},t,{relatedContext:r,draggedContext:o});return n(a,e)},onDragEnd:function(){this.computeIndexes(),T=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",D);var N=D;e["default"]=N}})["default"]}))},bf19:function(t,e,n){"use strict";var r=n("23e7");r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c301:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.regex)("decimal",/^[-]?\d*(\.\d+)?$/);e.default=o},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("ce4e"),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c99d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.withParams)({type:"ipAddress"},(function(t){if(!(0,r.req)(t))return!0;if("string"!==typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(i)}));e.default=o;var i=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255}},ca84:function(t,e,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,a=n("d012");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},cb69:function(t,e,n){"use strict";(function(t){function n(t){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.withParams=void 0;var r="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},o=function(t,e){return"object"===n(t)&&void 0!==e?e:t((function(){}))},i=r.vuelidate?r.vuelidate.withParams:o;e.withParams=i}).call(this,n("c8ba"))},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},ce4e:function(t,e,n){var r=n("da84"),o=n("9112");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("428f"),o=n("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d294:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};e.default=o},d4f4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=(0,r.withParams)({type:"required"},(function(t){return"string"===typeof t?(0,r.req)(t.trim()):(0,r.req)(t)}));e.default=o},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},e652:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t){return(0,r.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,r.ref)(t,this,n)||(0,r.req)(e)}))};e.default=o},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),a=n("9bf2");t.exports=function(t,e){for(var n=o(e),s=a.f,c=i.f,u=0;u=+t}))};e.default=o},ec11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("78ef"),o=function(t,e){return(0,r.withParams)({type:"between",min:t,max:e},(function(n){return!(0,r.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};e.default=o},ee2b:function(t,e){var n="-_",r=36;while(r--)n+=r.toString(36);r=36;while(r---10)n+=r.toString(36).toUpperCase();t.exports=function(t){var e="";r=t||21;while(r--)e+=n[64*Math.random()|0];return e}},f2f3:function(t,e,n){"use strict";function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var o={namespaced:!0,state:{locale:null,fallback:null,translations:{}},mutations:{SET_LOCALE:function(t,e){t.locale=e.locale},ADD_LOCALE:function(t,e){var n=i(e.translations);if(t.translations.hasOwnProperty(e.locale)){var r=t.translations[e.locale];t.translations[e.locale]=Object.assign({},r,n)}else t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(o){}},REPLACE_LOCALE:function(t,e){var n=i(e.translations);t.translations[e.locale]=n;try{t.translations.__ob__&&t.translations.__ob__.dep.notify()}catch(r){}},REMOVE_LOCALE:function(t,e){if(t.translations.hasOwnProperty(e.locale)){t.locale===e.locale&&(t.locale=null);var n=Object.assign({},t.translations);delete n[e.locale],t.translations=n}},SET_FALLBACK_LOCALE:function(t,e){t.fallback=e.locale}},actions:{setLocale:function(t,e){t.commit({type:"SET_LOCALE",locale:e.locale})},addLocale:function(t,e){t.commit({type:"ADD_LOCALE",locale:e.locale,translations:e.translations})},replaceLocale:function(t,e){t.commit({type:"REPLACE_LOCALE",locale:e.locale,translations:e.translations})},removeLocale:function(t,e){t.commit({type:"REMOVE_LOCALE",locale:e.locale,translations:e.translations})},setFallbackLocale:function(t,e){t.commit({type:"SET_FALLBACK_LOCALE",locale:e.locale})}}},i=function t(e){var n={};for(var o in e)if(e.hasOwnProperty(o)){var i=r(e[o]);if(a(e[o])){for(var s=e[o].length,c=0;c1?1:0;case"lv":return e%10===1&&e%100!==11?0:0!==e?1:2;case"lt":return e%10===1&&e%100!==11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"mnk":return 0===e?0:1===e?1:2;case"ro":return 1===e?0:0===e||e%100>0&&e%100<20?1:2;case"pl":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"cs":case"sk":return 1===e?0:e>=2&&e<=4?1:2;case"csb":return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"sl":return e%100===1?0:e%100===2?1:e%100===3||e%100===4?2:3;case"mt":return 1===e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case"gd":return 1===e||11===e?0:2===e||12===e?1:e>2&&e<20?2:3;case"cy":return 1===e?0:2===e?1:8!==e&&11!==e?2:3;case"kw":return 1===e?0:2===e?1:3===e?2:3;case"ga":return 1===e?0:2===e?1:e>2&&e<7?2:e>6&&e<11?3:4;case"ar":return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5;default:return 1!==e?1:0}}},c={install:function(t,e,n){"string"!==typeof arguments[2]&&"string"!==typeof arguments[3]||(console.warn("i18n: Registering the plugin vuex-i18n with a string for `moduleName` or `identifiers` is deprecated. Use a configuration object instead.","https://github.com/dkfbasel/vuex-i18n#setup"),n={moduleName:arguments[2],identifiers:arguments[3]}),n=Object.assign({warnings:!0,moduleName:"i18n",identifiers:["{","}"],preserveState:!1,translateFilterName:"translate",translateInFilterName:"translateIn",onTranslationNotFound:function(){}},n);var r=n.moduleName,i=n.identifiers,a=n.translateFilterName,s=n.translateInFilterName,c=n.onTranslationNotFound;if("function"!==typeof c&&(console.error("i18n: i18n config option onTranslationNotFound must be a function"),c=function(){}),e.registerModule(r,o,{preserveState:n.preserveState}),!1===e.state.hasOwnProperty(r))return console.error("i18n: i18n vuex module is not correctly initialized. Please check the module name:",r),t.prototype.$i18n=function(t){return t},t.prototype.$getLanguage=function(){return null},void(t.prototype.$setLanguage=function(){console.error("i18n: i18n vuex module is not correctly initialized")});var l=u(i,n.warnings),f=function(){var t=e.state[r].locale;return p.apply(void 0,[t].concat(Array.prototype.slice.call(arguments)))},p=function(t){var o=arguments,i="",a="",s={},u=null,f=o.length;if(f>=3&&"string"===typeof o[2]?(i=o[1],a=o[2],f>3&&(s=o[3]),f>4&&(u=o[4])):(i=o[1],a=i,f>2&&(s=o[2]),f>3&&(u=o[3])),!t)return n.warnings&&console.warn("i18n: i18n locale is not set when trying to access translations:",i),a;var p=e.state[r].translations,d=e.state[r].fallback,h=t.split("-"),v=!0;if((!1===p.hasOwnProperty(t)||!1===p[t].hasOwnProperty(i))&&(v=!1),!0===v)return l(t,p[t][i],s,u);if(h.length>1&&!0===p.hasOwnProperty(h[0])&&!0===p[h[0]].hasOwnProperty(i))return l(h[0],p[h[0]][i],s,u);var m=c(t,i,a);return m&&Promise.resolve(m).then((function(e){var n={};n[i]=e,b(t,n)})),!1===p.hasOwnProperty(d)?l(t,a,s,u):!1===p[d].hasOwnProperty(i)?l(d,a,s,u):l(t,p[d][i],s,u)},d=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:"fallback",o=e.state[r].locale,i=e.state[r].fallback,a=e.state[r].translations;if(a.hasOwnProperty(o)&&a[o].hasOwnProperty(t))return!0;if("strict"==n)return!1;var s=o.split("-");return!!(s.length>1&&a.hasOwnProperty(s[0])&&a[s[0]].hasOwnProperty(t))||"locale"!=n&&!(!a.hasOwnProperty(i)||!a[i].hasOwnProperty(t))},v=function(t){e.dispatch({type:"".concat(r,"/setFallbackLocale"),locale:t})},m=function(t){e.dispatch({type:"".concat(r,"/setLocale"),locale:t})},g=function(){return e.state[r].locale},y=function(){return Object.keys(e.state[r].translations)},b=function(t,n){return e.dispatch({type:"".concat(r,"/addLocale"),locale:t,translations:n})},w=function(t,n){return e.dispatch({type:"".concat(r,"/replaceLocale"),locale:t,translations:n})},x=function(t){e.state[r].translations.hasOwnProperty(t)&&e.dispatch({type:"".concat(r,"/removeLocale"),locale:t})},S=function(t){return n.warnings&&console.warn("i18n: $i18n.exists is depreceated. Please use $i18n.localeExists instead. It provides exactly the same functionality."),O(t)},O=function(t){return e.state[r].translations.hasOwnProperty(t)};t.prototype.$i18n={locale:g,locales:y,set:m,add:b,replace:w,remove:x,fallback:v,localeExists:O,keyExists:h,translate:f,translateIn:p,exists:S},t.i18n={locale:g,locales:y,set:m,add:b,replace:w,remove:x,fallback:v,translate:f,translateIn:p,localeExists:O,keyExists:h,exists:S},t.prototype.$t=f,t.prototype.$tlang=p,t.filter(a,f),t.filter(s,d)}},u=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];null!=t&&2==t.length||console.warn("i18n: You must specify the start and end character identifying variable substitutions");var n=new RegExp(t[0]+"{1}(\\w{1}|\\w.+?)"+t[1]+"{1}","g"),o=function(r,o){return r.replace?r.replace(n,(function(n){var i=n.replace(t[0],"").replace(t[1],"");return void 0!==o[i]?o[i]:(e&&(console.group?console.group("i18n: Not all placeholders found"):console.warn("i18n: Not all placeholders found"),console.warn("Text:",r),console.warn("Placeholder:",n),console.groupEnd&&console.groupEnd()),n)})):r},i=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,c=r(n),u=r(a),f=function(){return l(n)?n.map((function(t){return o(t,i,!1)})):"string"===c?o(n,i,!0):void 0};if(null===a)return f();if("number"!==u)return e&&console.warn("i18n: pluralization is not a number"),f();var p=f(),d=null;d=l(p)&&p.length>0?p:p.split(":::");var h=s.getTranslationIndex(t,a);return"undefined"===typeof d[h]?(e&&console.warn("i18n: pluralization not provided in locale",n,t,h),d[0].trim()):d[h].trim()};return i};function l(t){return!!t&&Array===t.constructor}var f={store:o,plugin:c};e["a"]=f},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},f906:function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t,e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,o){var i=o&&o.toUpperCase();return r||n[o]||e[o]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))},r=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d\d/,i=/\d\d?/,a=/\d*[^\s\d-:/()]+/,s=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?\d\d/,function(t){var e,n;(this.zone||(this.zone={})).offset=(e=t.match(/([+-]|\d\d)/g),0===(n=60*e[1]+ +e[2])?0:"+"===e[0]?-n:n)}],u=function(e){var n=t[e];return n&&(n.indexOf?n:n.s.concat(n.f))},l=function(e,n){var r,o=t.meridiem;if(o){for(var i=1;i<=24;i+=1)if(e.indexOf(o(i,0,n))>-1){r=i>12;break}}else r=e===(n?"pm":"PM");return r},f={A:[a,function(t){this.afternoon=l(t,!1)}],a:[a,function(t){this.afternoon=l(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[o,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,s("seconds")],ss:[i,s("seconds")],m:[i,s("minutes")],mm:[i,s("minutes")],H:[i,s("hours")],h:[i,s("hours")],HH:[i,s("hours")],hh:[i,s("hours")],D:[i,s("day")],DD:[o,s("day")],Do:[a,function(e){var n=t.ordinal,r=e.match(/\d+/);if(this.day=r[0],n)for(var o=1;o<=31;o+=1)n(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],M:[i,s("month")],MM:[o,s("month")],MMM:[a,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,s("year")],YY:[o,function(t){t=+t,this.year=t+(t>68?1900:2e3)}],YYYY:[/\d{4}/,s("year")],Z:c,ZZ:c},p=function(e,o,i){try{var a=function(e){for(var o=(e=n(e,t&&t.formats)).match(r),i=o.length,a=0;a0?c-1:m.getMonth());var w=l||0,x=p||0,S=d||0,O=h||0;return v?new Date(Date.UTC(y,b,g,w,x,S,O+60*v.offset*1e3)):i?new Date(Date.UTC(y,b,g,w,x,S,O)):new Date(y,b,g,w,x,S,O)}catch(t){return new Date("")}};return function(e,n,r){r.p.customParseFormat=!0;var o=n.prototype,i=o.parse;o.parse=function(e){var n=e.date,o=e.utc,a=e.args;this.$u=o;var s=a[1];if("string"==typeof s){var c=!0===a[2],u=!0===a[3],l=c||u,f=a[2];u&&(f=a[2]),c||(t=f?r.Ls[f]:this.$locale()),this.$d=p(n,s,o),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),l&&n!==this.format(s)&&(this.$d=new Date("")),t=void 0}else if(s instanceof Array)for(var d=s.length,h=1;h<=d;h+=1){a[1]=s[h-1];var v=r.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}h===d&&(this.$d=new Date(""))}else i.call(this,e)}}}))},f95e:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return f}));var r=n("5313"),o=n("0ac0"),i=function(t,e){this.match=t,this.handler="string"==typeof e?a(e):e};function a(t){return function(e,n,r,o){var i=t;if(n[1]){var a=n[0].lastIndexOf(n[1]);i+=n[0].slice(a+n[1].length),r+=a;var s=r-o;s>0&&(i=n[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}}var s=500;function c(t){var e=t.rules,n=new r["d"]({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return u(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection,o=r.$cursor;o&&u(t,o.pos,o.pos,"",e,n)}))}}},isInputRules:!0});return n}function u(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,c=a.doc.resolve(e);if(c.parent.type.spec.code)return!1;for(var u=c.parent.textBetween(Math.max(0,c.parentOffset-s),c.parentOffset,null,"")+r,l=0;l=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){var u=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,u))}else a.delete(i.from,i.to);e(a)}return!0}}return!1}new i(/--$/,"—"),new i(/\.\.\.$/,"…"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new i(/"$/,"”"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new i(/'$/,"’");function f(t,e,n,r){return new i(t,(function(t,i,a,s){var c=n instanceof Function?n(i):n,u=t.tr.delete(a,s),l=u.doc.resolve(a),f=l.blockRange(),p=f&&Object(o["h"])(f,e,c);if(!p)return null;u.wrap(f,p);var d=u.doc.resolve(a-1).nodeBefore;return d&&d.type==e&&Object(o["e"])(u.doc,a-1)&&(!r||r(i,d))&&u.join(a-1),u}))}function p(t,e,n){return new i(t,(function(t,r,o,i){var a=t.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,s):null}))}},fbf4:function(t,e,n){"use strict";function r(t){return null===t||void 0===t}function o(t){return null!==t&&void 0!==t}function i(t,e){return e.tag===t.tag&&e.key===t.key}function a(t){var e=t.tag;t.vm=new e({data:t.args})}function s(t){for(var e=Object.keys(t.args),n=0;nv?l(e,h,y):h>y&&f(t,d,v)}function l(t,e,n){for(;e<=n;++e)a(t[e])}function f(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(r.vm.$destroy(),r.vm=null)}}function p(t,e){t!==e&&(e.vm=t.vm,s(e))}function d(t,e){o(t)&&o(e)?t!==e&&u(t,e):o(e)?l(e,0,e.length-1):o(t)&&f(t,0,t.length-1)}function h(t,e,n){return{tag:t,key:e,args:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.patchChildren=d,e.h=h},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}}}]); \ No newline at end of file +function sm(t){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lm(){return lm=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}im.default=am,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return x.default}}),t.helpers=void 0;var e=k(pv),n=k(gv),r=k(bv),o=k(xv),i=k(kv),a=k(Ov),s=k($v),c=k(Ev),l=k(Pv),u=k(Rv),f=k(Fv),p=k(Bv),d=k(Wv),h=k(qv),v=k(Kv),m=k(Uv),g=k(Gv),y=k(Qv),b=k(em),w=k(rm),x=k(im),S=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(dv);function k(t){return t&&t.__esModule?t:{default:t}}t.helpers=S}(fv);function pm(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var dm=pm(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),hm=pm(/Edge/i),vm=pm(/firefox/i),mm=pm(/safari/i)&&!pm(/chrome/i)&&!pm(/android/i),gm=pm(/iP(ad|od|hone)/i),ym=pm(/chrome/i)&&pm(/android/i),bm={capture:!1,passive:!1};function wm(t,e,n){t.addEventListener(e,n,!dm&&bm)}function xm(t,e,n){t.removeEventListener(e,n,!dm&&bm)}function Sm(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function km(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function _m(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Sm(t,e):Sm(t,e))||r&&t===n)return t;if(t===n)break}while(t=km(t))}return null}var Om,Cm=/\s+/g;function Mm(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Cm," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Cm," ")}}function Dm(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function $m(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Dm(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Tm(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o=i:o<=i))return r;if(r===Am())break;r=zm(r,!1)}return!1}function Pm(t,e,n){for(var r=0,o=0,i=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=fm(n,["evt"]);Km.pluginEvent.bind(Lg)(t,e,um({dragEl:Xm,parentEl:Gm,ghostEl:Zm,rootEl:Qm,nextEl:tg,lastDownEl:eg,cloneEl:ng,cloneHidden:rg,dragStarted:mg,putSortable:lg,activeSortable:Lg.active,originalEvent:r,oldIndex:og,oldDraggableIndex:ag,newIndex:ig,newDraggableIndex:sg,hideGhostForTarget:Rg,unhideGhostForTarget:jg,cloneNowHidden:function(){rg=!0},cloneNowShown:function(){rg=!1},dispatchSortableEvent:function(t){Um({sortable:e,name:t,originalEvent:r})}},o))};function Um(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,c=t.oldIndex,l=t.newIndex,u=t.oldDraggableIndex,f=t.newDraggableIndex,p=t.originalEvent,d=t.putSortable,h=t.extraEventProperties;if(e=e||n&&n[Wm]){var v,m=e.options,g="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||dm||hm?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=s||n,v.item=o||n,v.clone=i,v.oldIndex=c,v.newIndex=l,v.oldDraggableIndex=u,v.newDraggableIndex=f,v.originalEvent=p,v.pullMode=d?d.lastPutMode:void 0;var y=um({},h,Km.getEventProperties(r,e));for(var b in y)v[b]=y[b];n&&n.dispatchEvent(v),m[g]&&m[g].call(e,v)}}(um({putSortable:lg,cloneEl:ng,targetEl:Xm,rootEl:Qm,oldIndex:og,oldDraggableIndex:ag,newIndex:ig,newDraggableIndex:sg},t))}var Xm,Gm,Zm,Qm,tg,eg,ng,rg,og,ig,ag,sg,cg,lg,ug,fg,pg,dg,hg,vg,mg,gg,yg,bg,wg,xg=!1,Sg=!1,kg=[],_g=!1,Og=!1,Cg=[],Mg=!1,Dg=[],$g="undefined"!=typeof document,Tg=gm,Ag=hm||dm?"cssFloat":"float",Eg=$g&&!ym&&!gm&&"draggable"in document.createElement("div"),Ng=function(){if($g){if(dm)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pg=function(t,e){var n=Dm(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Pm(t,0,e),i=Pm(t,1,e),a=o&&Dm(o),s=i&&Dm(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Em(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Em(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Ag]||i&&"none"===n[Ag]&&c+l>r)?"vertical":"horizontal"},Ig=function(t){function e(t,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==sm(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Rg=function(){!Ng&&Zm&&Dm(Zm,"display","none")},jg=function(){!Ng&&Zm&&Dm(Zm,"display","")};$g&&document.addEventListener("click",(function(t){if(Sg)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Sg=!1,!1}),!0);var zg=function(t){if(Xm){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,kg.some((function(t){if(!Im(t)){var e=Em(t),n=t[Wm].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,s=i>=e.top-n&&i<=e.bottom+n;return n&&r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Wm]._onDragOver(n)}}var o,i,a},Fg=function(t){Xm&&Xm.parentNode[Wm]._isOutsideThisEl(t.target)};function Lg(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=lm({},e),t[Wm]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Lg.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in Km.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Ig(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Eg,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?wm(t,"pointerdown",this._onTapStart):(wm(t,"mousedown",this._onTapStart),wm(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(wm(t,"dragover",this),wm(t,"dragenter",this)),kg.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),lm(this,Hm())}function Bg(t,e,n,r,o,i,a,s){var c,l,u=t[Wm],f=u.options.onMove;return!window.CustomEvent||dm||hm?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||Em(e),c.willInsertAfter=s,c.originalEvent=a,t.dispatchEvent(c),f&&(l=f.call(u,c,a)),l}function Vg(t){t.draggable=!1}function Wg(){Mg=!1}function Hg(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function qg(t){return setTimeout(t,0)}function Jg(t){return clearTimeout(t)}Lg.prototype={constructor:Lg,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gg=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Xm):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){Dg.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Dg.push(r)}}(n),!Xm&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(s=_m(s,r.draggable,n,!1))&&s.animated||eg===s)){if(og=Rm(s),ag=Rm(s,r.draggable),"function"==typeof l){if(l.call(this,t,s,this))return Um({sortable:e,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),Ym("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=_m(c,r.trim(),n,!1))return Um({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Ym("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!_m(c,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!Xm&&n.parentNode===i){var c=Em(n);if(Qm=i,Gm=(Xm=n).parentNode,tg=Xm.nextSibling,eg=n,cg=a.group,Lg.dragged=Xm,ug={target:Xm,clientX:(e||t).clientX,clientY:(e||t).clientY},hg=ug.clientX-c.left,vg=ug.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Xm.style["will-change"]="all",r=function(){Ym("delayEnded",o,{evt:t}),Lg.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!vm&&o.nativeDraggable&&(Xm.draggable=!0),o._triggerDragStart(t,e),Um({sortable:o,name:"choose",originalEvent:t}),Mm(Xm,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){Tm(Xm,t.trim(),Vg)})),wm(s,"dragover",zg),wm(s,"mousemove",zg),wm(s,"touchmove",zg),wm(s,"mouseup",o._onDrop),wm(s,"touchend",o._onDrop),wm(s,"touchcancel",o._onDrop),vm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Xm.draggable=!0),Ym("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(hm||dm))r();else{if(Lg.eventCanceled)return void this._onDrop();wm(s,"mouseup",o._disableDelayedDrag),wm(s,"touchend",o._disableDelayedDrag),wm(s,"touchcancel",o._disableDelayedDrag),wm(s,"mousemove",o._delayedDragTouchMoveHandler),wm(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&wm(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Xm&&Vg(Xm),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;xm(t,"mouseup",this._disableDelayedDrag),xm(t,"touchend",this._disableDelayedDrag),xm(t,"touchcancel",this._disableDelayedDrag),xm(t,"mousemove",this._delayedDragTouchMoveHandler),xm(t,"touchmove",this._delayedDragTouchMoveHandler),xm(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?wm(document,"pointermove",this._onTouchMove):wm(document,e?"touchmove":"mousemove",this._onTouchMove):(wm(Xm,"dragend",this),wm(Qm,"dragstart",this._onDragStart));try{document.selection?qg((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(xg=!1,Qm&&Xm){Ym("dragStarted",this,{evt:e}),this.nativeDraggable&&wm(document,"dragover",Fg);var n=this.options;!t&&Mm(Xm,n.dragClass,!1),Mm(Xm,n.ghostClass,!0),Lg.active=this,t&&this._appendGhost(),Um({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(fg){this._lastX=fg.clientX,this._lastY=fg.clientY,Rg();for(var t=document.elementFromPoint(fg.clientX,fg.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(fg.clientX,fg.clientY))!==e;)e=t;if(Xm.parentNode[Wm]._isOutsideThisEl(t),e)do{if(e[Wm]){if(e[Wm]._onDragOver({clientX:fg.clientX,clientY:fg.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);jg()}},_onTouchMove:function(t){if(ug){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=Zm&&$m(Zm,!0),a=Zm&&i&&i.a,s=Zm&&i&&i.d,c=Tg&&wg&&jm(wg),l=(o.clientX-ug.clientX+r.x)/(a||1)+(c?c[0]-Cg[0]:0)/(a||1),u=(o.clientY-ug.clientY+r.y)/(s||1)+(c?c[1]-Cg[1]:0)/(s||1);if(!Lg.active&&!xg){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!v.animated){if(v===Xm)return T(!1);if(v&&i===t.target&&(a=v),a&&(n=Em(a)),!1!==Bg(Qm,i,Xm,e,a,n,t,!!a))return $(),i.appendChild(Xm),Gm=i,A(),T(!0)}else if(a.parentNode===i){n=Em(a);var m,g,y,b=Xm.parentNode!==i,w=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===s||r+i/2===a+c/2}(Xm.animated&&Xm.toRect||e,a.animated&&a.toRect||n,o),x=o?"top":"left",S=Nm(a,"top","top")||Nm(Xm,"top","top"),k=S?S.scrollTop:void 0;if(gg!==a&&(g=n[x],_g=!1,Og=!w&&s.invertSwap||b),m=function(t,e,n,r,o,i,a,s){var c=r?t.clientY:t.clientX,l=r?n.height:n.width,u=r?n.top:n.left,f=r?n.bottom:n.right,p=!1;if(!a)if(s&&bgu+l*i/2:cf-bg)return-yg}else if(c>u+l*(1-o)/2&&cf-l*i/2))return c>u+l/2?1:-1;return 0}(t,a,n,o,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Og,gg===a),0!==m){var _=Rm(Xm);do{_-=m,y=Gm.children[_]}while(y&&("none"===Dm(y,"display")||y===Zm))}if(0===m||y===a)return T(!1);gg=a,yg=m;var O=a.nextElementSibling,C=!1,M=Bg(Qm,i,Xm,e,a,n,t,C=1===m);if(!1!==M)return 1!==M&&-1!==M||(C=1===M),Mg=!0,setTimeout(Wg,30),$(),C&&!O?i.appendChild(Xm):a.parentNode.insertBefore(Xm,C?O:a),S&&Bm(S,0,k-S.scrollTop),Gm=Xm.parentNode,void 0===g||Og||(bg=Math.abs(g-Em(a)[x])),A(),T(!0)}if(i.contains(Xm))return T(!1)}return!1}function D(s,c){Ym(s,d,um({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:p,target:a,completed:T,onMove:function(n,r){return Bg(Qm,i,Xm,e,n,Em(n),t,r)},changed:A},c))}function $(){D("dragOverAnimationCapture"),d.captureAnimationState(),d!==p&&p.captureAnimationState()}function T(e){return D("dragOverCompleted",{insertion:e}),e&&(u?l._hideClone():l._showClone(d),d!==p&&(Mm(Xm,lg?lg.options.ghostClass:l.options.ghostClass,!1),Mm(Xm,s.ghostClass,!0)),lg!==d&&d!==Lg.active?lg=d:d===Lg.active&&lg&&(lg=null),p===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){D("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===Xm&&!Xm.animated||a===i&&!a.animated)&&(gg=null),s.dragoverBubble||t.rootEl||a===document||(Xm.parentNode[Wm]._isOutsideThisEl(t.target),!e&&zg(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function A(){ig=Rm(Xm),sg=Rm(Xm,s.draggable),Um({sortable:d,name:"change",toEl:i,newIndex:ig,newDraggableIndex:sg,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){xm(document,"mousemove",this._onTouchMove),xm(document,"touchmove",this._onTouchMove),xm(document,"pointermove",this._onTouchMove),xm(document,"dragover",zg),xm(document,"mousemove",zg),xm(document,"touchmove",zg)},_offUpEvents:function(){var t=this.el.ownerDocument;xm(t,"mouseup",this._onDrop),xm(t,"touchend",this._onDrop),xm(t,"pointerup",this._onDrop),xm(t,"touchcancel",this._onDrop),xm(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ig=Rm(Xm),sg=Rm(Xm,n.draggable),Ym("drop",this,{evt:t}),Gm=Xm&&Xm.parentNode,ig=Rm(Xm),sg=Rm(Xm,n.draggable),Lg.eventCanceled||(xg=!1,Og=!1,_g=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Jg(this.cloneId),Jg(this._dragStartId),this.nativeDraggable&&(xm(document,"drop",this),xm(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),mm&&Dm(document.body,"user-select",""),Dm(Xm,"transform",""),t&&(mg&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Zm&&Zm.parentNode&&Zm.parentNode.removeChild(Zm),(Qm===Gm||lg&&"clone"!==lg.lastPutMode)&&ng&&ng.parentNode&&ng.parentNode.removeChild(ng),Xm&&(this.nativeDraggable&&xm(Xm,"dragend",this),Vg(Xm),Xm.style["will-change"]="",mg&&!xg&&Mm(Xm,lg?lg.options.ghostClass:this.options.ghostClass,!1),Mm(Xm,this.options.chosenClass,!1),Um({sortable:this,name:"unchoose",toEl:Gm,newIndex:null,newDraggableIndex:null,originalEvent:t}),Qm!==Gm?(ig>=0&&(Um({rootEl:Gm,name:"add",toEl:Gm,fromEl:Qm,originalEvent:t}),Um({sortable:this,name:"remove",toEl:Gm,originalEvent:t}),Um({rootEl:Gm,name:"sort",toEl:Gm,fromEl:Qm,originalEvent:t}),Um({sortable:this,name:"sort",toEl:Gm,originalEvent:t})),lg&&lg.save()):ig!==og&&ig>=0&&(Um({sortable:this,name:"update",toEl:Gm,originalEvent:t}),Um({sortable:this,name:"sort",toEl:Gm,originalEvent:t})),Lg.active&&(null!=ig&&-1!==ig||(ig=og,sg=ag),Um({sortable:this,name:"end",toEl:Gm,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ym("nulling",this),Qm=Xm=Gm=Zm=tg=ng=eg=rg=ug=fg=mg=ig=sg=og=ag=gg=yg=lg=cg=Lg.dragged=Lg.ghost=Lg.clone=Lg.active=null,Dg.forEach((function(t){t.checked=!0})),Dg.length=pg=dg=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Xm&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;rt.replace(cy,((t,e)=>e?e.toUpperCase():""))));function uy(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function fy(t,e,n){const r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function py(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function dy(t){return e=>{null!==this.realList&&this["onDrag"+t](e),py.call(this,t,e)}}function hy(t){return["transition-group","TransitionGroup"].includes(t)}function vy(t,e,n){return t[n]||(e[n]?e[n]():void 0)}const my=["Start","Add","Remove","Update","End"],gy=["Choose","Unchoose","Sort","Filter","Clone"],yy=["Move",...my,...gy].map((t=>"on"+t));var by=null;const wy={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(t){const e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{componentOptions:e}]=t;return!!e&&hy(e.tag)}(e);const{children:n,headerOffset:r,footerOffset:o}=function(t,e,n){let r=0,o=0;const i=vy(e,n,"header");i&&(r=i.length,t=t?[...i,...t]:[...i]);const a=vy(e,n,"footer");return a&&(o=a.length,t=t?[...t,...a]:[...a]),{children:t,headerOffset:r,footerOffset:o}}(e,this.$slots,this.$scopedSlots);this.headerOffset=r,this.footerOffset=o;const i=function(t,e){let n=null;const r=(t,e)=>{n=function(t,e,n){return void 0===n||((t=t||{})[e]=n),t}(n,t,e)},o=Object.keys(t).filter((t=>"id"===t||t.startsWith("data-"))).reduce(((e,n)=>(e[n]=t[n],e)),{});if(r("attrs",o),!e)return n;const{on:i,props:a,attrs:s}=e;return r("on",i),r("props",a),Object.assign(n.attrs,s),n}(this.$attrs,this.componentData);return t(this.getTag(),i,n)},created(){null!==this.list&&null!==this.value&&sy.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&sy.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&sy.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error(`Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}`);const t={};my.forEach((e=>{t["on"+e]=dy.call(this,e)})),gy.forEach((e=>{t["on"+e]=py.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[ly(e)]=this.$attrs[e],t)),{}),n=Object.assign({},this.options,e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Lg(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(t){this.updateOptions(t)},deep:!0},$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:t}=this._vnode;return t&&t.functional},getTag(){return this.tag||this.element},updateOptions(t){for(var e in t){const n=ly(e);-1===yy.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,r){if(!t)return[];const o=t.map((t=>t.elm)),i=e.length-r,a=[...e].map(((t,e)=>e>=i?o.length:o.indexOf(t)));return n?a.filter((t=>-1!==t)):a}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return t.map((t=>t.elm)).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:({__vue__:t})=>t&&t.$options&&hy(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t,emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.value];t(e),this.$emit("input",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,o={list:r,component:n};if(t!==e&&r&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,o)}return o},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),by=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;uy(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(fy(this.rootContainer,t.item,t.oldIndex),"clone"===t.pullMode)return void uy(t.clone);const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){uy(t.item),fy(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),r=n.indexOf(e.related),o=t.component.getVmIndex(r);return-1!==n.indexOf(by)||!e.willInsertAfter?o:o+1},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});return n(Object.assign({},t,{relatedContext:r,draggedContext:o}),e)},onDragEnd(){this.computeIndexes(),by=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",wy);export{lv as A,uv as B,av as C,jl as D,Yu as E,zc as F,fv as G,wy as H,Ch as I,dc as J,Nc as K,ju as N,Zu as P,qc as S,Iu as T,Cn as V,Hs as a,Qs as b,oc as c,nc as d,bh as e,vh as f,Th as g,Ah as h,Fh as i,Bh as j,Wh as k,Vh as l,qs as m,ch as n,Il as o,Mh as p,Vd as q,Yl as r,gh as s,yh as t,ac as u,$h as v,Lh as w,Oh as x,sv as y,cv as z}; diff --git a/kirby/panel/vite.config.js b/kirby/panel/vite.config.js new file mode 100644 index 0000000..7e46260 --- /dev/null +++ b/kirby/panel/vite.config.js @@ -0,0 +1,99 @@ +import fs from "fs"; +import path from "path"; +import { defineConfig } from "vite"; +import { createVuePlugin } from "vite-plugin-vue2"; +import postcssAutoprefixer from "autoprefixer"; +import postcssCsso from "postcss-csso"; +import postcssDirPseudoClass from "postcss-dir-pseudo-class"; +import postcssLogical from "postcss-logical"; +import pluginRewriteAll from "vite-plugin-rewrite-all"; + +let custom; +try { + custom = require("./vite.config.custom.js"); +} catch (err) { + custom = {}; +} + +export default defineConfig(({ command }) => { + // Tell Kirby that we are in dev mode + if (command === "serve") { + // Create the flag file on start + const runningPath = __dirname + "/.vite-running"; + fs.closeSync(fs.openSync(runningPath, "w")); + + // Delete the flag file on any kind of exit + for (const eventType of ["exit", "SIGINT", "uncaughtException"]) { + process.on(eventType, function(err) { + if (fs.existsSync(runningPath) === true) { + fs.unlinkSync(runningPath); + } + + if (eventType === "uncaughtException") { + console.error(err); + } + + process.exit(); + }); + } + } + + const proxy = { + target: process.env.VUE_APP_DEV_SERVER || "http://sandbox.test", + changeOrigin: true, + secure: false + }; + + return { + plugins: [createVuePlugin(), pluginRewriteAll()], + define: { + // Fix vuelidate error + "process.env.BUILD": JSON.stringify("production") + }, + build: { + minify: "terser", + cssCodeSplit: false, + rollupOptions: { + input: "/src/index.js", + output: { + entryFileNames: "js/[name].js", + chunkFileNames: "js/[name].js", + assetFileNames: "[ext]/[name].[ext]" + } + } + }, + optimizeDeps: { + entries: "src/**/*.{js,vue}" + }, + css: { + postcss: { + plugins: [ + postcssLogical(), + postcssDirPseudoClass(), + postcssCsso(), + postcssAutoprefixer() + ] + } + }, + resolve: { + alias: [ + { + find: "vue", + replacement: "vue/dist/vue.esm.js" + }, + { + find: "@", + replacement: path.resolve(__dirname, "src") + } + ] + }, + server: { + proxy: { + "/api": proxy, + "/env": proxy, + "/media": proxy + }, + ...custom + } + }; +}); diff --git a/kirby/src/Api/Api.php b/kirby/src/Api/Api.php index 185ec47..1512098 100644 --- a/kirby/src/Api/Api.php +++ b/kirby/src/Api/Api.php @@ -5,9 +5,9 @@ namespace Kirby\Api; use Closure; use Exception; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\F; use Kirby\Http\Response; use Kirby\Http\Router; -use Kirby\Toolkit\F; use Kirby\Toolkit\Pagination; use Kirby\Toolkit\Properties; use Kirby\Toolkit\Str; diff --git a/kirby/src/Cache/FileCache.php b/kirby/src/Cache/FileCache.php index a0adf74..d47e332 100644 --- a/kirby/src/Cache/FileCache.php +++ b/kirby/src/Cache/FileCache.php @@ -3,8 +3,8 @@ namespace Kirby\Cache; use Kirby\Exception\Exception; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Toolkit\Str; /** diff --git a/kirby/src/Cache/MemCached.php b/kirby/src/Cache/MemCached.php index 2f9c2bc..3a64cfa 100644 --- a/kirby/src/Cache/MemCached.php +++ b/kirby/src/Cache/MemCached.php @@ -16,7 +16,7 @@ use Memcached as MemcachedExt; class MemCached extends Cache { /** - * store for the memache connection + * store for the memcache connection * @var \Memcached */ protected $connection; diff --git a/kirby/src/Cms/Api.php b/kirby/src/Cms/Api.php index f6dfe88..06cc4e0 100644 --- a/kirby/src/Cms/Api.php +++ b/kirby/src/Cms/Api.php @@ -3,9 +3,8 @@ namespace Kirby\Cms; use Kirby\Api\Api as BaseApi; -use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; -use Kirby\Toolkit\Str; +use Kirby\Form\Form; /** * Api @@ -61,10 +60,12 @@ class Api extends BaseApi { $field = Form::for($model)->field($name); - $fieldApi = $this->clone([ - 'routes' => $field->api(), - 'data' => array_merge($this->data(), ['field' => $field]) - ]); + $fieldApi = new static( + array_merge($this->propertyData, [ + 'data' => array_merge($this->data(), ['field' => $field]), + 'routes' => $field->api(), + ]), + ); return $fieldApi->call($path, $this->requestMethod(), $this->requestData()); } @@ -80,19 +81,7 @@ class Api extends BaseApi */ public function file(string $path = null, string $filename) { - $filename = urldecode($filename); - $file = $this->parent($path)->file($filename); - - if ($file && $file->isReadable() === true) { - return $file; - } - - throw new NotFoundException([ - 'key' => 'file.notFound', - 'data' => [ - 'filename' => $filename - ] - ]); + return Find::file($path, $filename); } /** @@ -105,49 +94,7 @@ class Api extends BaseApi */ public function parent(string $path) { - $modelType = in_array($path, ['site', 'account']) ? $path : trim(dirname($path), '/'); - $modelTypes = [ - 'site' => 'site', - 'users' => 'user', - 'pages' => 'page', - 'account' => 'account' - ]; - $modelName = $modelTypes[$modelType] ?? null; - - if (Str::endsWith($modelType, '/files') === true) { - $modelName = 'file'; - } - - $kirby = $this->kirby(); - - switch ($modelName) { - case 'site': - $model = $kirby->site(); - break; - case 'account': - $model = $kirby->user(null, $kirby->option('api.allowImpersonation', false)); - break; - case 'page': - $id = str_replace(['+', ' '], '/', basename($path)); - $model = $kirby->page($id); - break; - case 'file': - $model = $this->file(...explode('/files/', $path)); - break; - case 'user': - $model = $kirby->user(basename($path)); - break; - default: - throw new InvalidArgumentException('Invalid model type: ' . $modelType); - } - - if ($model) { - return $model; - } - - throw new NotFoundException([ - 'key' => $modelName . '.undefined' - ]); + return Find::parent($path); } /** @@ -179,19 +126,7 @@ class Api extends BaseApi */ public function page(string $id) { - $id = str_replace('+', '/', $id); - $page = $this->kirby->page($id); - - if ($page && $page->isReadable() === true) { - return $page; - } - - throw new NotFoundException([ - 'key' => 'page.notFound', - 'data' => [ - 'slug' => $id - ] - ]); + return Find::page($id); } /** @@ -287,22 +222,15 @@ class Api extends BaseApi */ public function user(string $id = null) { - // get the authenticated user - if ($id === null) { - return $this->kirby->auth()->user(null, $this->kirby()->option('api.allowImpersonation', false)); - } + try { + return Find::user($id); + } catch (NotFoundException $e) { + if ($id === null) { + return null; + } - // get a specific user by id - if ($user = $this->kirby->users()->find($id)) { - return $user; + throw $e; } - - throw new NotFoundException([ - 'key' => 'user.notFound', - 'data' => [ - 'name' => $id - ] - ]); } /** diff --git a/kirby/src/Cms/App.php b/kirby/src/Cms/App.php index a887e5f..a6a1157 100644 --- a/kirby/src/Cms/App.php +++ b/kirby/src/Cms/App.php @@ -3,22 +3,23 @@ namespace Kirby\Cms; use Kirby\Data\Data; -use Kirby\Email\PHPMailer as Emailer; use Kirby\Exception\ErrorPageException; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Http\Request; use Kirby\Http\Router; use Kirby\Http\Server; use Kirby\Http\Uri; use Kirby\Http\Visitor; use Kirby\Session\AutoSession; +use Kirby\Text\KirbyTag; +use Kirby\Text\KirbyTags; use Kirby\Toolkit\A; use Kirby\Toolkit\Config; use Kirby\Toolkit\Controller; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; use Kirby\Toolkit\Properties; use Throwable; @@ -53,6 +54,7 @@ class App protected $api; protected $collections; + protected $core; protected $defaultLanguage; protected $language; protected $languages; @@ -84,6 +86,8 @@ class App */ public function __construct(array $props = [], bool $setInstance = true) { + $this->core = new Core($this); + // register all roots to be able to load stuff afterwards $this->bakeRoots($props['roots'] ?? []); @@ -265,7 +269,7 @@ class App */ protected function bakeRoots(array $roots = null) { - $roots = array_merge(require dirname(__DIR__, 2) . '/config/roots.php', (array)$roots); + $roots = array_merge($this->core->roots(), (array)$roots); $this->roots = Ingredients::bake($roots); return $this; } @@ -283,7 +287,7 @@ class App $urls['index'] = $this->options['url']; } - $urls = array_merge(require $this->root('kirby') . '/config/urls.php', (array)$urls); + $urls = array_merge($this->core->urls(), (array)$urls); $this->urls = Ingredients::bake($urls); return $this; } @@ -503,6 +507,17 @@ class App return null; } + /** + * Get access to object that lists + * all parts of Kirby core + * + * @return \Kirby\Cms\Core + */ + public function core() + { + return $this->core; + } + /** * Returns the default language object * @@ -555,11 +570,14 @@ class App * * @param mixed $preset * @param array $props - * @return \Kirby\Email\PHPMailer + * @return \Kirby\Email\Email */ public function email($preset = [], array $props = []) { - return new Emailer((new Email($preset, $props))->toArray(), $props['debug'] ?? false); + $debug = $props['debug'] ?? false; + $props = (new Email($preset, $props))->toArray(); + + return ($this->component('email'))($this, $props, $debug); } /** @@ -641,12 +659,11 @@ class App // any direct exception will be turned into an error page if (is_a($input, 'Throwable') === true) { if (is_a($input, 'Kirby\Exception\Exception') === true) { - $code = $input->getHttpCode(); - $message = $input->getMessage(); + $code = $input->getHttpCode(); } else { - $code = $input->getCode(); - $message = $input->getMessage(); + $code = $input->getCode(); } + $message = $input->getMessage(); if ($code < 400 || $code > 599) { $code = 500; @@ -748,8 +765,13 @@ class App $data['kirby'] = $data['kirby'] ?? $this; $data['site'] = $data['site'] ?? $data['kirby']->site(); $data['parent'] = $data['parent'] ?? $data['site']->page(); + $options = $this->options; - return KirbyTags::parse($text, $data, $this->options, $this); + $text = $this->apply('kirbytags:before', compact('text', 'data', 'options'), 'text'); + $text = KirbyTags::parse($text, $data, $options); + $text = $this->apply('kirbytags:after', compact('text', 'data', 'options'), 'text'); + + return $text; } /** @@ -818,17 +840,28 @@ class App /** * Returns all available site languages * + * @param bool * @return \Kirby\Cms\Languages */ - public function languages() + public function languages(bool $clone = true) { if ($this->languages !== null) { - return clone $this->languages; + return $clone === true ? clone $this->languages : $this->languages; } return $this->languages = Languages::load(); } + /** + * Access Kirby's part loader + * + * @return \Kirby\Cms\Loader + */ + public function load() + { + return new Loader($this); + } + /** * Returns the app's locks object * @@ -996,6 +1029,10 @@ class App $parent = $parent ?? $this->site(); if ($page = $parent->find($id)) { + /** + * We passed a single $id, we can be sure that the result is + * @var \Kirby\Cms\Page $page + */ return $page; } @@ -1213,7 +1250,7 @@ class App } $registry = $this->extensions('routes'); - $system = (include $this->root('kirby') . '/config/routes.php')($this); + $system = $this->core->routes(); $routes = array_merge($system['before'], $registry, $system['after']); return $this->routes = $routes; diff --git a/kirby/src/Cms/AppCaches.php b/kirby/src/Cms/AppCaches.php index d1219bf..14528fb 100644 --- a/kirby/src/Cms/AppCaches.php +++ b/kirby/src/Cms/AppCaches.php @@ -53,7 +53,7 @@ trait AppCaches // initialize the cache class $cache = new $className($options); - // check if it is a useable cache object + // check if it is a usable cache object if (is_a($cache, 'Kirby\Cache\Cache') !== true) { throw new InvalidArgumentException([ 'key' => 'app.invalid.cacheType', diff --git a/kirby/src/Cms/AppPlugins.php b/kirby/src/Cms/AppPlugins.php index 03fca7c..9d761ce 100644 --- a/kirby/src/Cms/AppPlugins.php +++ b/kirby/src/Cms/AppPlugins.php @@ -4,12 +4,15 @@ namespace Kirby\Cms; use Closure; use Kirby\Exception\DuplicateException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; +use Kirby\Filesystem\Mime; use Kirby\Form\Field as FormField; +use Kirby\Image\Image; +use Kirby\Panel\Panel; use Kirby\Text\KirbyTag; use Kirby\Toolkit\A; use Kirby\Toolkit\Collection as ToolkitCollection; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; use Kirby\Toolkit\V; /** @@ -30,13 +33,6 @@ trait AppPlugins */ protected static $plugins = []; - /** - * Cache for system extensions - * - * @var array - */ - protected static $systemExtensions = null; - /** * The extension registry * @@ -48,7 +44,11 @@ trait AppPlugins // other plugin types 'api' => [], + 'areas' => [], 'authChallenges' => [], + 'blockMethods' => [], + 'blockModels' => [], + 'blocksMethods' => [], 'blueprints' => [], 'cacheTypes' => [], 'collections' => [], @@ -58,9 +58,13 @@ trait AppPlugins 'collectionMethods' => [], 'fieldMethods' => [], 'fileMethods' => [], + 'fileTypes' => [], 'filesMethods' => [], 'fields' => [], 'hooks' => [], + 'layoutMethods' => [], + 'layoutColumnMethods' => [], + 'layoutsMethods' => [], 'pages' => [], 'pageMethods' => [], 'pagesMethods' => [], @@ -77,7 +81,7 @@ trait AppPlugins 'userMethods' => [], 'userModels' => [], 'usersMethods' => [], - 'validators' => [] + 'validators' => [], ]; /** @@ -126,6 +130,25 @@ trait AppPlugins } } + /** + * Registers additional custom Panel areas + * + * @param array $areas + * @return array + */ + protected function extendAreas(array $areas): array + { + foreach ($areas as $id => $area) { + if (isset($this->extensions['areas'][$id]) === false) { + $this->extensions['areas'][$id] = []; + } + + $this->extensions['areas'][$id][] = $area; + } + + return $this->extensions['areas']; + } + /** * Registers additional authentication challenges * @@ -137,6 +160,39 @@ trait AppPlugins return $this->extensions['authChallenges'] = Auth::$challenges = array_merge(Auth::$challenges, $challenges); } + /** + * Registers additional block methods + * + * @param array $methods + * @return array + */ + protected function extendBlockMethods(array $methods): array + { + return $this->extensions['blockMethods'] = Block::$methods = array_merge(Block::$methods, $methods); + } + + /** + * Registers additional block models + * + * @param array $models + * @return array + */ + protected function extendBlockModels(array $models): array + { + return $this->extensions['blockModels'] = Block::$models = array_merge(Block::$models, $models); + } + + /** + * Registers additional blocks methods + * + * @param array $methods + * @return array + */ + protected function extendBlocksMethods(array $methods): array + { + return $this->extensions['blockMethods'] = Blocks::$methods = array_merge(Blocks::$methods, $methods); + } + /** * Registers additional blueprints * @@ -225,6 +281,59 @@ trait AppPlugins return $this->extensions['fileMethods'] = File::$methods = array_merge(File::$methods, $methods); } + /** + * Registers additional custom file types and mimes + * + * @param array $fileTypes + * @return array + */ + protected function extendFileTypes(array $fileTypes): array + { + // normalize array + foreach ($fileTypes as $ext => $file) { + $extension = $file['extension'] ?? $ext; + $type = $file['type'] ?? null; + $mime = $file['mime'] ?? null; + $resizable = $file['resizable'] ?? false; + $viewable = $file['viewable'] ?? false; + + if (is_string($type) === true) { + if (isset(F::$types[$type]) === false) { + F::$types[$type] = []; + } + + if (in_array($extension, F::$types[$type]) === false) { + F::$types[$type][] = $extension; + } + } + + if ($mime !== null) { + if (array_key_exists($extension, Mime::$types) === true) { + // if `Mime::$types[$extension]` is not already an array, make it one + // and append the new MIME type unless it's already in the list + Mime::$types[$extension] = array_unique(array_merge((array)Mime::$types[$extension], (array)$mime)); + } else { + Mime::$types[$extension] = $mime; + } + } + + if ($resizable === true && in_array($extension, Image::$resizableTypes) === false) { + Image::$resizableTypes[] = $extension; + } + + if ($viewable === true && in_array($extension, Image::$viewableTypes) === false) { + Image::$viewableTypes[] = $extension; + } + } + + return $this->extensions['fileTypes'] = [ + 'type' => F::$types, + 'mime' => Mime::$types, + 'resizable' => Image::$resizableTypes, + 'viewable' => Image::$viewableTypes + ]; + } + /** * Registers additional files methods * @@ -294,6 +403,39 @@ trait AppPlugins return $this->extensions['markdown'] = $markdown; } + /** + * Registers additional layout methods + * + * @param array $methods + * @return array + */ + protected function extendLayoutMethods(array $methods): array + { + return $this->extensions['layoutMethods'] = Layout::$methods = array_merge(Layout::$methods, $methods); + } + + /** + * Registers additional layout column methods + * + * @param array $methods + * @return array + */ + protected function extendLayoutColumnMethods(array $methods): array + { + return $this->extensions['layoutColumnMethods'] = LayoutColumn::$methods = array_merge(LayoutColumn::$methods, $methods); + } + + /** + * Registers additional layouts methods + * + * @param array $methods + * @return array + */ + protected function extendLayoutsMethods(array $methods): array + { + return $this->extensions['layoutsMethods'] = Layouts::$methods = array_merge(Layouts::$methods, $methods); + } + /** * Registers additional options * @@ -625,95 +767,27 @@ trait AppPlugins */ protected function extensionsFromSystem() { - $root = $this->root('kirby'); + // mixins + FormField::$mixins = $this->core->fieldMixins(); + Section::$mixins = $this->core->sectionMixins(); - // load static extensions only once - if (static::$systemExtensions === null) { - // Form Field Mixins - FormField::$mixins['datetime'] = include $root . '/config/fields/mixins/datetime.php'; - FormField::$mixins['filepicker'] = include $root . '/config/fields/mixins/filepicker.php'; - FormField::$mixins['min'] = include $root . '/config/fields/mixins/min.php'; - FormField::$mixins['options'] = include $root . '/config/fields/mixins/options.php'; - FormField::$mixins['pagepicker'] = include $root . '/config/fields/mixins/pagepicker.php'; - FormField::$mixins['picker'] = include $root . '/config/fields/mixins/picker.php'; - FormField::$mixins['upload'] = include $root . '/config/fields/mixins/upload.php'; - FormField::$mixins['userpicker'] = include $root . '/config/fields/mixins/userpicker.php'; + // aliases + KirbyTag::$aliases = $this->core->kirbyTagAliases(); + Field::$aliases = $this->core->fieldMethodAliases(); - // Tag Aliases - KirbyTag::$aliases = [ - 'youtube' => 'video', - 'vimeo' => 'video' - ]; + // blueprint presets + PageBlueprint::$presets = $this->core->blueprintPresets(); - // Field method aliases - Field::$aliases = [ - 'bool' => 'toBool', - 'esc' => 'escape', - 'excerpt' => 'toExcerpt', - 'float' => 'toFloat', - 'h' => 'html', - 'int' => 'toInt', - 'kt' => 'kirbytext', - 'kti' => 'kirbytextinline', - 'link' => 'toLink', - 'md' => 'markdown', - 'sp' => 'smartypants', - 'v' => 'isValid', - 'x' => 'xml' - ]; - - // blueprint presets - PageBlueprint::$presets['pages'] = include $root . '/config/presets/pages.php'; - PageBlueprint::$presets['page'] = include $root . '/config/presets/page.php'; - PageBlueprint::$presets['files'] = include $root . '/config/presets/files.php'; - - // section mixins - Section::$mixins['empty'] = include $root . '/config/sections/mixins/empty.php'; - Section::$mixins['headline'] = include $root . '/config/sections/mixins/headline.php'; - Section::$mixins['help'] = include $root . '/config/sections/mixins/help.php'; - Section::$mixins['layout'] = include $root . '/config/sections/mixins/layout.php'; - Section::$mixins['max'] = include $root . '/config/sections/mixins/max.php'; - Section::$mixins['min'] = include $root . '/config/sections/mixins/min.php'; - Section::$mixins['pagination'] = include $root . '/config/sections/mixins/pagination.php'; - Section::$mixins['parent'] = include $root . '/config/sections/mixins/parent.php'; - - // section types - Section::$types['info'] = include $root . '/config/sections/info.php'; - Section::$types['pages'] = include $root . '/config/sections/pages.php'; - Section::$types['files'] = include $root . '/config/sections/files.php'; - Section::$types['fields'] = include $root . '/config/sections/fields.php'; - - static::$systemExtensions = [ - 'components' => include $root . '/config/components.php', - 'blueprints' => include $root . '/config/blueprints.php', - 'fields' => include $root . '/config/fields.php', - 'fieldMethods' => include $root . '/config/methods.php', - 'snippets' => include $root . '/config/snippets.php', - 'tags' => include $root . '/config/tags.php', - 'templates' => include $root . '/config/templates.php' - ]; - } - - // default auth challenges - $this->extendAuthChallenges([ - 'email' => 'Kirby\Cms\Auth\EmailChallenge' - ]); - - // default cache types - $this->extendCacheTypes([ - 'apcu' => 'Kirby\Cache\ApcuCache', - 'file' => 'Kirby\Cache\FileCache', - 'memcached' => 'Kirby\Cache\MemCached', - 'memory' => 'Kirby\Cache\MemoryCache', - ]); - - $this->extendComponents(static::$systemExtensions['components']); - $this->extendBlueprints(static::$systemExtensions['blueprints']); - $this->extendFields(static::$systemExtensions['fields']); - $this->extendFieldMethods((static::$systemExtensions['fieldMethods'])($this)); - $this->extendSnippets(static::$systemExtensions['snippets']); - $this->extendTags(static::$systemExtensions['tags']); - $this->extendTemplates(static::$systemExtensions['templates']); + $this->extendAuthChallenges($this->core->authChallenges()); + $this->extendCacheTypes($this->core->cacheTypes()); + $this->extendComponents($this->core->components()); + $this->extendBlueprints($this->core->blueprints()); + $this->extendFields($this->core->fields()); + $this->extendFieldMethods($this->core->fieldMethods()); + $this->extendSections($this->core->sections()); + $this->extendSnippets($this->core->snippets()); + $this->extendTags($this->core->kirbyTags()); + $this->extendTemplates($this->core->templates()); } /** @@ -725,7 +799,7 @@ trait AppPlugins */ public function nativeComponent(string $component) { - return static::$systemExtensions['components'][$component] ?? false; + return $this->core->components()[$component] ?? false; } /** diff --git a/kirby/src/Cms/AppTranslations.php b/kirby/src/Cms/AppTranslations.php index a174f85..e9511ac 100644 --- a/kirby/src/Cms/AppTranslations.php +++ b/kirby/src/Cms/AppTranslations.php @@ -159,20 +159,23 @@ trait AppTranslations * Set locale settings * * @deprecated 3.5.0 Use `\Kirby\Toolkit\Locale::set()` instead - * @todo Remove in 3.6.0 + * @todo Remove in 3.7.0 * * @param string|array $locale */ public function setLocale($locale): void { + // @codeCoverageIgnoreStart + deprecated('`Kirby\Cms\App::setLocale()` has been deprecated and will be removed in 3.7.0. Use `Kirby\Toolkit\Locale::set()` instead'); Locale::set($locale); + // @codeCoverageIgnoreEnd } /** * Load a specific translation by locale * * @param string|null $locale Locale name or `null` for the current locale - * @return \Kirby\Cms\Translation|null + * @return \Kirby\Cms\Translation */ public function translation(?string $locale = null) { diff --git a/kirby/src/Cms/Auth.php b/kirby/src/Cms/Auth.php index 5d04c84..06a6dc9 100644 --- a/kirby/src/Cms/Auth.php +++ b/kirby/src/Cms/Auth.php @@ -8,10 +8,10 @@ use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; use Kirby\Exception\PermissionException; +use Kirby\Filesystem\F; use Kirby\Http\Idn; use Kirby\Http\Request\Auth\BasicAuth; use Kirby\Toolkit\A; -use Kirby\Toolkit\F; use Throwable; /** @@ -95,21 +95,7 @@ class Auth */ public function createChallenge(string $email, bool $long = false, string $mode = 'login') { - // ensure that email addresses with IDN domains are in Unicode format - $email = Idn::decodeEmail($email); - - if ($this->isBlocked($email) === true) { - $this->kirby->trigger('user.login:failed', compact('email')); - - if ($this->kirby->option('debug') === true) { - $message = 'Rate limit exceeded'; - } else { - // avoid leaking security-relevant information - $message = ['key' => 'access.login']; - } - - throw new PermissionException($message); - } + $email = $this->validateEmail($email); // rate-limit the number of challenges for DoS/DDoS protection $this->track($email, false); @@ -190,7 +176,7 @@ class Auth $fromHeader = $this->kirby->request()->csrf(); // check for a predefined csrf or use the one from session - $fromSession = $this->kirby->option('api.csrf', csrf()); + $fromSession = $this->csrfFromSession(); // compare both tokens if (hash_equals((string)$fromSession, (string)$fromHeader) !== true) { @@ -200,6 +186,18 @@ class Auth return $fromSession; } + /** + * Returns either predefined csrf or the one from session + * @since 3.6.0 + * + * @return string + */ + public function csrfFromSession(): string + { + $isDev = $this->kirby->option('panel.dev', false) !== false; + return $this->kirby->option('api.csrf', $isDev ? 'dev' : csrf()); + } + /** * Returns the logged in user by checking * for a basic authentication header with @@ -384,7 +382,7 @@ class Auth * @param bool $long * @return \Kirby\Cms\User * - * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occured with debug mode off + * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occurred with debug mode off * @throws \Kirby\Exception\NotFoundException If the email was invalid * @throws \Kirby\Exception\InvalidArgumentException If the password is not valid (via `$user->login()`) */ @@ -415,7 +413,7 @@ class Auth * @param bool $long * @return \Kirby\Cms\Auth\Status * - * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occured with debug mode off + * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occurred with debug mode off * @throws \Kirby\Exception\NotFoundException If the email was invalid * @throws \Kirby\Exception\InvalidArgumentException If the password is not valid (via `$user->login()`) */ @@ -493,18 +491,15 @@ class Auth } /** - * Validates the user credentials and returns the user object on success; - * otherwise logs the failed attempt + * Ensures that email addresses with IDN domains are in Unicode format + * and that the rate limit was not exceeded * * @param string $email - * @param string $password - * @return \Kirby\Cms\User + * @return string The normalized Unicode email address * - * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occured with debug mode off - * @throws \Kirby\Exception\NotFoundException If the email was invalid - * @throws \Kirby\Exception\InvalidArgumentException If the password is not valid (via `$user->login()`) + * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded */ - public function validatePassword(string $email, string $password) + protected function validateEmail(string $email): string { // ensure that email addresses with IDN domains are in Unicode format $email = Idn::decodeEmail($email); @@ -523,6 +518,25 @@ class Auth throw new PermissionException($message); } + return $email; + } + + /** + * Validates the user credentials and returns the user object on success; + * otherwise logs the failed attempt + * + * @param string $email + * @param string $password + * @return \Kirby\Cms\User + * + * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occurred with debug mode off + * @throws \Kirby\Exception\NotFoundException If the email was invalid + * @throws \Kirby\Exception\InvalidArgumentException If the password is not valid (via `$user->login()`) + */ + public function validatePassword(string $email, string $password) + { + $email = $this->validateEmail($email); + // validate the user try { if ($user = $this->kirby->users()->find($email)) { @@ -724,7 +738,7 @@ class Auth * logged in user will be returned * @return \Kirby\Cms\User|null * - * @throws \Throwable If an authentication error occured + * @throws \Throwable If an authentication error occurred */ public function user($session = null, bool $allowImpersonation = true) { @@ -770,7 +784,7 @@ class Auth * @return \Kirby\Cms\User User object of the logged-in user * * @throws \Kirby\Exception\PermissionException If the rate limit was exceeded, the challenge timed out, the code - * is incorrect or if any other error occured with debug mode off + * is incorrect or if any other error occurred with debug mode off * @throws \Kirby\Exception\NotFoundException If the user from the challenge doesn't exist * @throws \Kirby\Exception\InvalidArgumentException If no authentication challenge is active * @throws \Kirby\Exception\LogicException If the authentication challenge is invalid @@ -830,7 +844,7 @@ class Auth throw new LogicException('Invalid authentication challenge: ' . $challenge); } catch (Throwable $e) { - if ($e->getMessage() !== 'Rate limit exceeded') { + if (empty($email) === false && $e->getMessage() !== 'Rate limit exceeded') { $this->track($email); } diff --git a/kirby/src/Cms/Auth/EmailChallenge.php b/kirby/src/Cms/Auth/EmailChallenge.php index f6e540d..07ee4c8 100644 --- a/kirby/src/Cms/Auth/EmailChallenge.php +++ b/kirby/src/Cms/Auth/EmailChallenge.php @@ -66,6 +66,7 @@ class EmailChallenge extends Challenge 'template' => 'auth/' . $mode, 'data' => [ 'user' => $user, + 'site' => $kirby->system()->title(), 'code' => $formatted, 'timeout' => round($options['timeout'] / 60) ] diff --git a/kirby/src/Cms/Block.php b/kirby/src/Cms/Block.php index da5e34d..27f7604 100644 --- a/kirby/src/Cms/Block.php +++ b/kirby/src/Cms/Block.php @@ -22,6 +22,8 @@ class Block extends Item { const ITEMS_CLASS = '\Kirby\Cms\Blocks'; + use HasMethods; + /** * @var \Kirby\Cms\Content */ @@ -32,6 +34,13 @@ class Block extends Item */ protected $isHidden; + /** + * Registry with all block models + * + * @var array + */ + public static $models = []; + /** * @var string */ @@ -46,6 +55,11 @@ class Block extends Item */ public function __call(string $method, array $args = []) { + // block methods + if ($this->hasMethod($method)) { + return $this->callMethod($method, $args); + } + return $this->content()->get($method); } @@ -53,7 +67,7 @@ class Block extends Item * Creates a new block object * * @param array $params - * @param \Kirby\Cms\Blocks $siblings + * @throws \Kirby\Exception\InvalidArgumentException */ public function __construct(array $params) { @@ -69,7 +83,7 @@ class Block extends Item $this->content = $params['content'] ?? []; $this->isHidden = $params['isHidden'] ?? false; - $this->type = $params['type'] ?? null; + $this->type = $params['type']; // create the content object $this->content = new Content($this->content, $this->parent); @@ -89,13 +103,13 @@ class Block extends Item * Deprecated method to return the block type * * @deprecated 3.5.0 Use `\Kirby\Cms\Block::type()` instead - * @todo Add deprecated() helper warning in 3.6.0 * @todo Remove in 3.7.0 * * @return string */ public function _key(): string { + deprecated('Block::_key() has been deprecated. Use Block::type() instead.'); return $this->type(); } @@ -103,13 +117,13 @@ class Block extends Item * Deprecated method to return the block id * * @deprecated 3.5.0 Use `\Kirby\Cms\Block::id()` instead - * @todo Add deprecated() helper warning in 3.6.0 * @todo Remove in 3.7.0 * * @return string */ public function _uid(): string { + deprecated('Block::_uid() has been deprecated. Use Block::id() instead.'); return $this->id(); } @@ -154,6 +168,38 @@ class Block extends Item return Str::excerpt($this->toHtml(), ...$args); } + /** + * Constructs a block object with registering blocks models + * + * @param array $params + * @return static + * @throws \Kirby\Exception\InvalidArgumentException + * @internal + */ + public static function factory(array $params) + { + $type = $params['type'] ?? null; + + if (empty($type) === false && $class = (static::$models[$type] ?? null)) { + $object = new $class($params); + + if (is_a($object, 'Kirby\Cms\Block') === true) { + return $object; + } + } + + // default model for blocks + if ($class = (static::$models['Kirby\Cms\Block'] ?? null)) { + $object = new $class($params); + + if (is_a($object, 'Kirby\Cms\Block') === true) { + return $object; + } + } + + return new static($params); + } + /** * Checks if the block is empty * diff --git a/kirby/src/Cms/BlockConverter.php b/kirby/src/Cms/BlockConverter.php index 8b98e0c..1f148dd 100644 --- a/kirby/src/Cms/BlockConverter.php +++ b/kirby/src/Cms/BlockConverter.php @@ -167,6 +167,14 @@ class BlockConverter return static::editorHeading($params, 'h6'); } + public static function editorHr(array $params): array + { + return [ + 'content' => [], + 'type' => 'line' + ]; + } + public static function editorHeading(array $params, string $level): array { return [ diff --git a/kirby/src/Cms/Blocks.php b/kirby/src/Cms/Blocks.php index ac6830e..483a7d0 100644 --- a/kirby/src/Cms/Blocks.php +++ b/kirby/src/Cms/Blocks.php @@ -99,6 +99,18 @@ class Blocks extends Items return $blocks; } + /** + * Checks if a given block type exists in the collection + * @since 3.6.0 + * + * @param string $type + * @return bool + */ + public function hasType(string $type): bool + { + return $this->filterBy('type', $type)->count() > 0; + } + /** * Parse and sanitize various block formats * diff --git a/kirby/src/Cms/Blueprint.php b/kirby/src/Cms/Blueprint.php index 8659b4a..f081483 100644 --- a/kirby/src/Cms/Blueprint.php +++ b/kirby/src/Cms/Blueprint.php @@ -6,9 +6,9 @@ use Exception; use Kirby\Data\Data; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\F; use Kirby\Form\Field; use Kirby\Toolkit\A; -use Kirby\Toolkit\F; use Kirby\Toolkit\I18n; use Throwable; @@ -58,6 +58,10 @@ class Blueprint throw new InvalidArgumentException('A blueprint model is required'); } + if (is_a($props['model'], ModelWithContent::class) === false) { + throw new InvalidArgumentException('Invalid blueprint model'); + } + $this->model = $props['model']; // the model should not be included in the props array @@ -288,6 +292,8 @@ class Blueprint return static::$loaded[$name] = Data::read($file); } elseif (is_array($file) === true) { return static::$loaded[$name] = $file; + } elseif (is_callable($file) === true) { + return static::$loaded[$name] = $file($kirby); } // neither a valid file nor array data @@ -697,6 +703,7 @@ class Blueprint 'columns' => $this->normalizeColumns($tabName, $tabProps['columns'] ?? []), 'icon' => $tabProps['icon'] ?? null, 'label' => $this->i18n($tabProps['label'] ?? ucfirst($tabName)), + 'link' => $this->model->panel()->url(true) . '/?tab=' . $tabName, 'name' => $tabName, ]); } @@ -720,7 +727,13 @@ class Blueprint return $props; } - return static::$presets[$props['preset']]($props); + $preset = static::$presets[$props['preset']]; + + if (is_string($preset) === true) { + $preset = require $preset; + } + + return $preset($props); } /** @@ -760,11 +773,15 @@ class Blueprint /** * Returns a single tab by name * - * @param string $name + * @param string|null $name * @return array|null */ - public function tab(string $name): ?array + public function tab(?string $name = null): ?array { + if ($name === null) { + return A::first($this->tabs); + } + return $this->tabs[$name] ?? null; } diff --git a/kirby/src/Cms/Collection.php b/kirby/src/Cms/Collection.php index d727054..786b330 100644 --- a/kirby/src/Cms/Collection.php +++ b/kirby/src/Cms/Collection.php @@ -165,16 +165,16 @@ class Collection extends BaseCollection * Checks if the given object or id * is in the collection * - * @param string|object $id + * @param string|object $key * @return bool */ - public function has($id): bool + public function has($key): bool { - if (is_object($id) === true) { - $id = $id->id(); + if (is_object($key) === true) { + $key = $key->id(); } - return parent::has($id); + return parent::has($key); } /** @@ -182,16 +182,16 @@ class Collection extends BaseCollection * The method will automatically detect objects * or ids and then search accordingly. * - * @param string|object $object + * @param string|object $needle * @return int */ - public function indexOf($object): int + public function indexOf($needle): int { - if (is_string($object) === true) { - return array_search($object, $this->keys()); + if (is_string($needle) === true) { + return array_search($needle, $this->keys()); } - return array_search($object->id(), $this->keys()); + return array_search($needle->id(), $this->keys()); } /** @@ -270,17 +270,17 @@ class Collection extends BaseCollection * offset, limit, search and paginate on the collection. * Any part of the query is optional. * - * @param array $query + * @param array $arguments * @return static */ - public function query(array $query = []) + public function query(array $arguments = []) { - $paginate = $query['paginate'] ?? null; - $search = $query['search'] ?? null; + $paginate = $arguments['paginate'] ?? null; + $search = $arguments['search'] ?? null; - unset($query['paginate']); + unset($arguments['paginate']); - $result = parent::query($query); + $result = parent::query($arguments); if (empty($search) === false) { if (is_array($search) === true) { diff --git a/kirby/src/Cms/Collections.php b/kirby/src/Cms/Collections.php index 2b49e6f..4752754 100644 --- a/kirby/src/Cms/Collections.php +++ b/kirby/src/Cms/Collections.php @@ -3,8 +3,8 @@ namespace Kirby\Cms; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\F; use Kirby\Toolkit\Controller; -use Kirby\Toolkit\F; /** * Manages and loads all collections diff --git a/kirby/src/Cms/Content.php b/kirby/src/Cms/Content.php index d810934..529674e 100644 --- a/kirby/src/Cms/Content.php +++ b/kirby/src/Cms/Content.php @@ -2,6 +2,8 @@ namespace Kirby\Cms; +use Kirby\Form\Form; + /** * The Content class handles all fields * for content from pages, the site and users diff --git a/kirby/src/Cms/ContentLocks.php b/kirby/src/Cms/ContentLocks.php index bd67918..77f3853 100644 --- a/kirby/src/Cms/ContentLocks.php +++ b/kirby/src/Cms/ContentLocks.php @@ -4,7 +4,7 @@ namespace Kirby\Cms; use Kirby\Data\Data; use Kirby\Exception\Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * Manages all content lock files diff --git a/kirby/src/Cms/Core.php b/kirby/src/Cms/Core.php new file mode 100644 index 0000000..61f5997 --- /dev/null +++ b/kirby/src/Cms/Core.php @@ -0,0 +1,550 @@ +core()` + * + * I.e. `$kirby->core()->areas()` + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Core +{ + /** + * @var array + */ + protected $cache = []; + + /** + * @var \Kirby\Cms\App + */ + protected $kirby; + + /** + * @var string + */ + protected $root; + + /** + * @param \Kirby\Cms\App $kirby + */ + public function __construct(App $kirby) + { + $this->kirby = $kirby; + $this->root = dirname(__DIR__, 2) . '/config'; + } + + /** + * Fetches the definition array of a particular area. + * + * This is a shortcut for `$kirby->core()->load()->area()` + * to give faster access to original area code in plugins. + * + * @param string $name + * @return array|null + */ + public function area(string $name): ?array + { + return $this->load()->area($name); + } + + /** + * Returns a list of all paths to area definition files + * + * They are located in `/kirby/config/areas` + * + * @return array + */ + public function areas(): array + { + return [ + 'account' => $this->root . '/areas/account.php', + 'installation' => $this->root . '/areas/installation.php', + 'languages' => $this->root . '/areas/languages.php', + 'login' => $this->root . '/areas/login.php', + 'site' => $this->root . '/areas/site.php', + 'system' => $this->root . '/areas/system.php', + 'users' => $this->root . '/areas/users.php', + ]; + } + + /** + * Returns a list of all default auth challenge classes + * + * @return array + */ + public function authChallenges(): array + { + return [ + 'email' => 'Kirby\Cms\Auth\EmailChallenge' + ]; + } + + /** + * Returns a list of all paths to blueprint presets + * + * They are located in `/kirby/config/presets` + * + * @return array + */ + public function blueprintPresets(): array + { + return [ + 'pages' => $this->root . '/presets/pages.php', + 'page' => $this->root . '/presets/page.php', + 'files' => $this->root . '/presets/files.php', + ]; + } + + /** + * Returns a list of all paths to core blueprints + * + * They are located in `/kirby/config/blueprints`. + * Block blueprints are located in `/kirby/config/blocks` + * + * @return array + */ + public function blueprints(): array + { + return [ + // blocks + 'blocks/code' => $this->root . '/blocks/code/code.yml', + 'blocks/gallery' => $this->root . '/blocks/gallery/gallery.yml', + 'blocks/heading' => $this->root . '/blocks/heading/heading.yml', + 'blocks/image' => $this->root . '/blocks/image/image.yml', + 'blocks/line' => $this->root . '/blocks/line/line.yml', + 'blocks/list' => $this->root . '/blocks/list/list.yml', + 'blocks/markdown' => $this->root . '/blocks/markdown/markdown.yml', + 'blocks/quote' => $this->root . '/blocks/quote/quote.yml', + 'blocks/table' => $this->root . '/blocks/table/table.yml', + 'blocks/text' => $this->root . '/blocks/text/text.yml', + 'blocks/video' => $this->root . '/blocks/video/video.yml', + + // file blueprints + 'files/default' => $this->root . '/blueprints/files/default.yml', + + // page blueprints + 'pages/default' => $this->root . '/blueprints/pages/default.yml', + + // site blueprints + 'site' => $this->root . '/blueprints/site.yml' + ]; + } + + /** + * Returns a list of all cache driver classes + * + * @return array + */ + public function cacheTypes(): array + { + return [ + 'apcu' => 'Kirby\Cache\ApcuCache', + 'file' => 'Kirby\Cache\FileCache', + 'memcached' => 'Kirby\Cache\MemCached', + 'memory' => 'Kirby\Cache\MemoryCache', + ]; + } + + /** + * Returns an array of all core component functions + * + * The component functions can be found in + * `/kirby/config/components.php` + * + * @return array + */ + public function components(): array + { + return $this->cache['components'] ?? $this->cache['components'] = include $this->root . '/components.php'; + } + + /** + * Returns a map of all field method aliases + * + * @return array + */ + public function fieldMethodAliases(): array + { + return [ + 'bool' => 'toBool', + 'esc' => 'escape', + 'excerpt' => 'toExcerpt', + 'float' => 'toFloat', + 'h' => 'html', + 'int' => 'toInt', + 'kt' => 'kirbytext', + 'kti' => 'kirbytextinline', + 'link' => 'toLink', + 'md' => 'markdown', + 'sp' => 'smartypants', + 'v' => 'isValid', + 'x' => 'xml' + ]; + } + + /** + * Returns an array of all field method functions + * + * Field methods are stored in `/kirby/config/methods.php` + * + * @return array + */ + public function fieldMethods(): array + { + return $this->cache['fieldMethods'] ?? $this->cache['fieldMethods'] = (include $this->root . '/methods.php')($this->kirby); + } + + /** + * Returns an array of paths for field mixins + * + * They are located in `/kirby/config/fields/mixins` + * + * @return array + */ + public function fieldMixins(): array + { + return [ + 'datetime' => $this->root . '/fields/mixins/datetime.php', + 'filepicker' => $this->root . '/fields/mixins/filepicker.php', + 'layout' => $this->root . '/fields/mixins/layout.php', + 'min' => $this->root . '/fields/mixins/min.php', + 'options' => $this->root . '/fields/mixins/options.php', + 'pagepicker' => $this->root . '/fields/mixins/pagepicker.php', + 'picker' => $this->root . '/fields/mixins/picker.php', + 'upload' => $this->root . '/fields/mixins/upload.php', + 'userpicker' => $this->root . '/fields/mixins/userpicker.php', + ]; + } + + /** + * Returns an array of all paths and class names of panel fields + * + * Traditional panel fields are located in `/kirby/config/fields` + * + * The more complex field classes can be found in + * `/kirby/src/Form/Fields` + * + * @return array + */ + public function fields(): array + { + return [ + 'blocks' => 'Kirby\Form\Field\BlocksField', + 'checkboxes' => $this->root . '/fields/checkboxes.php', + 'date' => $this->root . '/fields/date.php', + 'email' => $this->root . '/fields/email.php', + 'files' => $this->root . '/fields/files.php', + 'gap' => $this->root . '/fields/gap.php', + 'headline' => $this->root . '/fields/headline.php', + 'hidden' => $this->root . '/fields/hidden.php', + 'info' => $this->root . '/fields/info.php', + 'layout' => 'Kirby\Form\Field\LayoutField', + 'line' => $this->root . '/fields/line.php', + 'list' => $this->root . '/fields/list.php', + 'multiselect' => $this->root . '/fields/multiselect.php', + 'number' => $this->root . '/fields/number.php', + 'pages' => $this->root . '/fields/pages.php', + 'radio' => $this->root . '/fields/radio.php', + 'range' => $this->root . '/fields/range.php', + 'select' => $this->root . '/fields/select.php', + 'slug' => $this->root . '/fields/slug.php', + 'structure' => $this->root . '/fields/structure.php', + 'tags' => $this->root . '/fields/tags.php', + 'tel' => $this->root . '/fields/tel.php', + 'text' => $this->root . '/fields/text.php', + 'textarea' => $this->root . '/fields/textarea.php', + 'time' => $this->root . '/fields/time.php', + 'toggle' => $this->root . '/fields/toggle.php', + 'url' => $this->root . '/fields/url.php', + 'users' => $this->root . '/fields/users.php', + 'writer' => $this->root . '/fields/writer.php' + ]; + } + + /** + * Returns a map of all kirbytag aliases + * + * @return array + */ + public function kirbyTagAliases(): array + { + return [ + 'youtube' => 'video', + 'vimeo' => 'video' + ]; + } + + /** + * Returns an array of all kirbytag definitions + * + * They are located in `/kirby/config/tags.php` + * + * @return array + */ + public function kirbyTags(): array + { + return $this->cache['kirbytags'] ?? $this->cache['kirbytags'] = include $this->root . '/tags.php'; + } + + /** + * Loads a core part of Kirby + * + * The loader is set to not include plugins. + * This way, you can access original Kirby core code + * through this load method. + * + * @return \Kirby\Cms\Loader + */ + public function load() + { + return new Loader($this->kirby, false); + } + + /** + * Returns all absolute paths to important directories + * + * Roots are resolved and baked in `\Kirby\Cms\App::bakeRoots()` + * + * @return array + */ + public function roots(): array + { + return $this->cache['roots'] ?? $this->cache['roots'] = [ + // kirby + 'kirby' => function (array $roots) { + return dirname(__DIR__, 2); + }, + + // i18n + 'i18n' => function (array $roots) { + return $roots['kirby'] . '/i18n'; + }, + 'i18n:translations' => function (array $roots) { + return $roots['i18n'] . '/translations'; + }, + 'i18n:rules' => function (array $roots) { + return $roots['i18n'] . '/rules'; + }, + + // index + 'index' => function (array $roots) { + return dirname(__DIR__, 3); + }, + + // assets + 'assets' => function (array $roots) { + return $roots['index'] . '/assets'; + }, + + // content + 'content' => function (array $roots) { + return $roots['index'] . '/content'; + }, + + // media + 'media' => function (array $roots) { + return $roots['index'] . '/media'; + }, + + // panel + 'panel' => function (array $roots) { + return $roots['kirby'] . '/panel'; + }, + + // site + 'site' => function (array $roots) { + return $roots['index'] . '/site'; + }, + 'accounts' => function (array $roots) { + return $roots['site'] . '/accounts'; + }, + 'blueprints' => function (array $roots) { + return $roots['site'] . '/blueprints'; + }, + 'cache' => function (array $roots) { + return $roots['site'] . '/cache'; + }, + 'collections' => function (array $roots) { + return $roots['site'] . '/collections'; + }, + 'config' => function (array $roots) { + return $roots['site'] . '/config'; + }, + 'controllers' => function (array $roots) { + return $roots['site'] . '/controllers'; + }, + 'languages' => function (array $roots) { + return $roots['site'] . '/languages'; + }, + 'license' => function (array $roots) { + return $roots['config'] . '/.license'; + }, + 'logs' => function (array $roots) { + return $roots['site'] . '/logs'; + }, + 'models' => function (array $roots) { + return $roots['site'] . '/models'; + }, + 'plugins' => function (array $roots) { + return $roots['site'] . '/plugins'; + }, + 'sessions' => function (array $roots) { + return $roots['site'] . '/sessions'; + }, + 'snippets' => function (array $roots) { + return $roots['site'] . '/snippets'; + }, + 'templates' => function (array $roots) { + return $roots['site'] . '/templates'; + }, + + // blueprints + 'roles' => function (array $roots) { + return $roots['blueprints'] . '/users'; + }, + ]; + } + + /** + * Returns an array of all routes for Kirby’s router + * + * Routes are split into `before` and `after` routes. + * + * Plugin routes will be injected inbetween. + * + * @return array + */ + public function routes(): array + { + return $this->cache['routes'] ?? $this->cache['routes'] = (include $this->root . '/routes.php')($this->kirby); + } + + /** + * Returns a list of all paths to core block snippets + * + * They are located in `/kirby/config/blocks` + * + * @return array + */ + public function snippets(): array + { + return [ + 'blocks/code' => $this->root . '/blocks/code/code.php', + 'blocks/gallery' => $this->root . '/blocks/gallery/gallery.php', + 'blocks/heading' => $this->root . '/blocks/heading/heading.php', + 'blocks/image' => $this->root . '/blocks/image/image.php', + 'blocks/line' => $this->root . '/blocks/line/line.php', + 'blocks/list' => $this->root . '/blocks/list/list.php', + 'blocks/markdown' => $this->root . '/blocks/markdown/markdown.php', + 'blocks/quote' => $this->root . '/blocks/quote/quote.php', + 'blocks/table' => $this->root . '/blocks/table/table.php', + 'blocks/text' => $this->root . '/blocks/text/text.php', + 'blocks/video' => $this->root . '/blocks/video/video.php', + ]; + } + + /** + * Returns a list of paths to section mixins + * + * They are located in `/kirby/config/sections/mixins` + * + * @return array + */ + public function sectionMixins(): array + { + return [ + 'empty' => $this->root . '/sections/mixins/empty.php', + 'headline' => $this->root . '/sections/mixins/headline.php', + 'help' => $this->root . '/sections/mixins/help.php', + 'layout' => $this->root . '/sections/mixins/layout.php', + 'max' => $this->root . '/sections/mixins/max.php', + 'min' => $this->root . '/sections/mixins/min.php', + 'pagination' => $this->root . '/sections/mixins/pagination.php', + 'parent' => $this->root . '/sections/mixins/parent.php', + ]; + } + + /** + * Returns a list of all section definitions + * + * They are located in `/kirby/config/sections` + * + * @return array + */ + public function sections(): array + { + return [ + 'fields' => $this->root . '/sections/fields.php', + 'files' => $this->root . '/sections/files.php', + 'info' => $this->root . '/sections/info.php', + 'pages' => $this->root . '/sections/pages.php', + ]; + } + + /** + * Returns a list of paths to all system templates + * + * They are located in `/kirby/config/templates` + * + * @return array + */ + public function templates(): array + { + return [ + 'emails/auth/login' => $this->root . '/templates/emails/auth/login.php', + 'emails/auth/password-reset' => $this->root . '/templates/emails/auth/password-reset.php' + ]; + } + + /** + * Returns an array with all system URLs + * + * URLs are resolved and baked in `\Kirby\Cms\App::bakeUrls()` + * + * @return array + */ + public function urls(): array + { + return $this->cache['urls'] ?? $this->cache['urls'] = [ + 'index' => function () { + return Url::index(); + }, + 'base' => function (array $urls) { + return rtrim($urls['index'], '/'); + }, + 'current' => function (array $urls) { + $path = trim($this->kirby->path(), '/'); + + if (empty($path) === true) { + return $urls['index']; + } else { + return $urls['base'] . '/' . $path; + } + }, + 'assets' => function (array $urls) { + return $urls['base'] . '/assets'; + }, + 'api' => function (array $urls) { + return $urls['base'] . '/' . $this->kirby->option('api.slug', 'api'); + }, + 'media' => function (array $urls) { + return $urls['base'] . '/media'; + }, + 'panel' => function (array $urls) { + return $urls['base'] . '/' . $this->kirby->option('panel.slug', 'panel'); + } + ]; + } +} diff --git a/kirby/src/Cms/Dir.php b/kirby/src/Cms/Dir.php deleted file mode 100644 index 7c42c62..0000000 --- a/kirby/src/Cms/Dir.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -class Dir extends \Kirby\Toolkit\Dir -{ - public static $numSeparator = '_'; - - /** - * Scans the directory and analyzes files, - * content, meta info and children. This is used - * in Page, Site and User objects to fetch all - * relevant information. - * - * @param string $dir - * @param string $contentExtension - * @param array|null $contentIgnore - * @param bool $multilang - * @return array - */ - public static function inventory(string $dir, string $contentExtension = 'txt', array $contentIgnore = null, bool $multilang = false): array - { - $dir = realpath($dir); - - $inventory = [ - 'children' => [], - 'files' => [], - 'template' => 'default', - ]; - - if ($dir === false) { - return $inventory; - } - - $items = Dir::read($dir, $contentIgnore); - - // a temporary store for all content files - $content = []; - - // sort all items naturally to avoid sorting issues later - natsort($items); - - foreach ($items as $item) { - - // ignore all items with a leading dot - if (in_array(substr($item, 0, 1), ['.', '_']) === true) { - continue; - } - - $root = $dir . '/' . $item; - - if (is_dir($root) === true) { - - // extract the slug and num of the directory - if (preg_match('/^([0-9]+)' . static::$numSeparator . '(.*)$/', $item, $match)) { - $num = $match[1]; - $slug = $match[2]; - } else { - $num = null; - $slug = $item; - } - - $inventory['children'][] = [ - 'dirname' => $item, - 'model' => null, - 'num' => $num, - 'root' => $root, - 'slug' => $slug, - ]; - } else { - $extension = pathinfo($item, PATHINFO_EXTENSION); - - switch ($extension) { - case 'htm': - case 'html': - case 'php': - // don't track those files - break; - case $contentExtension: - $content[] = pathinfo($item, PATHINFO_FILENAME); - break; - default: - $inventory['files'][$item] = [ - 'filename' => $item, - 'extension' => $extension, - 'root' => $root, - ]; - } - } - } - - // remove the language codes from all content filenames - if ($multilang === true) { - foreach ($content as $key => $filename) { - $content[$key] = pathinfo($filename, PATHINFO_FILENAME); - } - - $content = array_unique($content); - } - - $inventory = static::inventoryContent($inventory, $content); - $inventory = static::inventoryModels($inventory, $contentExtension, $multilang); - - return $inventory; - } - - /** - * Take all content files, - * remove those who are meta files and - * detect the main content file - * - * @param array $inventory - * @param array $content - * @return array - */ - protected static function inventoryContent(array $inventory, array $content): array - { - - // filter meta files from the content file - if (empty($content) === true) { - $inventory['template'] = 'default'; - return $inventory; - } - - foreach ($content as $contentName) { - - // could be a meta file. i.e. cover.jpg - if (isset($inventory['files'][$contentName]) === true) { - continue; - } - - // it's most likely the template - $inventory['template'] = $contentName; - } - - return $inventory; - } - - /** - * Go through all inventory children - * and inject a model for each - * - * @param array $inventory - * @param string $contentExtension - * @param bool $multilang - * @return array - */ - protected static function inventoryModels(array $inventory, string $contentExtension, bool $multilang = false): array - { - // inject models - if (empty($inventory['children']) === false && empty(Page::$models) === false) { - if ($multilang === true) { - $contentExtension = App::instance()->defaultLanguage()->code() . '.' . $contentExtension; - } - - foreach ($inventory['children'] as $key => $child) { - foreach (Page::$models as $modelName => $modelClass) { - if (file_exists($child['root'] . '/' . $modelName . '.' . $contentExtension) === true) { - $inventory['children'][$key]['model'] = $modelName; - break; - } - } - } - } - - return $inventory; - } -} diff --git a/kirby/src/Cms/Field.php b/kirby/src/Cms/Field.php index 5a2caf4..db015a0 100644 --- a/kirby/src/Cms/Field.php +++ b/kirby/src/Cms/Field.php @@ -75,14 +75,14 @@ class Field $method = strtolower($method); if (isset(static::$methods[$method]) === true) { - return static::$methods[$method](clone $this, ...$arguments); + return (static::$methods[$method])(clone $this, ...$arguments); } if (isset(static::$aliases[$method]) === true) { $method = strtolower(static::$aliases[$method]); if (isset(static::$methods[$method]) === true) { - return static::$methods[$method](clone $this, ...$arguments); + return (static::$methods[$method])(clone $this, ...$arguments); } } diff --git a/kirby/src/Cms/Fieldset.php b/kirby/src/Cms/Fieldset.php index 7b5ff2a..4fd1b2c 100644 --- a/kirby/src/Cms/Fieldset.php +++ b/kirby/src/Cms/Fieldset.php @@ -3,6 +3,7 @@ namespace Kirby\Cms; use Kirby\Exception\InvalidArgumentException; +use Kirby\Form\Form; use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; @@ -21,6 +22,7 @@ class Fieldset extends Item const ITEMS_CLASS = '\Kirby\Cms\Fieldsets'; protected $disabled; + protected $editable; protected $fields = []; protected $icon; protected $label; @@ -49,6 +51,7 @@ class Fieldset extends Item parent::__construct($params); $this->disabled = $params['disabled'] ?? false; + $this->editable = $params['editable'] ?? true; $this->icon = $params['icon'] ?? null; $this->model = $this->parent; $this->name = $this->createName($params['name'] ?? Str::ucfirst($this->type)); @@ -70,6 +73,10 @@ class Fieldset extends Item } } + /** + * @param array $fields + * @return array + */ protected function createFields(array $fields = []): array { $fields = Blueprint::fieldsProps($fields); @@ -81,16 +88,28 @@ class Fieldset extends Item return $fields; } - protected function createName($name): string + /** + * @param array|string $name + * @return string|null + */ + protected function createName($name): ?string { return I18n::translate($name, $name); } + /** + * @param array|string $label + * @return string|null + */ protected function createLabel($label = null): ?string { return I18n::translate($label, $label); } + /** + * @param array $params + * @return array + */ protected function createTabs(array $params = []): array { $tabs = $params['tabs'] ?? []; @@ -124,11 +143,33 @@ class Fieldset extends Item return $tabs; } + /** + * @return bool + */ public function disabled(): bool { return $this->disabled; } + /** + * @return bool + */ + public function editable(): bool + { + if ($this->editable === false) { + return false; + } + + if (count($this->fields) === 0) { + return false; + } + + return true; + } + + /** + * @return array + */ public function fields(): array { return $this->fields; @@ -139,7 +180,7 @@ class Fieldset extends Item * * @param array $fields * @param array $input - * @return \Kirby\Cms\Form + * @return \Kirby\Form\Form */ public function form(array $fields, array $input = []) { @@ -151,36 +192,65 @@ class Fieldset extends Item ]); } + /** + * @return string|null + */ public function icon(): ?string { return $this->icon; } + /** + * @return string|null + */ public function label(): ?string { return $this->label; } + /** + * @return \Kirby\Cms\ModelWithContent + */ public function model() { return $this->model; } + /** + * @return string + */ public function name(): string { return $this->name; } + /** + * @return string|bool + */ + public function preview() + { + return $this->preview; + } + + /** + * @return array + */ public function tabs(): array { return $this->tabs; } + /** + * @return bool + */ public function translate(): bool { return $this->translate; } + /** + * @return string + */ public function type(): string { return $this->type; @@ -192,21 +262,33 @@ class Fieldset extends Item public function toArray(): array { return [ - 'disabled' => $this->disabled, - 'icon' => $this->icon, - 'label' => $this->label, - 'name' => $this->name, - 'preview' => $this->preview, - 'tabs' => $this->tabs, - 'translate' => $this->translate, - 'type' => $this->type, - 'unset' => $this->unset, - 'wysiwyg' => $this->wysiwyg, + 'disabled' => $this->disabled(), + 'editable' => $this->editable(), + 'icon' => $this->icon(), + 'label' => $this->label(), + 'name' => $this->name(), + 'preview' => $this->preview(), + 'tabs' => $this->tabs(), + 'translate' => $this->translate(), + 'type' => $this->type(), + 'unset' => $this->unset(), + 'wysiwyg' => $this->wysiwyg(), ]; } + /** + * @return bool + */ public function unset(): bool { return $this->unset; } + + /** + * @return bool + */ + public function wysiwyg(): bool + { + return $this->wysiwyg; + } } diff --git a/kirby/src/Cms/Fieldsets.php b/kirby/src/Cms/Fieldsets.php index 14ccfea..bbfa434 100644 --- a/kirby/src/Cms/Fieldsets.php +++ b/kirby/src/Cms/Fieldsets.php @@ -74,6 +74,7 @@ class Fieldsets extends Items 'gallery' => 'blocks/gallery', 'heading' => 'blocks/heading', 'image' => 'blocks/image', + 'line' => 'blocks/line', 'list' => 'blocks/list', 'markdown' => 'blocks/markdown', 'quote' => 'blocks/quote', diff --git a/kirby/src/Cms/File.php b/kirby/src/Cms/File.php index 61ab082..a29027e 100644 --- a/kirby/src/Cms/File.php +++ b/kirby/src/Cms/File.php @@ -2,11 +2,10 @@ namespace Kirby\Cms; -use Kirby\Image\Image; +use Kirby\Filesystem\F; +use Kirby\Filesystem\IsFile; +use Kirby\Panel\File as Panel; use Kirby\Toolkit\A; -use Kirby\Toolkit\Escape; -use Kirby\Toolkit\F; -use Throwable; /** * The `$file` object provides a set @@ -16,11 +15,11 @@ use Throwable; * URL or resizing an image. It also * handles file meta data. * - * The File class is a wrapper around - * the Kirby\Image\Image class, which - * is used to handle all file methods. + * The File class proxies the `Kirby\Filesystem\File` + * or `Kirby\Image\Image` class, which + * is used to handle all asset file methods. * In addition the File class handles - * File meta data via Kirby\Cms\Content. + * meta data via `Kirby\Cms\Content`. * * @package Kirby Cms * @author Bastian Allgeier @@ -33,19 +32,10 @@ class File extends ModelWithContent const CLASS_ALIAS = 'file'; use FileActions; - use FileFoundation; use FileModifications; use HasMethods; use HasSiblings; - - /** - * The parent asset object - * This is used to do actual file - * method calls, like size, mime, etc. - * - * @var \Kirby\Image\Image - */ - protected $asset; + use IsFile; /** * Cache for the initialized blueprint object @@ -57,12 +47,12 @@ class File extends ModelWithContent /** * @var string */ - protected $id; + protected $filename; /** * @var string */ - protected $filename; + protected $id; /** * All registered file methods @@ -123,7 +113,7 @@ class File extends ModelWithContent } // content fields - return $this->content()->get($method, $arguments); + return $this->content()->get($method); } /** @@ -133,7 +123,11 @@ class File extends ModelWithContent */ public function __construct(array $props) { - // properties + // set filename as the most important prop first + // TODO: refactor later to avoid redundant prop setting + $this->setProperty('filename', $props['filename'] ?? null, true); + + // set other properties $this->setProperties($props); } @@ -162,17 +156,6 @@ class File extends ModelWithContent return $this->parent()->apiUrl($relative) . '/files/' . $this->filename(); } - /** - * Returns the Image object - * - * @internal - * @return \Kirby\Image\Image - */ - public function asset() - { - return $this->asset = $this->asset ?? new Image($this->root()); - } - /** * Returns the FileBlueprint object for the file * @@ -226,43 +209,6 @@ class File extends ModelWithContent return $this->filename(); } - /** - * Provides a kirbytag or markdown - * tag for the file, which will be - * used in the panel, when the file - * gets dragged onto a textarea - * - * @internal - * @param string|null $type (null|auto|kirbytext|markdown) - * @param bool $absolute - * @return string - */ - public function dragText(string $type = null, bool $absolute = false): string - { - $type = $this->dragTextType($type); - $url = $absolute ? $this->id() : $this->filename(); - - if ($dragTextFromCallback = $this->dragTextFromCallback($type, $url)) { - return $dragTextFromCallback; - } - - if ($type === 'markdown') { - if ($this->type() === 'image') { - return '![' . $this->alt() . '](' . $url . ')'; - } else { - return '[' . $this->filename() . '](' . $url . ')'; - } - } else { - if ($this->type() === 'image') { - return '(image: ' . $url . ')'; - } elseif ($this->type() === 'video') { - return '(video: ' . $url . ')'; - } else { - return '(file: ' . $url . ')'; - } - } - } - /** * Constructs a File object * @@ -295,6 +241,20 @@ class File extends ModelWithContent return $this->siblingsCollection(); } + /** + * Converts the file to html + * + * @param array $attr + * @return string + */ + public function html(array $attr = []): string + { + return $this->asset()->html(array_merge( + ['alt' => $this->alt()], + $attr + )); + } + /** * Returns the id * @@ -446,156 +406,13 @@ class File extends ModelWithContent } /** - * Panel icon definition + * Returns the panel info object * - * @internal - * @param array|null $params - * @return array + * @return \Kirby\Panel\File */ - public function panelIcon(array $params = null): array + public function panel() { - $colorBlue = '#81a2be'; - $colorPurple = '#b294bb'; - $colorOrange = '#de935f'; - $colorGreen = '#a7bd68'; - $colorAqua = '#8abeb7'; - $colorYellow = '#f0c674'; - $colorRed = '#d16464'; - $colorWhite = '#c5c9c6'; - - $types = [ - 'image' => ['color' => $colorOrange, 'type' => 'file-image'], - 'video' => ['color' => $colorYellow, 'type' => 'file-video'], - 'document' => ['color' => $colorRed, 'type' => 'file-document'], - 'audio' => ['color' => $colorAqua, 'type' => 'file-audio'], - 'code' => ['color' => $colorBlue, 'type' => 'file-code'], - 'archive' => ['color' => $colorWhite, 'type' => 'file-zip'], - ]; - - $extensions = [ - 'indd' => ['color' => $colorPurple], - 'xls' => ['color' => $colorGreen, 'type' => 'file-spreadsheet'], - 'xlsx' => ['color' => $colorGreen, 'type' => 'file-spreadsheet'], - 'csv' => ['color' => $colorGreen, 'type' => 'file-spreadsheet'], - 'docx' => ['color' => $colorBlue, 'type' => 'file-word'], - 'doc' => ['color' => $colorBlue, 'type' => 'file-word'], - 'rtf' => ['color' => $colorBlue, 'type' => 'file-word'], - 'mdown' => ['type' => 'file-text'], - 'md' => ['type' => 'file-text'] - ]; - - $definition = array_merge($types[$this->type()] ?? [], $extensions[$this->extension()] ?? []); - - $params['type'] = $definition['type'] ?? 'file'; - $params['color'] = $definition['color'] ?? $colorWhite; - - return parent::panelIcon($params); - } - - /** - * Returns the image file object based on provided query - * - * @internal - * @param string|null $query - * @return \Kirby\Cms\File|\Kirby\Cms\Asset|null - */ - protected function panelImageSource(string $query = null) - { - if ($query === null && $this->isViewable()) { - return $this; - } - - return parent::panelImageSource($query); - } - - /** - * Returns an array of all actions - * that can be performed in the Panel - * - * @since 3.3.0 This also checks for the lock status - * @since 3.5.1 This also checks for matching accept settings - * - * @param array $unlock An array of options that will be force-unlocked - * @return array - */ - public function panelOptions(array $unlock = []): array - { - $options = parent::panelOptions($unlock); - - try { - // check if the file type is allowed at all, - // otherwise it cannot be replaced - $this->match($this->blueprint()->accept()); - } catch (Throwable $e) { - $options['replace'] = false; - } - - return $options; - } - - /** - * Returns the full path without leading slash - * - * @internal - * @return string - */ - public function panelPath(): string - { - return 'files/' . $this->filename(); - } - - /** - * Prepares the response data for file pickers - * and file fields - * - * @param array|null $params - * @return array - */ - public function panelPickerData(array $params = []): array - { - $image = $this->panelImage($params['image'] ?? []); - $icon = $this->panelIcon($image); - $uuid = $this->id(); - - if (empty($params['model']) === false) { - $uuid = $this->parent() === $params['model'] ? $this->filename() : $this->id(); - $absolute = $this->parent() !== $params['model']; - } - - // escape the default text - // TODO: no longer needed in 3.6 - $textQuery = $params['text'] ?? '{{ file.filename }}'; - $text = $this->toString($textQuery); - if ($textQuery === '{{ file.filename }}') { - $text = Escape::html($text); - } - - return [ - 'filename' => $this->filename(), - 'dragText' => $this->dragText('auto', $absolute ?? false), - 'icon' => $icon, - 'id' => $this->id(), - 'image' => $image, - 'info' => $this->toString($params['info'] ?? false), - 'link' => $this->panelUrl(true), - 'text' => $text, - 'type' => $this->type(), - 'url' => $this->url(), - 'uuid' => $uuid, - ]; - } - - /** - * Returns the url to the editing view - * in the panel - * - * @internal - * @param bool $relative - * @return string - */ - public function panelUrl(bool $relative = false): string - { - return $this->parent()->panelUrl($relative) . '/' . $this->panelPath(); + return new Panel($this); } /** @@ -612,6 +429,7 @@ class File extends ModelWithContent * Returns the parent id if a parent exists * * @internal + * @todo 3.7.0 When setParent() is changed, the if check is not needed anymore * @return string|null */ public function parentId(): ?string @@ -697,13 +515,22 @@ class File extends ModelWithContent } /** - * Sets the parent model object + * Sets the parent model object; + * this property is required for `File::create()` and + * will be generally required starting with Kirby 3.7.0 * * @param \Kirby\Cms\Model|null $parent * @return $this + * @todo make property required in 3.7.0 */ protected function setParent(Model $parent = null) { + // @codeCoverageIgnoreStart + if ($parent === null) { + deprecated('You are creating a `Kirby\Cms\File` object without passing the `parent` property. While unsupported, this hasn\'t caused any direct errors so far. To fix inconsistencies, the `parent` property will be required when creating a `Kirby\Cms\File` object in Kirby 3.7.0 and higher. Not passing this property will start throwing a breaking error.'); + } + // @codeCoverageIgnoreEnd + $this->parent = $parent; return $this; } @@ -806,4 +633,134 @@ class File extends ModelWithContent { return $this->url ?? $this->url = ($this->kirby()->component('file::url'))($this->kirby(), $this); } + + + /** + * Deprecated! + */ + + /** + * Provides a kirbytag or markdown + * tag for the file, which will be + * used in the panel, when the file + * gets dragged onto a textarea + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param string|null $type (null|auto|kirbytext|markdown) + * @param bool $absolute + * @return string + * @codeCoverageIgnore + */ + public function dragText(string $type = null, bool $absolute = false): string + { + return $this->panel()->dragText($type, $absolute); + } + + /** + * Returns an array of all actions + * that can be performed in the Panel + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @since 3.3.0 This also checks for the lock status + * @since 3.5.1 This also checks for matching accept settings + * + * @param array $unlock An array of options that will be force-unlocked + * @return array + * @codeCoverageIgnore + */ + public function panelOptions(array $unlock = []): array + { + return $this->panel()->options($unlock); + } + + /** + * Returns the full path without leading slash + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @return string + * @codeCoverageIgnore + */ + public function panelPath(): string + { + return $this->panel()->path(); + } + + /** + * Prepares the response data for file pickers + * and file fields + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @param array|null $params + * @return array + * @codeCoverageIgnore + */ + public function panelPickerData(array $params = []): array + { + return $this->panel()->pickerData($params); + } + + /** + * Returns the url to the editing view + * in the panel + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param bool $relative + * @return string + * @codeCoverageIgnore + */ + public function panelUrl(bool $relative = false): string + { + return $this->panel()->url($relative); + } + + /** + * Simplified File URL that uses the parent + * Page URL and the filename as a more stable + * alternative for the media URLs. + * + * @return string + */ + public function previewUrl(): string + { + $parent = $this->parent(); + $url = url($this->id()); + + switch ($parent::CLASS_ALIAS) { + case 'page': + $preview = $parent->blueprint()->preview(); + + // the page has a custom preview setting, + // thus the file is only accessible through + // the direct media URL + if ($preview !== true) { + return $this->url(); + } + + // it's more stable to access files for drafts + // through their direct URL to avoid conflicts + // with draft token verification + if ($parent->isDraft() === true) { + return $this->url(); + } + + return $url; + case 'user': + return $this->url(); + default: + return $url; + } + } } diff --git a/kirby/src/Cms/FileActions.php b/kirby/src/Cms/FileActions.php index 83f9c7d..e571eaf 100644 --- a/kirby/src/Cms/FileActions.php +++ b/kirby/src/Cms/FileActions.php @@ -5,8 +5,8 @@ namespace Kirby\Cms; use Closure; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; -use Kirby\Image\Image; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; +use Kirby\Form\Form; /** * FileActions @@ -75,6 +75,8 @@ trait FileActions F::move($oldFile->contentFile(), $newFile->contentFile()); } + $newFile->parent()->files()->remove($oldFile->id()); + $newFile->parent()->files()->set($newFile->id(), $newFile); return $newFile; }); @@ -178,7 +180,7 @@ trait FileActions // create the basic file and a test upload object $file = static::factory($props); - $upload = new Image($props['source']); + $upload = $file->asset($props['source']); // create a form for the file $form = Form::for($file, [ @@ -277,7 +279,14 @@ trait FileActions */ public function replace(string $source) { - return $this->commit('replace', ['file' => $this, 'upload' => new Image($source)], function ($file, $upload) { + $file = $this->clone(); + + $arguments = [ + 'file' => $file, + 'upload' => $file->asset($source) + ]; + + return $this->commit('replace', $arguments, function ($file, $upload) { // delete all public versions $file->unpublish(); diff --git a/kirby/src/Cms/FileBlueprint.php b/kirby/src/Cms/FileBlueprint.php index ee2e0f9..e34133a 100644 --- a/kirby/src/Cms/FileBlueprint.php +++ b/kirby/src/Cms/FileBlueprint.php @@ -2,7 +2,7 @@ namespace Kirby\Cms; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Kirby\Toolkit\Str; /** @@ -81,7 +81,7 @@ class FileBlueprint extends Blueprint if (is_array($accept['extension']) === true) { // determine the main MIME type for each extension - $restrictions[] = array_map(['Kirby\Toolkit\Mime', 'fromExtension'], $accept['extension']); + $restrictions[] = array_map(['Kirby\Filesystem\Mime', 'fromExtension'], $accept['extension']); } if (is_array($accept['type']) === true) { @@ -89,7 +89,7 @@ class FileBlueprint extends Blueprint $mimes = []; foreach ($accept['type'] as $type) { if ($extensions = F::typeToExtensions($type)) { - $mimes[] = array_map(['Kirby\Toolkit\Mime', 'fromExtension'], $extensions); + $mimes[] = array_map(['Kirby\Filesystem\Mime', 'fromExtension'], $extensions); } } diff --git a/kirby/src/Cms/FileFoundation.php b/kirby/src/Cms/FileFoundation.php deleted file mode 100644 index 6529f40..0000000 --- a/kirby/src/Cms/FileFoundation.php +++ /dev/null @@ -1,248 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -trait FileFoundation -{ - protected $asset; - protected $root; - protected $url; - - /** - * Magic caller for asset methods - * - * @param string $method - * @param array $arguments - * @return mixed - * @throws \Kirby\Exception\BadMethodCallException - */ - public function __call(string $method, array $arguments = []) - { - // public property access - if (isset($this->$method) === true) { - return $this->$method; - } - - // asset method proxy - if (method_exists($this->asset(), $method)) { - return $this->asset()->$method(...$arguments); - } - - throw new BadMethodCallException('The method: "' . $method . '" does not exist'); - } - - /** - * Constructor sets all file properties - * - * @param array $props - */ - public function __construct(array $props) - { - $this->setProperties($props); - } - - /** - * Converts the file object to a string - * In case of an image, it will create an image tag - * Otherwise it will return the url - * - * @return string - */ - public function __toString(): string - { - if ($this->type() === 'image') { - return $this->html(); - } - - return $this->url(); - } - - /** - * Returns the Image object - * - * @return \Kirby\Image\Image - */ - public function asset() - { - return $this->asset = $this->asset ?? new Image($this->root()); - } - - /** - * Checks if the file exists on disk - * - * @return bool - */ - public function exists(): bool - { - return file_exists($this->root()) === true; - } - - /** - * Returns the file extension - * - * @return string - */ - public function extension(): string - { - return F::extension($this->root()); - } - - /** - * Converts the file to html - * - * @param array $attr - * @return string - */ - public function html(array $attr = []): string - { - if ($this->type() === 'image') { - return Html::img($this->url(), array_merge(['alt' => $this->alt()], $attr)); - } else { - return Html::a($this->url(), $attr); - } - } - - /** - * Checks if the file is a resizable image - * - * @return bool - */ - public function isResizable(): bool - { - $resizable = [ - 'jpg', - 'jpeg', - 'gif', - 'png', - 'webp' - ]; - - return in_array($this->extension(), $resizable) === true; - } - - /** - * Checks if a preview can be displayed for the file - * in the panel or in the frontend - * - * @return bool - */ - public function isViewable(): bool - { - $viewable = [ - 'jpg', - 'jpeg', - 'gif', - 'png', - 'svg', - 'webp' - ]; - - return in_array($this->extension(), $viewable) === true; - } - - /** - * Returns the app instance - * - * @return \Kirby\Cms\App - */ - public function kirby() - { - return App::instance(); - } - - /** - * Get the file's last modification time. - * - * @param string $format - * @param string|null $handler date or strftime - * @return mixed - */ - public function modified(string $format = null, string $handler = null) - { - return F::modified($this->root(), $format, $handler ?? $this->kirby()->option('date.handler', 'date')); - } - - /** - * Returns the absolute path to the file root - * - * @return string|null - */ - public function root(): ?string - { - return $this->root; - } - - /** - * Setter for the root - * - * @param string|null $root - * @return $this - */ - protected function setRoot(string $root = null) - { - $this->root = $root; - return $this; - } - - /** - * Setter for the file url - * - * @param string $url - * @return $this - */ - protected function setUrl(string $url) - { - $this->url = $url; - return $this; - } - - /** - * Convert the object to an array - * - * @return array - */ - public function toArray(): array - { - $array = array_merge($this->asset()->toArray(), [ - 'isResizable' => $this->isResizable(), - 'url' => $this->url(), - ]); - - ksort($array); - - return $array; - } - - /** - * Returns the file type - * - * @return string|null - */ - public function type(): ?string - { - return F::type($this->root()); - } - - /** - * Returns the absolute url for the file - * - * @return string - */ - public function url(): string - { - return $this->url; - } -} diff --git a/kirby/src/Cms/FileModifications.php b/kirby/src/Cms/FileModifications.php index 8166d45..8a9cf05 100644 --- a/kirby/src/Cms/FileModifications.php +++ b/kirby/src/Cms/FileModifications.php @@ -5,7 +5,7 @@ namespace Kirby\Cms; use Kirby\Exception\InvalidArgumentException; /** - * Resizing, blurring etc. + * Trait for image resizing, blurring etc. * * @package Kirby Cms * @author Bastian Allgeier @@ -191,9 +191,20 @@ trait FileModifications return $this; } - $result = ($this->kirby()->component('file::version'))($this->kirby(), $this, $options); + // fallback to global config options + if (isset($options['format']) === false) { + if ($format = $this->kirby()->option('thumbs.format')) { + $options['format'] = $format; + } + } - if (is_a($result, 'Kirby\Cms\FileVersion') === false && is_a($result, 'Kirby\Cms\File') === false) { + $component = $this->kirby()->component('file::version'); + $result = $component($this->kirby(), $this, $options); + + if ( + is_a($result, 'Kirby\Cms\FileVersion') === false && + is_a($result, 'Kirby\Cms\File') === false + ) { throw new InvalidArgumentException('The file::version component must return a File or FileVersion object'); } diff --git a/kirby/src/Cms/FileRules.php b/kirby/src/Cms/FileRules.php index 3929b07..ed7bdfb 100644 --- a/kirby/src/Cms/FileRules.php +++ b/kirby/src/Cms/FileRules.php @@ -5,7 +5,7 @@ namespace Kirby\Cms; use Kirby\Exception\DuplicateException; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\PermissionException; -use Kirby\Image\Image; +use Kirby\Filesystem\File as BaseFile; use Kirby\Toolkit\Str; use Kirby\Toolkit\V; @@ -38,6 +38,12 @@ class FileRules ]); } + if (Str::length($name) === 0) { + throw new InvalidArgumentException([ + 'key' => 'file.changeName.empty' + ]); + } + $parent = $file->parent(); $duplicate = $parent->files()->not($file)->findBy('filename', $name . '.' . $file->extension()); @@ -67,15 +73,22 @@ class FileRules * Validates if the file can be created * * @param \Kirby\Cms\File $file - * @param \Kirby\Image\Image $upload + * @param \Kirby\Filesystem\File $upload * @return bool * @throws \Kirby\Exception\DuplicateException If a file with the same name exists * @throws \Kirby\Exception\PermissionException If the user is not allowed to create the file */ - public static function create(File $file, Image $upload): bool + public static function create(File $file, BaseFile $upload): bool { if ($file->exists() === true) { - throw new DuplicateException('The file exists and cannot be overwritten'); + if ($file->sha1() !== $upload->sha1()) { + throw new DuplicateException([ + 'key' => 'file.duplicate', + 'data' => [ + 'filename' => $file->filename() + ] + ]); + } } if ($file->permissions()->create() !== true) { @@ -110,12 +123,12 @@ class FileRules * Validates if the file can be replaced * * @param \Kirby\Cms\File $file - * @param \Kirby\Image\Image $upload + * @param \Kirby\Filesystem\File $upload * @return bool * @throws \Kirby\Exception\PermissionException If the user is not allowed to replace the file * @throws \Kirby\Exception\InvalidArgumentException If the file type of the new file is different */ - public static function replace(File $file, Image $upload): bool + public static function replace(File $file, BaseFile $upload): bool { if ($file->permissions()->replace() !== true) { throw new PermissionException('The file cannot be replaced'); @@ -169,34 +182,38 @@ class FileRules // make it easier to compare the extension $extension = strtolower($extension); - if (empty($extension)) { + if (empty($extension) === true) { throw new InvalidArgumentException([ 'key' => 'file.extension.missing', 'data' => ['filename' => $file->filename()] ]); } - if (V::in($extension, ['php', 'phar', 'html', 'htm', 'exe', App::instance()->contentExtension()])) { - throw new InvalidArgumentException([ - 'key' => 'file.extension.forbidden', - 'data' => ['extension' => $extension] - ]); - } - - if (Str::contains($extension, 'php') || Str::contains($extension, 'phar')) { + if ( + Str::contains($extension, 'php') !== false || + Str::contains($extension, 'phar') !== false || + Str::contains($extension, 'phtml') !== false + ) { throw new InvalidArgumentException([ 'key' => 'file.type.forbidden', 'data' => ['type' => 'PHP'] ]); } - if (Str::contains($extension, 'htm')) { + if (Str::contains($extension, 'htm') !== false) { throw new InvalidArgumentException([ 'key' => 'file.type.forbidden', 'data' => ['type' => 'HTML'] ]); } + if (V::in($extension, ['exe', App::instance()->contentExtension()]) !== false) { + throw new InvalidArgumentException([ + 'key' => 'file.extension.forbidden', + 'data' => ['extension' => $extension] + ]); + } + return true; } diff --git a/kirby/src/Cms/FileVersion.php b/kirby/src/Cms/FileVersion.php index ce0ead9..14b959f 100644 --- a/kirby/src/Cms/FileVersion.php +++ b/kirby/src/Cms/FileVersion.php @@ -2,7 +2,7 @@ namespace Kirby\Cms; -use Kirby\Toolkit\Properties; +use Kirby\Filesystem\IsFile; /** * FileVersion @@ -15,10 +15,7 @@ use Kirby\Toolkit\Properties; */ class FileVersion { - use FileFoundation { - toArray as parentToArray; - } - use Properties; + use IsFile; protected $modifications; protected $original; @@ -47,8 +44,8 @@ class FileVersion return $this->asset()->$method(...$arguments); } + // content fields if (is_a($this->original(), 'Kirby\Cms\File') === true) { - // content fields return $this->original()->content()->get($method, $arguments); } } @@ -101,7 +98,11 @@ class FileVersion */ public function save() { - $this->kirby()->thumb($this->original()->root(), $this->root(), $this->modifications()); + $this->kirby()->thumb( + $this->original()->root(), + $this->root(), + $this->modifications() + ); return $this; } @@ -132,7 +133,7 @@ class FileVersion */ public function toArray(): array { - $array = array_merge($this->parentToArray(), [ + $array = array_merge($this->asset()->toArray(), [ 'modifications' => $this->modifications(), ]); diff --git a/kirby/src/Cms/Files.php b/kirby/src/Cms/Files.php index 302423c..ded3616 100644 --- a/kirby/src/Cms/Files.php +++ b/kirby/src/Cms/Files.php @@ -2,6 +2,9 @@ namespace Kirby\Cms; +use Kirby\Exception\InvalidArgumentException; +use Kirby\Filesystem\F; + /** * The `$files` object extends the general * `Collection` class and refers to a @@ -30,12 +33,13 @@ class Files extends Collection * an entire second collection to the * current collection * - * @param mixed $object + * @param \Kirby\Cms\Files|\Kirby\Cms\File|string $object * @return $this + * @throws \Kirby\Exception\InvalidArgumentException When no `File` or `Files` object or an ID of an existing file is passed */ public function add($object) { - // add a page collection + // add a files collection if (is_a($object, self::class) === true) { $this->data = array_merge($this->data, $object->data); @@ -46,6 +50,11 @@ class Files extends Collection // add a file object } elseif (is_a($object, 'Kirby\Cms\File') === true) { $this->__set($object->id(), $object); + + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups + } elseif (in_array($object, [null, false, true], true) !== true) { + throw new InvalidArgumentException('You must pass a Files or File object or an ID of an existing file to the Files collection'); } return $this; @@ -120,6 +129,44 @@ class Files extends Collection return $this->findById($key); } + /** + * Returns the file size for all + * files in the collection in a + * human-readable format + * @since 3.6.0 + * + * @return string + */ + public function niceSize(): string + { + return F::niceSize($this->size()); + } + + /** + * Returns the raw size for all + * files in the collection + * @since 3.6.0 + * + * @return int + */ + public function size(): int + { + return F::size($this->values(function ($file) { + return $file->root(); + })); + } + + /** + * Returns the collection sorted by + * the sort number and the filename + * + * @return static + */ + public function sorted() + { + return $this->sort('sort', 'asc', 'filename', 'asc'); + } + /** * Filter all files by the given template * diff --git a/kirby/src/Cms/Find.php b/kirby/src/Cms/Find.php new file mode 100644 index 0000000..4ff92e3 --- /dev/null +++ b/kirby/src/Cms/Find.php @@ -0,0 +1,191 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Find +{ + /** + * Returns the file object for the given + * parent path and filename + * + * @param string|null $path Path to file's parent model + * @param string $filename Filename + * @return \Kirby\Cms\File|null + * @throws \Kirby\Exception\NotFoundException if the file cannot be found + */ + public static function file(string $path = null, string $filename) + { + $filename = urldecode($filename); + $file = static::parent($path)->file($filename); + + if ($file && $file->isReadable() === true) { + return $file; + } + + throw new NotFoundException([ + 'key' => 'file.notFound', + 'data' => [ + 'filename' => $filename + ] + ]); + } + + /** + * Returns the language object for the given code + * + * @param string $code Language code + * @return \Kirby\Cms\Language|null + * @throws \Kirby\Exception\NotFoundException if the language cannot be found + */ + public static function language(string $code) + { + if ($language = App::instance()->language($code)) { + return $language; + } + + throw new NotFoundException([ + 'key' => 'language.notFound', + 'data' => [ + 'code' => $code + ] + ]); + } + + /** + * Returns the page object for the given id + * + * @param string $id Page's id + * @return \Kirby\Cms\Page|null + * @throws \Kirby\Exception\NotFoundException if the page cannot be found + */ + public static function page(string $id) + { + $id = str_replace(['+', ' '], '/', $id); + $page = App::instance()->page($id); + + if ($page && $page->isReadable() === true) { + return $page; + } + + throw new NotFoundException([ + 'key' => 'page.notFound', + 'data' => [ + 'slug' => $id + ] + ]); + } + + /** + * Returns the model's object for the given path + * + * @param string $path Path to parent model + * @return \Kirby\Cms\Model|null + * @throws \Kirby\Exception\InvalidArgumentException if the model type is invalid + * @throws \Kirby\Exception\NotFoundException if the model cannot be found + */ + public static function parent(string $path) + { + $path = trim($path, '/'); + $modelType = in_array($path, ['site', 'account']) ? $path : trim(dirname($path), '/'); + $modelTypes = [ + 'site' => 'site', + 'users' => 'user', + 'pages' => 'page', + 'account' => 'account' + ]; + + $modelName = $modelTypes[$modelType] ?? null; + + if (Str::endsWith($modelType, '/files') === true) { + $modelName = 'file'; + } + + $kirby = App::instance(); + + switch ($modelName) { + case 'site': + $model = $kirby->site(); + break; + case 'account': + $model = static::user(); + break; + case 'page': + $model = static::page(basename($path)); + break; + case 'file': + $model = static::file(...explode('/files/', $path)); + break; + case 'user': + $model = $kirby->user(basename($path)); + break; + default: + throw new InvalidArgumentException('Invalid model type: ' . $modelType); + } + + if ($model) { + return $model; + } + + throw new NotFoundException([ + 'key' => $modelName . '.undefined' + ]); + } + + /** + * Returns the user object for the given id or + * returns the current authenticated user if no + * id is passed + * + * @param string|null $id User's id + * @return \Kirby\Cms\User|null + * @throws \Kirby\Exception\NotFoundException if the user for the given id cannot be found + */ + public static function user(string $id = null) + { + // account is a reserved word to find the current + // user. It's used in various API and area routes. + if ($id === 'account') { + $id = null; + } + + $kirby = App::instance(); + + // get the authenticated user + if ($id === null) { + if ($user = $kirby->user(null, $kirby->option('api.allowImpersonation', false))) { + return $user; + } + + throw new NotFoundException([ + 'key' => 'user.undefined' + ]); + } + + // get a specific user by id + if ($user = $kirby->user($id)) { + return $user; + } + + throw new NotFoundException([ + 'key' => 'user.notFound', + 'data' => [ + 'name' => $id + ] + ]); + } +} diff --git a/kirby/src/Cms/Form.php b/kirby/src/Cms/Form.php deleted file mode 100644 index 522b7ae..0000000 --- a/kirby/src/Cms/Form.php +++ /dev/null @@ -1,130 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -class Form extends BaseForm -{ - protected $errors; - protected $fields; - protected $values = []; - - /** - * Form constructor. - * - * @param array $props - */ - public function __construct(array $props) - { - $kirby = App::instance(); - - if ($kirby->multilang() === true) { - $fields = $props['fields'] ?? []; - $languageCode = $props['language'] ?? $kirby->language()->code(); - $isDefaultLanguage = $languageCode === $kirby->defaultLanguage()->code(); - - foreach ($fields as $fieldName => $fieldProps) { - // switch untranslatable fields to readonly - if (($fieldProps['translate'] ?? true) === false && $isDefaultLanguage === false) { - $fields[$fieldName]['unset'] = true; - $fields[$fieldName]['disabled'] = true; - } - } - - $props['fields'] = $fields; - } - - parent::__construct($props); - } - - /** - * Get the field object by name - * and handle nested fields correctly - * - * @param string $name - * @throws \Kirby\Exception\NotFoundException - * @return \Kirby\Form\Field - */ - public function field(string $name) - { - $form = $this; - $fieldNames = Str::split($name, '+'); - $index = 0; - $count = count($fieldNames); - $field = null; - - foreach ($fieldNames as $fieldName) { - $index++; - - if ($field = $form->fields()->get($fieldName)) { - if ($count !== $index) { - $form = $field->form(); - } - } else { - throw new NotFoundException('The field "' . $fieldName . '" could not be found'); - } - } - - // it can get this error only if $name is an empty string as $name = '' - if ($field === null) { - throw new NotFoundException('No field could be loaded'); - } - - return $field; - } - - /** - * @param \Kirby\Cms\Model $model - * @param array $props - * @return static - */ - public static function for(Model $model, array $props = []) - { - // get the original model data - $original = $model->content($props['language'] ?? null)->toArray(); - $values = $props['values'] ?? []; - - // convert closures to values - foreach ($values as $key => $value) { - if (is_a($value, 'Closure') === true) { - $values[$key] = $value($original[$key] ?? null); - } - } - - // set a few defaults - $props['values'] = array_merge($original, $values); - $props['fields'] = $props['fields'] ?? []; - $props['model'] = $model; - - // search for the blueprint - if (method_exists($model, 'blueprint') === true && $blueprint = $model->blueprint()) { - $props['fields'] = $blueprint->fields(); - } - - $ignoreDisabled = $props['ignoreDisabled'] ?? false; - - // REFACTOR: this could be more elegant - if ($ignoreDisabled === true) { - $props['fields'] = array_map(function ($field) { - $field['disabled'] = false; - return $field; - }, $props['fields']); - } - - return new static($props); - } -} diff --git a/kirby/src/Cms/HasChildren.php b/kirby/src/Cms/HasChildren.php index 5a6808c..94e4fa4 100644 --- a/kirby/src/Cms/HasChildren.php +++ b/kirby/src/Cms/HasChildren.php @@ -2,6 +2,7 @@ namespace Kirby\Cms; +use Kirby\Filesystem\Dir; use Kirby\Toolkit\Str; /** @@ -16,21 +17,21 @@ use Kirby\Toolkit\Str; trait HasChildren { /** - * The Pages collection + * The list of available published children * * @var \Kirby\Cms\Pages */ public $children; /** - * The list of available drafts + * The list of available draft children * * @var \Kirby\Cms\Pages */ public $drafts; /** - * Returns the Pages collection + * Returns all published children * * @return \Kirby\Cms\Pages */ @@ -44,7 +45,7 @@ trait HasChildren } /** - * Returns all children and drafts at the same time + * Returns all published and draft children at the same time * * @return \Kirby\Cms\Pages */ @@ -54,8 +55,8 @@ trait HasChildren } /** - * Return a list of ids for the model's - * toArray method + * Returns a list of IDs for the model's + * `toArray` method * * @return array */ @@ -65,7 +66,7 @@ trait HasChildren } /** - * Searches for a child draft by id + * Searches for a draft child by ID * * @param string $path * @return \Kirby\Cms\Page|null @@ -99,7 +100,7 @@ trait HasChildren } /** - * Return all drafts of the model + * Returns all draft children * * @return \Kirby\Cms\Pages */ @@ -123,7 +124,7 @@ trait HasChildren } /** - * Finds one or multiple children by id + * Finds one or multiple published children by ID * * @param string ...$arguments * @return \Kirby\Cms\Page|\Kirby\Cms\Pages|null @@ -134,7 +135,7 @@ trait HasChildren } /** - * Finds a single page or draft + * Finds a single published or draft child * * @param string $path * @return \Kirby\Cms\Page|null @@ -145,7 +146,7 @@ trait HasChildren } /** - * Returns a collection of all children of children + * Returns a collection of all published children of published children * * @return \Kirby\Cms\Pages */ @@ -155,7 +156,7 @@ trait HasChildren } /** - * Checks if the model has any children + * Checks if the model has any published children * * @return bool */ @@ -165,7 +166,7 @@ trait HasChildren } /** - * Checks if the model has any drafts + * Checks if the model has any draft children * * @return bool */ @@ -197,7 +198,7 @@ trait HasChildren /** * Creates a flat child index * - * @param bool $drafts + * @param bool $drafts If set to `true`, draft children are included * @return \Kirby\Cms\Pages */ public function index(bool $drafts = false) @@ -210,7 +211,7 @@ trait HasChildren } /** - * Sets the Children collection + * Sets the published children collection * * @param array|null $children * @return $this @@ -225,7 +226,7 @@ trait HasChildren } /** - * Sets the Drafts collection + * Sets the draft children collection * * @param array|null $drafts * @return $this diff --git a/kirby/src/Cms/KirbyTag.php b/kirby/src/Cms/KirbyTag.php deleted file mode 100644 index 4a676eb..0000000 --- a/kirby/src/Cms/KirbyTag.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -class KirbyTag extends \Kirby\Text\KirbyTag -{ - /** - * Finds a file for the given path. - * The method first searches the file - * in the current parent, if it's a page. - * Afterwards it uses Kirby's global file finder. - * - * @param string $path - * @return \Kirby\Cms\File|null - */ - public function file(string $path) - { - $parent = $this->parent(); - - if ( - is_object($parent) === true && - method_exists($parent, 'file') === true && - $file = $parent->file($path) - ) { - return $file; - } - - if (is_a($parent, 'Kirby\Cms\File') === true && $file = $parent->page()->file($path)) { - return $file; - } - - return $this->kirby()->file($path, null, true); - } - - /** - * Returns the current Kirby instance - * - * @return \Kirby\Cms\App - */ - public function kirby() - { - return $this->data['kirby'] ?? App::instance(); - } - - /** - * Returns the parent model - * - * @return \Kirby\Cms\Model|null - */ - public function parent() - { - return $this->data['parent']; - } -} diff --git a/kirby/src/Cms/KirbyTags.php b/kirby/src/Cms/KirbyTags.php deleted file mode 100644 index d92d719..0000000 --- a/kirby/src/Cms/KirbyTags.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -class KirbyTags extends \Kirby\Text\KirbyTags -{ - /** - * The KirbyTag rendering class - * - * @var string - */ - protected static $tagClass = 'Kirby\Cms\KirbyTag'; - - /** - * @param string|null $text - * @param array $data - * @param array $options - * @param \Kirby\Cms\App|null $app - * @return string - */ - public static function parse(string $text = null, array $data = [], array $options = [], ?App $app = null): string - { - if ($app !== null) { - $text = $app->apply('kirbytags:before', compact('text', 'data', 'options'), 'text'); - } - - $text = parent::parse($text, $data, $options); - - if ($app !== null) { - $text = $app->apply('kirbytags:after', compact('text', 'data', 'options'), 'text'); - } - - return $text; - } -} diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php index 97ca7b7..f889cba 100644 --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -5,7 +5,7 @@ namespace Kirby\Cms; use Kirby\Data\Data; use Kirby\Exception\Exception; use Kirby\Exception\PermissionException; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Kirby\Toolkit\Locale; use Kirby\Toolkit\Str; use Throwable; @@ -221,6 +221,9 @@ class Language extends Model static::converter('', $language->code()); } + // update the main languages collection in the app instance + App::instance()->languages(false)->append($language->code(), $language); + return $language; } @@ -234,23 +237,25 @@ class Language extends Model */ public function delete(): bool { - if ($this->exists() === false) { - return true; - } - $kirby = App::instance(); $languages = $kirby->languages(); $code = $this->code(); + $isLast = $languages->count() === 1; if (F::remove($this->root()) !== true) { throw new Exception('The language could not be deleted'); } - if ($languages->count() === 1) { - return $this->converter($code, ''); + if ($isLast === true) { + $this->converter($code, ''); } else { - return $this->deleteContentFiles($code); + $this->deleteContentFiles($code); } + + // get the original language collection and remove the current language + $kirby->languages(false)->remove($code); + + return true; } /** @@ -679,6 +684,11 @@ class Language extends Model throw new PermissionException('Please select another language to be the primary language'); } - return $updated->save(); + $language = $updated->save(); + + // make sure the language is also updated in the Kirby language collection + App::instance()->languages(false)->set($language->code(), $language); + + return $language; } } diff --git a/kirby/src/Cms/LanguageRouter.php b/kirby/src/Cms/LanguageRouter.php index a770c35..9a6a222 100644 --- a/kirby/src/Cms/LanguageRouter.php +++ b/kirby/src/Cms/LanguageRouter.php @@ -91,7 +91,7 @@ class LanguageRouter return $page->uri($language) . '/' . $pattern; }, $patterns); - // reinject the pattern and the full page object + // re-inject the pattern and the full page object $routes[$index]['pattern'] = $patterns; $routes[$index]['page'] = $page; } else { diff --git a/kirby/src/Cms/LanguageRoutes.php b/kirby/src/Cms/LanguageRoutes.php index ad98bc9..14801bb 100644 --- a/kirby/src/Cms/LanguageRoutes.php +++ b/kirby/src/Cms/LanguageRoutes.php @@ -2,7 +2,7 @@ namespace Kirby\Cms; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; class LanguageRoutes { diff --git a/kirby/src/Cms/Languages.php b/kirby/src/Cms/Languages.php index 1b84359..77df4d6 100644 --- a/kirby/src/Cms/Languages.php +++ b/kirby/src/Cms/Languages.php @@ -3,7 +3,7 @@ namespace Kirby\Cms; use Kirby\Exception\DuplicateException; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * A collection of all defined site languages diff --git a/kirby/src/Cms/Layout.php b/kirby/src/Cms/Layout.php index d65caee..728f953 100644 --- a/kirby/src/Cms/Layout.php +++ b/kirby/src/Cms/Layout.php @@ -17,6 +17,8 @@ class Layout extends Item { const ITEMS_CLASS = '\Kirby\Cms\Layouts'; + use HasMethods; + /** * @var \Kirby\Cms\Content */ @@ -36,6 +38,11 @@ class Layout extends Item */ public function __call(string $method, array $args = []) { + // layout methods + if ($this->hasMethod($method) === true) { + return $this->callMethod($method, $args); + } + return $this->attrs()->get($method); } diff --git a/kirby/src/Cms/LayoutColumn.php b/kirby/src/Cms/LayoutColumn.php index a5aa2cd..857d435 100644 --- a/kirby/src/Cms/LayoutColumn.php +++ b/kirby/src/Cms/LayoutColumn.php @@ -19,6 +19,8 @@ class LayoutColumn extends Item { const ITEMS_CLASS = '\Kirby\Cms\LayoutColumns'; + use HasMethods; + /** * @var \Kirby\Cms\Blocks */ @@ -45,13 +47,33 @@ class LayoutColumn extends Item $this->width = $params['width'] ?? '1/1'; } + /** + * Magic getter function + * + * @param string $method + * @param mixed $args + * @return mixed + */ + public function __call(string $method, $args) + { + // layout column methods + if ($this->hasMethod($method) === true) { + return $this->callMethod($method, $args); + } + } + /** * Returns the blocks collection * + * @param bool $includeHidden Sets whether to include hidden blocks * @return \Kirby\Cms\Blocks */ - public function blocks() + public function blocks(bool $includeHidden = false) { + if ($includeHidden === false) { + return $this->blocks->filter('isHidden', false); + } + return $this->blocks; } @@ -104,7 +126,7 @@ class LayoutColumn extends Item public function toArray(): array { return [ - 'blocks' => $this->blocks()->toArray(), + 'blocks' => $this->blocks(true)->toArray(), 'id' => $this->id(), 'width' => $this->width(), ]; diff --git a/kirby/src/Cms/Layouts.php b/kirby/src/Cms/Layouts.php index 2f6bbe8..c8c7f59 100644 --- a/kirby/src/Cms/Layouts.php +++ b/kirby/src/Cms/Layouts.php @@ -41,6 +41,18 @@ class Layouts extends Items return parent::factory($items, $params); } + /** + * Checks if a given block type exists in the layouts collection + * @since 3.6.0 + * + * @param string $type + * @return bool + */ + public function hasBlockType(string $type): bool + { + return $this->toBlocks()->hasType($type); + } + /** * Parse layouts data * @@ -63,4 +75,28 @@ class Layouts extends Items return $input; } + + /** + * Converts layouts to blocks + * @since 3.6.0 + * + * @param bool $includeHidden Sets whether to include hidden blocks + * @return \Kirby\Cms\Blocks + */ + public function toBlocks(bool $includeHidden = false) + { + $blocks = []; + + if ($this->isNotEmpty() === true) { + foreach ($this->data() as $layout) { + foreach ($layout->columns() as $column) { + foreach ($column->blocks($includeHidden) as $block) { + $blocks[] = $block->toArray(); + } + } + } + } + + return Blocks::factory($blocks); + } } diff --git a/kirby/src/Cms/Loader.php b/kirby/src/Cms/Loader.php new file mode 100644 index 0000000..ecf14f2 --- /dev/null +++ b/kirby/src/Cms/Loader.php @@ -0,0 +1,250 @@ +load()` and the + * `$kirby->core()->load()` methods. + * + * With `$kirby->load()` you get access to core parts + * that might be overwritten by plugins. + * + * With `$kirby->core()->load()` you get access to + * untouched core parts. This is useful if you want to + * reuse or fall back to core features in your plugins. + * + * @package Kirby Cms + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Loader +{ + /** + * @var \Kirby\Cms\App + */ + protected $kirby; + + /** + * @var bool + */ + protected $withPlugins; + + /** + * @param \Kirby\Cms\App $kirby + * @param bool $withPlugins + */ + public function __construct(App $kirby, bool $withPlugins = true) + { + $this->kirby = $kirby; + $this->withPlugins = $withPlugins; + } + + /** + * Loads the area definition + * + * @param string $name + * @return array|null + */ + public function area(string $name): ?array + { + return $this->areas()[$name] ?? null; + } + + /** + * Loads all areas and makes sure that plugins + * are injected properly + * + * @return array + */ + public function areas(): array + { + $areas = []; + $extensions = $this->withPlugins === true ? $this->kirby->extensions('areas') : []; + + // load core areas and extend them with elements from plugins if they exist + foreach ($this->kirby->core()->areas() as $id => $area) { + $area = $this->resolveArea($area); + + if (isset($extensions[$id]) === true) { + foreach ($extensions[$id] as $areaExtension) { + $extension = $this->resolveArea($areaExtension); + $area = array_replace_recursive($area, $extension); + } + + unset($extensions[$id]); + } + + $areas[$id] = $area; + } + + // add additional areas from plugins + foreach ($extensions as $id => $areaExtensions) { + foreach ($areaExtensions as $areaExtension) { + $areas[$id] = $this->resolve($areaExtension); + } + } + + return $areas; + } + + /** + * Loads a core component closure + * + * @param string $name + * @return \Closure|null + */ + public function component(string $name): ?Closure + { + return $this->extension('components', $name); + } + + /** + * Loads all core component closures + * + * @return array + */ + public function components(): array + { + return $this->extensions('components'); + } + + /** + * Loads a particular extension + * + * @param string $type + * @param string $name + * @return mixed + */ + public function extension(string $type, string $name) + { + return $this->extensions($type)[$name] ?? null; + } + + /** + * Loads all defined extensions + * + * @param string $type + * @return array + */ + public function extensions(string $type): array + { + return $this->withPlugins === false ? $this->kirby->core()->$type() : $this->kirby->extensions($type); + } + + /** + * The resolver takes a string, array or closure. + * + * 1.) a string is supposed to be a path to an existing file. + * The file will either be included when it's a PHP file and + * the array contents will be read. Or it will be parsed with + * the Data class to read yml or json data into an array + * + * 2.) arrays are untouched and returned + * + * 3.) closures will be called and the Kirby instance will be + * passed as first argument + * + * @param mixed $item + * @return mixed + */ + public function resolve($item) + { + if (is_string($item) === true) { + if (F::extension($item) !== 'php') { + $item = Data::read($item); + } else { + $item = require $item; + } + } + + if (is_callable($item)) { + $item = $item($this->kirby); + } + + return $item; + } + + /** + * Calls `static::resolve()` on all items + * in the given array + * + * @param array $items + * @return array + */ + public function resolveAll(array $items): array + { + $result = []; + + foreach ($items as $key => $value) { + $result[$key] = $this->resolve($value); + } + + return $result; + } + + /** + * Areas need a bit of special treatment + * when they are being loaded + * + * @param string|array|Closure $area + * @return array + */ + public function resolveArea($area): array + { + $area = $this->resolve($area); + $dropdowns = $area['dropdowns'] ?? []; + + // convert closure dropdowns to an array definition + // otherwise they cannot be merged properly later + foreach ($dropdowns as $key => $dropdown) { + if (is_a($dropdown, 'Closure') === true) { + $area['dropdowns'][$key] = [ + 'options' => $dropdown + ]; + } + } + + return $area; + } + + /** + * Loads a particular section definition + * + * @param string $name + * @return array|null + */ + public function section(string $name): ?array + { + return $this->resolve($this->extension('sections', $name)); + } + + /** + * Loads all section defintions + * + * @return array + */ + public function sections(): array + { + return $this->resolveAll($this->extensions('sections')); + } + + /** + * Returns the status flag, which shows + * if plugins are loaded as well. + * + * @return bool + */ + public function withPlugins(): bool + { + return $this->withPlugins; + } +} diff --git a/kirby/src/Cms/Media.php b/kirby/src/Cms/Media.php index b3ff75c..6cf3799 100644 --- a/kirby/src/Cms/Media.php +++ b/kirby/src/Cms/Media.php @@ -3,8 +3,8 @@ namespace Kirby\Cms; use Kirby\Data\Data; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Toolkit\Str; use Throwable; @@ -48,8 +48,8 @@ class Media if (Str::startsWith($hash, $file->mediaToken() . '-') === true) { return Response::redirect($file->mediaUrl(), 307); } else { - // don't leak the correct token - return new Response('Not Found', 'text/plain', 404); + // don't leak the correct token, render the error page + return false; } } diff --git a/kirby/src/Cms/Model.php b/kirby/src/Cms/Model.php index 9cbda75..d8c2167 100644 --- a/kirby/src/Cms/Model.php +++ b/kirby/src/Cms/Model.php @@ -17,6 +17,14 @@ abstract class Model { use Properties; + /** + * Each model must define a CLASS_ALIAS + * which will be used in template queries. + * The CLASS_ALIAS is a short human-readable + * version of the class name. I.e. page. + */ + const CLASS_ALIAS = null; + /** * The parent Kirby instance * diff --git a/kirby/src/Cms/ModelWithContent.php b/kirby/src/Cms/ModelWithContent.php index 4f3a8fd..2a83a44 100644 --- a/kirby/src/Cms/ModelWithContent.php +++ b/kirby/src/Cms/ModelWithContent.php @@ -5,6 +5,7 @@ namespace Kirby\Cms; use Closure; use Kirby\Data\Data; use Kirby\Exception\InvalidArgumentException; +use Kirby\Form\Form; use Kirby\Toolkit\Str; use Throwable; @@ -19,14 +20,6 @@ use Throwable; */ abstract class ModelWithContent extends Model { - /** - * Each model must define a CLASS_ALIAS - * which will be used in template queries. - * The CLASS_ALIAS is a short human-readable - * version of the class name. I.e. page. - */ - const CLASS_ALIAS = null; - /** * The content * @@ -244,46 +237,6 @@ abstract class ModelWithContent extends Model return $this->update([$field => $value]); } - /** - * Returns the drag text from a custom callback - * if the callback is defined in the config - * - * @internal - * @param string $type markdown or kirbytext - * @param mixed ...$args - * @return string|null - */ - public function dragTextFromCallback(string $type, ...$args): ?string - { - $dragTextCallback = option('panel.' . $type . '.' . static::CLASS_ALIAS . 'DragText'); - - if (empty($dragTextCallback) === false && is_a($dragTextCallback, 'Closure') === true && ($dragText = $dragTextCallback($this, ...$args)) !== null) { - return $dragText; - } - - return null; - } - - /** - * Returns the correct drag text type - * depending on the given type or the - * configuration - * - * @internal - * @param string $type (null|auto|kirbytext|markdown) - * @return string - */ - public function dragTextType(string $type = null): string - { - $type = $type ?? 'auto'; - - if ($type === 'auto') { - $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; - } - - return $type === 'markdown' ? 'markdown' : 'kirbytext'; - } - /** * Returns all content validation errors * @@ -362,144 +315,12 @@ abstract class ModelWithContent extends Model } /** - * Returns the panel icon definition + * Returns the panel info of the model + * @since 3.6.0 * - * @internal - * @param array|null $params - * @return array + * @return \Kirby\Panel\Model */ - public function panelIcon(array $params = null): array - { - $defaults = [ - 'type' => 'page', - 'ratio' => null, - 'back' => 'pattern', - 'color' => '#c5c9c6', - ]; - - return array_merge($defaults, $params ?? []); - } - - /** - * @internal - * @param string|array|false|null $settings - * @return array|null - */ - public function panelImage($settings = null): ?array - { - $defaults = [ - 'ratio' => '3/2', - 'back' => 'pattern', - 'cover' => false - ]; - - // switch the image off - if ($settings === false) { - return null; - } - - if (is_string($settings) === true) { - // use defined icon in blueprint - if ($settings === 'icon') { - return []; - } - - $settings = [ - 'query' => $settings - ]; - } - - if ($image = $this->panelImageSource($settings['query'] ?? null)) { - - // main url - $settings['url'] = $image->url(); - - // only create srcsets for actual File objects - if (is_a($image, 'Kirby\Cms\File') === true) { - - // for cards - $settings['cards'] = [ - 'url' => 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw', - 'srcset' => $image->srcset([ - 352, - 864, - 1408, - ]) - ]; - - // for lists - $settings['list'] = [ - 'url' => 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw', - 'srcset' => $image->srcset([ - '1x' => [ - 'width' => 38, - 'height' => 38, - 'crop' => 'center' - ], - '2x' => [ - 'width' => 76, - 'height' => 76, - 'crop' => 'center' - ], - ]) - ]; - } - - unset($settings['query']); - } - - return array_merge($defaults, (array)$settings); - } - - /** - * Returns the image file object based on provided query - * - * @internal - * @param string|null $query - * @return \Kirby\Cms\File|\Kirby\Cms\Asset|null - */ - protected function panelImageSource(string $query = null) - { - $image = $this->query($query ?? null); - - // validate the query result - if (is_a($image, 'Kirby\Cms\File') === false && is_a($image, 'Kirby\Cms\Asset') === false) { - $image = null; - } - - // fallback for files - if ($image === null && is_a($this, 'Kirby\Cms\File') === true && $this->isViewable() === true) { - $image = $this; - } - - return $image; - } - - /** - * Returns an array of all actions - * that can be performed in the Panel - * This also checks for the lock status - * @since 3.3.0 - * - * @param array $unlock An array of options that will be force-unlocked - * @return array - */ - public function panelOptions(array $unlock = []): array - { - $options = $this->permissions()->toArray(); - - if ($this->isLocked()) { - foreach ($options as $key => $value) { - if (in_array($key, $unlock)) { - continue; - } - - $options[$key] = false; - } - } - - return $options; - } + abstract public function panel(); /** * Must return the permissions object for the model @@ -687,24 +508,43 @@ abstract class ModelWithContent extends Model } /** - * String template builder + * String template builder with automatic HTML escaping + * @since 3.6.0 * - * @param string|null $template + * @param string|null $template Template string or `null` to use the model ID * @param array $data * @param string $fallback Fallback for tokens in the template that cannot be replaced * @return string */ - public function toString(string $template = null, array $data = [], string $fallback = ''): string + public function toSafeString(string $template = null, array $data = [], string $fallback = ''): string + { + return $this->toString($template, $data, $fallback, 'safeTemplate'); + } + + /** + * String template builder + * + * @param string|null $template Template string or `null` to use the model ID + * @param array $data + * @param string $fallback Fallback for tokens in the template that cannot be replaced + * @param string $handler For internal use + * @return string + */ + public function toString(string $template = null, array $data = [], string $fallback = '', string $handler = 'template'): string { if ($template === null) { - return $this->id(); + return $this->id() ?? ''; } - $result = Str::template($template, array_replace([ + if ($handler !== 'template' && $handler !== 'safeTemplate') { + throw new InvalidArgumentException('Invalid toString handler'); // @codeCoverageIgnore + } + + $result = Str::$handler($template, array_replace([ 'kirby' => $this->kirby(), 'site' => is_a($this, 'Kirby\Cms\Site') ? $this : $this->site(), static::CLASS_ALIAS => $this - ], $data), $fallback); + ], $data), ['fallback' => $fallback]); return $result; } @@ -801,4 +641,59 @@ abstract class ModelWithContent extends Model $this->contentFileData($data, $languageCode) ); } + + + /** + * Deprecated! + */ + + /** + * Returns the panel icon definition + * + * @deprecated 3.6.0 Use `->panel()->image()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param array|null $params + * @return array|null + * @codeCoverageIgnore + */ + public function panelIcon(array $params = null): ?array + { + return $this->panel()->image($params); + } + + /** + * @deprecated 3.6.0 Use `->panel()->image()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param string|array|false|null $settings + * @return array|null + * @codeCoverageIgnore + */ + public function panelImage($settings = null): ?array + { + return $this->panel()->image($settings); + } + + /** + * Returns an array of all actions + * that can be performed in the Panel + * This also checks for the lock status + * + * @deprecated 3.6.0 Use `->panel()->options()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @param array $unlock An array of options that will be force-unlocked + * @return array + * @codeCoverageIgnore + */ + public function panelOptions(array $unlock = []): array + { + return $this->panel()->options($unlock); + } } diff --git a/kirby/src/Cms/Page.php b/kirby/src/Cms/Page.php index a817753..4afae4d 100644 --- a/kirby/src/Cms/Page.php +++ b/kirby/src/Cms/Page.php @@ -5,10 +5,11 @@ namespace Kirby\Cms; use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Http\Uri; +use Kirby\Panel\Page as Panel; use Kirby\Toolkit\A; -use Kirby\Toolkit\Escape; -use Kirby\Toolkit\F; /** * The `$page` object is the heart and @@ -171,7 +172,7 @@ class Page extends ModelWithContent } // return page content otherwise - return $this->content()->get($method, $arguments); + return $this->content()->get($method); } /** @@ -214,9 +215,9 @@ class Page extends ModelWithContent public function apiUrl(bool $relative = false): string { if ($relative === true) { - return 'pages/' . $this->panelId(); + return 'pages/' . $this->panel()->id(); } else { - return $this->kirby()->url('api') . '/pages/' . $this->panelId(); + return $this->kirby()->url('api') . '/pages/' . $this->panel()->id(); } } @@ -335,7 +336,7 @@ class Page extends ModelWithContent * @return array * @throws \Kirby\Exception\InvalidArgumentException If the controller returns invalid objects for `kirby`, `site`, `pages` or `page` */ - public function controller($data = [], $contentType = 'html'): array + public function controller(array $data = [], string $contentType = 'html'): array { // create the template data $data = array_merge($data, [ @@ -426,31 +427,6 @@ class Page extends ModelWithContent } } - /** - * Provides a kirbytag or markdown - * tag for the page, which will be - * used in the panel, when the page - * gets dragged onto a textarea - * - * @internal - * @param string|null $type (null|auto|kirbytext|markdown) - * @return string - */ - public function dragText(string $type = null): string - { - $type = $this->dragTextType($type); - - if ($dragTextFromCallback = $this->dragTextFromCallback($type)) { - return $dragTextFromCallback; - } - - if ($type === 'markdown') { - return '[' . $this->title() . '](' . $this->url() . ')'; - } else { - return '(link: ' . $this->id() . ' text: ' . $this->title() . ')'; - } - } - /** * Checks if the page exists on disk * @@ -929,109 +905,13 @@ class Page extends ModelWithContent } /** - * Returns the panel icon definition - * according to the blueprint settings + * Returns the panel info object * - * @internal - * @param array|null $params - * @return array + * @return \Kirby\Panel\Page */ - public function panelIcon(array $params = null): array + public function panel() { - if ($icon = $this->blueprint()->icon()) { - $params['type'] = $icon; - } - - return parent::panelIcon($params); - } - - /** - * Returns the escaped Id, which is - * used in the panel to make routing work properly - * - * @internal - * @return string - */ - public function panelId(): string - { - return str_replace('/', '+', $this->id()); - } - - /** - * Returns the image file object based on provided query - * - * @internal - * @param string|null $query - * @return \Kirby\Cms\File|\Kirby\Cms\Asset|null - */ - protected function panelImageSource(string $query = null) - { - if ($query === null) { - $query = 'page.image'; - } - - return parent::panelImageSource($query); - } - - /** - * Returns the full path without leading slash - * - * @internal - * @return string - */ - public function panelPath(): string - { - return 'pages/' . $this->panelId(); - } - - /** - * Prepares the response data for page pickers - * and page fields - * - * @param array|null $params - * @return array - */ - public function panelPickerData(array $params = []): array - { - $image = $this->panelImage($params['image'] ?? []); - $icon = $this->panelIcon($image); - - // escape the default text - // TODO: no longer needed in 3.6 - $textQuery = $params['text'] ?? '{{ page.title }}'; - $text = $this->toString($textQuery); - if ($textQuery === '{{ page.title }}') { - $text = Escape::html($text); - } - - return [ - 'dragText' => $this->dragText(), - 'hasChildren' => $this->hasChildren(), - 'icon' => $icon, - 'id' => $this->id(), - 'image' => $image, - 'info' => $this->toString($params['info'] ?? false), - 'link' => $this->panelUrl(true), - 'text' => $text, - 'url' => $this->url(), - ]; - } - - /** - * Returns the url to the editing view - * in the panel - * - * @internal - * @param bool $relative - * @return string - */ - public function panelUrl(bool $relative = false): string - { - if ($relative === true) { - return '/' . $this->panelPath(); - } else { - return $this->kirby()->url('panel') . '/' . $this->panelPath(); - } + return new Panel($this); } /** @@ -1383,7 +1263,9 @@ class Page extends ModelWithContent $languageCode = $this->kirby()->languageCode(); } - if ($translation = $this->translations()->find($languageCode)) { + $defaultLanguageCode = $this->kirby()->defaultLanguage()->code(); + + if ($languageCode !== $defaultLanguageCode && $translation = $this->translations()->find($languageCode)) { return $translation->slug() ?? $this->slug; } } @@ -1576,4 +1458,97 @@ class Page extends ModelWithContent return $this->url = $this->site()->urlForLanguage($language) . '/' . $this->slug($language); } + + + /** + * Deprecated! + */ + + /** + * Provides a kirbytag or markdown + * tag for the page, which will be + * used in the panel, when the page + * gets dragged onto a textarea + * + * @deprecated 3.6.0 Use `->panel()->dragText()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param string|null $type (null|auto|kirbytext|markdown) + * @return string + * @codeCoverageIgnore + */ + public function dragText(string $type = null): string + { + return $this->panel()->dragText($type); + } + + /** + * Returns the escaped Id, which is + * used in the panel to make routing work properly + * + * @deprecated 3.6.0 Use `->panel()->id()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @return string + * @codeCoverageIgnore + */ + public function panelId(): string + { + return $this->panel()->id(); + } + + /** + * Returns the full path without leading slash + * + * @deprecated 3.6.0 Use `->panel()->path()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @return string + * @codeCoverageIgnore + */ + public function panelPath(): string + { + return $this->panel()->path(); + } + + /** + * Prepares the response data for page pickers + * and page fields + * + * @deprecated 3.6.0 Use `->panel()->pickerData()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @param array|null $params + * @return array + * @codeCoverageIgnore + */ + public function panelPickerData(array $params = []): array + { + return $this->panel()->pickerData($params); + } + + /** + * Returns the url to the editing view + * in the panel + * + * @deprecated 3.6.0 Use `->panel()->url()` instead + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param bool $relative + * @return string + * @codeCoverageIgnore + */ + public function panelUrl(bool $relative = false): string + { + return $this->panel()->url($relative); + } } diff --git a/kirby/src/Cms/PageActions.php b/kirby/src/Cms/PageActions.php index 5a41bc0..7730a2d 100644 --- a/kirby/src/Cms/PageActions.php +++ b/kirby/src/Cms/PageActions.php @@ -7,8 +7,10 @@ use Kirby\Exception\DuplicateException; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; +use Kirby\Form\Form; use Kirby\Toolkit\A; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; /** @@ -284,6 +286,10 @@ trait PageActions ]); foreach ($this->kirby()->languages()->codes() as $code) { + if ($oldPage->translation($code)->exists() !== true) { + continue; + } + $content = $oldPage->content($code)->convertTo($template); if (F::remove($oldPage->contentFile($code)) !== true) { @@ -295,7 +301,7 @@ trait PageActions } // return a fresh copy of the object - return $newPage->clone(); + $page = $newPage->clone(); } else { $newPage = $this->clone([ 'content' => $this->content()->convertTo($template), @@ -306,8 +312,17 @@ trait PageActions throw new LogicException('The old text file could not be removed'); } - return $newPage->save(); + $page = $newPage->save(); } + + // update the parent collection + if ($page->isDraft() === true) { + $page->parentModel()->drafts()->set($page->id(), $page); + } else { + $page->parentModel()->children()->set($page->id(), $page); + } + + return $page; }); } @@ -322,7 +337,16 @@ trait PageActions { $arguments = ['page' => $this, 'title' => $title, 'languageCode' => $languageCode]; return $this->commit('changeTitle', $arguments, function ($page, $title, $languageCode) { - return $page->save(['title' => $title], $languageCode); + $page = $page->save(['title' => $title], $languageCode); + + // flush the parent cache to get children and drafts right + if ($page->isDraft() === true) { + $page->parentModel()->drafts()->set($page->id(), $page); + } else { + $page->parentModel()->children()->set($page->id(), $page); + } + + return $page; }); } @@ -529,14 +553,13 @@ trait PageActions return 0; case 'date': case 'datetime': + // the $format needs to produce only digits, + // so it can be converted to integer below $format = $mode === 'date' ? 'Ymd' : 'YmdHi'; $lang = $this->kirby()->defaultLanguage() ?? null; $field = $this->content($lang)->get('date'); $date = $field->isEmpty() ? 'now' : $field; - // TODO: in 3.6.0 throw an error if date() doesn't - // return a number, see https://github.com/getkirby/kirby/pull/3061#discussion_r552783943 return (int)date($format, strtotime($date)); - break; case 'default': $max = $this @@ -571,7 +594,7 @@ trait PageActions 'kirby' => $app, 'page' => $app->page($this->id()), 'site' => $app->site(), - ], ''); + ], ['fallback' => '']); return (int)$template; } @@ -640,17 +663,28 @@ trait PageActions { // create the slug for the duplicate - $slug = Str::slug($slug ?? $this->slug() . '-copy'); + $slug = Str::slug($slug ?? $this->slug() . '-' . Str::slug(t('page.duplicate.appendix'))); + + $arguments = [ + 'originalPage' => $this, + 'input' => $slug, + 'options' => $options + ]; - $arguments = ['originalPage' => $this, 'input' => $slug, 'options' => $options]; return $this->commit('duplicate', $arguments, function ($page, $slug, $options) { - return $this->copy([ + $page = $this->copy([ 'parent' => $this->parent(), 'slug' => $slug, 'isDraft' => true, 'files' => $options['files'] ?? false, 'children' => $options['children'] ?? false, ]); + + if (isset($options['title']) === true) { + $page = $page->changeTitle($options['title']); + } + + return $page; }); } @@ -786,20 +820,6 @@ trait PageActions return true; } - /** - * @deprecated 3.5.0 Use `Page::changeSort()` instead - * @todo Remove in 3.6.0 - * - * @param null $position - * @return $this|static - */ - public function sort($position = null) - { - deprecated('$page->sort() is deprecated, use $page->changeSort() instead. $page->sort() will be removed in Kirby 3.6.0.'); - - return $this->changeStatus('listed', $position); - } - /** * Convert a page from listed or * unlisted to draft. diff --git a/kirby/src/Cms/PageRules.php b/kirby/src/Cms/PageRules.php index 92d9f08..e575725 100644 --- a/kirby/src/Cms/PageRules.php +++ b/kirby/src/Cms/PageRules.php @@ -169,26 +169,12 @@ class PageRules return true; } - if ($page->permissions()->changeStatus() !== true) { - throw new PermissionException([ - 'key' => 'page.changeStatus.permission', - 'data' => [ - 'slug' => $page->slug() - ] - ]); - } + static::publish($page); if ($position !== null && $position < 0) { throw new InvalidArgumentException(['key' => 'page.num.invalid']); } - if ($page->isDraft() === true && empty($page->errors()) === false) { - throw new PermissionException([ - 'key' => 'page.changeStatus.incomplete', - 'details' => $page->errors() - ]); - } - return true; } @@ -201,14 +187,7 @@ class PageRules */ public static function changeStatusToUnlisted(Page $page) { - if ($page->permissions()->changeStatus() !== true) { - throw new PermissionException([ - 'key' => 'page.changeStatus.permission', - 'data' => [ - 'slug' => $page->slug() - ] - ]); - } + static::publish($page); return true; } @@ -376,6 +355,34 @@ class PageRules return true; } + /** + * Check if the page can be published + * (status change from draft to listed or unlisted) + * + * @param Page $page + * @return bool + */ + public static function publish(Page $page): bool + { + if ($page->permissions()->changeStatus() !== true) { + throw new PermissionException([ + 'key' => 'page.changeStatus.permission', + 'data' => [ + 'slug' => $page->slug() + ] + ]); + } + + if ($page->isDraft() === true && empty($page->errors()) === false) { + throw new PermissionException([ + 'key' => 'page.changeStatus.incomplete', + 'details' => $page->errors() + ]); + } + + return true; + } + /** * Validates if the page can be updated * diff --git a/kirby/src/Cms/Pages.php b/kirby/src/Cms/Pages.php index 1f97af5..3e141a9 100644 --- a/kirby/src/Cms/Pages.php +++ b/kirby/src/Cms/Pages.php @@ -48,13 +48,13 @@ class Pages extends Collection * an entire second collection to the * current collection * - * @param mixed $object + * @param \Kirby\Cms\Pages|\Kirby\Cms\Page|string $object * @return $this - * @throws \Kirby\Exception\InvalidArgumentException + * @throws \Kirby\Exception\InvalidArgumentException When no `Page` or `Pages` object or an ID of an existing page is passed */ public function add($object) { - // add a page collection + // add a pages collection if (is_a($object, self::class) === true) { $this->data = array_merge($this->data, $object->data); @@ -66,9 +66,10 @@ class Pages extends Collection } elseif (is_a($object, 'Kirby\Cms\Page') === true) { $this->__set($object->id(), $object); - // give a useful error message on invalid input + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups } elseif (in_array($object, [null, false, true], true) !== true) { - throw new InvalidArgumentException('You must pass a Page object to the Pages collection'); + throw new InvalidArgumentException('You must pass a Pages or Page object or an ID of an existing page to the Pages collection'); } return $this; @@ -223,14 +224,8 @@ class Pages extends Collection return $page; } - $multiLang = App::instance()->multilang(); - - if ($multiLang === true && $page = $this->findBy('slug', $id)) { - return $page; - } - $start = is_a($this->parent, 'Kirby\Cms\Page') === true ? $this->parent->id() : ''; - $page = $this->findByIdRecursive($id, $start, $multiLang); + $page = $this->findByIdRecursive($id, $start, App::instance()->multilang()); return $page; } @@ -254,8 +249,14 @@ class Pages extends Collection $query = ltrim($query . '/' . $key, '/'); $item = $collection->get($query) ?? null; - if ($item === null && $multiLang === true) { - $item = $collection->findBy('slug', $key); + if ($item === null && $multiLang === true && !App::instance()->language()->isDefault()) { + if (count($path) > 1 || $collection->parent()) { + // either the desired path is definitely not a slug, or collection is the children of another collection + $item = $collection->findBy('slug', $key); + } else { + // desired path _could_ be a slug or a "top level" uri + $item = $collection->findBy('uri', $key); + } } if ($item === null) { diff --git a/kirby/src/Cms/Panel.php b/kirby/src/Cms/Panel.php deleted file mode 100644 index 4941a76..0000000 --- a/kirby/src/Cms/Panel.php +++ /dev/null @@ -1,139 +0,0 @@ - - * @link https://getkirby.com - * @copyright Bastian Allgeier GmbH - * @license https://getkirby.com/license - */ -class Panel -{ - /** - * Returns custom css path for panel ui - * - * @param \Kirby\Cms\App $kirby - * @return string|false - */ - public static function customCss(App $kirby) - { - if ($css = $kirby->option('panel.css')) { - $asset = asset($css); - - if ($asset->exists() === true) { - return $asset->url() . '?' . $asset->modified(); - } - } - - return false; - } - - /** - * Returns predefined icons path as sprite svg file - * - * @param \Kirby\Cms\App $kirby - * @return string - */ - public static function icons(App $kirby): string - { - return F::read($kirby->root('kirby') . '/panel/dist/img/icons.svg'); - } - - /** - * Links all dist files in the media folder - * and returns the link to the requested asset - * - * @param \Kirby\Cms\App $kirby - * @return bool - * @throws \Exception If Panel assets could not be moved to the public directory - */ - public static function link(App $kirby): bool - { - $mediaRoot = $kirby->root('media') . '/panel'; - $panelRoot = $kirby->root('panel') . '/dist'; - $versionHash = $kirby->versionHash(); - $versionRoot = $mediaRoot . '/' . $versionHash; - - // check if the version already exists - if (is_dir($versionRoot) === true) { - return false; - } - - // delete the panel folder and all previous versions - Dir::remove($mediaRoot); - - // recreate the panel folder - Dir::make($mediaRoot, true); - - // create a symlink to the dist folder - if (Dir::copy($panelRoot, $versionRoot) !== true) { - throw new Exception('Panel assets could not be linked'); - } - - return true; - } - - /** - * Renders the main panel view - * - * @param \Kirby\Cms\App $kirby - * @return \Kirby\Http\Response - */ - public static function render(App $kirby) - { - try { - if (static::link($kirby) === true) { - usleep(1); - go($kirby->url('index') . '/' . $kirby->path()); - } - } catch (Throwable $e) { - die('The Panel assets cannot be installed properly. ' . $e->getMessage()); - } - - // get the uri object for the panel url - $uri = new Uri($url = $kirby->url('panel')); - - // fetch all plugins - $plugins = new PanelPlugins(); - - $view = new View($kirby->root('kirby') . '/views/panel.php', [ - 'kirby' => $kirby, - 'config' => $kirby->option('panel'), - 'assetUrl' => $kirby->url('media') . '/panel/' . $kirby->versionHash(), - 'customCss' => static::customCss($kirby), - 'icons' => static::icons($kirby), - 'pluginCss' => $plugins->url('css'), - 'pluginJs' => $plugins->url('js'), - 'panelUrl' => $uri->path()->toString(true) . '/', - 'nonce' => $kirby->nonce(), - 'options' => [ - 'url' => $url, - 'site' => $kirby->url('index'), - 'api' => $kirby->url('api'), - 'csrf' => $kirby->option('api.csrf') ?? csrf(), - 'translation' => 'en', - 'debug' => $kirby->option('debug', false), - 'search' => [ - 'limit' => $kirby->option('panel.search.limit') ?? 10 - ] - ] - ]); - - return new Response($view->render()); - } -} diff --git a/kirby/src/Cms/Permissions.php b/kirby/src/Cms/Permissions.php index 1daac9e..27ffde5 100644 --- a/kirby/src/Cms/Permissions.php +++ b/kirby/src/Cms/Permissions.php @@ -27,10 +27,12 @@ class Permissions */ protected $actions = [ 'access' => [ - 'panel' => true, - 'settings' => true, - 'site' => true, - 'users' => true, + 'account' => true, + 'languages' => true, + 'panel' => true, + 'site' => true, + 'system' => true, + 'users' => true, ], 'files' => [ 'changeName' => true, @@ -157,6 +159,12 @@ class Permissions */ protected function setAction(string $category, string $action, $setting) { + // deprecated fallback for the settings/system view + // TODO: remove in 3.7 + if ($category === 'access' && $action === 'settings') { + $action = 'system'; + } + // wildcard to overwrite the entire category if ($action === '*') { return $this->setCategory($category, $setting); diff --git a/kirby/src/Cms/Picker.php b/kirby/src/Cms/Picker.php index c729396..65e766a 100644 --- a/kirby/src/Cms/Picker.php +++ b/kirby/src/Cms/Picker.php @@ -54,6 +54,8 @@ abstract class Picker 'image' => [], // query template for the info field 'info' => false, + // listing style: list, cards, cardlets + 'layout' =>'list', // number of users displayed per pagination page 'limit' => 20, // optional mapping function for the result array @@ -98,11 +100,12 @@ abstract class Picker if (empty($this->options['map']) === false) { $result[] = $this->options['map']($item); } else { - $result[] = $item->panelPickerData([ - 'image' => $this->options['image'], - 'info' => $this->options['info'], - 'model' => $this->options['model'], - 'text' => $this->options['text'], + $result[] = $item->panel()->pickerData([ + 'image' => $this->options['image'], + 'info' => $this->options['info'], + 'layout' => $this->options['layout'], + 'model' => $this->options['model'], + 'text' => $this->options['text'], ]); } } diff --git a/kirby/src/Cms/Plugin.php b/kirby/src/Cms/Plugin.php index d74c7ff..84d6cfe 100644 --- a/kirby/src/Cms/Plugin.php +++ b/kirby/src/Cms/Plugin.php @@ -5,6 +5,7 @@ namespace Kirby\Cms; use Exception; use Kirby\Data\Data; use Kirby\Exception\InvalidArgumentException; +use Kirby\Toolkit\V; /** * Represents a Plugin and handles parsing of @@ -45,8 +46,36 @@ class Plugin extends Model $this->setName($name); $this->extends = $extends; $this->root = $extends['root'] ?? dirname(debug_backtrace()[0]['file']); + $this->info = empty($extends['info']) === false && is_array($extends['info']) ? $extends['info'] : null; - unset($this->extends['root']); + unset($this->extends['root'], $this->extends['info']); + } + + /** + * Returns the array with author information + * from the composer file + * + * @return array + */ + public function authors(): array + { + return $this->info()['authors'] ?? []; + } + + /** + * Returns a comma-separated list with all author names + * + * @return string + */ + public function authorsNames(): string + { + $names = []; + + foreach ($this->authors() as $author) { + $names[] = $author['name'] ?? null; + } + + return implode(', ', array_filter($names)); } /** @@ -57,6 +86,16 @@ class Plugin extends Model return $this->extends; } + /** + * Returns the unique id for the plugin + * + * @return string + */ + public function id(): string + { + return $this->name(); + } + /** * @return array */ @@ -76,6 +115,22 @@ class Plugin extends Model return $this->info = $info; } + /** + * Returns the link to the plugin homepage + * + * @return string|null + */ + public function link(): ?string + { + $homepage = $this->info['homepage'] ?? null; + $docs = $this->info['support']['docs'] ?? null; + $source = $this->info['support']['source'] ?? null; + + $link = $homepage ?? $docs ?? $source; + + return V::url($link) ? $link : null; + } + /** * @return string */ @@ -153,6 +208,14 @@ class Plugin extends Model */ public function toArray(): array { - return $this->propertiesToArray(); + return [ + 'authors' => $this->authors(), + 'description' => $this->description(), + 'name' => $this->name(), + 'license' => $this->license(), + 'link' => $this->link(), + 'root' => $this->root(), + 'version' => $this->version() + ]; } } diff --git a/kirby/src/Cms/PluginAssets.php b/kirby/src/Cms/PluginAssets.php index 20f53c8..f762977 100644 --- a/kirby/src/Cms/PluginAssets.php +++ b/kirby/src/Cms/PluginAssets.php @@ -2,9 +2,9 @@ namespace Kirby\Cms; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Http\Response; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; /** * Plugin assets are automatically copied/linked @@ -66,15 +66,11 @@ class PluginAssets static::clean($pluginName); $target = $plugin->mediaRoot() . '/' . $filename; - $url = $plugin->mediaUrl() . '/' . $filename; - // create the plugin directory first - Dir::make($plugin->mediaRoot(), true); - - if (F::link($source, $target, 'symlink') === true) { - return Response::redirect($url); - } + // create a symlink if possible + F::link($source, $target, 'symlink'); + // return the file response return Response::file($source); } } diff --git a/kirby/src/Cms/Responder.php b/kirby/src/Cms/Responder.php index 4ea8647..ef576d0 100644 --- a/kirby/src/Cms/Responder.php +++ b/kirby/src/Cms/Responder.php @@ -3,7 +3,7 @@ namespace Kirby\Cms; use Kirby\Exception\InvalidArgumentException; -use Kirby\Toolkit\Mime; +use Kirby\Filesystem\Mime; use Kirby\Toolkit\Str; /** diff --git a/kirby/src/Cms/Role.php b/kirby/src/Cms/Role.php index 217d8b5..998849a 100644 --- a/kirby/src/Cms/Role.php +++ b/kirby/src/Cms/Role.php @@ -4,7 +4,7 @@ namespace Kirby\Cms; use Exception; use Kirby\Data\Data; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Kirby\Toolkit\I18n; /** diff --git a/kirby/src/Cms/Site.php b/kirby/src/Cms/Site.php index 650c053..750e70f 100644 --- a/kirby/src/Cms/Site.php +++ b/kirby/src/Cms/Site.php @@ -4,6 +4,8 @@ namespace Kirby\Cms; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\LogicException; +use Kirby\Filesystem\Dir; +use Kirby\Panel\Site as Panel; use Kirby\Toolkit\A; /** @@ -113,7 +115,7 @@ class Site extends ModelWithContent } // return site content otherwise - return $this->content()->get($method, $arguments); + return $this->content()->get($method); } /** @@ -412,31 +414,13 @@ class Site extends ModelWithContent } /** - * Returns the full path without leading slash + * Returns the panel info object * - * @internal - * @return string + * @return \Kirby\Panel\Site */ - public function panelPath(): string + public function panel() { - return 'site'; - } - - /** - * Returns the url to the editing view - * in the panel - * - * @internal - * @param bool $relative - * @return string - */ - public function panelUrl(bool $relative = false): string - { - if ($relative === true) { - return '/' . $this->panelPath(); - } else { - return $this->kirby()->url('panel') . '/' . $this->panelPath(); - } + return new Panel($this); } /** @@ -571,7 +555,7 @@ class Site extends ModelWithContent * @param string|null $url * @return $this */ - protected function setUrl($url = null) + protected function setUrl(?string $url = null) { $this->url = $url; return $this; @@ -603,7 +587,7 @@ class Site extends ModelWithContent * @param string|null $language * @return string */ - public function url($language = null): string + public function url(?string $language = null): string { if ($language !== null || $this->kirby()->multilang() === true) { return $this->urlForLanguage($language); @@ -675,4 +659,41 @@ class Site extends ModelWithContent { return Dir::wasModifiedAfter($this->root(), $time); } + + + /** + * Deprecated! + */ + + /** + * Returns the full path without leading slash + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @return string + * @codeCoverageIgnore + */ + public function panelPath(): string + { + return $this->panel()->path(); + } + + /** + * Returns the url to the editing view + * in the panel + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param bool $relative + * @return string + * @codeCoverageIgnore + */ + public function panelUrl(bool $relative = false): string + { + return $this->panel()->url($relative); + } } diff --git a/kirby/src/Cms/SiteActions.php b/kirby/src/Cms/SiteActions.php index 4297f39..e99740b 100644 --- a/kirby/src/Cms/SiteActions.php +++ b/kirby/src/Cms/SiteActions.php @@ -55,7 +55,10 @@ trait SiteActions */ public function changeTitle(string $title, string $languageCode = null) { - $arguments = ['site' => $this, 'title' => $title, 'languageCode' => $languageCode]; + $site = $this; + $title = trim($title); + $arguments = compact('site', 'title', 'languageCode'); + return $this->commit('changeTitle', $arguments, function ($site, $title, $languageCode) { return $site->save(['title' => $title], $languageCode); }); diff --git a/kirby/src/Cms/StructureObject.php b/kirby/src/Cms/StructureObject.php index a2cbeb7..c79b63b 100644 --- a/kirby/src/Cms/StructureObject.php +++ b/kirby/src/Cms/StructureObject.php @@ -3,11 +3,11 @@ namespace Kirby\Cms; /** - * The StructureObject reprents each item + * The StructureObject represents each item * in a Structure collection. StructureObjects * behave pretty much the same as Pages or Users * and have a Content object to access their fields. - * All fields in a StructureObject are therefor also + * All fields in a StructureObject are therefore also * wrapped in a Field object and can be accessed in * the same way as Page fields. They also use the same * Field methods. @@ -61,7 +61,7 @@ class StructureObject extends Model return $this->$method; } - return $this->content()->get($method, $arguments); + return $this->content()->get($method); } /** diff --git a/kirby/src/Cms/System.php b/kirby/src/Cms/System.php index 436a5b4..3326a07 100644 --- a/kirby/src/Cms/System.php +++ b/kirby/src/Cms/System.php @@ -6,10 +6,10 @@ use Kirby\Data\Json; use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\PermissionException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Http\Remote; use Kirby\Toolkit\A; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; use Kirby\Toolkit\V; use Throwable; @@ -56,25 +56,6 @@ class System return $this->toArray(); } - /** - * Get an status array of all checks - * - * @return array - */ - public function status(): array - { - return [ - 'accounts' => $this->accounts(), - 'content' => $this->content(), - 'curl' => $this->curl(), - 'sessions' => $this->sessions(), - 'mbstring' => $this->mbstring(), - 'media' => $this->media(), - 'php' => $this->php(), - 'server' => $this->server(), - ]; - } - /** * Check for a writable accounts folder * @@ -132,6 +113,13 @@ class System throw new PermissionException('The accounts directory could not be created'); } + // init /site/sessions + try { + Dir::make($this->app->root('sessions')); + } catch (Throwable $e) { + throw new PermissionException('The sessions directory could not be created'); + } + // init /content try { Dir::make($this->app->root('content')); @@ -227,44 +215,6 @@ class System return in_array(false, array_values($this->status()), true) === false; } - /** - * Normalizes the app's index URL for - * licensing purposes - * - * @param string|null $url Input URL, by default the app's index URL - * @return string Normalized URL - */ - protected function licenseUrl(string $url = null): string - { - if ($url === null) { - $url = $this->indexUrl(); - } - - // remove common "testing" subdomains as well as www. - // to ensure that installations of the same site have - // the same license URL; only for installations at /, - // subdirectory installations are difficult to normalize - if (Str::contains($url, '/') === false) { - if (Str::startsWith($url, 'www.')) { - return substr($url, 4); - } - - if (Str::startsWith($url, 'dev.')) { - return substr($url, 4); - } - - if (Str::startsWith($url, 'test.')) { - return substr($url, 5); - } - - if (Str::startsWith($url, 'staging.')) { - return substr($url, 8); - } - } - - return $url; - } - /** * Loads the license file and returns * the license information if available @@ -276,7 +226,7 @@ class System public function license() { try { - $license = Json::read($this->app->root('config') . '/.license'); + $license = Json::read($this->app->root('license')); } catch (Throwable $e) { return false; } @@ -319,13 +269,51 @@ class System // only return the actual license key if the // current user has appropriate permissions $user = $this->app->user(); - if ($user && $user->role()->permissions()->for('access', 'settings') === true) { + if ($user && $user->isAdmin() === true) { return $license['license']; } else { return true; } } + /** + * Normalizes the app's index URL for + * licensing purposes + * + * @param string|null $url Input URL, by default the app's index URL + * @return string Normalized URL + */ + protected function licenseUrl(string $url = null): string + { + if ($url === null) { + $url = $this->indexUrl(); + } + + // remove common "testing" subdomains as well as www. + // to ensure that installations of the same site have + // the same license URL; only for installations at /, + // subdirectory installations are difficult to normalize + if (Str::contains($url, '/') === false) { + if (Str::startsWith($url, 'www.')) { + return substr($url, 4); + } + + if (Str::startsWith($url, 'dev.')) { + return substr($url, 4); + } + + if (Str::startsWith($url, 'test.')) { + return substr($url, 5); + } + + if (Str::startsWith($url, 'staging.')) { + return substr($url, 8); + } + } + + return $url; + } + /** * Returns the configured UI modes for the login form * with their respective options @@ -416,10 +404,21 @@ class System public function php(): bool { return - version_compare(PHP_VERSION, '7.3.0', '>=') === true && + version_compare(PHP_VERSION, '7.4.0', '>=') === true && version_compare(PHP_VERSION, '8.1.0', '<') === true; } + /** + * Returns a sorted collection of all + * installed plugins + * + * @return \Kirby\Cms\Collection + */ + public function plugins() + { + return (new Collection(App::instance()->plugins()))->sortBy('name', 'asc'); + } + /** * Validates the license key * and adds it to the .license file in the config @@ -445,10 +444,11 @@ class System ]); } + // @codeCoverageIgnoreStart $response = Remote::get('https://licenses.getkirby.com/register', [ 'data' => [ 'license' => $license, - 'email' => $email, + 'email' => Str::lower(trim($email)), 'domain' => $this->indexUrl() ] ]); @@ -464,7 +464,7 @@ class System $json['email'] = $email; // where to store the license file - $file = $this->app->root('config') . '/.license'; + $file = $this->app->root('license'); // save the license information Json::write($file, $json); @@ -474,6 +474,7 @@ class System 'key' => 'license.verification' ]); } + // @codeCoverageIgnoreEnd return true; } @@ -484,6 +485,16 @@ class System * @return bool */ public function server(): bool + { + return $this->serverSoftware() !== null; + } + + /** + * Returns the detected server software + * + * @return string|null + */ + public function serverSoftware(): ?string { if ($servers = $this->app->option('servers')) { $servers = A::wrap($servers); @@ -499,7 +510,9 @@ class System $software = $_SERVER['SERVER_SOFTWARE'] ?? null; - return preg_match('!(' . implode('|', $servers) . ')!i', $software) > 0; + preg_match('!(' . implode('|', $servers) . ')!i', $software, $matches); + + return $matches[0] ?? null; } /** @@ -513,10 +526,45 @@ class System } /** - * Return the status as array + * Get an status array of all checks * * @return array */ + public function status(): array + { + return [ + 'accounts' => $this->accounts(), + 'content' => $this->content(), + 'curl' => $this->curl(), + 'sessions' => $this->sessions(), + 'mbstring' => $this->mbstring(), + 'media' => $this->media(), + 'php' => $this->php(), + 'server' => $this->server(), + ]; + } + + /** + * Returns the site's title as defined in the + * content file or `site.yml` blueprint + * @since 3.6.0 + * + * @return string + */ + public function title(): string + { + $site = $this->app->site(); + + if ($site->title()->isNotEmpty()) { + return $site->title()->value(); + } + + return $site->blueprint()->title(); + } + + /** + * @return array + */ public function toArray(): array { return $this->status(); diff --git a/kirby/src/Cms/Template.php b/kirby/src/Cms/Template.php index b7df18e..d41d229 100644 --- a/kirby/src/Cms/Template.php +++ b/kirby/src/Cms/Template.php @@ -3,7 +3,7 @@ namespace Kirby\Cms; use Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Kirby\Toolkit\Tpl; /** diff --git a/kirby/src/Cms/Translations.php b/kirby/src/Cms/Translations.php index 9f018af..3560b26 100644 --- a/kirby/src/Cms/Translations.php +++ b/kirby/src/Cms/Translations.php @@ -2,8 +2,8 @@ namespace Kirby\Cms; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; /** * A collection of all available Translations. diff --git a/kirby/src/Cms/Url.php b/kirby/src/Cms/Url.php index 635b0ef..bc6e7e5 100644 --- a/kirby/src/Cms/Url.php +++ b/kirby/src/Cms/Url.php @@ -61,9 +61,6 @@ class Url extends BaseUrl public static function to(string $path = null, $options = null): string { $kirby = App::instance(); - - return ($kirby->component('url'))($kirby, $path, $options, function (string $path = null, $options = null) use ($kirby) { - return ($kirby->nativeComponent('url'))($kirby, $path, $options); - }); + return ($kirby->component('url'))($kirby, $path, $options); } } diff --git a/kirby/src/Cms/User.php b/kirby/src/Cms/User.php index eb558e8..2fc86ec 100644 --- a/kirby/src/Cms/User.php +++ b/kirby/src/Cms/User.php @@ -5,8 +5,9 @@ namespace Kirby\Cms; use Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; -use Kirby\Toolkit\Escape; -use Kirby\Toolkit\F; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; +use Kirby\Panel\User as Panel; use Kirby\Toolkit\Str; /** @@ -115,7 +116,7 @@ class User extends ModelWithContent } // return site content otherwise - return $this->content()->get($method, $arguments); + return $this->content()->get($method); } /** @@ -125,7 +126,8 @@ class User extends ModelWithContent */ public function __construct(array $props) { - $props['id'] = $props['id'] ?? $this->createId(); + // TODO: refactor later to avoid redundant prop setting + $this->setProperty('id', $props['id'] ?? $this->createId(), true); $this->setProperties($props); } @@ -578,92 +580,13 @@ class User extends ModelWithContent } /** - * Panel icon definition + * Returns the panel info object * - * @internal - * @param array $params - * @return array + * @return \Kirby\Panel\User */ - public function panelIcon(array $params = null): array + public function panel() { - $params['type'] = 'user'; - - return parent::panelIcon($params); - } - - /** - * Returns the image file object based on provided query - * - * @internal - * @param string|null $query - * @return \Kirby\Cms\File|\Kirby\Cms\Asset|null - */ - protected function panelImageSource(string $query = null) - { - if ($query === null) { - return $this->avatar(); - } - - return parent::panelImageSource($query); - } - - /** - * Returns the full path without leading slash - * - * @internal - * @return string - */ - public function panelPath(): string - { - return 'users/' . $this->id(); - } - - /** - * Returns prepared data for the panel user picker - * - * @param array|null $params - * @return array - */ - public function panelPickerData(array $params = null): array - { - $image = $this->panelImage($params['image'] ?? []); - $icon = $this->panelIcon($image); - - // escape the default text - // TODO: no longer needed in 3.6 - $textQuery = $params['text'] ?? '{{ user.username }}'; - $text = $this->toString($textQuery); - if ($textQuery === '{{ user.username }}') { - $text = Escape::html($text); - } - - return [ - 'icon' => $icon, - 'id' => $this->id(), - 'image' => $image, - 'email' => $this->email(), - 'info' => $this->toString($params['info'] ?? false), - 'link' => $this->panelUrl(true), - 'text' => $text, - 'username' => $this->username(), - ]; - } - - /** - * Returns the url to the editing view - * in the panel - * - * @internal - * @param bool $relative - * @return string - */ - public function panelUrl(bool $relative = false): string - { - if ($relative === true) { - return '/' . $this->panelPath(); - } else { - return $this->kirby()->url('panel') . '/' . $this->panelPath(); - } + return new Panel($this); } /** @@ -909,13 +832,13 @@ class User extends ModelWithContent * @param string $fallback Fallback for tokens in the template that cannot be replaced * @return string */ - public function toString(string $template = null, array $data = [], string $fallback = ''): string + public function toString(string $template = null, array $data = [], string $fallback = '', string $handler = 'template'): string { if ($template === null) { $template = $this->email(); } - return parent::toString($template, $data); + return parent::toString($template, $data, $fallback, $handler); } /** @@ -951,9 +874,61 @@ class User extends ModelWithContent } if (password_verify($password, $this->password()) !== true) { - throw new InvalidArgumentException(['key' => 'user.password.wrong']); + throw new InvalidArgumentException(['key' => 'user.password.wrong', 'httpCode' => 401]); } return true; } + + + /** + * Deprecated! + */ + + /** + * Returns the full path without leading slash + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @return string + * @codeCoverageIgnore + */ + public function panelPath(): string + { + return $this->panel()->path(); + } + + /** + * Returns prepared data for the panel user picker + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @param array|null $params + * @return array + * @codeCoverageIgnore + */ + public function panelPickerData(array $params = null): array + { + return $this->panel()->pickerData($params); + } + + /** + * Returns the url to the editing view + * in the panel + * + * @todo Add `deprecated()` helper warning in 3.7.0 + * @todo Remove in 3.8.0 + * + * @internal + * @param bool $relative + * @return string + * @codeCoverageIgnore + */ + public function panelUrl(bool $relative = false): string + { + return $this->panel()->url($relative); + } } diff --git a/kirby/src/Cms/UserActions.php b/kirby/src/Cms/UserActions.php index 7343715..1640416 100644 --- a/kirby/src/Cms/UserActions.php +++ b/kirby/src/Cms/UserActions.php @@ -6,10 +6,12 @@ use Closure; use Kirby\Data\Data; use Kirby\Exception\LogicException; use Kirby\Exception\PermissionException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; +use Kirby\Form\Form; use Kirby\Http\Idn; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; use Kirby\Toolkit\Str; +use Throwable; /** * UserActions @@ -30,6 +32,8 @@ trait UserActions */ public function changeEmail(string $email) { + $email = trim($email); + return $this->commit('changeEmail', ['user' => $this, 'email' => Idn::decodeEmail($email)], function ($user, $email) { $user = $user->clone([ 'email' => $email @@ -39,6 +43,9 @@ trait UserActions 'email' => $email ]); + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; }); } @@ -60,6 +67,9 @@ trait UserActions 'language' => $language ]); + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; }); } @@ -72,6 +82,8 @@ trait UserActions */ public function changeName(string $name) { + $name = trim($name); + return $this->commit('changeName', ['user' => $this, 'name' => $name], function ($user, $name) { $user = $user->clone([ 'name' => $name @@ -81,6 +93,9 @@ trait UserActions 'name' => $name ]); + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; }); } @@ -100,6 +115,9 @@ trait UserActions $user->writePassword($password); + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; }); } @@ -121,6 +139,9 @@ trait UserActions 'role' => $role ]); + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; }); } @@ -232,14 +253,21 @@ trait UserActions public function createId(): string { $length = 8; - $id = Str::random($length); - while ($this->kirby()->users()->has($id)) { - $length++; - $id = Str::random($length); - } + do { + try { + $id = Str::random($length); + if (UserRules::validId($this, $id) === true) { + return $id; + } - return $id; + // we can't really test for a random match + // @codeCoverageIgnoreStart + } catch (Throwable $e) { + $length++; + } + } while (true); + // @codeCoverageIgnoreEnd } /** @@ -315,6 +343,9 @@ trait UserActions $this->kirby()->auth()->setUser($user); } + // update the users collection + $user->kirby()->users()->set($user->id(), $user); + return $user; } @@ -327,6 +358,11 @@ trait UserActions */ protected function updateCredentials(array $credentials): bool { + // normalize the email address + if (isset($credentials['email']) === true) { + $credentials['email'] = Str::lower(trim($credentials['email'])); + } + return $this->writeCredentials(array_merge($this->credentials(), $credentials)); } diff --git a/kirby/src/Cms/UserRules.php b/kirby/src/Cms/UserRules.php index f2f93b5..10c0f41 100644 --- a/kirby/src/Cms/UserRules.php +++ b/kirby/src/Cms/UserRules.php @@ -299,6 +299,10 @@ class UserRules */ public static function validId(User $user, string $id): bool { + if ($id === 'account') { + throw new InvalidArgumentException('"account" is a reserved word and cannot be used as user id'); + } + if ($user->kirby()->users()->find($id)) { throw new DuplicateException('A user with this id exists'); } diff --git a/kirby/src/Cms/Users.php b/kirby/src/Cms/Users.php index 63b789b..338f0a8 100644 --- a/kirby/src/Cms/Users.php +++ b/kirby/src/Cms/Users.php @@ -2,8 +2,9 @@ namespace Kirby\Cms; -use Kirby\Toolkit\Dir; -use Kirby\Toolkit\F; +use Kirby\Exception\InvalidArgumentException; +use Kirby\Filesystem\Dir; +use Kirby\Filesystem\F; use Kirby\Toolkit\Str; /** @@ -37,12 +38,13 @@ class Users extends Collection * an entire second collection to the * current collection * - * @param mixed $object + * @param \Kirby\Cms\Users|\Kirby\Cms\User|string $object * @return $this + * @throws \Kirby\Exception\InvalidArgumentException When no `User` or `Users` object or an ID of an existing user is passed */ public function add($object) { - // add a page collection + // add a users collection if (is_a($object, self::class) === true) { $this->data = array_merge($this->data, $object->data); @@ -53,6 +55,11 @@ class Users extends Collection // add a user object } elseif (is_a($object, 'Kirby\Cms\User') === true) { $this->__set($object->id(), $object); + + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups + } elseif (in_array($object, [null, false, true], true) !== true) { + throw new InvalidArgumentException('You must pass a Users or User object or an ID of an existing user to the Users collection'); } return $this; diff --git a/kirby/src/Data/Data.php b/kirby/src/Data/Data.php index def29ac..658659a 100644 --- a/kirby/src/Data/Data.php +++ b/kirby/src/Data/Data.php @@ -3,7 +3,7 @@ namespace Kirby\Data; use Kirby\Exception\Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * The `Data` class provides readers and diff --git a/kirby/src/Data/Handler.php b/kirby/src/Data/Handler.php index 071f30c..475ebad 100644 --- a/kirby/src/Data/Handler.php +++ b/kirby/src/Data/Handler.php @@ -3,7 +3,7 @@ namespace Kirby\Data; use Kirby\Exception\Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * Base handler abstract, diff --git a/kirby/src/Data/Json.php b/kirby/src/Data/Json.php index 542ce53..5b16431 100644 --- a/kirby/src/Data/Json.php +++ b/kirby/src/Data/Json.php @@ -34,7 +34,7 @@ class Json extends Handler */ public static function decode($string): array { - if ($string === null) { + if ($string === null || $string === '') { return []; } diff --git a/kirby/src/Data/PHP.php b/kirby/src/Data/PHP.php index 63efd1d..c0dda18 100644 --- a/kirby/src/Data/PHP.php +++ b/kirby/src/Data/PHP.php @@ -4,7 +4,7 @@ namespace Kirby\Data; use Kirby\Exception\BadMethodCallException; use Kirby\Exception\Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * Reader and write of PHP files with data in a returned array @@ -49,10 +49,10 @@ class PHP extends Handler /** * PHP strings shouldn't be decoded manually * - * @param mixed $array + * @param mixed $string * @return array */ - public static function decode($array): array + public static function decode($string): array { throw new BadMethodCallException('The PHP::decode() method is not implemented'); } diff --git a/kirby/src/Data/Txt.php b/kirby/src/Data/Txt.php index ab80909..22ce369 100644 --- a/kirby/src/Data/Txt.php +++ b/kirby/src/Data/Txt.php @@ -93,7 +93,7 @@ class Txt extends Handler */ public static function decode($string): array { - if ($string === null) { + if ($string === null || $string === '') { return []; } diff --git a/kirby/src/Data/Xml.php b/kirby/src/Data/Xml.php index 9c36be7..9b1e6b5 100644 --- a/kirby/src/Data/Xml.php +++ b/kirby/src/Data/Xml.php @@ -35,7 +35,7 @@ class Xml extends Handler */ public static function decode($string): array { - if ($string === null) { + if ($string === null || $string === '') { return []; } diff --git a/kirby/src/Data/Yaml.php b/kirby/src/Data/Yaml.php index df6956a..023d429 100644 --- a/kirby/src/Data/Yaml.php +++ b/kirby/src/Data/Yaml.php @@ -50,7 +50,7 @@ class Yaml extends Handler */ public static function decode($string): array { - if ($string === null) { + if ($string === null || $string === '') { return []; } diff --git a/kirby/src/Database/Database.php b/kirby/src/Database/Database.php index 74eacb5..ab12fb9 100644 --- a/kirby/src/Database/Database.php +++ b/kirby/src/Database/Database.php @@ -205,7 +205,7 @@ class Database } // fetch the dsn and store it - $this->dsn = static::$types[$this->type]['dsn']($options); + $this->dsn = (static::$types[$this->type]['dsn'])($options); // try to connect $this->connection = new PDO($this->dsn, $options['user'], $options['password']); @@ -504,7 +504,7 @@ class Database { if ($this->tables === null) { // Get the list of tables from the database - $sql = $this->sql()->tables($this->database); + $sql = $this->sql()->tables(); $results = $this->query($sql['query'], $sql['bindings']); if ($results) { diff --git a/kirby/src/Database/Db.php b/kirby/src/Database/Db.php index 08a1363..a374945 100644 --- a/kirby/src/Database/Db.php +++ b/kirby/src/Database/Db.php @@ -123,7 +123,7 @@ class Db public static function __callStatic(string $method, $arguments) { if (isset(static::$queries[$method])) { - return static::$queries[$method](...$arguments); + return (static::$queries[$method])(...$arguments); } if (static::$connection !== null && method_exists(static::$connection, $method) === true) { @@ -134,9 +134,10 @@ class Db } } +// @codeCoverageIgnoreStart + /** * Shortcut for SELECT clauses - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param mixed $columns Either a string with columns or an array of column names @@ -152,7 +153,6 @@ Db::$queries['select'] = function (string $table, $columns = '*', $where = null, /** * Shortcut for selecting a single row in a table - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param mixed $columns Either a string with columns or an array of column names @@ -168,7 +168,6 @@ Db::$queries['first'] = Db::$queries['row'] = Db::$queries['one'] = function (st /** * Returns only values from a single column - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param string $column The name of the column to select from @@ -184,19 +183,17 @@ Db::$queries['column'] = function (string $table, string $column, $where = null, /** * Shortcut for inserting a new row into a table - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param array $values An array of values which should be inserted - * @return int ID of the inserted row + * @return mixed Returns the last inserted id on success or false */ -Db::$queries['insert'] = function (string $table, array $values): int { +Db::$queries['insert'] = function (string $table, array $values) { return Db::table($table)->insert($values); }; /** * Shortcut for updating a row in a table - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param array $values An array of values which should be inserted @@ -209,7 +206,6 @@ Db::$queries['update'] = function (string $table, array $values, $where = null): /** * Shortcut for deleting rows in a table - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param mixed $where An optional WHERE clause @@ -221,7 +217,6 @@ Db::$queries['delete'] = function (string $table, $where = null): bool { /** * Shortcut for counting rows in a table - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param mixed $where An optional WHERE clause @@ -233,7 +228,6 @@ Db::$queries['count'] = function (string $table, $where = null): int { /** * Shortcut for calculating the minimum value in a column - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param string $column The name of the column of which the minimum should be calculated @@ -246,7 +240,6 @@ Db::$queries['min'] = function (string $table, string $column, $where = null): f /** * Shortcut for calculating the maximum value in a column - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param string $column The name of the column of which the maximum should be calculated @@ -259,7 +252,6 @@ Db::$queries['max'] = function (string $table, string $column, $where = null): f /** * Shortcut for calculating the average value in a column - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param string $column The name of the column of which the average should be calculated @@ -272,7 +264,6 @@ Db::$queries['avg'] = function (string $table, string $column, $where = null): f /** * Shortcut for calculating the sum of all values in a column - * @codeCoverageIgnore * * @param string $table The name of the table which should be queried * @param string $column The name of the column of which the sum should be calculated @@ -282,3 +273,5 @@ Db::$queries['avg'] = function (string $table, string $column, $where = null): f Db::$queries['sum'] = function (string $table, string $column, $where = null): float { return Db::table($table)->where($where)->sum($column); }; + +// @codeCoverageIgnoreEnd diff --git a/kirby/src/Database/Query.php b/kirby/src/Database/Query.php index f56d951..6c9938b 100644 --- a/kirby/src/Database/Query.php +++ b/kirby/src/Database/Query.php @@ -341,7 +341,7 @@ class Query */ public function innerJoin($table, $on) { - return $this->join($table, $on, 'inner'); + return $this->join($table, $on, 'inner join'); } /** @@ -710,7 +710,7 @@ class Query $this->database->fail(); } - $result = $this->database->execute($sql['query'], $sql['bindings'], $params); + $result = $this->database->execute($sql['query'], $sql['bindings']); $this->reset(); @@ -1009,9 +1009,8 @@ class Query $key = $sql->columnName($this->table, $args[0]); // ->where('username', 'in', ['myuser', 'myotheruser']); + $predicate = trim(strtoupper($args[1])); if (is_array($args[2]) === true) { - $predicate = trim(strtoupper($args[1])); - if (in_array($predicate, ['IN', 'NOT IN']) === false) { throw new InvalidArgumentException('Invalid predicate ' . $predicate); } @@ -1029,11 +1028,8 @@ class Query // add that to the where clause in parenthesis $result = $key . ' ' . $predicate . ' (' . implode(', ', $values) . ')'; - $this->bindings($bindings); - // ->where('username', 'like', 'myuser'); } else { - $predicate = trim(strtoupper($args[1])); $predicates = [ '=', '>=', '>', '<=', '<', '<>', '!=', '<=>', 'IS', 'IS NOT', @@ -1051,9 +1047,8 @@ class Query $bindings[$valueBinding] = $args[2]; $result = $key . ' ' . $predicate . ' ' . $valueBinding; - - $this->bindings($bindings); } + $this->bindings($bindings); } break; diff --git a/kirby/src/Database/Sql.php b/kirby/src/Database/Sql.php index 2738cfd..af50753 100644 --- a/kirby/src/Database/Sql.php +++ b/kirby/src/Database/Sql.php @@ -225,7 +225,7 @@ abstract class Sql 'null' => $null, 'default' => $columnDefault['query'], 'unique' => $uniqueColumn - ], '')); + ], ['fallback' => ''])); return [ 'query' => $query, diff --git a/kirby/src/Email/PHPMailer.php b/kirby/src/Email/PHPMailer.php index 93ddb45..771675f 100644 --- a/kirby/src/Email/PHPMailer.php +++ b/kirby/src/Email/PHPMailer.php @@ -36,7 +36,7 @@ class PHPMailer extends Email $mailer->addReplyTo($replyTo, $this->replyToName() ?? ''); } - // add (multiple) recepient, CC & BCC addresses + // add (multiple) recipient, CC & BCC addresses foreach ($this->to() as $email => $name) { $mailer->addAddress($email, $name ?? ''); } diff --git a/kirby/src/Exception/Exception.php b/kirby/src/Exception/Exception.php index f6bc588..f434348 100644 --- a/kirby/src/Exception/Exception.php +++ b/kirby/src/Exception/Exception.php @@ -121,7 +121,11 @@ class Exception extends \Exception } // format message with passed data - $message = Str::template($message, $this->data, '-', '{', '}'); + $message = Str::template($message, $this->data, [ + 'fallback' => '-', + 'start' => '{', + 'end' => '}' + ]); // handover to Exception parent class constructor parent::__construct($message, null, $args['previous'] ?? null); diff --git a/kirby/src/Cms/Asset.php b/kirby/src/Filesystem/Asset.php similarity index 76% rename from kirby/src/Cms/Asset.php rename to kirby/src/Filesystem/Asset.php index 9c68460..ee53d4a 100644 --- a/kirby/src/Cms/Asset.php +++ b/kirby/src/Filesystem/Asset.php @@ -1,17 +1,16 @@ * @link https://getkirby.com * @copyright Bastian Allgeier GmbH @@ -19,36 +18,28 @@ use Kirby\Toolkit\Properties; */ class Asset { - use FileFoundation; + use IsFile; use FileModifications; - use Properties; /** + * Relative file path + * * @var string */ protected $path; /** - * Creates a new Asset object - * for the given path. + * Creates a new Asset object for the given path. * * @param string $path */ public function __construct(string $path) { - $this->setPath(dirname($path)); - $this->setRoot($this->kirby()->root('index') . '/' . $path); - $this->setUrl($this->kirby()->url('index') . '/' . $path); - } - - /** - * Returns the alternative text for the asset - * - * @return null - */ - public function alt() - { - return null; + $this->setProperties([ + 'path' => dirname($path), + 'root' => $this->kirby()->root('index') . '/' . $path, + 'url' => $this->kirby()->url('index') . '/' . $path + ]); } /** diff --git a/kirby/src/Toolkit/Dir.php b/kirby/src/Filesystem/Dir.php similarity index 65% rename from kirby/src/Toolkit/Dir.php rename to kirby/src/Filesystem/Dir.php index 1f6f837..17b517c 100644 --- a/kirby/src/Toolkit/Dir.php +++ b/kirby/src/Filesystem/Dir.php @@ -1,8 +1,10 @@ * @link https://getkirby.com * @copyright Bastian Allgeier GmbH @@ -37,6 +44,8 @@ class Dir '@eaDir' ]; + public static $numSeparator = '_'; + /** * Copy the directory to a new destination * @@ -189,6 +198,171 @@ class Dir return is_writable($dir); } + /** + * Scans the directory and analyzes files, + * content, meta info and children. This is used + * in `Kirby\Cms\Page`, `Kirby\Cms\Site` and + * `Kirby\Cms\User` objects to fetch all + * relevant information. + * + * Don't use outside the Cms context. + * + * @internal + * + * @param string $dir + * @param string $contentExtension + * @param array|null $contentIgnore + * @param bool $multilang + * @return array + */ + public static function inventory(string $dir, string $contentExtension = 'txt', array $contentIgnore = null, bool $multilang = false): array + { + $dir = realpath($dir); + + $inventory = [ + 'children' => [], + 'files' => [], + 'template' => 'default', + ]; + + if ($dir === false) { + return $inventory; + } + + $items = static::read($dir, $contentIgnore); + + // a temporary store for all content files + $content = []; + + // sort all items naturally to avoid sorting issues later + natsort($items); + + foreach ($items as $item) { + + // ignore all items with a leading dot + if (in_array(substr($item, 0, 1), ['.', '_']) === true) { + continue; + } + + $root = $dir . '/' . $item; + + if (is_dir($root) === true) { + + // extract the slug and num of the directory + if (preg_match('/^([0-9]+)' . static::$numSeparator . '(.*)$/', $item, $match)) { + $num = (int)$match[1]; + $slug = $match[2]; + } else { + $num = null; + $slug = $item; + } + + $inventory['children'][] = [ + 'dirname' => $item, + 'model' => null, + 'num' => $num, + 'root' => $root, + 'slug' => $slug, + ]; + } else { + $extension = pathinfo($item, PATHINFO_EXTENSION); + + switch ($extension) { + case 'htm': + case 'html': + case 'php': + // don't track those files + break; + case $contentExtension: + $content[] = pathinfo($item, PATHINFO_FILENAME); + break; + default: + $inventory['files'][$item] = [ + 'filename' => $item, + 'extension' => $extension, + 'root' => $root, + ]; + } + } + } + + // remove the language codes from all content filenames + if ($multilang === true) { + foreach ($content as $key => $filename) { + $content[$key] = pathinfo($filename, PATHINFO_FILENAME); + } + + $content = array_unique($content); + } + + $inventory = static::inventoryContent($inventory, $content); + $inventory = static::inventoryModels($inventory, $contentExtension, $multilang); + + return $inventory; + } + + /** + * Take all content files, + * remove those who are meta files and + * detect the main content file + * + * @param array $inventory + * @param array $content + * @return array + */ + protected static function inventoryContent(array $inventory, array $content): array + { + + // filter meta files from the content file + if (empty($content) === true) { + $inventory['template'] = 'default'; + return $inventory; + } + + foreach ($content as $contentName) { + + // could be a meta file. i.e. cover.jpg + if (isset($inventory['files'][$contentName]) === true) { + continue; + } + + // it's most likely the template + $inventory['template'] = $contentName; + } + + return $inventory; + } + + /** + * Go through all inventory children + * and inject a model for each + * + * @param array $inventory + * @param string $contentExtension + * @param bool $multilang + * @return array + */ + protected static function inventoryModels(array $inventory, string $contentExtension, bool $multilang = false): array + { + // inject models + if (empty($inventory['children']) === false && empty(Page::$models) === false) { + if ($multilang === true) { + $contentExtension = App::instance()->defaultLanguage()->code() . '.' . $contentExtension; + } + + foreach ($inventory['children'] as $key => $child) { + foreach (Page::$models as $modelName => $modelClass) { + if (file_exists($child['root'] . '/' . $modelName . '.' . $contentExtension) === true) { + $inventory['children'][$key]['model'] = $modelName; + break; + } + } + } + } + + return $inventory; + } + /** * Create a (symbolic) link to a directory * @@ -198,7 +372,7 @@ class Dir */ public static function link(string $source, string $link): bool { - Dir::make(dirname($link), true); + static::make(dirname($link), true); if (is_dir($link) === true) { return true; @@ -384,27 +558,25 @@ class Dir } /** - * Gets the size of the directory and all subfolders and files + * Gets the size of the directory * * @param string $dir The path of the directory + * @param bool $recursive Include all subfolders and their files * @return mixed */ - public static function size(string $dir) + public static function size(string $dir, bool $recursive = true) { if (is_dir($dir) === false) { return false; } - $size = 0; - $items = static::read($dir); + // Get size for all direct files + $size = F::size(static::files($dir, null, true)); - foreach ($items as $item) { - $root = $dir . '/' . $item; - - if (is_dir($root) === true) { - $size += static::size($root); - } elseif (is_file($root) === true) { - $size += F::size($root); + // if recursive, add sizes of all subdirectories + if ($recursive === true) { + foreach (static::dirs($dir, null, true) as $subdir) { + $size += static::size($subdir); } } diff --git a/kirby/src/Toolkit/F.php b/kirby/src/Filesystem/F.php similarity index 92% rename from kirby/src/Toolkit/F.php rename to kirby/src/Filesystem/F.php index 9d6185d..a74dd42 100644 --- a/kirby/src/Toolkit/F.php +++ b/kirby/src/Filesystem/F.php @@ -1,8 +1,10 @@ * @link https://getkirby.com * @copyright Bastian Allgeier GmbH @@ -20,6 +22,9 @@ use ZipArchive; */ class F { + /** + * @var array + */ public static $types = [ 'archive' => [ 'gz', @@ -105,6 +110,9 @@ class F ], ]; + /** + * @var array + */ public static $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; /** @@ -465,10 +473,7 @@ class F return false; } - $stat = stat($file); - $mtime = $stat['mtime'] ?? 0; - $ctime = $stat['ctime'] ?? 0; - $modified = max([$mtime, $ctime]); + $modified = filemtime($file); if (is_null($format) === true) { return $modified; @@ -523,7 +528,7 @@ class F /** * Converts an integer size into a human readable format * - * @param mixed $size The file size or a file path + * @param mixed $size The file size, a file path or array of paths * @param string|null|false $locale Locale for number formatting, * `null` for the current locale, * `false` to disable number formatting @@ -532,7 +537,7 @@ class F public static function niceSize($size, $locale = null): string { // file mode - if (is_string($size) === true && file_exists($size) === true) { + if (is_string($size) === true || is_array($size) === true) { $size = static::size($size); } @@ -638,6 +643,8 @@ class F * Returns the relative path of the file * starting after $in * + * @SuppressWarnings(PHPMD.CountInLoopExpression) + * * @param string $file * @param string $in * @return string @@ -652,11 +659,24 @@ class F $file = str_replace('\\', '/', $file); $in = str_replace('\\', '/', $in); - if (Str::contains($file, $in) === false) { - return basename($file); + // trim trailing slashes + $file = rtrim($file, '/'); + $in = rtrim($in, '/'); + + if (Str::contains($file, $in . '/') === false) { + // make the paths relative by stripping what they have + // in common and adding `../` tokens at the start + $fileParts = explode('/', $file); + $inParts = explode('/', $in); + while (count($fileParts) && count($inParts) && ($fileParts[0] === $inParts[0])) { + array_shift($fileParts); + array_shift($inParts); + } + + return str_repeat('../', count($inParts)) . implode('/', $fileParts); } - return Str::after($file, $in); + return '/' . Str::after($file, $in . '/'); } /** @@ -696,8 +716,8 @@ class F * * * - * $safe = f::safeName('über genious.txt'); - * // safe will be ueber-genious.txt + * $safe = f::safeName('über genius.txt'); + * // safe will be ueber-genius.txt * * * @@ -732,13 +752,19 @@ class F } /** - * Returns the size of a file. + * Returns the size of a file or an array of files. * - * @param mixed $file The path + * @param string|array $file file path or array of paths * @return int */ - public static function size(string $file): int + public static function size($file): int { + if (is_array($file) === true) { + return array_reduce($file, function ($total, $file) { + return $total + F::size($file); + }, 0); + } + try { return filesize($file); } catch (Throwable $e) { @@ -838,7 +864,7 @@ class F * * @param string $file The path for the new file * @param mixed $content Either a string, an object or an array. Arrays and objects will be serialized. - * @param bool $append true: append the content to an exisiting file if available. false: overwrite. + * @param bool $append true: append the content to an existing file if available. false: overwrite. * @return bool */ public static function write(string $file, $content, bool $append = false): bool diff --git a/kirby/src/Filesystem/File.php b/kirby/src/Filesystem/File.php new file mode 100644 index 0000000..2d0d58b --- /dev/null +++ b/kirby/src/Filesystem/File.php @@ -0,0 +1,629 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class File +{ + use Properties; + + /** + * Absolute file path + * + * @var string + */ + protected $root; + + /** + * Absolute file URL + * + * @var string|null + */ + protected $url; + + /** + * Validation rules to be used for `::match()` + * + * @var array + */ + public static $validations = [ + 'maxsize' => ['size', 'max'], + 'minsize' => ['size', 'min'] + ]; + + /** + * Constructor sets all file properties + * + * @param array|string|null $props Properties or deprecated `$root` string + * @param string|null $url Deprecated argument, use `$props['url']` instead + */ + public function __construct($props = null, string $url = null) + { + // Legacy support for old constructor of + // the `Kirby\Image\Image` class + // @todo 4.0.0 remove + if (is_array($props) === false) { + $props = [ + 'root' => $props, + 'url' => $url + ]; + } + + $this->setProperties($props); + } + + /** + * Improved `var_dump` output + * + * @return array + */ + public function __debugInfo(): array + { + return $this->toArray(); + } + + /** + * Returns the URL for the file object + * + * @return string + */ + public function __toString(): string + { + return $this->url() ?? $this->root() ?? ''; + } + + /** + * Returns the file content as base64 encoded string + * + * @return string + */ + public function base64(): string + { + return base64_encode($this->read()); + } + + /** + * Copy a file to a new location. + * + * @param string $target + * @param bool $force + * @return static + */ + public function copy(string $target, bool $force = false) + { + if (F::copy($this->root, $target, $force) !== true) { + throw new Exception('The file "' . $this->root . '" could not be copied'); + } + + return new static($target); + } + + /** + * Returns the file as data uri + * + * @param bool $base64 Whether the data should be base64 encoded or not + * @return string + */ + public function dataUri(bool $base64 = true): string + { + if ($base64 === true) { + return 'data:' . $this->mime() . ';base64,' . $this->base64(); + } + + return 'data:' . $this->mime() . ',' . Escape::url($this->read()); + } + + /** + * Deletes the file + * + * @return bool + */ + public function delete(): bool + { + if (F::remove($this->root) !== true) { + throw new Exception('The file "' . $this->root . '" could not be deleted'); + } + + return true; + } + + /* + * Automatically sends all needed headers for the file to be downloaded + * and echos the file's content + * + * @param string|null $filename Optional filename for the download + * @return string + */ + public function download($filename = null): string + { + return Response::download($this->root, $filename ?? $this->filename()); + } + + /** + * Checks if the file actually exists + * + * @return bool + */ + public function exists(): bool + { + return file_exists($this->root) === true; + } + + /** + * Returns the current lowercase extension (without .) + * + * @return string + */ + public function extension(): string + { + return F::extension($this->root); + } + + /** + * Returns the filename + * + * @return string + */ + public function filename(): string + { + return basename($this->root); + } + + /** + * Returns a md5 hash of the root + * + * @return string + */ + public function hash(): string + { + return md5($this->root); + } + + /** + * Sends an appropriate header for the asset + * + * @param bool $send + * @return \Kirby\Http\Response|void + */ + public function header(bool $send = true) + { + $response = new Response('', $this->mime()); + + if ($send !== true) { + return $response; + } + + $response->send(); + } + + /** + * Converts the file to html + * + * @param array $attr + * @return string + */ + public function html(array $attr = []): string + { + return Html::a($this->url() ?? '', $attr); + } + + /** + * Checks if a file is of a certain type + * + * @param string $value An extension or mime type + * @return bool + */ + public function is(string $value): bool + { + return F::is($this->root, $value); + } + + /** + * Checks if the file is readable + * + * @return bool + */ + public function isReadable(): bool + { + return is_readable($this->root) === true; + } + + /** + * Checks if the file is a resizable image + * + * @return bool + */ + public function isResizable(): bool + { + return false; + } + + /** + * Checks if a preview can be displayed for the file + * in the panel or in the frontend + * + * @return bool + */ + public function isViewable(): bool + { + return false; + } + + /** + * Checks if the file is writable + * + * @return bool + */ + public function isWritable(): bool + { + return F::isWritable($this->root); + } + + /** + * Returns the app instance if it exists + * + * @return \Kirby\Cms\App|null + */ + public function kirby() + { + return App::instance(null, true); + } + + /** + * Runs a set of validations on the file object + * (mainly for images). + * + * @param array $rules + * @return bool + * @throws \Kirby\Exception\Exception + */ + public function match(array $rules): bool + { + $rules = array_change_key_case($rules); + + if (is_array($rules['mime'] ?? null) === true) { + $mime = $this->mime(); + + // determine if any pattern matches the MIME type; + // once any pattern matches, `$carry` is `true` and the rest is skipped + $matches = array_reduce($rules['mime'], function ($carry, $pattern) use ($mime) { + return $carry || Mime::matches($mime, $pattern); + }, false); + + if ($matches !== true) { + throw new Exception([ + 'key' => 'file.mime.invalid', + 'data' => compact('mime') + ]); + } + } + + if (is_array($rules['extension'] ?? null) === true) { + $extension = $this->extension(); + if (in_array($extension, $rules['extension']) !== true) { + throw new Exception([ + 'key' => 'file.extension.invalid', + 'data' => compact('extension') + ]); + } + } + + if (is_array($rules['type'] ?? null) === true) { + $type = $this->type(); + if (in_array($type, $rules['type']) !== true) { + throw new Exception([ + 'key' => 'file.type.invalid', + 'data' => compact('type') + ]); + } + } + + foreach (static::$validations as $key => $arguments) { + $rule = $rules[$key] ?? null; + + if ($rule !== null) { + $property = $arguments[0]; + $validator = $arguments[1]; + + if (V::$validator($this->$property(), $rule) === false) { + throw new Exception([ + 'key' => 'file.' . $key, + 'data' => [$property => $rule] + ]); + } + } + } + + return true; + } + + /** + * Detects the mime type of the file + * + * @return string|null + */ + public function mime() + { + return Mime::type($this->root); + } + + /** + * Returns the file's last modification time + * + * @param string $format + * @param string|null $handler date or strftime + * @return mixed + */ + public function modified(?string $format = null, ?string $handler = null) + { + $kirby = $this->kirby(); + + return F::modified( + $this->root, + $format, + $handler ?? ($kirby ? $kirby->option('date.handler', 'date') : 'date') + ); + } + + /** + * Move the file to a new location + * + * @param string $newRoot + * @param bool $overwrite Force overwriting any existing files + * @return static + */ + public function move(string $newRoot, bool $overwrite = false) + { + if (F::move($this->root, $newRoot, $overwrite) !== true) { + throw new Exception('The file: "' . $this->root . '" could not be moved to: "' . $newRoot . '"'); + } + + return new static($newRoot); + } + + /** + * Getter for the name of the file + * without the extension + * + * @return string + */ + public function name(): string + { + return pathinfo($this->root, PATHINFO_FILENAME); + } + + /** + * Returns the file size in a + * human-readable format + * + * @return string + */ + public function niceSize(): string + { + return F::niceSize($this->root); + } + + /** + * Reads the file content and returns it. + * + * @return string|false + */ + public function read() + { + return F::read($this->root); + } + + /** + * Returns the absolute path to the file + * + * @return string + */ + public function realpath(): string + { + return realpath($this->root); + } + + /** + * Changes the name of the file without + * touching the extension + * + * @param string $newName + * @param bool $overwrite Force overwrite existing files + * @return static + */ + public function rename(string $newName, bool $overwrite = false) + { + $newRoot = F::rename($this->root, $newName, $overwrite); + + if ($newRoot === false) { + throw new Exception('The file: "' . $this->root . '" could not be renamed to: "' . $newName . '"'); + } + + return new static($newRoot); + } + + /** + * Returns the given file path + * + * @return string|null + */ + public function root(): ?string + { + return $this->root; + } + + /** + * Setter for the root + * + * @param string|null $root + * @return $this + */ + protected function setRoot(?string $root = null) + { + $this->root = $root; + return $this; + } + + /** + * Setter for the file url + * + * @param string|null $url + * @return $this + */ + protected function setUrl(?string $url = null) + { + $this->url = $url; + return $this; + } + + /** + * Returns the absolute url for the file + * + * @return string|null + */ + public function url(): ?string + { + return $this->url; + } + + /** + * Sanitizes the file contents depending on the file type + * by overwriting the file with the sanitized version + * @since 3.6.0 + * + * @param string|bool $typeLazy Explicit sane handler type string, + * `true` for lazy autodetection or + * `false` for normal autodetection + * @return void + * + * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + * @throws \Kirby\Exception\LogicException If more than one handler applies + * @throws \Kirby\Exception\NotFoundException If the handler was not found + * @throws \Kirby\Exception\Exception On other errors + */ + public function sanitizeContents($typeLazy = false): void + { + Sane::sanitizeFile($this->root(), $typeLazy); + } + + /** + * Returns the sha1 hash of the file + * @since 3.6.0 + * + * @return string + */ + public function sha1(): string + { + return sha1_file($this->root); + } + + /** + * Returns the raw size of the file + * + * @return int + */ + public function size(): int + { + return F::size($this->root); + } + + /** + * Converts the media object to a + * plain PHP array + * + * @return array + */ + public function toArray(): array + { + return [ + 'extension' => $this->extension(), + 'filename' => $this->filename(), + 'hash' => $this->hash(), + 'isReadable' => $this->isReadable(), + 'isResizable' => $this->isResizable(), + 'isWritable' => $this->isWritable(), + 'mime' => $this->mime(), + 'modified' => $this->modified('c'), + 'name' => $this->name(), + 'niceSize' => $this->niceSize(), + 'root' => $this->root(), + 'safeName' => F::safeName($this->name()), + 'size' => $this->size(), + 'type' => $this->type(), + 'url' => $this->url() + ]; + } + + /** + * Converts the entire file array into + * a json string + * + * @return string + */ + public function toJson(): string + { + return json_encode($this->toArray()); + } + + /** + * Returns the file type. + * + * @return string|null + */ + public function type(): ?string + { + return F::type($this->root); + } + + /** + * Validates the file contents depending on the file type + * + * @param string|bool $typeLazy Explicit sane handler type string, + * `true` for lazy autodetection or + * `false` for normal autodetection + * @return void + * + * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + * @throws \Kirby\Exception\NotFoundException If the handler was not found + * @throws \Kirby\Exception\Exception On other errors + */ + public function validateContents($typeLazy = false): void + { + Sane::validateFile($this->root(), $typeLazy); + } + + /** + * Writes content to the file + * + * @param string $content + * @return bool + */ + public function write($content): bool + { + if (F::write($this->root, $content) !== true) { + throw new Exception('The file "' . $this->root . '" could not be written'); + } + + return true; + } +} diff --git a/kirby/src/Cms/Filename.php b/kirby/src/Filesystem/Filename.php similarity index 94% rename from kirby/src/Cms/Filename.php rename to kirby/src/Filesystem/Filename.php index b5e1867..a6fc729 100644 --- a/kirby/src/Cms/Filename.php +++ b/kirby/src/Filesystem/Filename.php @@ -1,11 +1,11 @@ toString(); * // result: some-file-300x200-crop-top-left-q80.jpg * - * @package Kirby Cms + * @package Kirby Filesystem * @author Bastian Allgeier * @link https://getkirby.com * @copyright Bastian Allgeier GmbH @@ -75,7 +75,10 @@ class Filename $this->filename = $filename; $this->template = $template; $this->attributes = $attributes; - $this->extension = $this->sanitizeExtension(pathinfo($filename, PATHINFO_EXTENSION)); + $this->extension = $this->sanitizeExtension( + $attributes['format'] ?? + pathinfo($filename, PATHINFO_EXTENSION) + ); $this->name = $this->sanitizeName(pathinfo($filename, PATHINFO_FILENAME)); } @@ -136,7 +139,7 @@ class Filename $result[] = $value; break; case 'crop': - $result[] = ($value === 'center') ? null : $key . '-' . $value; + $result[] = ($value === 'center') ? 'crop' : $key . '-' . $value; break; default: $result[] = $key . $value; @@ -298,6 +301,6 @@ class Filename 'name' => $this->name(), 'attributes' => $this->attributesToString('-'), 'extension' => $this->extension() - ], ''); + ], ['fallback' => '']); } } diff --git a/kirby/src/Filesystem/IsFile.php b/kirby/src/Filesystem/IsFile.php new file mode 100644 index 0000000..23526b1 --- /dev/null +++ b/kirby/src/Filesystem/IsFile.php @@ -0,0 +1,196 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +trait IsFile +{ + use Properties; + + /** + * File asset object + * + * @var \Kirby\Filesystem\File + */ + protected $asset; + + /** + * Absolute file path + * + * @var string|null + */ + protected $root; + + /** + * Absolute file URL + * + * @var string|null + */ + protected $url; + + /** + * Constructor sets all file properties + * + * @param array $props + */ + public function __construct(array $props) + { + $this->setProperties($props); + } + + /** + * Magic caller for asset methods + * + * @param string $method + * @param array $arguments + * @return mixed + * @throws \Kirby\Exception\BadMethodCallException + */ + public function __call(string $method, array $arguments = []) + { + // public property access + if (isset($this->$method) === true) { + return $this->$method; + } + + // asset method proxy + if (method_exists($this->asset(), $method)) { + return $this->asset()->$method(...$arguments); + } + + throw new BadMethodCallException('The method: "' . $method . '" does not exist'); + } + + /** + * Converts the asset to a string + * + * @return string + */ + public function __toString(): string + { + return (string)$this->asset(); + } + + /** + * Returns the file asset object + * + * @param array|string|null $props + * @return \Kirby\Filesystem\File + */ + public function asset($props = null) + { + if ($this->asset !== null) { + return $this->asset; + } + + $props = $props ?? [ + 'root' => $this->root(), + 'url' => $this->url() + ]; + + switch ($this->type()) { + case 'image': + return $this->asset = new Image($props); + default: + return $this->asset = new File($props); + } + } + + /** + * Checks if the file exists on disk + * + * @return bool + */ + public function exists(): bool + { + // Important to include this in the trait + // to avoid infinite loops when trying + // to proxy the method from the asset object + return file_exists($this->root()) === true; + } + + + /** + * Returns the app instance + * + * @return \Kirby\Cms\App + */ + public function kirby() + { + return App::instance(); + } + + /** + * Returns the given file path + * + * @return string|null + */ + public function root(): ?string + { + return $this->root; + } + + /** + * Setter for the root + * + * @param string|null $root + * @return $this + */ + protected function setRoot(?string $root = null) + { + $this->root = $root; + return $this; + } + + /** + * Setter for the file url + * + * @param string|null $url + * @return $this + */ + protected function setUrl(?string $url = null) + { + $this->url = $url; + return $this; + } + + /** + * Returns the file type + * + * @return string|null + */ + public function type(): ?string + { + // Important to include this in the trait + // to avoid infinite loops when trying + // to proxy the method from the asset object + return F::type($this->root() ?? $this->url()); + } + + /** + * Returns the absolute url for the file + * + * @return string|null + */ + public function url(): ?string + { + return $this->url; + } +} diff --git a/kirby/src/Toolkit/Mime.php b/kirby/src/Filesystem/Mime.php similarity index 97% rename from kirby/src/Toolkit/Mime.php rename to kirby/src/Filesystem/Mime.php index 68bd726..41b463e 100644 --- a/kirby/src/Toolkit/Mime.php +++ b/kirby/src/Filesystem/Mime.php @@ -1,7 +1,8 @@ * @link https://getkirby.com * @copyright Bastian Allgeier GmbH @@ -127,12 +128,12 @@ class Mime // fixing map $map = [ 'text/html' => [ - 'svg' => ['Kirby\Toolkit\Mime', 'fromSvg'], + 'svg' => ['Kirby\Filesystem\Mime', 'fromSvg'], ], 'text/plain' => [ 'css' => 'text/css', 'json' => 'application/json', - 'svg' => ['Kirby\Toolkit\Mime', 'fromSvg'], + 'svg' => ['Kirby\Filesystem\Mime', 'fromSvg'], ], 'text/x-asm' => [ 'css' => 'text/css' @@ -161,7 +162,7 @@ class Mime * @param string $extension * @return string|null */ - public static function fromExtension(string $extension) + public static function fromExtension(string $extension): ?string { $mime = static::$types[$extension] ?? null; return is_array($mime) === true ? array_shift($mime) : $mime; @@ -295,7 +296,6 @@ class Mime if ($value === $mime) { $extensions[] = $key; - continue; } } diff --git a/kirby/src/Form/Field.php b/kirby/src/Form/Field.php index cc5c843..c56c816 100644 --- a/kirby/src/Form/Field.php +++ b/kirby/src/Form/Field.php @@ -238,7 +238,7 @@ class Field extends Component 'help' => function () { /** @var \Kirby\Form\Field $this */ if ($this->help) { - $help = $this->model()->toString($this->help); + $help = $this->model()->toSafeString($this->help); $help = $this->kirby()->kirbytext($help); return $help; } @@ -441,7 +441,7 @@ class Field extends Component ksort($array); return array_filter($array, function ($item) { - return $item !== null; + return $item !== null && is_object($item) === false; }); } diff --git a/kirby/src/Form/Field/BlocksField.php b/kirby/src/Form/Field/BlocksField.php index bf88289..4d9e301 100644 --- a/kirby/src/Form/Field/BlocksField.php +++ b/kirby/src/Form/Field/BlocksField.php @@ -5,10 +5,10 @@ namespace Kirby\Form\Field; use Kirby\Cms\Block; use Kirby\Cms\Blocks as BlocksCollection; use Kirby\Cms\Fieldsets; -use Kirby\Cms\Form; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Form\FieldClass; +use Kirby\Form\Form; use Kirby\Form\Mixin\EmptyState; use Kirby\Form\Mixin\Max; use Kirby\Form\Mixin\Min; @@ -146,6 +146,15 @@ class BlocksField extends FieldClass return ['uuid' => uuid()]; } ], + [ + 'pattern' => 'paste', + 'method' => 'POST', + 'action' => function () use ($field) { + $value = BlocksCollection::parse(get('html')); + $blocks = BlocksCollection::factory($value); + return $field->blocksToValues($blocks->toArray()); + } + ], [ 'pattern' => 'fieldsets/(:any)', 'method' => 'GET', diff --git a/kirby/src/Form/Field/LayoutField.php b/kirby/src/Form/Field/LayoutField.php index ae4ced4..f3ea55a 100644 --- a/kirby/src/Form/Field/LayoutField.php +++ b/kirby/src/Form/Field/LayoutField.php @@ -4,10 +4,10 @@ namespace Kirby\Form\Field; use Kirby\Cms\Blueprint; use Kirby\Cms\Fieldset; -use Kirby\Cms\Form; use Kirby\Cms\Layout; use Kirby\Cms\Layouts; use Kirby\Exception\InvalidArgumentException; +use Kirby\Form\Form; use Kirby\Toolkit\Str; use Throwable; diff --git a/kirby/src/Form/FieldClass.php b/kirby/src/Form/FieldClass.php index 4b48fa5..dd1eba1 100644 --- a/kirby/src/Form/FieldClass.php +++ b/kirby/src/Form/FieldClass.php @@ -10,32 +10,116 @@ use Kirby\Toolkit\I18n; use Kirby\Toolkit\Str; use Throwable; +/** + * Abstract field class to be used instead + * of functional field components for more + * control. + * + * @package Kirby Form + * @author Bastian Allgeier + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ abstract class FieldClass { use HasSiblings; + /** + * @var string|null + */ protected $after; + + /** + * @var bool + */ protected $autofocus; + + /** + * @var string|null + */ protected $before; + + /** + * @var mixed + */ protected $default; + + /** + * @var bool + */ protected $disabled; + + /** + * @var string|null + */ protected $help; + + /** + * @var string|null + */ protected $icon; + + /** + * @var string|null + */ protected $label; + /** * @var \Kirby\Cms\ModelWithContent */ protected $model; + + /** + * @var string + */ protected $name; + + /** + * @var array + */ protected $params; + + /** + * @var string|null + */ protected $placeholder; + + /** + * @var bool + */ protected $required; + + /** + * @var \Kirby\Form\Fields + */ protected $siblings; + + /** + * @var bool + */ protected $translate; + + /** + * @var mixed + */ protected $value; + + /** + * @var array|null + */ protected $when; + + /** + * @var string|null + */ protected $width; + /** + * @param string $param + * @param array $args + * @return mixed + */ public function __call(string $param, array $args) { if (isset($this->$param) === true) { @@ -45,6 +129,9 @@ abstract class FieldClass return $this->params[$param] ?? null; } + /** + * @param array $params + */ public function __construct(array $params = []) { $this->params = $params; @@ -71,28 +158,41 @@ abstract class FieldClass } } + /** + * @return string|null + */ public function after(): ?string { return $this->stringTemplate($this->after); } + /** + * @return array + */ public function api(): array { return $this->routes(); } + /** + * @return bool + */ public function autofocus(): bool { return $this->autofocus; } + /** + * @return string|null + */ public function before(): ?string { return $this->stringTemplate($this->before); } /** - * @deprecated + * @deprecated 3.5.0 + * @todo remove when the general field class setup has been refactored * * Returns the field data * in a format to be stored @@ -109,13 +209,11 @@ abstract class FieldClass /** * Returns the default value for the field, * which will be used when a page/file/user is created + * + * @return mixed */ public function default() { - if ($this->default === null) { - return; - } - if (is_string($this->default) === false) { return $this->default; } @@ -125,89 +223,14 @@ abstract class FieldClass /** * If `true`, the field is no longer editable and will not be saved + * + * @return bool */ public function disabled(): bool { return $this->disabled; } - /** - * Optional help text below the field - */ - public function help(): ?string - { - if (empty($this->help) === false) { - $help = $this->stringTemplate($this->help); - $help = $this->kirby()->kirbytext($help); - return $help; - } - - return null; - } - - protected function i18n($param) - { - return empty($param) === false ? I18n::translate($param, $param) : null; - } - - /** - * Optional icon that will be shown at the end of the field - */ - public function icon(): ?string - { - return $this->icon; - } - - public function id(): string - { - return $this->name(); - } - - public function isDisabled(): bool - { - return $this->disabled; - } - - public function isEmpty(): bool - { - return $this->isEmptyValue($this->value()); - } - - public function isEmptyValue($value): bool - { - return in_array($value, [null, '', []], true); - } - - /** - * Checks if the field is invalid - * - * @return bool - */ - public function isInvalid(): bool - { - return $this->isValid() === false; - } - - public function isRequired(): bool - { - return $this->required; - } - - public function isSaveable(): bool - { - return true; - } - - /** - * Checks if the field is valid - * - * @return bool - */ - public function isValid(): bool - { - return empty($this->errors()) === true; - } - /** * Runs all validations and returns an array of * error messages @@ -230,6 +253,110 @@ abstract class FieldClass $this->value = $value; } + /** + * Optional help text below the field + * + * @return string|null + */ + public function help(): ?string + { + if (empty($this->help) === false) { + $help = $this->stringTemplate($this->help); + $help = $this->kirby()->kirbytext($help); + return $help; + } + + return null; + } + + /** + * @param string|array|null $param + * @return string|null + */ + protected function i18n($param = null): ?string + { + return empty($param) === false ? I18n::translate($param, $param) : null; + } + + /** + * Optional icon that will be shown at the end of the field + * + * @return string|null + */ + public function icon(): ?string + { + return $this->icon; + } + + /** + * @return string + */ + public function id(): string + { + return $this->name(); + } + + /** + * @return bool + */ + public function isDisabled(): bool + { + return $this->disabled; + } + + /** + * @return bool + */ + public function isEmpty(): bool + { + return $this->isEmptyValue($this->value()); + } + + /** + * @param mixed $value + * @return bool + */ + public function isEmptyValue($value = null): bool + { + return in_array($value, [null, '', []], true); + } + + /** + * Checks if the field is invalid + * + * @return bool + */ + public function isInvalid(): bool + { + return $this->isValid() === false; + } + + /** + * @return bool + */ + public function isRequired(): bool + { + return $this->required; + } + + /** + * @return bool + */ + public function isSaveable(): bool + { + return true; + } + + /** + * Checks if the field is valid + * + * @return bool + */ + public function isValid(): bool + { + return empty($this->errors()) === true; + } + /** * Returns the Kirby instance * @@ -242,6 +369,8 @@ abstract class FieldClass /** * The field label can be set as string or associative array with translations + * + * @return string */ public function label(): string { @@ -251,7 +380,7 @@ abstract class FieldClass /** * Returns the parent model * - * @return mixed|null + * @return mixed */ public function model() { @@ -324,6 +453,8 @@ abstract class FieldClass /** * Optional placeholder value that will be shown when the field is empty + * + * @return string|null */ public function placeholder(): ?string { @@ -379,8 +510,8 @@ abstract class FieldClass } /** - * @deprecated - * + * @deprecated 3.5.0 + * @todo remove when the general field class setup has been refactored * @return bool */ public function save() @@ -388,91 +519,170 @@ abstract class FieldClass return $this->isSaveable(); } + /** + * @param array|string|null $after + * @return void + */ protected function setAfter($after = null) { $this->after = $this->i18n($after); } + /** + * @param bool $autofocus + * @return void + */ protected function setAutofocus(bool $autofocus = false) { $this->autofocus = $autofocus; } + /** + * @param array|string|null $before + * @return void + */ protected function setBefore($before = null) { $this->before = $this->i18n($before); } + /** + * @param mixed $default + * @return void + */ protected function setDefault($default = null) { $this->default = $default; } + /** + * @param bool $disabled + * @return void + */ protected function setDisabled(bool $disabled = false) { $this->disabled = $disabled; } + /** + * @param array|string|null $help + * @return void + */ protected function setHelp($help = null) { $this->help = $this->i18n($help); } - protected function setIcon(string $icon = null) + /** + * @param string|null $icon + * @return void + */ + protected function setIcon(?string $icon = null) { $this->icon = $icon; } + /** + * @param array|string|null $label + * @return void + */ protected function setLabel($label = null) { $this->label = $this->i18n($label); } + /** + * @param \Kirby\Cms\ModelWithContent $model + * @return void + */ protected function setModel(ModelWithContent $model) { $this->model = $model; } + /** + * @param string|null $name + * @return void + */ protected function setName(string $name = null) { $this->name = $name; } + /** + * @param array|string|null $placeholder + * @return void + */ protected function setPlaceholder($placeholder = null) { $this->placeholder = $this->i18n($placeholder); } + /** + * @param bool $required + * @return void + */ protected function setRequired(bool $required = false) { $this->required = $required; } - protected function setSiblings(Fields $siblings = null) + /** + * @param \Kirby\Form\Fields|null $siblings + * @return void + */ + protected function setSiblings(?Fields $siblings = null) { - $this->siblings = $siblings ?? new Fields([]); + $this->siblings = $siblings ?? new Fields([$this]); } + /** + * @param bool $translate + * @return void + */ protected function setTranslate(bool $translate = true) { $this->translate = $translate; } + /** + * Setter for the when condition + * + * @param mixed $when + * @return void + */ protected function setWhen($when = null) { $this->when = $when; } + /** + * Setter for the field width + * + * @param string|null $width + * @return void + */ protected function setWidth(string $width = null) { $this->width = $width; } + /** + * Returns all sibling fields + * + * @return \Kirby\Form\Fields + */ protected function siblingsCollection() { return $this->siblings; } + /** + * Parses a string template in the given value + * + * @param string|null $string + * @return string|null + */ protected function stringTemplate(?string $string = null): ?string { if ($string !== null) { @@ -482,6 +692,13 @@ abstract class FieldClass return null; } + /** + * Converts the given value to a value + * that can be stored in the text file + * + * @param mixed $value + * @return mixed + */ public function store($value) { return $value; @@ -514,6 +731,11 @@ abstract class FieldClass }); } + /** + * Returns the field type + * + * @return string + */ public function type(): string { return lcfirst(basename(str_replace(['\\', 'Field'], ['/', ''], static::class))); @@ -587,6 +809,10 @@ abstract class FieldClass return $this->value; } + /** + * @param mixed $value + * @return array + */ protected function valueFromJson($value): array { try { @@ -596,11 +822,20 @@ abstract class FieldClass } } - protected function valueFromYaml($value) + /** + * @param mixed $value + * @return array + */ + protected function valueFromYaml($value): array { return Data::decode($value, 'yaml'); } + /** + * @param array|null $value + * @param bool $pretty + * @return string + */ protected function valueToJson(array $value = null, bool $pretty = false): string { if ($pretty === true) { @@ -610,6 +845,10 @@ abstract class FieldClass return json_encode($value); } + /** + * @param array|null $value + * @return string + */ protected function valueToYaml(array $value = null): string { return Data::encode($value, 'yaml'); diff --git a/kirby/src/Form/Form.php b/kirby/src/Form/Form.php index 9a56a16..db50e31 100644 --- a/kirby/src/Form/Form.php +++ b/kirby/src/Form/Form.php @@ -3,7 +3,10 @@ namespace Kirby\Form; use Kirby\Cms\App; +use Kirby\Cms\Model; use Kirby\Data\Data; +use Kirby\Exception\NotFoundException; +use Kirby\Toolkit\Str; use Throwable; /** @@ -54,6 +57,12 @@ class Form $strict = $props['strict'] ?? false; $inject = $props; + // prepare field properties for multilang setups + $fields = static::prepareFieldsForLanguage( + $fields, + $props['language'] ?? null + ); + // lowercase all value names $values = array_change_key_case($values); $input = array_change_key_case($input); @@ -194,6 +203,42 @@ class Form return Field::factory('info', $props); } + /** + * Get the field object by name + * and handle nested fields correctly + * + * @param string $name + * @throws \Kirby\Exception\NotFoundException + * @return \Kirby\Form\Field + */ + public function field(string $name) + { + $form = $this; + $fieldNames = Str::split($name, '+'); + $index = 0; + $count = count($fieldNames); + $field = null; + + foreach ($fieldNames as $fieldName) { + $index++; + + if ($field = $form->fields()->get($fieldName)) { + if ($count !== $index) { + $form = $field->form(); + } + } else { + throw new NotFoundException('The field "' . $fieldName . '" could not be found'); + } + } + + // it can get this error only if $name is an empty string as $name = '' + if ($field === null) { + throw new NotFoundException('No field could be loaded'); + } + + return $field; + } + /** * Returns form fields * @@ -204,6 +249,47 @@ class Form return $this->fields; } + /** + * @param \Kirby\Cms\Model $model + * @param array $props + * @return static + */ + public static function for(Model $model, array $props = []) + { + // get the original model data + $original = $model->content($props['language'] ?? null)->toArray(); + $values = $props['values'] ?? []; + + // convert closures to values + foreach ($values as $key => $value) { + if (is_a($value, 'Closure') === true) { + $values[$key] = $value($original[$key] ?? null); + } + } + + // set a few defaults + $props['values'] = array_merge($original, $values); + $props['fields'] = $props['fields'] ?? []; + $props['model'] = $model; + + // search for the blueprint + if (method_exists($model, 'blueprint') === true && $blueprint = $model->blueprint()) { + $props['fields'] = $blueprint->fields(); + } + + $ignoreDisabled = $props['ignoreDisabled'] ?? false; + + // REFACTOR: this could be more elegant + if ($ignoreDisabled === true) { + $props['fields'] = array_map(function ($field) { + $field['disabled'] = false; + return $field; + }, $props['fields']); + } + + return new static($props); + } + /** * Checks if the form is invalid * @@ -224,6 +310,40 @@ class Form return empty($this->errors()) === true; } + /** + * Disables fields in secondary languages when + * they are configured to be untranslatable + * + * @param array $fields + * @param string|null $language + * @return array + */ + protected static function prepareFieldsForLanguage(array $fields, ?string $language = null): array + { + $kirby = App::instance(null, true); + + // only modify the fields if we have a valid Kirby multilang instance + if (!$kirby || $kirby->multilang() === false) { + return $fields; + } + + if ($language === null) { + $language = $kirby->language()->code(); + } + + if ($language !== $kirby->defaultLanguage()->code()) { + foreach ($fields as $fieldName => $fieldProps) { + // switch untranslatable fields to readonly + if (($fieldProps['translate'] ?? true) === false) { + $fields[$fieldName]['unset'] = true; + $fields[$fieldName]['disabled'] = true; + } + } + } + + return $fields; + } + /** * Converts the data of fields to strings * diff --git a/kirby/src/Form/OptionsApi.php b/kirby/src/Form/OptionsApi.php index 6cbf204..4efbc8a 100644 --- a/kirby/src/Form/OptionsApi.php +++ b/kirby/src/Form/OptionsApi.php @@ -7,7 +7,6 @@ use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; use Kirby\Http\Remote; use Kirby\Http\Url; -use Kirby\Toolkit\Escape; use Kirby\Toolkit\Properties; use Kirby\Toolkit\Query; use Kirby\Toolkit\Str; @@ -27,17 +26,17 @@ class OptionsApi use Properties; /** - * @var + * @var array */ protected $data; /** - * @var + * @var string|null */ protected $fetch; /** - * @var + * @var array|string|null */ protected $options; @@ -47,7 +46,7 @@ class OptionsApi protected $text = '{{ item.value }}'; /** - * @var + * @var string */ protected $url; @@ -90,11 +89,7 @@ class OptionsApi protected function field(string $field, array $data): string { $value = $this->$field(); - return Str::template($value, $data, [ - 'callback' => function ($result) { - return Escape::html($result); - } - ]); + return Str::safeTemplate($value, $data); } /** @@ -166,14 +161,14 @@ class OptionsApi * @param string|null $fetch * @return $this */ - protected function setFetch(string $fetch = null) + protected function setFetch(?string $fetch = null) { $this->fetch = $fetch; return $this; } /** - * @param $options + * @param array|string|null $options * @return $this */ protected function setOptions($options = null) @@ -183,30 +178,30 @@ class OptionsApi } /** - * @param $text + * @param string $text * @return $this */ - protected function setText($text = null) + protected function setText(?string $text = null) { $this->text = $text; return $this; } /** - * @param $url + * @param string $url * @return $this */ - protected function setUrl($url) + protected function setUrl(string $url) { $this->url = $url; return $this; } /** - * @param null $value + * @param string|null $value * @return $this */ - protected function setValue($value = null) + protected function setValue(?string $value = null) { $this->value = $value; return $this; @@ -215,7 +210,7 @@ class OptionsApi /** * @return string */ - public function text() + public function text(): string { return $this->text; } @@ -240,7 +235,7 @@ class OptionsApi /** * @return string */ - public function value() + public function value(): string { return $this->value; } diff --git a/kirby/src/Form/OptionsQuery.php b/kirby/src/Form/OptionsQuery.php index 74d196e..ba4660f 100644 --- a/kirby/src/Form/OptionsQuery.php +++ b/kirby/src/Form/OptionsQuery.php @@ -6,7 +6,6 @@ use Kirby\Cms\Field; use Kirby\Exception\InvalidArgumentException; use Kirby\Exception\NotFoundException; use Kirby\Toolkit\Collection; -use Kirby\Toolkit\Escape; use Kirby\Toolkit\Obj; use Kirby\Toolkit\Properties; use Kirby\Toolkit\Query; @@ -103,26 +102,7 @@ class OptionsQuery $value = $value[$object]; } - $result = Str::template($value, $data); - - // escape the default queries for the `text` field - // TODO: remove after default escape implemented for query templates in 3.6 - if ($field === 'text') { - $defaults = [ - 'arrayItem' => '{{ arrayItem.value }}', - 'block' => '{{ block.type }}: {{ block.id }}', - 'file' => '{{ file.filename }}', - 'page' => '{{ page.title }}', - 'structureItem' => '{{ structureItem.title }}', - 'user' => '{{ user.username }}', - ]; - - if (isset($defaults[$object]) && $value === $defaults[$object]) { - $result = Escape::html($result); - } - } - - return $result; + return Str::safeTemplate($value, $data); } /** diff --git a/kirby/src/Form/Validations.php b/kirby/src/Form/Validations.php index d828298..56825e2 100644 --- a/kirby/src/Form/Validations.php +++ b/kirby/src/Form/Validations.php @@ -19,12 +19,12 @@ class Validations /** * Validates if the field value is boolean * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function boolean(Field $field, $value): bool + public static function boolean($field, $value): bool { if ($field->isEmpty($value) === false) { if (is_bool($value) === false) { @@ -40,12 +40,12 @@ class Validations /** * Validates if the field value is valid date * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function date(Field $field, $value): bool + public static function date($field, $value): bool { if ($field->isEmpty($value) === false) { if (V::date($value) !== true) { @@ -61,12 +61,12 @@ class Validations /** * Validates if the field value is valid email * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function email(Field $field, $value): bool + public static function email($field, $value): bool { if ($field->isEmpty($value) === false) { if (V::email($value) === false) { @@ -82,12 +82,12 @@ class Validations /** * Validates if the field value is maximum * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function max(Field $field, $value): bool + public static function max($field, $value): bool { if ($field->isEmpty($value) === false && $field->max() !== null) { if (V::max($value, $field->max()) === false) { @@ -103,12 +103,12 @@ class Validations /** * Validates if the field value is max length * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function maxlength(Field $field, $value): bool + public static function maxlength($field, $value): bool { if ($field->isEmpty($value) === false && $field->maxlength() !== null) { if (V::maxLength($value, $field->maxlength()) === false) { @@ -124,12 +124,12 @@ class Validations /** * Validates if the field value is minimum * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function min(Field $field, $value): bool + public static function min($field, $value): bool { if ($field->isEmpty($value) === false && $field->min() !== null) { if (V::min($value, $field->min()) === false) { @@ -145,12 +145,12 @@ class Validations /** * Validates if the field value is min length * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function minlength(Field $field, $value): bool + public static function minlength($field, $value): bool { if ($field->isEmpty($value) === false && $field->minlength() !== null) { if (V::minLength($value, $field->minlength()) === false) { @@ -166,12 +166,12 @@ class Validations /** * Validates if the field value matches defined pattern * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function pattern(Field $field, $value): bool + public static function pattern($field, $value): bool { if ($field->isEmpty($value) === false && $field->pattern() !== null) { if (V::match($value, '/' . $field->pattern() . '/i') === false) { @@ -187,12 +187,12 @@ class Validations /** * Validates if the field value is required * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function required(Field $field, $value): bool + public static function required($field, $value): bool { if ($field->isRequired() === true && $field->save() === true && $field->isEmpty($value) === true) { throw new InvalidArgumentException([ @@ -206,12 +206,12 @@ class Validations /** * Validates if the field value is in defined options * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function option(Field $field, $value): bool + public static function option($field, $value): bool { if ($field->isEmpty($value) === false) { $values = array_column($field->options(), 'value'); @@ -229,12 +229,12 @@ class Validations /** * Validates if the field values is in defined options * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function options(Field $field, $value): bool + public static function options($field, $value): bool { if ($field->isEmpty($value) === false) { $values = array_column($field->options(), 'value'); @@ -253,12 +253,12 @@ class Validations /** * Validates if the field value is valid time * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function time(Field $field, $value): bool + public static function time($field, $value): bool { if ($field->isEmpty($value) === false) { if (V::time($value) !== true) { @@ -274,12 +274,12 @@ class Validations /** * Validates if the field value is valid url * - * @param \Kirby\Form\Field $field + * @param \Kirby\Form\Field|\Kirby\Form\FieldClass $field * @param $value * @return bool * @throws \Kirby\Exception\InvalidArgumentException */ - public static function url(Field $field, $value): bool + public static function url($field, $value): bool { if ($field->isEmpty($value) === false) { if (V::url($value) === false) { diff --git a/kirby/src/Http/Header.php b/kirby/src/Http/Header.php index 6ee8680..3bfdc2c 100644 --- a/kirby/src/Http/Header.php +++ b/kirby/src/Http/Header.php @@ -2,7 +2,7 @@ namespace Kirby\Http; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * The Header class provides methods diff --git a/kirby/src/Http/Query.php b/kirby/src/Http/Query.php index 0956802..828f92c 100644 --- a/kirby/src/Http/Query.php +++ b/kirby/src/Http/Query.php @@ -43,7 +43,7 @@ class Query extends Obj public function toString($questionMark = false): string { - $query = http_build_query($this); + $query = http_build_query($this, null, '&', PHP_QUERY_RFC3986); if (empty($query) === true) { return ''; diff --git a/kirby/src/Http/Remote.php b/kirby/src/Http/Remote.php index 31c1a99..ae82866 100644 --- a/kirby/src/Http/Remote.php +++ b/kirby/src/Http/Remote.php @@ -5,7 +5,7 @@ namespace Kirby\Http; use Exception; use Kirby\Cms\App; use Kirby\Exception\InvalidArgumentException; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Kirby\Toolkit\Str; /** @@ -104,6 +104,13 @@ class Remote { $defaults = static::$defaults; + // use the system CA store by default if + // one has been configured in php.ini + $cainfo = ini_get('curl.cainfo'); + if (empty($cainfo) === false && is_file($cainfo) === true) { + $defaults['ca'] = self::CA_SYSTEM; + } + // update the defaults with App config if set; // request the App instance lazily $app = App::instance(null, true); diff --git a/kirby/src/Http/Request.php b/kirby/src/Http/Request.php index dce994b..0c04995 100644 --- a/kirby/src/Http/Request.php +++ b/kirby/src/Http/Request.php @@ -6,7 +6,6 @@ use Kirby\Http\Request\Auth\BasicAuth; use Kirby\Http\Request\Auth\BearerAuth; use Kirby\Http\Request\Body; use Kirby\Http\Request\Files; -use Kirby\Http\Request\Method; use Kirby\Http\Request\Query; use Kirby\Toolkit\A; use Kirby\Toolkit\Str; diff --git a/kirby/src/Http/Response.php b/kirby/src/Http/Response.php index 0172c6c..6471815 100644 --- a/kirby/src/Http/Response.php +++ b/kirby/src/Http/Response.php @@ -3,7 +3,7 @@ namespace Kirby\Http; use Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; use Throwable; /** diff --git a/kirby/src/Http/Server.php b/kirby/src/Http/Server.php index 1ccf919..7c48e63 100644 --- a/kirby/src/Http/Server.php +++ b/kirby/src/Http/Server.php @@ -119,13 +119,21 @@ class Server */ public static function port(bool $forwarded = false): int { - $port = $forwarded === true ? static::get('HTTP_X_FORWARDED_PORT') : null; - - if (empty($port) === true) { - $port = static::get('SERVER_PORT'); + // based on forwarded port + if ($forwarded === true) { + if ($port = static::get('HTTP_X_FORWARDED_PORT')) { + return $port; + } } - return $port; + // based on HTTP host + $host = static::get('HTTP_HOST'); + if ($pos = strpos($host, ':')) { + return (int)substr($host, $pos + 1); + } + + // based on server port + return static::get('SERVER_PORT'); } /** diff --git a/kirby/src/Http/Visitor.php b/kirby/src/Http/Visitor.php index 0a7e8f3..437b769 100644 --- a/kirby/src/Http/Visitor.php +++ b/kirby/src/Http/Visitor.php @@ -2,8 +2,8 @@ namespace Kirby\Http; +use Kirby\Filesystem\Mime; use Kirby\Toolkit\Collection; -use Kirby\Toolkit\Mime; use Kirby\Toolkit\Obj; use Kirby\Toolkit\Str; diff --git a/kirby/src/Image/Darkroom.php b/kirby/src/Image/Darkroom.php index 503eddc..1e4da75 100644 --- a/kirby/src/Image/Darkroom.php +++ b/kirby/src/Image/Darkroom.php @@ -21,6 +21,9 @@ class Darkroom 'im' => 'Kirby\Image\Darkroom\ImageMagick' ]; + /** + * @var array + */ protected $settings = []; /** @@ -61,8 +64,9 @@ class Darkroom { return [ 'autoOrient' => true, - 'crop' => false, 'blur' => false, + 'crop' => false, + 'format' => null, 'grayscale' => false, 'height' => null, 'quality' => 90, diff --git a/kirby/src/Image/Darkroom/GdLib.php b/kirby/src/Image/Darkroom/GdLib.php index eda6118..cfe0429 100644 --- a/kirby/src/Image/Darkroom/GdLib.php +++ b/kirby/src/Image/Darkroom/GdLib.php @@ -2,9 +2,8 @@ namespace Kirby\Image\Darkroom; -ini_set('memory_limit', '512M'); - use claviska\SimpleImage; +use Kirby\Filesystem\Mime; use Kirby\Image\Darkroom; /** @@ -28,6 +27,7 @@ class GdLib extends Darkroom public function process(string $file, array $options = []): array { $options = $this->preprocess($file, $options); + $mime = $this->mime($options); $image = new SimpleImage(); $image->fromFile($file); @@ -37,7 +37,7 @@ class GdLib extends Darkroom $image = $this->blur($image, $options); $image = $this->grayscale($image, $options); - $image->toFile($file, null, $options['quality']); + $image->toFile($file, $mime, $options['quality']); return $options; } @@ -106,4 +106,19 @@ class GdLib extends Darkroom return $image->desaturate(); } + + /** + * Returns mime type based on `format` option + * + * @param array $options + * @return string|null + */ + protected function mime(array $options): ?string + { + if ($options['format'] === null) { + return null; + } + + return Mime::fromExtension($options['format']); + } } diff --git a/kirby/src/Image/Darkroom/ImageMagick.php b/kirby/src/Image/Darkroom/ImageMagick.php index f27dd4c..6406b95 100644 --- a/kirby/src/Image/Darkroom/ImageMagick.php +++ b/kirby/src/Image/Darkroom/ImageMagick.php @@ -3,8 +3,8 @@ namespace Kirby\Image\Darkroom; use Exception; +use Kirby\Filesystem\F; use Kirby\Image\Darkroom; -use Kirby\Toolkit\F; /** * ImageMagick @@ -211,6 +211,10 @@ class ImageMagick extends Darkroom */ protected function save(string $file, array $options): string { + if ($options['format'] !== null) { + $file = pathinfo($file, PATHINFO_DIRNAME) . '/' . pathinfo($file, PATHINFO_FILENAME) . '.' . $options['format']; + } + return sprintf('-limit thread 1 "%s"', $file); } diff --git a/kirby/src/Image/Exif.php b/kirby/src/Image/Exif.php index 3452179..9ee686d 100644 --- a/kirby/src/Image/Exif.php +++ b/kirby/src/Image/Exif.php @@ -17,7 +17,7 @@ class Exif { /** * the parent image object - * @var Image + * @var \Kirby\Image\Image */ protected $image; @@ -207,9 +207,11 @@ class Exif */ protected function read(): array { + // @codeCoverageIgnoreStart if (function_exists('exif_read_data') === false) { return []; } + // @codeCoverageIgnoreEnd $data = @exif_read_data($this->image->root()); return is_array($data) ? $data : []; @@ -253,7 +255,7 @@ class Exif } /** - * Teturn the focal length + * Return the focal length * * @return string|null */ diff --git a/kirby/src/Image/Image.php b/kirby/src/Image/Image.php index 18d5edc..87135ea 100644 --- a/kirby/src/Image/Image.php +++ b/kirby/src/Image/Image.php @@ -2,33 +2,26 @@ namespace Kirby\Image; -use Kirby\Exception\Exception; -use Kirby\Http\Response; -use Kirby\Toolkit\File; +use Kirby\Filesystem\File; use Kirby\Toolkit\Html; -use Kirby\Toolkit\Mime; -use Kirby\Toolkit\V; /** - * A representation of an image/media file + * A representation of an image file * with dimensions, optional exif data and * a connection to our darkroom classes to resize/crop * images. * + * Extends the `Kirby\Filesystem\File` class with + * those image-specific methods. + * * @package Kirby Image - * @author Bastian Allgeier + * @author Nico Hoffmann * @link https://getkirby.com * @copyright Bastian Allgeier GmbH * @license https://opensource.org/licenses/MIT */ class Image extends File { - /** - * optional url where the file is reachable - * @var string - */ - protected $url; - /** * @var \Kirby\Image\Exif|null */ @@ -40,39 +33,52 @@ class Image extends File protected $dimensions; /** - * Constructor - * - * @param string|null $root - * @param string|null $url + * @var array */ - public function __construct(string $root = null, string $url = null) - { - parent::__construct($root); - $this->url = $url; - } + public static $resizableTypes = [ + 'jpg', + 'jpeg', + 'gif', + 'png', + 'webp' + ]; /** - * Improved `var_dump` output - * - * @return array + * @var array */ - public function __debugInfo(): array - { - return array_merge($this->toArray(), [ - 'dimensions' => $this->dimensions(), - 'exif' => $this->exif(), - ]); - } + public static $viewableTypes = [ + 'avif', + 'jpg', + 'jpeg', + 'gif', + 'png', + 'svg', + 'webp' + ]; /** - * Returns a full link to this file - * Perfect for debugging in connection with echo + * Validation rules to be used for `::match()` + * + * @var array + */ + public static $validations = [ + 'maxsize' => ['size', 'max'], + 'minsize' => ['size', 'min'], + 'maxwidth' => ['width', 'max'], + 'minwidth' => ['width', 'min'], + 'maxheight' => ['height', 'max'], + 'minheight' => ['height', 'min'], + 'orientation' => ['orientation', 'same'] + ]; + + /** + * Returns the `` tag for the image object * * @return string */ public function __toString(): string { - return $this->root; + return $this->html(); } /** @@ -86,7 +92,13 @@ class Image extends File return $this->dimensions; } - if (in_array($this->mime(), ['image/jpeg', 'image/jp2', 'image/png', 'image/gif', 'image/webp'])) { + if (in_array($this->mime(), [ + 'image/jpeg', + 'image/jp2', + 'image/png', + 'image/gif', + 'image/webp' + ])) { return $this->dimensions = Dimensions::forImage($this->root); } @@ -97,18 +109,6 @@ class Image extends File return $this->dimensions = new Dimensions(0, 0); } - /* - * Automatically sends all needed headers for the file to be downloaded - * and echos the file's content - * - * @param string|null $filename Optional filename for the download - * @return string - */ - public function download($filename = null): string - { - return Response::download($this->root, $filename ?? $this->filename()); - } - /** * Returns the exif object for this file (if image) * @@ -116,23 +116,7 @@ class Image extends File */ public function exif() { - if ($this->exif !== null) { - return $this->exif; - } - $this->exif = new Exif($this); - return $this->exif; - } - - /** - * Sends an appropriate header for the asset - * - * @param bool $send - * @return \Kirby\Http\Response|string - */ - public function header(bool $send = true) - { - $response = new Response('', $this->mime()); - return $send === true ? $response->send() : $response; + return $this->exif = $this->exif ?? new Exif($this); } /** @@ -146,6 +130,8 @@ class Image extends File } /** + * Converts the file to html + * * @param array $attr * @return string */ @@ -195,80 +181,24 @@ class Image extends File } /** - * Runs a set of validations on the image object + * Checks if the file is a resizable image * - * @param array $rules * @return bool - * @throws \Exception */ - public function match(array $rules): bool + public function isResizable(): bool { - $rules = array_change_key_case($rules); + return in_array($this->extension(), static::$resizableTypes) === true; + } - if (is_array($rules['mime'] ?? null) === true) { - $mime = $this->mime(); - - // determine if any pattern matches the MIME type; - // once any pattern matches, `$carry` is `true` and the rest is skipped - $matches = array_reduce($rules['mime'], function ($carry, $pattern) use ($mime) { - return $carry || Mime::matches($mime, $pattern); - }, false); - - if ($matches !== true) { - throw new Exception([ - 'key' => 'file.mime.invalid', - 'data' => compact('mime') - ]); - } - } - - if (is_array($rules['extension'] ?? null) === true) { - $extension = $this->extension(); - if (in_array($extension, $rules['extension']) !== true) { - throw new Exception([ - 'key' => 'file.extension.invalid', - 'data' => compact('extension') - ]); - } - } - - if (is_array($rules['type'] ?? null) === true) { - $type = $this->type(); - if (in_array($type, $rules['type']) !== true) { - throw new Exception([ - 'key' => 'file.type.invalid', - 'data' => compact('type') - ]); - } - } - - $validations = [ - 'maxsize' => ['size', 'max'], - 'minsize' => ['size', 'min'], - 'maxwidth' => ['width', 'max'], - 'minwidth' => ['width', 'min'], - 'maxheight' => ['height', 'max'], - 'minheight' => ['height', 'min'], - 'orientation' => ['orientation', 'same'] - ]; - - foreach ($validations as $key => $arguments) { - $rule = $rules[$key] ?? null; - - if ($rule !== null) { - $property = $arguments[0]; - $validator = $arguments[1]; - - if (V::$validator($this->$property(), $rule) === false) { - throw new Exception([ - 'key' => 'file.' . $key, - 'data' => [$property => $rule] - ]); - } - } - } - - return true; + /** + * Checks if a preview can be displayed for the file + * in the Panel or in the frontend + * + * @return bool + */ + public function isViewable(): bool + { + return in_array($this->extension(), static::$viewableTypes) === true; } /** @@ -293,38 +223,20 @@ class Image extends File } /** - * Converts the media object to a - * plain PHP array + * Converts the object to an array * * @return array */ public function toArray(): array { - return array_merge(parent::toArray(), [ + $array = array_merge(parent::toArray(), [ 'dimensions' => $this->dimensions()->toArray(), 'exif' => $this->exif()->toArray(), ]); - } - /** - * Converts the entire file array into - * a json string - * - * @return string - */ - public function toJson(): string - { - return json_encode($this->toArray()); - } + ksort($array); - /** - * Returns the url - * - * @return string - */ - public function url() - { - return $this->url; + return $array; } /** diff --git a/kirby/src/Panel/Dialog.php b/kirby/src/Panel/Dialog.php new file mode 100644 index 0000000..ad87900 --- /dev/null +++ b/kirby/src/Panel/Dialog.php @@ -0,0 +1,39 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Dialog extends Json +{ + protected static $key = '$dialog'; + + /** + * Renders dialogs + * + * @param mixed $data + * @param array $options + * @return \Kirby\Http\Response + */ + public static function response($data, array $options = []) + { + // interpret true as success + if ($data === true) { + $data = [ + 'code' => 200 + ]; + } + + return parent::response($data, $options); + } +} diff --git a/kirby/src/Panel/Document.php b/kirby/src/Panel/Document.php new file mode 100644 index 0000000..6cf844a --- /dev/null +++ b/kirby/src/Panel/Document.php @@ -0,0 +1,263 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Document +{ + /** + * Generates an array with all assets + * that need to be loaded for the panel (js, css, icons) + * + * @return array + */ + public static function assets(): array + { + $kirby = kirby(); + $nonce = $kirby->nonce(); + + // get the assets from the Vite dev server in dev mode; + // dev mode = explicitly enabled in the config AND Vite is running + $dev = $kirby->option('panel.dev', false); + $isDev = $dev !== false && is_file($kirby->roots()->panel() . '/.vite-running') === true; + + if ($isDev === true) { + // vite on explicitly configured base URL or port 3000 + // of the current Kirby request + if (is_string($dev) === true) { + $url = $dev; + } else { + $url = rtrim($kirby->request()->url([ + 'port' => 3000, + 'path' => null, + 'params' => null, + 'query' => null + ])->toString(), '/'); + } + } else { + // vite is not running, use production assets + $url = $kirby->url('media') . '/panel/' . $kirby->versionHash(); + } + + // fetch all plugins + $plugins = new Plugins(); + + $assets = [ + 'css' => [ + 'index' => $url . '/css/style.css', + 'plugins' => $plugins->url('css'), + 'custom' => static::customCss(), + ], + 'icons' => $kirby->option('panel.favicon', [ + 'apple-touch-icon' => [ + 'type' => 'image/png', + 'url' => $url . '/apple-touch-icon.png', + ], + 'shortcut icon' => [ + 'type' => 'image/svg+xml', + 'url' => $url . '/favicon.svg', + ], + 'alternate icon' => [ + 'type' => 'image/png', + 'url' => $url . '/favicon.png', + ] + ]), + 'js' => [ + 'vendor' => [ + 'nonce' => $nonce, + 'src' => $url . '/js/vendor.js', + 'type' => 'module' + ], + 'pluginloader' => [ + 'nonce' => $nonce, + 'src' => $url . '/js/plugins.js', + 'type' => 'module' + ], + 'plugins' => [ + 'nonce' => $nonce, + 'src' => $plugins->url('js'), + 'defer' => true + ], + 'custom' => [ + 'nonce' => $nonce, + 'src' => static::customJs(), + 'type' => 'module' + ], + 'index' => [ + 'nonce' => $nonce, + 'src' => $url . '/js/index.js', + 'type' => 'module' + ], + ] + ]; + + // during dev mode, add vite client and adapt + // path to `index.js` - vendor and stylesheet + // don't need to be loaded in dev mode + if ($isDev === true) { + $assets['js']['vite'] = [ + 'nonce' => $nonce, + 'src' => $url . '/@vite/client', + 'type' => 'module' + ]; + $assets['js']['index'] = [ + 'nonce' => $nonce, + 'src' => $url . '/src/index.js', + 'type' => 'module' + ]; + + unset($assets['css']['index'], $assets['js']['vendor']); + } + + // remove missing files + $assets['css'] = array_filter($assets['css']); + $assets['js'] = array_filter($assets['js'], function ($js) { + return empty($js['src']) === false; + }); + + return $assets; + } + + /** + * Check for a custom css file from the + * config (panel.css) + * + * @return string|null + */ + public static function customCss(): ?string + { + if ($css = kirby()->option('panel.css')) { + $asset = asset($css); + + if ($asset->exists() === true) { + return $asset->url() . '?' . $asset->modified(); + } + } + + return null; + } + + /** + * Check for a custom js file from the + * config (panel.js) + * + * @return string|null + */ + public static function customJs(): ?string + { + if ($js = kirby()->option('panel.js')) { + $asset = asset($js); + + if ($asset->exists() === true) { + return $asset->url() . '?' . $asset->modified(); + } + } + + return null; + } + + /** + * Load the SVG icon sprite + * This will be injected in the + * initial HTML document for the Panel + * + * @return string + */ + public static function icons(): string + { + return F::read(kirby()->root('kirby') . '/panel/dist/img/icons.svg'); + } + + /** + * Links all dist files in the media folder + * and returns the link to the requested asset + * + * @return bool + * @throws \Kirby\Exception\Exception If Panel assets could not be moved to the public directory + */ + public static function link(): bool + { + $kirby = kirby(); + $mediaRoot = $kirby->root('media') . '/panel'; + $panelRoot = $kirby->root('panel') . '/dist'; + $versionHash = $kirby->versionHash(); + $versionRoot = $mediaRoot . '/' . $versionHash; + + // check if the version already exists + if (is_dir($versionRoot) === true) { + return false; + } + + // delete the panel folder and all previous versions + Dir::remove($mediaRoot); + + // recreate the panel folder + Dir::make($mediaRoot, true); + + // copy assets to the dist folder + if (Dir::copy($panelRoot, $versionRoot) !== true) { + throw new Exception('Panel assets could not be linked'); + } + + return true; + } + + /** + * Renders the panel document + * + * @param array $fiber + * @return \Kirby\Http\Response + */ + public static function response(array $fiber) + { + $kirby = kirby(); + + // Full HTML response + // @codeCoverageIgnoreStart + try { + if (static::link() === true) { + usleep(1); + go($kirby->url('index') . '/' . $kirby->path()); + } + } catch (Throwable $e) { + die('The Panel assets cannot be installed properly. ' . $e->getMessage()); + } + // @codeCoverageIgnoreEnd + + // get the uri object for the panel url + $uri = new Uri($url = $kirby->url('panel')); + + // proper response code + $code = $fiber['$view']['code'] ?? 200; + + // load the main Panel view template + $body = Tpl::load($kirby->root('kirby') . '/views/panel.php', [ + 'assets' => static::assets(), + 'icons' => static::icons(), + 'nonce' => $kirby->nonce(), + 'fiber' => $fiber, + 'panelUrl' => $uri->path()->toString(true) . '/', + ]); + + return new Response($body, 'text/html', $code); + } +} diff --git a/kirby/src/Panel/Dropdown.php b/kirby/src/Panel/Dropdown.php new file mode 100644 index 0000000..f2ed7fe --- /dev/null +++ b/kirby/src/Panel/Dropdown.php @@ -0,0 +1,89 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Dropdown extends Json +{ + protected static $key = '$dropdown'; + + /** + * Returns the options for the changes dropdown + * + * @return array + */ + public static function changes(): array + { + $kirby = kirby(); + $multilang = $kirby->multilang(); + $ids = Str::split(get('ids')); + $options = []; + + foreach ($ids as $id) { + try { + // parse the given ID to extract + // the path and an optional query + $uri = new Uri($id); + $path = $uri->path()->toString(); + $query = $uri->query(); + $option = Find::parent($path)->panel()->dropdownOption(); + + // add the language to each option, if it is included in the query + // of the given ID and the language actually exists + if ($multilang && $query->language && $language = $kirby->language($query->language)) { + $option['text'] .= ' (' . $language->code() . ')'; + $option['link'] .= '?language=' . $language->code(); + } + + $options[] = $option; + } catch (Throwable $e) { + continue; + } + } + + // the given set of ids does not match any + // real models. This means that the stored ids + // in local storage are not correct and the changes + // store needs to be cleared + if (empty($options) === true) { + throw new LogicException('No changes for given models'); + } + + return $options; + } + + /** + * Renders dropdowns + * + * @param mixed $data + * @param array $options + * @return \Kirby\Http\Response + */ + public static function response($data, array $options = []) + { + if (is_array($data) === true) { + $data = [ + 'options' => array_values($data) + ]; + } + + return parent::response($data, $options); + } +} diff --git a/kirby/src/Panel/Field.php b/kirby/src/Panel/Field.php new file mode 100644 index 0000000..c6c9935 --- /dev/null +++ b/kirby/src/Panel/Field.php @@ -0,0 +1,272 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Field +{ + /** + * A standard email field + * + * @param array $props + * @return array + */ + public static function email(array $props = []): array + { + return array_merge([ + 'label' => t('email'), + 'type' => 'email', + 'counter' => false, + ], $props); + } + + /** + * File position + * + * @param \Kirby\Cms\File + * @param array $props + * @return array + */ + public static function filePosition(File $file, array $props = []): array + { + $index = 0; + $options = []; + + foreach ($file->siblings(false)->sorted() as $sibling) { + $index++; + + $options[] = [ + 'value' => $index, + 'text' => $index + ]; + + $options[] = [ + 'value' => $sibling->id(), + 'text' => $sibling->filename(), + 'disabled' => true + ]; + } + + $index++; + + $options[] = [ + 'value' => $index, + 'text' => $index + ]; + + return array_merge([ + 'label' => t('file.sort'), + 'type' => 'select', + 'empty' => false, + 'options' => $options + ], $props); + } + + + /** + * @return array + */ + public static function hidden(): array + { + return ['type' => 'hidden']; + } + + /** + * Page position + * + * @param \Kirby\Cms\Page + * @param array $props + * @return array + */ + public static function pagePosition(Page $page, array $props = []): array + { + $index = 0; + $options = []; + $siblings = $page->parentModel()->children()->listed()->not($page); + + foreach ($siblings as $sibling) { + $index++; + + $options[] = [ + 'value' => $index, + 'text' => $index + ]; + + $options[] = [ + 'value' => $sibling->id(), + 'text' => $sibling->title()->value(), + 'disabled' => true + ]; + } + + $index++; + + $options[] = [ + 'value' => $index, + 'text' => $index + ]; + + // if only one available option, + // hide field when not in debug mode + if (count($options) < 2) { + return static::hidden(); + } + + return array_merge([ + 'label' => t('page.changeStatus.position'), + 'type' => 'select', + 'empty' => false, + 'options' => $options, + ], $props); + } + + /** + * A regular password field + * + * @param array $props + * @return array + */ + public static function password(array $props = []): array + { + return array_merge([ + 'label' => t('password'), + 'type' => 'password' + ], $props); + } + + /** + * User role radio buttons + * + * @param array $props + * @return array + */ + public static function role(array $props = []): array + { + $kirby = kirby(); + $user = $kirby->user(); + $isAdmin = $user && $user->isAdmin(); + $roles = []; + + foreach ($kirby->roles() as $role) { + // exclude the admin role, if the user + // is not allowed to change role to admin + if ($role->name() === 'admin' && $isAdmin === false) { + continue; + } + + $roles[] = [ + 'text' => $role->title(), + 'info' => $role->description() ?? t('role.description.placeholder'), + 'value' => $role->name() + ]; + } + + return array_merge([ + 'label' => t('role'), + 'type' => count($roles) <= 1 ? 'hidden' : 'radio', + 'options' => $roles + ], $props); + } + + /** + * @param array $props + * @return array + */ + public static function slug(array $props = []): array + { + return array_merge([ + 'label' => t('slug'), + 'type' => 'slug', + ], $props); + } + + /** + * @param array $blueprints + * @param array $props + * @return array + */ + public static function template(?array $blueprints = [], ?array $props = []): array + { + $options = []; + + foreach ($blueprints as $blueprint) { + $options[] = [ + 'text' => $blueprint['title'] ?? $blueprint['text'] ?? null, + 'value' => $blueprint['name'] ?? $blueprint['value'] ?? null, + ]; + } + + return array_merge([ + 'label' => t('template'), + 'type' => 'select', + 'empty' => false, + 'options' => $options, + 'icon' => 'template', + 'disabled' => count($options) <= 1 + ], $props); + } + + /** + * @param array $props + * @return array + */ + public static function title(array $props = []): array + { + return array_merge([ + 'label' => t('title'), + 'type' => 'text', + 'icon' => 'title', + ], $props); + } + + /** + * Panel translation select box + * + * @param array $props + * @return array + */ + public static function translation(array $props = []): array + { + $translations = []; + foreach (kirby()->translations() as $translation) { + $translations[] = [ + 'text' => $translation->name(), + 'value' => $translation->code() + ]; + } + + return array_merge([ + 'label' => t('language'), + 'type' => 'select', + 'icon' => 'globe', + 'options' => $translations, + 'empty' => false + ], $props); + } + + /** + * @param array $props + * @return array + */ + public static function username(array $props = []): array + { + return array_merge([ + 'icon' => 'user', + 'label' => t('name'), + 'type' => 'text', + ], $props); + } +} diff --git a/kirby/src/Panel/File.php b/kirby/src/Panel/File.php new file mode 100644 index 0000000..c4327bf --- /dev/null +++ b/kirby/src/Panel/File.php @@ -0,0 +1,471 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class File extends Model +{ + /** + * Breadcrumb array + * + * @return array + */ + public function breadcrumb(): array + { + $breadcrumb = []; + $parent = $this->model->parent(); + + switch ($parent::CLASS_ALIAS) { + case 'user': + // The breadcrumb is not necessary + // on the account view + if ($parent->isLoggedIn() === false) { + $breadcrumb[] = [ + 'label' => $parent->username(), + 'link' => $parent->panel()->url(true) + ]; + } + break; + case 'page': + $breadcrumb = $this->model->parents()->flip()->values(function ($parent) { + return [ + 'label' => $parent->title()->toString(), + 'link' => $parent->panel()->url(true), + ]; + }); + } + + // add the file + $breadcrumb[] = [ + 'label' => $this->model->filename(), + 'link' => $this->url(true), + ]; + + return $breadcrumb; + } + + /** + * Provides a kirbytag or markdown + * tag for the file, which will be + * used in the panel, when the file + * gets dragged onto a textarea + * + * @internal + * @param string|null $type (`auto`|`kirbytext`|`markdown`) + * @param bool $absolute + * @return string + */ + public function dragText(string $type = null, bool $absolute = false): string + { + $type = $this->dragTextType($type); + $url = $absolute ? $this->model->id() : $this->model->filename(); + + if ($dragTextFromCallback = $this->dragTextFromCallback($type, $url)) { + return $dragTextFromCallback; + } + + if ($type === 'markdown') { + if ($this->model->type() === 'image') { + return '![' . $this->model->alt() . '](' . $url . ')'; + } + + return '[' . $this->model->filename() . '](' . $url . ')'; + } + + if ($this->model->type() === 'image') { + return '(image: ' . $url . ')'; + } + if ($this->model->type() === 'video') { + return '(video: ' . $url . ')'; + } + + return '(file: ' . $url . ')'; + } + + /** + * Provides options for the file dropdown + * + * @param array $options + * @return array + */ + public function dropdown(array $options = []): array + { + $defaults = [ + 'view' => get('view'), + 'update' => get('update'), + 'delete' => get('delete') + ]; + + $options = array_merge($defaults, $options); + $file = $this->model; + $permissions = $this->options(['preview']); + $view = $options['view'] ?? 'view'; + $url = $this->url(true); + $result = []; + + if ($view === 'list') { + $result[] = [ + 'link' => $file->previewUrl(), + 'target' => '_blank', + 'icon' => 'open', + 'text' => t('open') + ]; + $result[] = '-'; + } + + $result[] = [ + 'dialog' => $url . '/changeName', + 'icon' => 'title', + 'text' => t('rename'), + 'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions) + ]; + + $result[] = [ + 'click' => 'replace', + 'icon' => 'upload', + 'text' => t('replace'), + 'disabled' => $this->isDisabledDropdownOption('replace', $options, $permissions) + ]; + + if ($view === 'list') { + $result[] = '-'; + $result[] = [ + 'dialog' => $url . '/changeSort', + 'icon' => 'sort', + 'text' => t('file.sort'), + 'disabled' => $this->isDisabledDropdownOption('update', $options, $permissions) + ]; + } + + $result[] = '-'; + $result[] = [ + 'dialog' => $url . '/delete', + 'icon' => 'trash', + 'text' => t('delete'), + 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) + ]; + + return $result; + } + + /** + * Returns the setup for a dropdown option + * which is used in the changes dropdown + * for example. + * + * @return array + */ + public function dropdownOption(): array + { + return [ + 'icon' => 'image', + 'text' => $this->model->filename(), + ] + parent::dropdownOption(); + } + + /** + * Returns the Panel icon color + * + * @return string + */ + protected function imageColor(): string + { + $types = [ + 'image' => 'orange-400', + 'video' => 'yellow-400', + 'document' => 'red-400', + 'audio' => 'aqua-400', + 'code' => 'blue-400', + 'archive' => 'white' + ]; + + $extensions = [ + 'indd' => 'purple-400', + 'xls' => 'green-400', + 'xlsx' => 'green-400', + 'csv' => 'green-400', + 'docx' => 'blue-400', + 'doc' => 'blue-400', + 'rtf' => 'blue-400' + ]; + + return $extensions[$this->model->extension()] ?? + $types[$this->model->type()] ?? + parent::imageDefaults()['icon']; + } + + /** + * Default settings for the file's Panel image + * + * @return array + */ + protected function imageDefaults(): array + { + return array_merge(parent::imageDefaults(), [ + 'color' => $this->imageColor(), + 'icon' => $this->imageIcon(), + ]); + } + + /** + * Returns the Panel icon type + * + * @return string + */ + protected function imageIcon(): string + { + $types = [ + 'image' => 'file-image', + 'video' => 'file-video', + 'document' => 'file-document', + 'audio' => 'file-audio', + 'code' => 'file-code', + 'archive' => 'file-zip' + ]; + + $extensions = [ + 'xls' => 'file-spreadsheet', + 'xlsx' => 'file-spreadsheet', + 'csv' => 'file-spreadsheet', + 'docx' => 'file-word', + 'doc' => 'file-word', + 'rtf' => 'file-word', + 'mdown' => 'file-text', + 'md' => 'file-text' + ]; + + return $extensions[$this->model->extension()] ?? + $types[$this->model->type()] ?? + parent::imageDefaults()['color']; + } + + /** + * Returns the image file object based on provided query + * + * @internal + * @param string|null $query + * @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null + */ + protected function imageSource(string $query = null) + { + if ($query === null && $this->model->isViewable()) { + return $this->model; + } + + return parent::imageSource($query); + } + + /** + * Returns an array of all actions + * that can be performed in the Panel + * + * @param array $unlock An array of options that will be force-unlocked + * @return array + */ + public function options(array $unlock = []): array + { + $options = parent::options($unlock); + + try { + // check if the file type is allowed at all, + // otherwise it cannot be replaced + $this->model->match($this->model->blueprint()->accept()); + } catch (Throwable $e) { + $options['replace'] = false; + } + + return $options; + } + + /** + * Returns the full path without leading slash + * + * @return string + */ + public function path(): string + { + return 'files/' . $this->model->filename(); + } + + /** + * Prepares the response data for file pickers + * and file fields + * + * @param array|null $params + * @return array + */ + public function pickerData(array $params = []): array + { + $id = $this->model->id(); + $name = $this->model->filename(); + + if (empty($params['model']) === false) { + $parent = $this->model->parent(); + $uuid = $parent === $params['model'] ? $name : $id; + $absolute = $parent !== $params['model']; + } + + $params['text'] = $params['text'] ?? '{{ file.filename }}'; + + return array_merge(parent::pickerData($params), [ + 'filename' => $name, + 'dragText' => $this->dragText('auto', $absolute ?? false), + 'type' => $this->model->type(), + 'url' => $this->model->url(), + 'uuid' => $uuid ?? $id, + ]); + } + + /** + * Returns the data array for the + * view's component props + * + * @internal + * + * @return array + */ + public function props(): array + { + $file = $this->model; + $dimensions = $file->dimensions(); + $siblings = $file->templateSiblings()->sortBy( + 'sort', + 'asc', + 'filename', + 'asc' + ); + + + return array_merge( + parent::props(), + $this->prevNext(), + [ + 'blueprint' => $this->model->template() ?? 'default', + 'model' => [ + 'content' => $this->content(), + 'dimensions' => $dimensions->toArray(), + 'extension' => $file->extension(), + 'filename' => $file->filename(), + 'link' => $this->url(true), + 'mime' => $file->mime(), + 'niceSize' => $file->niceSize(), + 'id' => $id = $file->id(), + 'parent' => $file->parent()->panel()->path(), + 'template' => $file->template(), + 'type' => $file->type(), + 'url' => $file->url(), + ], + 'preview' => [ + 'image' => $this->image([ + 'back' => 'transparent', + 'ratio' => '1/1' + ], 'cards'), + 'url' => $url = $file->previewUrl(), + 'details' => [ + [ + 'title' => t('template'), + 'text' => $file->template() ?? '—' + ], + [ + 'title' => t('mime'), + 'text' => $file->mime() + ], + [ + 'title' => t('url'), + 'text' => $id, + 'link' => $url + ], + [ + 'title' => t('size'), + 'text' => $file->niceSize() + ], + [ + 'title' => t('dimensions'), + 'text' => $file->type() === 'image' ? $file->dimensions() . ' ' . t('pixel') : '—' + ], + [ + 'title' => t('orientation'), + 'text' => $file->type() === 'image' ? t('orientation.' . $dimensions->orientation()) : '—' + ], + ] + ] + ] + ); + } + + /** + * Returns navigation array with + * previous and next file + * + * @internal + * + * @return array + */ + public function prevNext(): array + { + $file = $this->model; + $siblings = $file->templateSiblings()->sortBy( + 'sort', + 'asc', + 'filename', + 'asc' + ); + + return [ + 'next' => function () use ($file, $siblings): ?array { + $next = $siblings->nth($siblings->indexOf($file) + 1); + return $next ? $next->panel()->toLink('filename') : null; + }, + 'prev' => function () use ($file, $siblings): ?array { + $prev = $siblings->nth($siblings->indexOf($file) - 1); + return $prev ? $prev->panel()->toLink('filename') : null; + } + ]; + } + /** + * Returns the url to the editing view + * in the panel + * + * @param bool $relative + * @return string + */ + public function url(bool $relative = false): string + { + $parent = $this->model->parent()->panel()->url($relative); + return $parent . '/' . $this->path(); + } + + /** + * Returns the data array for + * this model's Panel view + * + * @internal + * + * @return array + */ + public function view(): array + { + $file = $this->model; + + return [ + 'breadcrumb' => function () use ($file): array { + return $file->panel()->breadcrumb(); + }, + 'component' => 'k-file-view', + 'props' => $this->props(), + 'search' => 'files', + 'title' => $file->filename(), + ]; + } +} diff --git a/kirby/src/Panel/Home.php b/kirby/src/Panel/Home.php new file mode 100644 index 0000000..45f8bed --- /dev/null +++ b/kirby/src/Panel/Home.php @@ -0,0 +1,261 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Home +{ + /** + * Returns an alternative URL if access + * to the first choice is blocked. + * + * It will go through the entire menu and + * take the first area which is not disabled + * or locked in other ways + * + * @param \Kirby\Cms\User $user + * @return string + */ + public static function alternative(User $user): string + { + $permissions = $user->role()->permissions(); + + // no access to the panel? The only good alternative is the main url + if ($permissions->for('access', 'panel') === false) { + return site()->url(); + } + + // needed to create a proper menu + $areas = Panel::areas(); + $menu = View::menu($areas, $permissions->toArray()); + + // go through the menu and search for the first + // available view we can go to + foreach ($menu as $menuItem) { + // skip separators + if ($menuItem === '-') { + continue; + } + + // skip disabled items + if (($menuItem['disabled'] ?? false) === true) { + continue; + } + + // skip the logout button + if ($menuItem['id'] === 'logout') { + continue; + } + + + return Panel::url($menuItem['link']); + } + + throw new NotFoundException('There’s no available Panel page to redirect to'); + } + + /** + * Checks if the user has access to the given + * panel path. This is quite tricky, because we + * need to call a trimmed down router to check + * for available routes and their firewall status. + * + * @param \Kirby\Cms\User + * @param string $path + * @return bool + */ + public static function hasAccess(User $user, string $path): bool + { + $areas = Panel::areas(); + $routes = Panel::routes($areas); + + // Remove fallback routes. Otherwise a route + // would be found even if the view does + // not exist at all. + foreach ($routes as $index => $route) { + if ($route['pattern'] === '(:all)') { + unset($routes[$index]); + } + } + + // create a dummy router to check if we can access this route at all + try { + return router($path, 'GET', $routes, function ($route) use ($user) { + $auth = $route->attributes()['auth'] ?? true; + $areaId = $route->attributes()['area'] ?? null; + $type = $route->attributes()['type'] ?? 'view'; + + // only allow redirects to views + if ($type !== 'view') { + return false; + } + + // if auth is not required the redirect is allowed + if ($auth === false) { + return true; + } + + // check the firewall + return Panel::hasAccess($user, $areaId); + }); + } catch (Throwable $e) { + return false; + } + } + + /** + * Checks if the given Uri has the same domain + * as the index URL of the Kirby installation. + * This is used to block external URLs to third-party + * domains as redirect options. + * + * @param \Kirby\Http\Uri $uri + * @return bool + */ + public static function hasValidDomain(Uri $uri): bool + { + return $uri->domain() === (new Uri(site()->url()))->domain(); + } + + /** + * Checks if the given URL is a Panel Url. + * + * @param string $url + * @return bool + */ + public static function isPanelUrl(string $url): bool + { + return Str::startsWith($url, kirby()->url('panel')); + } + + /** + * Returns the path after /panel/ which can then + * be used in the router or to find a matching view + * + * @param string $url + * @return string|null + */ + public static function panelPath(string $url): ?string + { + $after = Str::after($url, kirby()->url('panel')); + return trim($after, '/'); + } + + /** + * Returns the Url that has been stored in the session + * before the last logout. We take this Url if possible + * to redirect the user back to the last point where they + * left before they got logged out. + * + * @return string|null + */ + public static function remembered(): ?string + { + // check for a stored path after login + $remembered = kirby()->session()->pull('panel.path'); + + // convert the result to an absolute URL if available + return $remembered ? Panel::url($remembered) : null; + } + + /** + * Tries to find the best possible Url to redirect + * the user to after the login. + * + * When the user got logged out, we try to send them back + * to the point where they left. + * + * If they have a custom redirect Url defined in their blueprint + * via the `home` option, we send them there if no Url is stored + * in the session. + * + * If none of the options above find any result, we try to send + * them to the site view. + * + * Before the redirect happens, the final Url is sanitized, the query + * and params are removed to avoid any attacks and the domain is compared + * to avoid redirects to external Urls. + * + * Afterwards, we also check for permissions before the redirect happens + * to avoid redirects to inaccessible Panel views. In such a case + * the next best accessible view is picked from the menu. + * + * @return string + */ + public static function url(): string + { + $user = kirby()->user(); + + // if there's no authenticated user, all internal + // redirects will be blocked and the user is redirected + // to the login instead + if (!$user) { + return Panel::url('login'); + } + + // get the last visited url from the session or the custom home + $url = static::remembered() ?? $user->panel()->home(); + + // inspect the given URL + $uri = new Uri($url); + + // compare domains to avoid external redirects + if (static::hasValidDomain($uri) !== true) { + throw new InvalidArgumentException('External URLs are not allowed for Panel redirects'); + } + + // remove all params to avoid + // possible attack vectors + $uri->params = ''; + $uri->query = ''; + + // get a clean version of the URL + $url = $uri->toString(); + + // Don't further inspect URLs outside of the Panel + if (static::isPanelUrl($url) === false) { + return $url; + } + + // get the plain panel path + $path = static::panelPath($url); + + // a redirect to login, logout or installation + // views would lead to an infinite redirect loop + if (in_array($path, ['', 'login', 'logout', 'installation'], true) === true) { + $path = 'site'; + } + + // Check if the user can access the URL + if (static::hasAccess($user, $path) === true) { + return Panel::url($path); + } + + // Try to find an alternative + return static::alternative($user); + } +} diff --git a/kirby/src/Panel/Json.php b/kirby/src/Panel/Json.php new file mode 100644 index 0000000..2ec61e8 --- /dev/null +++ b/kirby/src/Panel/Json.php @@ -0,0 +1,77 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +abstract class Json +{ + protected static $key = '$response'; + + /** + * Renders the error response with the provided message + * + * @param string $message + * @param int $code + * @return array + */ + public static function error(string $message, int $code = 404) + { + return [ + 'code' => $code, + 'error' => $message + ]; + } + + /** + * Prepares the JSON response for the Panel + * + * @param mixed $data + * @param array $options + * @return mixed + */ + public static function response($data, array $options = []) + { + // handle redirects + if (is_a($data, 'Kirby\Panel\Redirect') === true) { + $data = [ + 'redirect' => $data->location(), + 'code' => $data->code() + ]; + + // handle Kirby exceptions + } elseif (is_a($data, 'Kirby\Exception\Exception') === true) { + $data = static::error($data->getMessage(), $data->getHttpCode()); + + // handle exceptions + } elseif (is_a($data, 'Throwable') === true) { + $data = static::error($data->getMessage(), 500); + + // only expect arrays from here on + } elseif (is_array($data) === false) { + $data = static::error('Invalid response', 500); + } + + if (empty($data) === true) { + $data = static::error('The response is empty', 404); + } + + // always inject the response code + $data['code'] = $data['code'] ?? 200; + $data['path'] = $options['path'] ?? null; + $data['referrer'] = Panel::referrer(); + + return Panel::json([static::$key => $data], $data['code']); + } +} diff --git a/kirby/src/Panel/Model.php b/kirby/src/Panel/Model.php new file mode 100644 index 0000000..d3832ef --- /dev/null +++ b/kirby/src/Panel/Model.php @@ -0,0 +1,415 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +abstract class Model +{ + /** + * @var \Kirby\Cms\ModelWithContent + */ + protected $model; + + /** + * @param \Kirby\Cms\ModelWithContent $model + */ + public function __construct($model) + { + $this->model = $model; + } + + /** + * Get the content values for the model + * + * @return array + */ + public function content(): array + { + return Form::for($this->model)->values(); + } + + /** + * Returns the drag text from a custom callback + * if the callback is defined in the config + * @internal + * + * @param string $type markdown or kirbytext + * @param mixed ...$args + * @return string|null + */ + public function dragTextFromCallback(string $type, ...$args): ?string + { + $option = 'panel.' . $type . '.' . $this->model::CLASS_ALIAS . 'DragText'; + $callback = option($option); + + if ( + empty($callback) === false && + is_a($callback, 'Closure') === true && + ($dragText = $callback($this->model, ...$args)) !== null + ) { + return $dragText; + } + + return null; + } + + /** + * Returns the correct drag text type + * depending on the given type or the + * configuration + * + * @internal + * + * @param string|null $type (`auto`|`kirbytext`|`markdown`) + * @return string + */ + public function dragTextType(string $type = null): string + { + $type = $type ?? 'auto'; + + if ($type === 'auto') { + $type = option('panel.kirbytext', true) ? 'kirbytext' : 'markdown'; + } + + return $type === 'markdown' ? 'markdown' : 'kirbytext'; + } + + /** + * Returns the setup for a dropdown option + * which is used in the changes dropdown + * for example. + * + * @return array + */ + public function dropdownOption(): array + { + return [ + 'icon' => 'page', + 'link' => $this->url(), + 'text' => $this->model->id(), + ]; + } + + /** + * Returns the Panel image definition + * + * @internal + * + * @param string|array|false|null $settings + * @return array|null + */ + public function image($settings = [], string $layout = 'list'): ?array + { + // completely switched off + if ($settings === false) { + return null; + } + + // skip image thumbnail if option + // is explicitly set to show the icon + if ($settings === 'icon') { + $settings = [ + 'query' => false + ]; + } elseif (is_string($settings) === true) { + // convert string settings to proper array + $settings = [ + 'query' => $settings + ]; + } + + // merge with defaults and blueprint option + $settings = array_merge( + $this->imageDefaults(), + $settings ?? [], + $this->model->blueprint()->image() ?? [], + ); + + if ($image = $this->imageSource($settings['query'] ?? null)) { + // main url + $settings['url'] = $image->url(); + + // only create srcsets for actual File objects + if (is_a($image, 'Kirby\Cms\File') === true) { + $settings['src'] = static::imagePlaceholder(); + + switch ($layout) { + case 'cards': + $sizes = [352, 864, 1408]; + break; + case 'cardlets': + $sizes = [96, 192]; + break; + case 'list': + default: + $sizes = [38, 76]; + break; + } + + if (($settings['cover'] ?? false) === false || $layout === 'cards') { + $settings['srcset'] = $image->srcset($sizes); + } else { + $settings['srcset'] = $image->srcset([ + '1x' => [ + 'width' => $sizes[0], + 'height' => $sizes[0], + 'crop' => 'center' + ], + '2x' => [ + 'width' => $sizes[1], + 'height' => $sizes[1], + 'crop' => 'center' + ] + ]); + } + } + } + + if (isset($settings['query']) === true) { + unset($settings['query']); + } + + // resolve remaining options defined as query + return A::map($settings, function ($option) { + if (is_string($option) === false) { + return $option; + } + + return $this->model->toString($option); + }); + } + + /** + * Default settings for Panel image + * + * @return array + */ + protected function imageDefaults(): array + { + return [ + 'back' => 'pattern', + 'color' => 'gray-500', + 'cover' => false, + 'icon' => 'page', + 'ratio' => '3/2', + ]; + } + + /** + * Data URI placeholder string for Panel image + * + * @internal + * + * @return string + */ + public static function imagePlaceholder(): string + { + return 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw'; + } + + /** + * Returns the image file object based on provided query + * + * @internal + * + * @param string|null $query + * @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null + */ + protected function imageSource(?string $query = null) + { + $image = $this->model->query($query ?? null); + + // validate the query result + if ( + is_a($image, 'Kirby\Cms\File') === true || + is_a($image, 'Kirby\Filesystem\Asset') === true + ) { + return $image; + } + + return null; + } + + /** + * Checks for disabled dropdown options according + * to the given permissions + * + * @param string $action + * @param array $options + * @param array $permissions + * @return bool + */ + public function isDisabledDropdownOption(string $action, array $options, array $permissions): bool + { + $option = $options[$action] ?? true; + return $permissions[$action] === false || $option === false || $option === 'false'; + } + + /** + * Returns lock info for the Panel + * + * @return array|false array with lock info, + * false if locking is not supported + */ + public function lock() + { + if ($lock = $this->model->lock()) { + if ($lock->isUnlocked() === true) { + return ['state' => 'unlock']; + } + + if ($lock->isLocked() === true) { + return [ + 'state' => 'lock', + 'data' => $lock->get() + ]; + } + + return ['state' => null]; + } + + return false; + } + + /** + * Returns an array of all actions + * that can be performed in the Panel + * This also checks for the lock status + * + * @param array $unlock An array of options that will be force-unlocked + * @return array + */ + public function options(array $unlock = []): array + { + $options = $this->model->permissions()->toArray(); + + if ($this->model->isLocked()) { + foreach ($options as $key => $value) { + if (in_array($key, $unlock)) { + continue; + } + + $options[$key] = false; + } + } + + return $options; + } + + /** + * Returns the full path without leading slash + * + * @return string + */ + abstract public function path(): string; + + /** + * Prepares the response data for page pickers + * and page fields + * + * @param array|null $params + * @return array + */ + public function pickerData(array $params = []): array + { + return [ + 'id' => $this->model->id(), + 'image' => $this->image( + $params['image'] ?? [], + $params['layout'] ?? 'list' + ), + 'info' => $this->model->toSafeString($params['info'] ?? false), + 'link' => $this->url(true), + 'sortable' => true, + 'text' => $this->model->toSafeString($params['text'] ?? false), + ]; + } + + /** + * Returns the data array for the + * view's component props + * + * @internal + * + * @return array + */ + public function props(): array + { + $blueprint = $this->model->blueprint(); + $tabs = $blueprint->tabs(); + $tab = $blueprint->tab(get('tab')) ?? $tabs[0] ?? null; + + $props = [ + 'lock' => $this->lock(), + 'permissions' => $this->model->permissions()->toArray(), + 'tabs' => $tabs, + ]; + + // only send the tab if it exists + // this will let the vue component define + // a proper default value + if ($tab) { + $props['tab'] = $tab; + } + + return $props; + } + + /** + * Returns link url and tooltip + * for model (e.g. used for prev/next + * navigation) + * + * @internal + * + * @param string $tooltip + * @return array + */ + public function toLink(string $tooltip = 'title'): array + { + return [ + 'link' => $this->url(true), + 'tooltip' => (string)$this->model->{$tooltip}() + ]; + } + + /** + * Returns the url to the editing view + * in the Panel + * + * @internal + * + * @param bool $relative + * @return string + */ + public function url(bool $relative = false): string + { + if ($relative === true) { + return '/' . $this->path(); + } + + return $this->model->kirby()->url('panel') . '/' . $this->path(); + } + + /** + * Returns the data array for + * this model's Panel view + * + * @internal + * + * @return array + */ + abstract public function view(): array; +} diff --git a/kirby/src/Panel/Page.php b/kirby/src/Panel/Page.php new file mode 100644 index 0000000..f443194 --- /dev/null +++ b/kirby/src/Panel/Page.php @@ -0,0 +1,379 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Page extends Model +{ + /** + * Breadcrumb array + * + * @return array + */ + public function breadcrumb(): array + { + $parents = $this->model->parents()->flip()->merge($this->model); + return $parents->values(function ($parent) { + return [ + 'label' => $parent->title()->toString(), + 'link' => $parent->panel()->url(true), + ]; + }); + } + + /** + * Provides a kirbytag or markdown + * tag for the page, which will be + * used in the panel, when the page + * gets dragged onto a textarea + * + * @internal + * @param string|null $type (`auto`|`kirbytext`|`markdown`) + * @return string + */ + public function dragText(string $type = null): string + { + $type = $this->dragTextType($type); + + if ($callback = $this->dragTextFromCallback($type)) { + return $callback; + } + + if ($type === 'markdown') { + return '[' . $this->model->title() . '](' . $this->model->url() . ')'; + } + + return '(link: ' . $this->model->id() . ' text: ' . $this->model->title() . ')'; + } + + /** + * Provides options for the page dropdown + * + * @param array $options + * @return array + */ + public function dropdown(array $options = []): array + { + $defaults = [ + 'view' => get('view'), + 'sort' => get('sort'), + 'delete' => get('delete') + ]; + + $options = array_merge($defaults, $options); + $page = $this->model; + $permissions = $this->options(['preview']); + $view = $options['view'] ?? 'view'; + $url = $this->url(true); + $result = []; + + if ($view === 'list') { + $result['preview'] = [ + 'link' => $page->previewUrl(), + 'target' => '_blank', + 'icon' => 'open', + 'text' => t('open'), + 'disabled' => $this->isDisabledDropdownOption('preview', $options, $permissions) + ]; + $result[] = '-'; + } + + $result['changeTitle'] = [ + 'dialog' => [ + 'url' => $url . '/changeTitle', + 'query' => [ + 'select' => 'title' + ] + ], + 'icon' => 'title', + 'text' => t('rename'), + 'disabled' => $this->isDisabledDropdownOption('changeTitle', $options, $permissions) + ]; + + $result['duplicate'] = [ + 'dialog' => $url . '/duplicate', + 'icon' => 'copy', + 'text' => t('duplicate'), + 'disabled' => $this->isDisabledDropdownOption('duplicate', $options, $permissions) + ]; + + $result[] = '-'; + + $result['changeSlug'] = [ + 'dialog' => [ + 'url' => $url . '/changeTitle', + 'query' => [ + 'select' => 'slug' + ] + ], + 'icon' => 'url', + 'text' => t('page.changeSlug'), + 'disabled' => $this->isDisabledDropdownOption('changeSlug', $options, $permissions) + ]; + + $result['changeStatus'] = [ + 'dialog' => $url . '/changeStatus', + 'icon' => 'preview', + 'text' => t('page.changeStatus'), + 'disabled' => $this->isDisabledDropdownOption('changeStatus', $options, $permissions) + ]; + + $siblings = $page->parentModel()->children()->listed()->not($page); + + $result['changeSort'] = [ + 'dialog' => $url . '/changeSort', + 'icon' => 'sort', + 'text' => t('page.sort'), + 'disabled' => $siblings->count() === 0 || $this->isDisabledDropdownOption('sort', $options, $permissions) + ]; + + $result['changeTemplate'] = [ + 'dialog' => $url . '/changeTemplate', + 'icon' => 'template', + 'text' => t('page.changeTemplate'), + 'disabled' => $this->isDisabledDropdownOption('changeTemplate', $options, $permissions) + ]; + + $result[] = '-'; + $result['delete'] = [ + 'dialog' => $url . '/delete', + 'icon' => 'trash', + 'text' => t('delete'), + 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) + ]; + + return $result; + } + + /** + * Returns the setup for a dropdown option + * which is used in the changes dropdown + * for example. + * + * @return array + */ + public function dropdownOption(): array + { + return [ + 'text' => $this->model->title()->value(), + ] + parent::dropdownOption(); + } + + /** + * Returns the escaped Id, which is + * used in the panel to make routing work properly + * + * @return string + */ + public function id(): string + { + return str_replace('/', '+', $this->model->id()); + } + + /** + * Default settings for the page's Panel image + * + * @return array + */ + protected function imageDefaults(): array + { + $defaults = []; + + if ($icon = $this->model->blueprint()->icon()) { + $defaults['icon'] = $icon; + } + + return array_merge(parent::imageDefaults(), $defaults); + } + + /** + * Returns the image file object based on provided query + * + * @internal + * @param string|null $query + * @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null + */ + protected function imageSource(string $query = null) + { + if ($query === null) { + $query = 'page.image'; + } + + return parent::imageSource($query); + } + + /** + * Returns the full path without leading slash + * + * @internal + * @return string + */ + public function path(): string + { + return 'pages/' . $this->id(); + } + + /** + * Prepares the response data for page pickers + * and page fields + * + * @param array|null $params + * @return array + */ + public function pickerData(array $params = []): array + { + $params['text'] = $params['text'] ?? '{{ page.title }}'; + + return array_merge(parent::pickerData($params), [ + 'dragText' => $this->dragText(), + 'hasChildren' => $this->model->hasChildren(), + 'url' => $this->model->url() + ]); + } + + /** + * The best applicable position for + * the position/status dialog + * + * @return int + */ + public function position(): int + { + return $this->model->num() ?? $this->model->parentModel()->children()->listed()->not($this->model)->count() + 1; + } + + /** + * Returns navigation array with + * previous and next page + * based on blueprint definition + * + * @internal + * + * @return array + */ + public function prevNext(): array + { + $page = $this->model; + + // create siblings collection based on + // blueprint navigation + $siblings = function (string $direction) use ($page) { + $navigation = $page->blueprint()->navigation(); + $sortBy = $navigation['sortBy'] ?? null; + $status = $navigation['status'] ?? null; + $template = $navigation['template'] ?? null; + $direction = $direction === 'prev' ? 'prev' : 'next'; + + // if status is defined in navigation, + // all items in the collection are used + // (drafts, listed and unlisted) otherwise + // it depends on the status of the page + $siblings = $status !== null ? $page->parentModel()->childrenAndDrafts() : $page->siblings(); + + // sort the collection if custom sortBy + // defined in navigation otherwise + // default sorting will apply + if ($sortBy !== null) { + $siblings = $siblings->sort(...$siblings::sortArgs($sortBy)); + } + + $siblings = $page->{$direction . 'All'}($siblings); + + if (empty($navigation) === false) { + $statuses = (array)($status ?? $page->status()); + $templates = (array)($template ?? $page->intendedTemplate()); + + // do not filter if template navigation is all + if (in_array('all', $templates) === false) { + $siblings = $siblings->filter('intendedTemplate', 'in', $templates); + } + + // do not filter if status navigation is all + if (in_array('all', $statuses) === false) { + $siblings = $siblings->filter('status', 'in', $statuses); + } + } else { + $siblings = $siblings + ->filter('intendedTemplate', $page->intendedTemplate()) + ->filter('status', $page->status()); + } + + return $siblings->filter('isReadable', true); + }; + + return [ + 'next' => function () use ($siblings) { + $next = $siblings('next')->first(); + return $next ? $next->panel()->toLink('title') : null; + }, + 'prev' => function () use ($siblings) { + $prev = $siblings('prev')->last(); + return $prev ? $prev->panel()->toLink('title') : null; + } + ]; + } + + /** + * Returns the data array for the + * view's component props + * + * @internal + * + * @return array + */ + public function props(): array + { + $page = $this->model; + + return array_merge( + parent::props(), + $this->prevNext(), + [ + 'blueprint' => $this->model->intendedTemplate()->name(), + 'model' => [ + 'content' => $this->content(), + 'id' => $page->id(), + 'link' => $this->url(true), + 'parent' => $page->parentModel()->panel()->url(true), + 'previewUrl' => $page->previewUrl(), + 'status' => $page->status(), + 'title' => $page->title()->toString(), + ], + 'status' => function () use ($page) { + if ($status = $page->status()) { + return $page->blueprint()->status()[$status] ?? null; + } + }, + ] + ); + } + + /** + * Returns the data array for + * this model's Panel view + * + * @internal + * + * @return array + */ + public function view(): array + { + $page = $this->model; + + return [ + 'breadcrumb' => $page->panel()->breadcrumb(), + 'component' => 'k-page-view', + 'props' => $this->props(), + 'title' => $page->title()->toString(), + ]; + } +} diff --git a/kirby/src/Panel/Panel.php b/kirby/src/Panel/Panel.php new file mode 100644 index 0000000..576abe6 --- /dev/null +++ b/kirby/src/Panel/Panel.php @@ -0,0 +1,608 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Panel +{ + /** + * Normalize a panel area + * + * @param string $id + * @param array|string $area + * @return array + */ + public static function area(string $id, $area): array + { + $area['id'] = $id; + $area['label'] = $area['label'] ?? $id; + $area['breadcrumb'] = $area['breadcrumb'] ?? []; + $area['breadcrumbLabel'] = $area['breadcrumbLabel'] ?? $area['label']; + $area['title'] = $area['label']; + $area['menu'] = $area['menu'] ?? false; + $area['link'] = $area['link'] ?? $id; + $area['search'] = $area['search'] ?? null; + + return $area; + } + + /** + * Collect all registered areas + * + * @return array + */ + public static function areas(): array + { + $kirby = kirby(); + $system = $kirby->system(); + $user = $kirby->user(); + $areas = $kirby->load()->areas(); + + // the system is not ready + if ($system->isOk() === false || $system->isInstalled() === false) { + return [ + 'installation' => static::area('installation', $areas['installation']), + ]; + } + + // not yet authenticated + if (!$user) { + return [ + 'login' => static::area('login', $areas['login']), + ]; + } + + unset($areas['installation'], $areas['login']); + + // Disable the language area for single-language installations + // This does not check for installed languages. Otherwise you'd + // not be able to add the first language through the view + if (!$kirby->option('languages')) { + unset($areas['languages']); + } + + $menu = $kirby->option('panel.menu', [ + 'site', + 'languages', + 'users', + 'system', + ]); + + $result = []; + + // add the sorted areas + foreach ($menu as $id) { + if ($area = ($areas[$id] ?? null)) { + $result[$id] = static::area($id, $area); + unset($areas[$id]); + } + } + + // add the remaining areas + foreach ($areas as $id => $area) { + $result[$id] = static::area($id, $area); + } + + return $result; + } + + /** + * Check for access permissions + * + * @param \Kirby\Cms\User|null $user + * @param string|null $areaId + * @return bool + */ + public static function firewall(?User $user = null, ?string $areaId = null): bool + { + // a user has to be logged in + if ($user === null) { + throw new PermissionException(['key' => 'access.panel']); + } + + // get all access permissions for the user role + $permissions = $user->role()->permissions()->toArray()['access']; + + // check for general panel access + if (($permissions['panel'] ?? true) !== true) { + throw new PermissionException(['key' => 'access.panel']); + } + + // don't check if the area is not defined + if (empty($areaId) === true) { + return true; + } + + // undefined area permissions means access + if (isset($permissions[$areaId]) === false) { + return true; + } + + // no access + if ($permissions[$areaId] !== true) { + throw new PermissionException(['key' => 'access.view']); + } + + return true; + } + + + /** + * Redirect to a Panel url + * + * @param string|null $path + * @param int $code + * @throws \Kirby\Panel\Redirect + * @return void + * @codeCoverageIgnore + */ + public static function go(?string $url = null, int $code = 302): void + { + throw new Redirect(static::url($url), $code); + } + + /** + * Check if the given user has access to the panel + * or to a given area + * + * @param \Kirby\Cms\User|null $user + * @param string|null $area + * @return bool + */ + public static function hasAccess(?User $user = null, string $area = null): bool + { + try { + static::firewall($user, $area); + return true; + } catch (Throwable $e) { + return false; + } + } + + /** + * Checks for a Fiber request + * via get parameters or headers + * + * @return bool + */ + public static function isFiberRequest(): bool + { + $request = kirby()->request(); + + if ($request->method() === 'GET') { + return (bool)($request->get('_json') ?? $request->header('X-Fiber')); + } + + return false; + } + + /** + * Returns a JSON response + * for Fiber calls + * + * @param array $data + * @param int $code + * @return \Kirby\Http\Response + */ + public static function json(array $data, int $code = 200) + { + return Response::json($data, $code, get('_pretty'), [ + 'X-Fiber' => 'true', + 'Cache-Control' => 'no-store' + ]); + } + + /** + * Checks for a multilanguage installation + * + * @return bool + */ + public static function multilang(): bool + { + // multilang setup check + $kirby = kirby(); + return $kirby->option('languages') || $kirby->multilang(); + } + + /** + * Returns the referrer path if present + * + * @return string|null + */ + public static function referrer(): ?string + { + $referrer = kirby()->request()->header('X-Fiber-Referrer') ?? get('_referrer'); + return '/' . trim($referrer, '/'); + } + + /** + * Creates a Response object from the result of + * a Panel route call + * + * @params mixed $result + * @params array $options + * @return \Kirby\Http\Response + */ + public static function response($result, array $options = []) + { + // pass responses directly down to the Kirby router + if (is_a($result, 'Kirby\Http\Response') === true) { + return $result; + } + + // interpret missing/empty results as not found + if ($result === null || $result === false) { + $result = new NotFoundException('The data could not be found'); + + // interpret strings as errors + } elseif (is_string($result) === true) { + $result = new Exception($result); + } + + // handle different response types (view, dialog, ...) + switch ($options['type'] ?? null) { + case 'dialog': + return Dialog::response($result, $options); + case 'dropdown': + return Dropdown::response($result, $options); + case 'search': + return Search::response($result, $options); + default: + return View::response($result, $options); + } + } + + /** + * Router for the Panel views + * + * @param string $path + * @return \Kirby\Http\Response|false + */ + public static function router(string $path = null) + { + $kirby = kirby(); + + if ($kirby->option('panel') === false) { + return null; + } + + // set the translation for Panel UI before + // gathering areas and routes, so that the + // `t()` helper can already be used + static::setTranslation(); + + // set the language in multi-lang installations + static::setLanguage(); + + $areas = static::areas(); + $routes = static::routes($areas); + + // create a micro-router for the Panel + return router($path, $method = $kirby->request()->method(), $routes, function ($route) use ($areas, $kirby, $method, $path) { + + // trigger hook + $route = $kirby->apply('panel.route:before', compact('route', 'path', 'method'), 'route'); + + // route needs authentication? + $auth = $route->attributes()['auth'] ?? true; + $areaId = $route->attributes()['area'] ?? null; + $type = $route->attributes()['type'] ?? 'view'; + $area = $areas[$areaId] ?? null; + + // call the route action to check the result + try { + // check for access before executing area routes + if ($auth !== false) { + static::firewall($kirby->user(), $areaId); + } + + $result = $route->action()->call($route, ...$route->arguments()); + } catch (Throwable $e) { + $result = $e; + } + + $response = static::response($result, [ + 'area' => $area, + 'areas' => $areas, + 'path' => $path, + 'type' => $type + ]); + + return $kirby->apply('panel.route:after', compact('route', 'path', 'method', 'response'), 'response'); + }); + } + + /** + * Extract the routes from the given array + * of active areas. + * + * @return array + */ + public static function routes(array $areas): array + { + $kirby = kirby(); + + // the browser incompatibility + // warning is always needed + $routes = [ + [ + 'pattern' => 'browser', + 'auth' => false, + 'action' => function () use ($kirby) { + return new Response( + Tpl::load($kirby->root('kirby') . '/views/browser.php') + ); + }, + ] + ]; + + // register all routes from areas + foreach ($areas as $areaId => $area) { + $routes = array_merge( + $routes, + static::routesForViews($areaId, $area), + static::routesForSearches($areaId, $area), + static::routesForDialogs($areaId, $area), + static::routesForDropdowns($areaId, $area), + ); + } + + // if the Panel is already installed and/or the + // user is authenticated, those areas won't be + // included, which is why we add redirect routes + // to main Panel view as fallbacks + $routes[] = [ + 'pattern' => [ + '/', + 'installation', + 'login', + ], + 'action' => function () { + Panel::go(Home::url()); + } + ]; + + // catch all route + $routes[] = [ + 'pattern' => '(:all)', + 'action' => function () { + return 'The view could not be found'; + } + ]; + + return $routes; + } + + /** + * Extract all routes from an area + * + * @param string $areaId + * @param array $area + * @return array + */ + public static function routesForDialogs(string $areaId, array $area): array + { + $dialogs = $area['dialogs'] ?? []; + $routes = []; + + foreach ($dialogs as $key => $dialog) { + + // create the full pattern with dialogs prefix + $pattern = 'dialogs/' . trim(($dialog['pattern'] ?? $key), '/'); + + // load event + $routes[] = [ + 'pattern' => $pattern, + 'type' => 'dialog', + 'area' => $areaId, + 'action' => $dialog['load'] ?? function () { + return 'The load handler for your dialog is missing'; + }, + ]; + + // submit event + $routes[] = [ + 'pattern' => $pattern, + 'type' => 'dialog', + 'area' => $areaId, + 'method' => 'POST', + 'action' => $dialog['submit'] ?? function () { + return 'Your dialog does not define a submit handler'; + } + ]; + } + + return $routes; + } + + /** + * Extract all routes for dropdowns + * + * @param string $areaId + * @param array $area + * @return array + */ + public static function routesForDropdowns(string $areaId, array $area): array + { + $dropdowns = $area['dropdowns'] ?? []; + $routes = []; + + foreach ($dropdowns as $name => $dropdown) { + // create the full pattern with dropdowns prefix + $pattern = 'dropdowns/' . trim(($dropdown['pattern'] ?? $name), '/'); + + // load event + $routes[] = [ + 'pattern' => $pattern, + 'type' => 'dropdown', + 'area' => $areaId, + 'method' => 'GET|POST', + 'action' => $dropdown['options'] ?? $dropdown['action'] + ]; + } + + return $routes; + } + + /** + * Extract all routes for searches + * + * @param string $areaId + * @param array $area + * @return array + */ + public static function routesForSearches(string $areaId, array $area): array + { + $searches = $area['searches'] ?? []; + $routes = []; + + foreach ($searches as $name => $params) { + + // create the full routing pattern + $pattern = 'search/' . $name; + + // load event + $routes[] = [ + 'pattern' => $pattern, + 'type' => 'search', + 'area' => $areaId, + 'action' => function () use ($params) { + return $params['query'](get('query')); + } + ]; + } + + return $routes; + } + + /** + * Extract all views from an area + * + * @param string $areaId + * @param array $area + * @return array + */ + public static function routesForViews(string $areaId, array $area): array + { + $views = $area['views'] ?? []; + $routes = []; + + foreach ($views as $view) { + $view['area'] = $areaId; + $view['type'] = 'view'; + $routes[] = $view; + } + + return $routes; + } + + /** + * Set the current language in multi-lang + * installations based on the session or the + * query language query parameter + * + * @return string|null + */ + public static function setLanguage(): ?string + { + $kirby = kirby(); + + // language switcher + if (static::multilang()) { + $fallback = 'en'; + + if ($defaultLanguage = $kirby->defaultLanguage()) { + $fallback = $defaultLanguage->code(); + } + + $session = $kirby->session(); + $sessionLanguage = $session->get('panel.language', $fallback); + $language = get('language') ?? $sessionLanguage; + + // keep the language for the next visit + if ($language !== $sessionLanguage) { + $session->set('panel.language', $language); + } + + // activate the current language in Kirby + $kirby->setCurrentLanguage($language); + + return $language; + } + + return null; + } + + /** + * Set the currently active Panel translation + * based on the current user or config + * + * @return string + */ + public static function setTranslation(): string + { + $kirby = kirby(); + + if ($user = $kirby->user()) { + // use the user language for the default translation + $translation = $user->language(); + } else { + // fall back to the language from the config + $translation = $kirby->panelLanguage(); + } + + $kirby->setCurrentTranslation($translation); + + return $translation; + } + + /** + * Creates an absolute Panel URL + * independent of the Panel slug config + * + * @param string|null $url + * @return string + */ + public static function url(?string $url = null): string + { + $slug = kirby()->option('panel.slug', 'panel'); + + // only touch relative paths + if (Url::isAbsolute($url) === false) { + $path = trim($url, '/'); + + // add the panel slug prefix if it it's not + // included in the path yet + if (Str::startsWith($path, $slug . '/') === false) { + $path = $slug . '/' . $path; + } + + // create an absolute URL + $url = url($path); + } + + return $url; + } +} diff --git a/kirby/src/Cms/PanelPlugins.php b/kirby/src/Panel/Plugins.php similarity index 93% rename from kirby/src/Cms/PanelPlugins.php rename to kirby/src/Panel/Plugins.php index e05caea..d8e91f0 100644 --- a/kirby/src/Cms/PanelPlugins.php +++ b/kirby/src/Panel/Plugins.php @@ -1,22 +1,23 @@ * @link https://getkirby.com * @copyright Bastian Allgeier GmbH * @license https://getkirby.com/license */ -class PanelPlugins +class Plugins { /** * Cache of all collected plugin files diff --git a/kirby/src/Panel/Redirect.php b/kirby/src/Panel/Redirect.php new file mode 100644 index 0000000..00c0a81 --- /dev/null +++ b/kirby/src/Panel/Redirect.php @@ -0,0 +1,46 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Redirect extends Exception +{ + /** + * Returns the HTTP code for the redirect + * + * @return int + */ + public function code(): int + { + $codes = [301, 302, 303, 307, 308]; + + if (in_array($this->getCode(), $codes) === true) { + return $this->getCode(); + } + + return 302; + } + + /** + * Returns the URL for the redirect + * + * @return string + */ + public function location(): string + { + return $this->getMessage(); + } +} diff --git a/kirby/src/Panel/Search.php b/kirby/src/Panel/Search.php new file mode 100644 index 0000000..1b160eb --- /dev/null +++ b/kirby/src/Panel/Search.php @@ -0,0 +1,36 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Search extends Json +{ + protected static $key = '$search'; + + /** + * @param mixed $data + * @param array $options + * @return \Kirby\Http\Response + */ + public static function response($data, array $options = []) + { + if (is_array($data) === true) { + $data = [ + 'results' => $data + ]; + } + + return parent::response($data, $options); + } +} diff --git a/kirby/src/Panel/Site.php b/kirby/src/Panel/Site.php new file mode 100644 index 0000000..b5d7955 --- /dev/null +++ b/kirby/src/Panel/Site.php @@ -0,0 +1,94 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Site extends Model +{ + /** + * Returns the setup for a dropdown option + * which is used in the changes dropdown + * for example. + * + * @return array + */ + public function dropdownOption(): array + { + return [ + 'icon' => 'home', + 'text' => $this->model->title()->value(), + ] + parent::dropdownOption(); + } + + /** + * Returns the image file object based on provided query + * + * @internal + * @param string|null $query + * @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null + */ + protected function imageSource(string $query = null) + { + if ($query === null) { + $query = 'site.image'; + } + + return parent::imageSource($query); + } + + /** + * Returns the full path without leading slash + * + * @return string + */ + public function path(): string + { + return 'site'; + } + + /** + * Returns the data array for the + * view's component props + * + * @internal + * + * @return array + */ + public function props(): array + { + return array_merge(parent::props(), [ + 'blueprint' => 'site', + 'model' => [ + 'content' => $this->content(), + 'link' => $this->url(true), + 'previewUrl' => $this->model->previewUrl(), + 'title' => $this->model->title()->toString(), + ] + ]); + } + + /** + * Returns the data array for + * this model's Panel view + * + * @internal + * + * @return array + */ + public function view(): array + { + return [ + 'component' => 'k-site-view', + 'props' => $this->props() + ]; + } +} diff --git a/kirby/src/Panel/User.php b/kirby/src/Panel/User.php new file mode 100644 index 0000000..3c05c62 --- /dev/null +++ b/kirby/src/Panel/User.php @@ -0,0 +1,272 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class User extends Model +{ + /** + * Breadcrumb array + * + * @return array + */ + public function breadcrumb(): array + { + return [ + [ + 'label' => $this->model->username(), + 'link' => $this->url(true), + ] + ]; + } + + /** + * Provides options for the user dropdown + * + * @param array $options + * @return array + */ + public function dropdown(array $options = []): array + { + $account = $this->model->isLoggedIn(); + $i18nPrefix = $account ? 'account' : 'user'; + $permissions = $this->options(['preview']); + $url = $this->url(true); + $result = []; + + $result[] = [ + 'dialog' => $url . '/changeName', + 'icon' => 'title', + 'text' => t($i18nPrefix . '.changeName'), + 'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions) + ]; + + $result[] = '-'; + + $result[] = [ + 'dialog' => $url . '/changeEmail', + 'icon' => 'email', + 'text' => t('user.changeEmail'), + 'disabled' => $this->isDisabledDropdownOption('changeEmail', $options, $permissions) + ]; + + $result[] = [ + 'dialog' => $url . '/changeRole', + 'icon' => 'bolt', + 'text' => t('user.changeRole'), + 'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions) + ]; + + $result[] = [ + 'dialog' => $url . '/changePassword', + 'icon' => 'key', + 'text' => t('user.changePassword'), + 'disabled' => $this->isDisabledDropdownOption('changePassword', $options, $permissions) + ]; + + $result[] = [ + 'dialog' => $url . '/changeLanguage', + 'icon' => 'globe', + 'text' => t('user.changeLanguage'), + 'disabled' => $this->isDisabledDropdownOption('changeLanguage', $options, $permissions) + ]; + + $result[] = '-'; + + $result[] = [ + 'dialog' => $url . '/delete', + 'icon' => 'trash', + 'text' => t($i18nPrefix . '.delete'), + 'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions) + ]; + + return $result; + } + + /** + * Returns the setup for a dropdown option + * which is used in the changes dropdown + * for example. + * + * @return array + */ + public function dropdownOption(): array + { + return [ + 'icon' => 'user', + 'text' => $this->model->username(), + ] + parent::dropdownOption(); + } + + /** + * @return string|null + */ + public function home(): ?string + { + if ($home = ($this->model->blueprint()->home() ?? null)) { + $url = $this->model->toString($home); + return url($url); + } + + return Panel::url('site'); + } + + /** + * Default settings for the user's Panel image + * + * @return array + */ + protected function imageDefaults(): array + { + return array_merge(parent::imageDefaults(), [ + 'back' => 'black', + 'icon' => 'user', + 'ratio' => '1/1', + ]); + } + + /** + * Returns the image file object based on provided query + * + * @param string|null $query + * @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null + */ + protected function imageSource(string $query = null) + { + if ($query === null) { + return $this->model->avatar(); + } + + return parent::imageSource($query); + } + + /** + * Returns the full path without leading slash + * + * @return string + */ + public function path(): string + { + // path to your own account + if ($this->model->isLoggedIn() === true) { + return 'account'; + } + + return 'users/' . $this->model->id(); + } + + /** + * Returns prepared data for the panel user picker + * + * @param array|null $params + * @return array + */ + public function pickerData(array $params = null): array + { + $params['text'] = $params['text'] ?? '{{ user.username }}'; + + return array_merge(parent::pickerData($params), [ + 'email' => $this->model->email(), + 'username' => $this->model->username(), + ]); + } + + /** + * Returns navigation array with + * previous and next user + * + * @internal + * + * @return array + */ + public function prevNext(): array + { + $user = $this->model; + + return [ + 'next' => function () use ($user) { + $next = $user->next(); + return $next ? $next->panel()->toLink('username') : null; + }, + 'prev' => function () use ($user) { + $prev = $user->prev(); + return $prev ? $prev->panel()->toLink('username') : null; + } + ]; + } + + /** + * Returns the data array for the + * view's component props + * + * @internal + * + * @return array + */ + public function props(): array + { + $user = $this->model; + $account = $user->isLoggedIn(); + $avatar = $user->avatar(); + + return array_merge( + parent::props(), + $account ? [] : $this->prevNext(), + [ + 'blueprint' => $this->model->role()->name(), + 'model' => [ + 'account' => $account, + 'avatar' => $avatar ? $avatar->url() : null, + 'content' => $this->content(), + 'email' => $user->email(), + 'id' => $user->id(), + 'language' => $this->translation()->name(), + 'link' => $this->url(true), + 'name' => $user->name()->toString(), + 'role' => $user->role()->title(), + 'username' => $user->username(), + ] + ] + ); + } + + /** + * Returns the Translation object + * for the selected Panel language + * + * @return \Kirby\Cms\Translation + */ + public function translation() + { + $kirby = $this->model->kirby(); + $lang = $this->model->language(); + return $kirby->translation($lang); + } + + /** + * Returns the data array for + * this model's Panel view + * + * @internal + * + * @return array + */ + public function view(): array + { + return [ + 'breadcrumb' => $this->breadcrumb(), + 'component' => 'k-user-view', + 'props' => $this->props(), + 'title' => $this->model->username(), + ]; + } +} diff --git a/kirby/src/Panel/View.php b/kirby/src/Panel/View.php new file mode 100644 index 0000000..bab7af6 --- /dev/null +++ b/kirby/src/Panel/View.php @@ -0,0 +1,463 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class View +{ + /** + * Filters the data array based on headers or + * query parameters. Requests can return only + * certain data fields that way or globals can + * be injected on demand. + * + * @param array $data + * @return array + */ + public static function apply(array $data): array + { + $request = kirby()->request(); + $only = $request->header('X-Fiber-Only') ?? get('_only'); + + if (empty($only) === false) { + return static::applyOnly($data, $only); + } + + $globals = $request->header('X-Fiber-Globals') ?? get('_globals'); + + if (empty($globals) === false) { + return static::applyGlobals($data, $globals); + } + + return A::apply($data); + } + + /** + * Checks if globals should be included in a JSON Fiber request. They are normally + * only loaded with the full document request, but sometimes need to be updated. + * + * A global request can be activated with the `X-Fiber-Globals` header or the + * `_globals` query parameter. + * + * @param array $data + * @param string|null $globals + * @return array + */ + public static function applyGlobals(array $data, ?string $globals = null): array + { + // split globals string into an array of fields + $globalKeys = Str::split($globals, ','); + + // add requested globals + if (empty($globalKeys) === true) { + return $data; + } + + $globals = static::globals(); + + foreach ($globalKeys as $globalKey) { + if (isset($globals[$globalKey]) === true) { + $data[$globalKey] = $globals[$globalKey]; + } + } + + // merge with shared data + return A::apply($data); + } + + /** + * Checks if the request should only return a limited + * set of data. This can be activated with the `X-Fiber-Only` + * header or the `_only` query parameter in a request. + * + * Such requests can fetch shared data or globals. + * Globals will be loaded on demand. + * + * @param array $data + * @param string|null $only + * @return array + */ + public static function applyOnly(array $data, ?string $only = null): array + { + // split include string into an array of fields + $onlyKeys = Str::split($only, ','); + + // if a full request is made, return all data + if (empty($onlyKeys) === true) { + return $data; + } + + // otherwise filter data based on + // dot notation, e.g. `$props.tab.columns` + $result = []; + + // check if globals are requested and need to be merged + if (Str::contains($only, '$')) { + $data = array_merge_recursive(static::globals(), $data); + } + + // make sure the data is already resolved to make + // nested data fetching work + $data = A::apply($data); + + // build a new array with all requested data + foreach ($onlyKeys as $onlyKey) { + $result[$onlyKey] = A::get($data, $onlyKey); + } + + // Nest dotted keys in array but ignore $translation + return A::nest($result, [ + '$translation' + ]); + } + + /** + * Creates the shared data array for the individual views + * The full shared data is always sent on every JSON and + * full document request unless the `X-Fiber-Only` header or + * the `_only` query parameter is set. + * + * @param array $view + * @param array $options + * @return array + */ + public static function data(array $view = [], array $options = []): array + { + $kirby = kirby(); + + // multilang setup check + $multilang = Panel::multilang(); + + // get the authenticated user + $user = $kirby->user(); + + // user permissions + $permissions = $user ? $user->role()->permissions()->toArray() : []; + + // current content language + $language = $kirby->language(); + + // shared data for all requests + return [ + '$direction' => function () use ($kirby, $multilang, $language, $user) { + if ($multilang === true && $language && $user) { + $isDefault = $language->direction() === $kirby->defaultLanguage()->direction(); + $isFromUser = $language->code() === $user->language(); + + if ($isDefault === false && $isFromUser === false) { + return $language->direction(); + } + } + }, + '$language' => function () use ($kirby, $multilang, $language) { + if ($multilang === true && $language) { + return [ + 'code' => $language->code(), + 'default' => $language->isDefault(), + 'direction' => $language->direction(), + 'name' => $language->name(), + 'rules' => $language->rules(), + ]; + } + }, + '$languages' => function () use ($kirby, $multilang): array { + if ($multilang === true) { + return $kirby->languages()->values(function ($language) { + return [ + 'code' => $language->code(), + 'default' => $language->isDefault(), + 'direction' => $language->direction(), + 'name' => $language->name(), + 'rules' => $language->rules(), + ]; + }); + } + + return []; + }, + '$menu' => function () use ($options, $permissions) { + return static::menu($options['areas'] ?? [], $permissions, $options['area']['id'] ?? null); + }, + '$permissions' => $permissions, + '$license' => (bool)$kirby->system()->license(), + '$multilang' => $multilang, + '$searches' => static::searches($options['areas'] ?? [], $permissions), + '$url' => Url::current(), + '$user' => function () use ($user) { + if ($user) { + return [ + 'email' => $user->email(), + 'id' => $user->id(), + 'language' => $user->language(), + 'role' => $user->role()->id(), + 'username' => $user->username(), + ]; + } + + return null; + }, + '$view' => function () use ($kirby, $options, $view) { + $defaults = [ + 'breadcrumb' => [], + 'code' => 200, + 'path' => Str::after($kirby->path(), '/'), + 'timestamp' => (int)(microtime(true) * 1000), + 'props' => [], + 'search' => $kirby->option('panel.search.type', 'pages') + ]; + + $view = array_replace_recursive($defaults, $options['area'] ?? [], $view); + + // make sure that views and dialogs are gone + unset( + $view['dialogs'], + $view['dropdowns'], + $view['searches'], + $view['views'] + ); + + // resolve all callbacks in the view array + return A::apply($view); + } + ]; + } + + /** + * Renders the error view with provided message + * + * @param string $message + * @param int $code + * @return array + */ + public static function error(string $message, int $code = 404) + { + return [ + 'code' => $code, + 'component' => 'k-error-view', + 'error' => $message, + 'props' => [ + 'error' => $message, + 'layout' => Panel::hasAccess(kirby()->user()) ? 'inside' : 'outside' + ], + 'title' => 'Error' + ]; + } + + /** + * Creates global data for the Panel. + * This will be injected in the full Panel + * view via the script tag. Global data + * is only requested once on the first page load. + * It can be loaded partially later if needed, + * but is otherwise not included in Fiber calls. + * + * @return array + */ + public static function globals(): array + { + $kirby = kirby(); + + return [ + '$config' => function () use ($kirby) { + return [ + 'debug' => $kirby->option('debug', false), + 'kirbytext' => $kirby->option('panel.kirbytext', true), + 'search' => [ + 'limit' => $kirby->option('panel.search.limit', 10), + 'type' => $kirby->option('panel.search.type', 'pages') + ], + 'translation' => $kirby->option('panel.language', 'en'), + ]; + }, + '$system' => function () use ($kirby) { + $locales = []; + + foreach ($kirby->translations() as $translation) { + $locales[$translation->code()] = $translation->locale(); + } + + return [ + 'ascii' => Str::$ascii, + 'csrf' => $kirby->auth()->csrfFromSession(), + 'isLocal' => $kirby->system()->isLocal(), + 'locales' => $locales, + 'slugs' => Str::$language, + 'title' => $kirby->site()->title()->or('Kirby Panel')->toString() + ]; + }, + '$translation' => function () use ($kirby) { + if ($user = $kirby->user()) { + $translation = $kirby->translation($user->language()); + } else { + $translation = $kirby->translation($kirby->panelLanguage()); + } + + return [ + 'code' => $translation->code(), + 'data' => $translation->dataWithFallback(), + 'direction' => $translation->direction(), + 'name' => $translation->name(), + ]; + }, + '$urls' => function () use ($kirby) { + return [ + 'api' => $kirby->url('api'), + 'site' => $kirby->url('index') + ]; + } + ]; + } + + /** + * Creates the menu for the topbar + * + * @param array $areas + * @param array $permissions + * @param string|null $current + * @return array + */ + public static function menu(?array $areas = [], ?array $permissions = [], ?string $current = null): array + { + $menu = []; + + // areas + foreach ($areas as $areaId => $area) { + $access = $permissions['access'][$areaId] ?? true; + + // areas without access permissions get skipped entirely + if ($access === false) { + continue; + } + + // fetch custom menu settings from the area definition + $menuSetting = $area['menu'] ?? false; + + // menu settings can be a callback that can return true, false or disabled + if (is_a($menuSetting, 'Closure') === true) { + $menuSetting = $menuSetting($areas, $permissions, $current); + } + + // false will remove the area entirely just like with + // disabled permissions + if ($menuSetting === false) { + continue; + } + + $menu[] = [ + 'current' => $areaId === $current, + 'disabled' => $menuSetting === 'disabled', + 'icon' => $area['icon'], + 'id' => $areaId, + 'link' => $area['link'], + 'text' => $area['label'], + ]; + } + + $menu[] = '-'; + $menu[] = [ + 'current' => $current === 'account', + 'icon' => 'account', + 'id' => 'account', + 'link' => 'account', + 'disabled' => ($permissions['access']['account'] ?? false) === false, + 'text' => t('view.account'), + ]; + $menu[] = '-'; + + // logout + $menu[] = [ + 'icon' => 'logout', + 'id' => 'logout', + 'link' => 'logout', + 'text' => t('logout') + ]; + return $menu; + } + + /** + * Renders the main panel view either as + * JSON response or full HTML document based + * on the request header or query params + * + * @param mixed $data + * @param array $options + * @return \Kirby\Http\Response + */ + public static function response($data, array $options = []) + { + $kirby = kirby(); + $area = $options['area'] ?? []; + $areas = $options['areas'] ?? []; + + // handle redirects + if (is_a($data, 'Kirby\Panel\Redirect') === true) { + return Response::redirect($data->location(), $data->code()); + + // handle Kirby exceptions + } elseif (is_a($data, 'Kirby\Exception\Exception') === true) { + $data = static::error($data->getMessage(), $data->getHttpCode()); + + // handle regular exceptions + } elseif (is_a($data, 'Throwable') === true) { + $data = static::error($data->getMessage(), 500); + + // only expect arrays from here on + } elseif (is_array($data) === false) { + $data = static::error('Invalid Panel response', 500); + } + + // get all data for the request + $fiber = static::data($data, $options); + + // if requested, send $fiber data as JSON + if (Panel::isFiberRequest() === true) { + + // filter data, if only or globals headers or + // query parameters are set + $fiber = static::apply($fiber); + + return Panel::json($fiber, $fiber['$view']['code'] ?? 200); + } + + // load globals for the full document response + $globals = static::globals(); + + // resolve and merge globals and shared data + $fiber = array_merge_recursive(A::apply($globals), A::apply($fiber)); + + // render the full HTML document + return Document::response($fiber); + } + + public static function searches(array $areas, array $permissions) + { + $searches = []; + + foreach ($areas as $area) { + foreach ($area['searches'] ?? [] as $id => $params) { + $searches[$id] = [ + 'icon' => $params['icon'] ?? 'search', + 'label' => $params['label'] ?? Str::ucfirst($id), + 'id' => $id + ]; + } + } + return $searches; + } +} diff --git a/kirby/src/Parsley/Element.php b/kirby/src/Parsley/Element.php index 5265b6f..cbf97cf 100644 --- a/kirby/src/Parsley/Element.php +++ b/kirby/src/Parsley/Element.php @@ -3,21 +3,53 @@ namespace Kirby\Parsley; use DOMElement; +use DOMNodeList; use DOMXPath; use Kirby\Toolkit\Str; +/** + * Represents a block level element + * in an HTML document + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Element { + /** + * @var array + */ protected $marks; + + /** + * @var \DOMElement + */ protected $node; + /** + * @param \DOMElement $node + * @param array $marks + */ public function __construct(DOMElement $node, array $marks = []) { $this->marks = $marks; $this->node = $node; } - public function attr(string $attr, $fallback = null) + /** + * The returns the attribute value or + * the given fallback if the attribute does not exist + * + * @param string $attr + * @param string|null $fallback + * @return string|null + */ + public function attr(string $attr, string $fallback = null): ?string { if ($this->node->hasAttribute($attr)) { return $this->node->getAttribute($attr) ?? $fallback; @@ -26,27 +58,54 @@ class Element return $fallback; } - public function children() + /** + * Returns a list of all child elements + * + * @return \DOMNodeList + */ + public function children(): DOMNodeList { return $this->node->childNodes; } + /** + * Returns an array with all class names + * + * @return array + */ public function classList(): array { return Str::split($this->className(), ' '); } - public function className() + /** + * Returns the value of the class attribute + * + * @return string|null + */ + public function className(): ?string { - return $this->node->getAttribute('class'); + return $this->attr('class'); } + /** + * Returns the original dom element + * + * @return \DOMElement + */ public function element() { return $this->node; } - public function filter(string $query) + /** + * Returns an array with all nested elements + * that could be found for the given query + * + * @param string $query + * @return array + */ + public function filter(string $query): array { $result = []; @@ -59,40 +118,80 @@ class Element return $result; } + /** + * Tries to find a single nested element by + * query and otherwise returns null + * + * @param string $query + * @return \Kirby\Parsley\Element|null + */ public function find(string $query) { if ($result = $this->query($query)[0]) { return new static($result); } - return false; + return null; } + /** + * Returns the inner HTML of the element + * + * @param array|null $marks List of allowed marks + * @return string + */ public function innerHtml(array $marks = null): string { return (new Inline($this->node, $marks ?? $this->marks))->innerHtml(); } - public function innerText() + /** + * Returns the contents as plain text + * + * @return string + */ + public function innerText(): string { return trim($this->node->textContent); } + /** + * Returns the full HTML for the element + * + * @param array|null $marks + * @return string + */ public function outerHtml(array $marks = null): string { return $this->node->ownerDocument->saveHtml($this->node); } - public function query($query) + /** + * Searches nested elements + * + * @param string $query + * @return DOMNodeList|null + */ + public function query(string $query) { return (new DOMXPath($this->node->ownerDocument))->query($query, $this->node); } + /** + * Removes the element from the DOM + * + * @return void + */ public function remove() { $this->node->parentNode->removeChild($this->node); } + /** + * Returns the name of the element + * + * @return string + */ public function tagName(): string { return $this->node->tagName; diff --git a/kirby/src/Parsley/Inline.php b/kirby/src/Parsley/Inline.php index 96784d4..ebac6a8 100644 --- a/kirby/src/Parsley/Inline.php +++ b/kirby/src/Parsley/Inline.php @@ -2,70 +2,173 @@ namespace Kirby\Parsley; +use DOMNode; +use DOMNodeList; +use Kirby\Toolkit\Html; + +/** + * Represents an inline element + * in an HTML document + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Inline { + /** + * @var string + */ protected $html = ''; + + /** + * @var array + */ protected $marks = []; - public function __construct($node, array $marks = []) + /** + * @param \DOMNode $node + * @param array $marks + */ + public function __construct(DOMNode $node, array $marks = []) { $this->createMarkRules($marks); - $this->html = trim($this->parseNode($node)); + $this->html = trim(static::parseNode($node, $this->marks)); } - public function createMarkRules($marks) + /** + * Loads all mark rules + * + * @param array $marks + * @return array + */ + protected function createMarkRules(array $marks) { foreach ($marks as $mark) { $this->marks[$mark['tag']] = $mark; } + + return $this->marks; } - public function parseChildren($children): string + /** + * Get all allowed attributes for a DOMNode + * as clean array + * + * @param DOMNode $node + * @param array $marks + * @return array + */ + public static function parseAttrs(DOMNode $node, array $marks = []): array { - if (!$children) { - return ''; + $attrs = []; + $mark = $marks[$node->tagName]; + $defaults = $mark['defaults'] ?? []; + + foreach ($mark['attrs'] ?? [] as $attr) { + if ($node->hasAttribute($attr)) { + $attrs[$attr] = $node->getAttribute($attr); + } else { + $attrs[$attr] = $defaults[$attr] ?? null; + } } + return $attrs; + } + + /** + * Parses all children and creates clean HTML + * for each of them. + * + * @param \DOMNodeList $children + * @param array $marks + * @return string + */ + public static function parseChildren(DOMNodeList $children, array $marks): string + { $html = ''; foreach ($children as $child) { - $html .= $this->parseNode($child); + $html .= static::parseNode($child, $marks); } return $html; } - public function parseNode($node) + /** + * Go through all child elements and create + * clean inner HTML for them + * + * @param DOMNode $node + * @return string|null + */ + public static function parseInnerHtml(DOMNode $node, array $marks = []): ?string + { + $html = static::parseChildren($node->childNodes, $marks); + + // trim the inner HTML for paragraphs + if ($node->tagName === 'p') { + $html = trim($html); + } + + // return null for empty inner HTML + if ($html === '') { + return null; + } + + return $html; + } + + /** + * Converts the given node to clean HTML + * + * @param \DOMNode $node + * @param array $marks + * @return string|null + */ + public static function parseNode(DOMNode $node, array $marks = []): ?string { if (is_a($node, 'DOMText') === true) { - return $node->textContent; + return Html::encode($node->textContent); } // ignore comments if (is_a($node, 'DOMComment') === true) { - return ''; - } - - // known marks - if (array_key_exists($node->tagName, $this->marks) === true) { - $mark = $this->marks[$node->tagName]; - $attrs = []; - $defaults = $mark['defaults'] ?? []; - - foreach ($mark['attrs'] ?? [] as $attr) { - if ($node->hasAttribute($attr)) { - $attrs[$attr] = $node->getAttribute($attr); - } else { - $attrs[$attr] = $defaults[$attr] ?? null; - } - } - - return '<' . $node->tagName . attr($attrs, ' ') . '>' . $this->parseChildren($node->childNodes) . 'tagName . '>'; + return null; } // unknown marks - return $this->parseChildren($node->childNodes); + if (array_key_exists($node->tagName, $marks) === false) { + return static::parseChildren($node->childNodes, $marks); + } + + // collect all allowed attributes + $attrs = static::parseAttrs($node, $marks); + + // close self-closing elements + if (Html::isVoid($node->tagName) === true) { + return '<' . $node->tagName . attr($attrs, ' ') . ' />'; + } + + $innerHtml = static::parseInnerHtml($node, $marks); + + // skip empty paragraphs + if ($innerHtml === null && $node->tagName === 'p') { + return null; + } + + // create the outer html for the element + return '<' . $node->tagName . attr($attrs, ' ') . '>' . $innerHtml . 'tagName . '>'; } - public function innerHtml() + /** + * Returns the HTML contents of the element + * + * @return string + */ + public function innerHtml(): string { return $this->html; } diff --git a/kirby/src/Parsley/Parsley.php b/kirby/src/Parsley/Parsley.php index 9af2580..6faa9a3 100644 --- a/kirby/src/Parsley/Parsley.php +++ b/kirby/src/Parsley/Parsley.php @@ -2,23 +2,73 @@ namespace Kirby\Parsley; -use DOMDocument; -use DOMXPath; +use DOMNode; use Kirby\Parsley\Schema\Plain; +use Kirby\Toolkit\Dom; +/** + * HTML parser to extract the best possible blocks + * from any kind of HTML document + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Parsley { + /** + * @var array + */ protected $blocks = []; - protected $body; + + /** + * @var \DOMDocument + */ protected $doc; - protected $inline; + + /** + * @var \Kirby\Toolkit\Dom + */ + protected $dom; + + /** + * @var array + */ + protected $inline = []; + + /** + * @var array + */ protected $marks = []; + + /** + * @var array + */ protected $nodes = []; + + /** + * @var \Kirby\Parsley\Schema + */ protected $schema; + + /** + * @var array + */ protected $skip = []; + /** + * @var bool + */ public static $useXmlExtension = true; + /** + * @param string $html + * @param \Kirby\Parsley\Schema|null $schema + */ public function __construct(string $html, Schema $schema = null) { // fail gracefully if the XML extension is not installed @@ -33,45 +83,66 @@ class Parsley return; } - libxml_use_internal_errors(true); - - $this->doc = new DOMDocument(); - $this->doc->preserveWhiteSpace = false; - $this->doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); - - libxml_clear_errors(); + if (!preg_match('//', $html)) { + $html = '
' . $html . '
'; + } + $this->dom = new Dom($html); + $this->doc = $this->dom->document(); $this->schema = $schema ?? new Plain(); $this->skip = $this->schema->skip(); $this->marks = $this->schema->marks(); $this->inline = []; + // load all allowed nodes from the schema $this->createNodeRules($this->schema->nodes()); - $this->parseNode($this->body()); + // start parsing at the top level and go through + // all children of the document + foreach ($this->doc->childNodes as $childNode) { + $this->parseNode($childNode); + } + + // needs to be called at last to fetch remaining + // inline elements after parsing has ended $this->endInlineBlock(); } + /** + * Returns all detected blocks + * + * @return array + */ public function blocks(): array { return $this->blocks; } - public function body() - { - return $this->body = $this->body ?? $this->query($this->doc, '/html/body')[0]; - } - - public function createNodeRules($nodes) + /** + * Load all node rules from the schema + * + * @param array $nodes + * @return array + */ + public function createNodeRules(array $nodes): array { foreach ($nodes as $node) { $this->nodes[$node['tag']] = $node; } + + return $this->nodes; } - public function containsBlock($element): bool + /** + * Checks if the given element contains + * any other block level elements + * + * @param \DOMNode $element + * @return bool + */ + public function containsBlock(DOMNode $element): bool { - if (!$element->childNodes) { + if ($element->hasChildNodes() === false) { return false; } @@ -84,8 +155,22 @@ class Parsley return false; } + /** + * Takes all inline elements in the inline cache + * and combines them in a final block. The block + * will either be merged with the previous block + * if the type matches, or will be appended. + * + * The inline cache will be reset afterwards + * + * @return void + */ public function endInlineBlock() { + if (empty($this->inline) === true) { + return; + } + $html = []; foreach ($this->inline as $inline) { @@ -102,26 +187,30 @@ class Parsley $this->inline = []; } - public function fallback($node) + /** + * Creates a fallback block type for the given + * element. The element can either be a element object + * or a simple HTML/plain text string + * + * @param \Kirby\Parsley\Element|string $element + * @return array|null + */ + public function fallback($element): ?array { - if (is_a($node, 'DOMText') === true) { - $html = $node->textContent; - } elseif (is_a($node, Element::class) === true) { - $html = $node->innerHtml(); - } elseif (is_string($node) === true) { - $html = $node; - } else { - $html = ''; - } - - if ($fallback = $this->schema->fallback($html)) { + if ($fallback = $this->schema->fallback($element)) { return $fallback; } - return false; + return null; } - public function isBlock($element): bool + /** + * Checks if the given DOMNode is a block element + * + * @param DOMNode $element + * @return bool + */ + public function isBlock(DOMNode $element): bool { if (is_a($element, 'DOMElement') === false) { return false; @@ -130,13 +219,24 @@ class Parsley return array_key_exists($element->tagName, $this->nodes) === true; } - public function isInline($element) + /** + * Checks if the given DOMNode is an inline element + * + * @param \DOMNode $element + * @return bool + */ + public function isInline(DOMNode $element): bool { if (is_a($element, 'DOMText') === true) { return true; } if (is_a($element, 'DOMElement') === true) { + // all spans will be treated as inline elements + if ($element->tagName === 'span') { + return true; + } + if ($this->containsBlock($element) === true) { return false; } @@ -152,14 +252,18 @@ class Parsley return false; } - public function mergeOrAppend($block) + /** + * @param array $block + * @return void + */ + public function mergeOrAppend(array $block) { $lastIndex = count($this->blocks) - 1; $lastItem = $this->blocks[$lastIndex] ?? null; // merge with previous block if ($block['type'] === 'text' && $lastItem && $lastItem['type'] === 'text') { - $this->blocks[$lastIndex]['content']['text'] .= "\n\n" . $block['content']['text']; + $this->blocks[$lastIndex]['content']['text'] .= ' ' . $block['content']['text']; // append } else { @@ -167,13 +271,21 @@ class Parsley } } - public function parseNode($element) + /** + * Parses the given DOM node and tries to + * convert it to a block or a list of blocks + * + * @param \DOMNode $element + * @return void + */ + public function parseNode(DOMNode $element): bool { - // comments - if (is_a($element, 'DOMComment') === true) { - return true; - } + $skip = ['DOMComment', 'DOMDocumentType']; + // unwanted element types + if (in_array(get_class($element), $skip) === true) { + return false; + } // inline context if ($this->isInline($element)) { @@ -193,13 +305,22 @@ class Parsley return true; } - // has only unkown children (div, etc.) + // has only unknown children (div, etc.) if ($this->containsBlock($element) === false) { if (in_array($element->tagName, $this->skip) === true) { - return true; + return false; } - if ($element->tagName !== 'body') { + $wrappers = [ + 'body', + 'head', + 'html', + ]; + + // wrapper elements should never be converted + // to a simple fallback block. Their children + // have to be parsed individually. + if (in_array($element->tagName, $wrappers) === false) { $node = new Element($element, $this->marks); if ($block = $this->fallback($node)) { @@ -214,19 +335,19 @@ class Parsley foreach ($element->childNodes as $childNode) { $this->parseNode($childNode); } + + return true; } - public function query($element, $query) - { - return (new DOMXPath($element))->query($query); - } - + /** + * @return bool + */ public function useXmlExtension(): bool { if (static::$useXmlExtension !== true) { return false; } - return class_exists('DOMDocument') === true; + return Dom::isSupported(); } } diff --git a/kirby/src/Parsley/Schema.php b/kirby/src/Parsley/Schema.php index d6ff231..2cb72c0 100644 --- a/kirby/src/Parsley/Schema.php +++ b/kirby/src/Parsley/Schema.php @@ -2,10 +2,61 @@ namespace Kirby\Parsley; -abstract class Schema +/** + * Block schema definition + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ +class Schema { - abstract public function fallback(string $html); - abstract public function marks(): array; - abstract public function nodes(): array; - abstract public function skip(): array; + /** + * Returns the fallback block when no + * other block type can be detected + * + * @param \Kirby\Parsley\Element|string $element + * @return array|null + */ + public function fallback($element): ?array + { + return null; + } + + /** + * Returns a list of allowed inline marks + * and their parsing rules + * + * @return array + */ + public function marks(): array + { + return []; + } + + /** + * Returns a list of allowed nodes and + * their parsing rules + * + * @return array + */ + public function nodes(): array + { + return []; + } + + /** + * Returns a list of all elements that should be + * skipped and not be parsed at all + * + * @return array + */ + public function skip(): array + { + return []; + } } diff --git a/kirby/src/Parsley/Schema/Blocks.php b/kirby/src/Parsley/Schema/Blocks.php index 8ca03e0..e6dc6a5 100644 --- a/kirby/src/Parsley/Schema/Blocks.php +++ b/kirby/src/Parsley/Schema/Blocks.php @@ -5,28 +5,103 @@ namespace Kirby\Parsley\Schema; use Kirby\Parsley\Element; use Kirby\Toolkit\Str; +/** + * The plain schema definition converts + * the entire document into simple text blocks + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Blocks extends Plain { - public function fallback(string $html) + /** + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function blockquote(Element $node): array { - $html = trim($html); + $citation = null; + $text = []; - if (Str::length($html) === 0) { - return false; + // get all the text for the quote + foreach ($node->children() as $child) { + if (is_a($child, 'DOMText') === true) { + $text[] = trim($child->textContent); + } + if (is_a($child, 'DOMElement') === true && $child->tagName !== 'footer') { + $text[] = (new Element($child))->innerHTML($this->marks()); + } + } + + // filter empty blocks and separate text blocks with breaks + $text = implode('', array_filter($text)); + + // get the citation from the footer + if ($footer = $node->find('footer')) { + $citation = $footer->innerHTML($this->marks()); } return [ 'content' => [ - 'text' => '

' . $html . '

', + 'citation' => $citation, + 'text' => $text + ], + 'type' => 'quote', + ]; + } + + /** + * Creates the fallback block type + * if no other block can be found + * + * @param \Kirby\Parsley\Element|string $element + * @return array|null + */ + public function fallback($element): ?array + { + if (is_a($element, Element::class) === true) { + $html = $element->innerHtml(); + + // wrap the inner HTML in a p tag if it doesn't + // contain one yet. + if (Str::contains($html, '

') === false) { + $html = '

' . $html . '

'; + } + } elseif (is_string($element) === true) { + $html = trim($element); + + if (Str::length($html) === 0) { + return null; + } + + $html = '

' . $html . '

'; + } else { + return null; + } + + return [ + 'content' => [ + 'text' => $html, ], 'type' => 'text', ]; } - public function heading($node, $level) + /** + * Converts a heading element to a heading block + * + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function heading(Element $node): array { $content = [ - 'level' => $level, + 'level' => strtolower($node->tagName()), 'text' => $node->innerHTML() ]; @@ -42,7 +117,91 @@ class Blocks extends Plain ]; } - public function list($node) + /** + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function iframe(Element $node): array + { + $caption = null; + $src = $node->attr('src'); + + if ($figcaption = $node->find('ancestor::figure[1]//figcaption')) { + $caption = $figcaption->innerHTML($this->marks()); + + // avoid parsing the caption twice + $figcaption->remove(); + } + + // reverse engineer video URLs + if (preg_match('!player.vimeo.com\/video\/([0-9]+)!i', $src, $array) === 1) { + $src = 'https://vimeo.com/' . $array[1]; + } elseif (preg_match('!youtube.com\/embed\/([a-zA-Z0-9_-]+)!', $src, $array) === 1) { + $src = 'https://youtube.com/watch?v=' . $array[1]; + } elseif (preg_match('!youtube-nocookie.com\/embed\/([a-zA-Z0-9_-]+)!', $src, $array) === 1) { + $src = 'https://youtube.com/watch?v=' . $array[1]; + } else { + $src = false; + } + + // correct video URL + if ($src) { + return [ + 'content' => [ + 'caption' => $caption, + 'url' => $src + ], + 'type' => 'video', + ]; + } + + return [ + 'content' => [ + 'text' => $node->outerHTML() + ], + 'type' => 'markdown', + ]; + } + + /** + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function img(Element $node): array + { + $caption = null; + $link = null; + + if ($figcaption = $node->find('ancestor::figure[1]//figcaption')) { + $caption = $figcaption->innerHTML($this->marks()); + + // avoid parsing the caption twice + $figcaption->remove(); + } + + if ($a = $node->find('ancestor::a')) { + $link = $a->attr('href'); + } + + return [ + 'content' => [ + 'alt' => $node->attr('alt'), + 'caption' => $caption, + 'link' => $link, + 'location' => 'web', + 'src' => $node->attr('src'), + ], + 'type' => 'image', + ]; + } + + /** + * Converts a list element to HTML + * + * @param \Kirby\Parsley\Element $node + * @return string + */ + public function list(Element $node): string { $html = []; @@ -69,12 +228,21 @@ class Blocks extends Plain return '<' . $node->tagName() . '>' . implode($html) . 'tagName() . '>'; } + /** + * Returns a list of allowed inline marks + * and their parsing rules + * + * @return array + */ public function marks(): array { return [ [ 'tag' => 'a', - 'attrs' => ['href', 'target', 'title'], + 'attrs' => ['href', 'rel', 'target', 'title'], + 'defaults' => [ + 'rel' => 'noopener noreferrer' + ] ], [ 'tag' => 'abbr', @@ -82,6 +250,9 @@ class Blocks extends Plain [ 'tag' => 'b' ], + [ + 'tag' => 'br', + ], [ 'tag' => 'code' ], @@ -94,6 +265,9 @@ class Blocks extends Plain [ 'tag' => 'i', ], + [ + 'tag' => 'p', + ], [ 'tag' => 'strike', ], @@ -112,153 +286,81 @@ class Blocks extends Plain ]; } + /** + * Returns a list of allowed nodes and + * their parsing rules + * + * @codeCoverageIgnore + * @return array + */ public function nodes(): array { return [ [ 'tag' => 'blockquote', - 'parse' => function ($node) { - $citation = null; - $text = []; - - // get all the text for the quote - foreach ($node->element()->childNodes as $child) { - if (is_a($child, 'DOMText') === true) { - $text[] = trim($child->textContent); - } - if (is_a($child, 'DOMElement') === true && $child->tagName !== 'footer') { - $text[] = (new Element($child))->innerHTML($this->marks()); - } - } - - // filter empty blocks and separate text blocks with breaks - $text = implode('

', array_filter($text)); - - // get the citation from the footer - if ($footer = $node->find('footer')) { - $citation = $footer->innerHTML($this->marks()); - } - - return [ - 'content' => [ - 'citation' => $citation, - 'text' => $text - ], - 'type' => 'quote', - ]; + 'parse' => function (Element $node) { + return $this->blockquote($node); } ], [ 'tag' => 'h1', - 'parse' => function ($node) { - return $this->heading($node, 'h1'); + 'parse' => function (Element $node) { + return $this->heading($node); } ], [ 'tag' => 'h2', - 'parse' => function ($node) { - return $this->heading($node, 'h2'); + 'parse' => function (Element $node) { + return $this->heading($node); } ], [ 'tag' => 'h3', - 'parse' => function ($node) { - return $this->heading($node, 'h3'); + 'parse' => function (Element $node) { + return $this->heading($node); } ], [ 'tag' => 'h4', - 'parse' => function ($node) { - return $this->heading($node, 'h4'); + 'parse' => function (Element $node) { + return $this->heading($node); } ], [ 'tag' => 'h5', - 'parse' => function ($node) { - return $this->heading($node, 'h5'); + 'parse' => function (Element $node) { + return $this->heading($node); } ], [ 'tag' => 'h6', - 'parse' => function ($node) { - return $this->heading($node, 'h6'); + 'parse' => function (Element $node) { + return $this->heading($node); + } + ], + [ + 'tag' => 'hr', + 'parse' => function (Element $node) { + return [ + 'type' => 'line' + ]; } ], [ 'tag' => 'iframe', - 'parse' => function ($node) { - $caption = null; - $src = $node->attr('src'); - - if ($figcaption = $node->find('ancestor::figure[1]//figcaption')) { - $caption = $figcaption->innerHTML($this->marks()); - - // avoid parsing the caption twice - $figcaption->remove(); - } - - // reverse engineer video URLs - if (preg_match('!player.vimeo.com\/video\/([0-9]+)!i', $src, $array) === 1) { - $src = 'https://vimeo.com/' . $array[1]; - } elseif (preg_match('!youtube.com\/embed\/([a-zA-Z0-9_-]+)!', $src, $array) === 1) { - $src = 'https://youtube.com/watch?v=' . $array[1]; - } elseif (preg_match('!youtube-nocookie.com\/embed\/([a-zA-Z0-9_-]+)!', $src, $array) === 1) { - $src = 'https://youtube.com/watch?v=' . $array[1]; - } else { - $src = false; - } - - // correct video URL - if ($src) { - return [ - 'content' => [ - 'caption' => $caption, - 'url' => $src - ], - 'type' => 'video', - ]; - } - - return [ - 'content' => [ - 'text' => $node->outerHTML() - ], - 'type' => 'markdown', - ]; + 'parse' => function (Element $node) { + return $this->iframe($node); } ], [ 'tag' => 'img', - 'parse' => function ($node) { - $caption = null; - $link = null; - - if ($figcaption = $node->find('ancestor::figure[1]//figcaption')) { - $caption = $figcaption->innerHTML($this->marks()); - - // avoid parsing the caption twice - $figcaption->remove(); - } - - if ($a = $node->find('ancestor::a')) { - $link = $a->attr('href'); - } - - return [ - 'content' => [ - 'alt' => $node->attr('alt'), - 'caption' => $caption, - 'link' => $link, - 'location' => 'web', - 'src' => $node->attr('src'), - ], - 'type' => 'image', - ]; + 'parse' => function (Element $node) { + return $this->img($node); } ], [ 'tag' => 'ol', - 'parse' => function ($node) { + 'parse' => function (Element $node) { return [ 'content' => [ 'text' => $this->list($node) @@ -269,41 +371,19 @@ class Blocks extends Plain ], [ 'tag' => 'pre', - 'parse' => function ($node) { - $language = 'text'; - - if ($code = $node->find('//code')) { - foreach ($code->classList() as $className) { - if (preg_match('!language-(.*?)!', $className)) { - $language = str_replace('language-', '', $className); - break; - } - } - } - - return [ - 'content' => [ - 'code' => $node->innerText(), - 'language' => $language - ], - 'type' => 'code', - ]; + 'parse' => function (Element $node) { + return $this->pre($node); } ], [ 'tag' => 'table', - 'parse' => function ($node) { - return [ - 'content' => [ - 'text' => $node->outerHTML(), - ], - 'type' => 'markdown', - ]; + 'parse' => function (Element $node) { + return $this->table($node); } ], [ 'tag' => 'ul', - 'parse' => function ($node) { + 'parse' => function (Element $node) { return [ 'content' => [ 'text' => $this->list($node) @@ -314,4 +394,44 @@ class Blocks extends Plain ], ]; } + + /** + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function pre(Element $node): array + { + $language = 'text'; + + if ($code = $node->find('//code')) { + foreach ($code->classList() as $className) { + if (preg_match('!language-(.*?)!', $className)) { + $language = str_replace('language-', '', $className); + break; + } + } + } + + return [ + 'content' => [ + 'code' => $node->innerText(), + 'language' => $language + ], + 'type' => 'code', + ]; + } + + /** + * @param \Kirby\Parsley\Element $node + * @return array + */ + public function table(Element $node): array + { + return [ + 'content' => [ + 'text' => $node->outerHTML(), + ], + 'type' => 'markdown', + ]; + } } diff --git a/kirby/src/Parsley/Schema/Plain.php b/kirby/src/Parsley/Schema/Plain.php index c2408e4..99c67aa 100644 --- a/kirby/src/Parsley/Schema/Plain.php +++ b/kirby/src/Parsley/Schema/Plain.php @@ -2,39 +2,68 @@ namespace Kirby\Parsley\Schema; +use Kirby\Parsley\Element; use Kirby\Parsley\Schema; use Kirby\Toolkit\Str; +/** + * The plain schema definition converts + * the entire document into simple text blocks + * + * @since 3.5.0 + * + * @package Kirby Parsley + * @author Bastian Allgeier , + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://getkirby.com/license + */ class Plain extends Schema { - public function fallback(string $html) + /** + * Creates the fallback block type + * if no other block can be found + * + * @param \Kirby\Parsley\Element|string $element + * @return array|null + */ + public function fallback($element): ?array { - $text = trim($html); + if (is_a($element, Element::class) === true) { + $text = $element->innerText(); + } elseif (is_string($element) === true) { + $text = trim($element); - if (Str::length($text) === 0) { - return false; + if (Str::length($text) === 0) { + return null; + } + } else { + return null; } return [ - 'type' => 'text', 'content' => [ 'text' => $text - ] + ], + 'type' => 'text', ]; } - public function marks(): array - { - return []; - } - - public function nodes(): array - { - return []; - } - + /** + * Returns a list of all elements that + * should be skipped during parsing + * + * @return array + */ public function skip(): array { - return ['meta', 'script', 'style']; + return [ + 'base', + 'link', + 'meta', + 'script', + 'style', + 'title' + ]; } } diff --git a/kirby/src/Sane/DomHandler.php b/kirby/src/Sane/DomHandler.php new file mode 100644 index 0000000..5d9cee7 --- /dev/null +++ b/kirby/src/Sane/DomHandler.php @@ -0,0 +1,165 @@ + + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ +class DomHandler extends Handler +{ + /** + * List of all MIME types that may + * be used in data URIs + * + * @var array + */ + public static $allowedDataUris = [ + 'data:image/png', + 'data:image/gif', + 'data:image/jpg', + 'data:image/jpe', + 'data:image/pjp', + 'data:img/png', + 'data:img/gif', + 'data:img/jpg', + 'data:img/jpe', + 'data:img/pjp', + ]; + + /** + * Allowed hostnames for HTTP(S) URLs + * + * @var array + */ + public static $allowedDomains = []; + + /** + * Names of allowed XML processing instructions + * + * @var array + */ + public static $allowedPIs = []; + + /** + * The document type (`'HTML'` or `'XML'`) + * (to be set in child classes) + * + * @var string + */ + protected static $type = 'XML'; + + /** + * Sanitizes the given string + * + * @param string $string + * @return string + * + * @throws \Kirby\Exception\InvalidArgumentException If the file couldn't be parsed + */ + public static function sanitize(string $string): string + { + $dom = static::parse($string); + $dom->sanitize(static::options()); + return $dom->toString(); + } + + /** + * Validates file contents + * + * @param string $string + * @return void + * + * @throws \Kirby\Exception\InvalidArgumentException If the file couldn't be parsed + * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + */ + public static function validate(string $string): void + { + $dom = static::parse($string); + $errors = $dom->sanitize(static::options()); + if (count($errors) > 0) { + // there may be multiple errors, we can only throw one of them at a time + throw $errors[0]; + } + } + + /** + * Custom callback for additional attribute sanitization + * @internal + * + * @param \DOMAttr $attr + * @return array Array with exception objects for each modification + */ + public static function sanitizeAttr(DOMAttr $attr): array + { + // to be extended in child classes + return []; + } + + /** + * Custom callback for additional element sanitization + * @internal + * + * @param \DOMElement $element + * @return array Array with exception objects for each modification + */ + public static function sanitizeElement(DOMElement $element): array + { + // to be extended in child classes + return []; + } + + /** + * Custom callback for additional doctype validation + * @internal + * + * @param \DOMDocumentType $doctype + * @return void + */ + public static function validateDoctype(DOMDocumentType $doctype): void + { + // to be extended in child classes + } + + /** + * Returns the sanitization options for the handler + * (to be extended in child classes) + * + * @return array + */ + protected static function options(): array + { + return [ + 'allowedDataUris' => static::$allowedDataUris, + 'allowedDomains' => static::$allowedDomains, + 'allowedPIs' => static::$allowedPIs, + 'attrCallback' => [static::class, 'sanitizeAttr'], + 'doctypeCallback' => [static::class, 'validateDoctype'], + 'elementCallback' => [static::class, 'sanitizeElement'], + ]; + } + + /** + * Parses the given string into a `Toolkit\Dom` object + * + * @param string $string + * @return \Kirby\Toolkit\Dom + * + * @throws \Kirby\Exception\InvalidArgumentException If the file couldn't be parsed + */ + protected static function parse(string $string) + { + return new Dom($string, static::$type); + } +} diff --git a/kirby/src/Sane/Handler.php b/kirby/src/Sane/Handler.php index df06400..aa1d881 100644 --- a/kirby/src/Sane/Handler.php +++ b/kirby/src/Sane/Handler.php @@ -3,7 +3,7 @@ namespace Kirby\Sane; use Kirby\Exception\Exception; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * Base handler abstract, @@ -19,6 +19,30 @@ use Kirby\Toolkit\F; */ abstract class Handler { + /** + * Sanitizes the given string + * + * @param string $string + * @return string + */ + abstract public static function sanitize(string $string): string; + + /** + * Sanitizes the contents of a file by overwriting + * the file with the sanitized version + * + * @param string $file + * @return void + * + * @throws \Kirby\Exception\Exception If the file does not exist + * @throws \Kirby\Exception\Exception On other errors + */ + public static function sanitizeFile(string $file): void + { + $sanitized = static::sanitize(static::readFile($file)); + F::write($file, $sanitized); + } + /** * Validates file contents * @@ -37,15 +61,31 @@ abstract class Handler * @return void * * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + * @throws \Kirby\Exception\Exception If the file does not exist * @throws \Kirby\Exception\Exception On other errors */ public static function validateFile(string $file): void + { + static::validate(static::readFile($file)); + } + + /** + * Reads the contents of a file + * for sanitization or validation + * + * @param string $file + * @return string + * + * @throws \Kirby\Exception\Exception If the file does not exist + */ + protected static function readFile(string $file): string { $contents = F::read($file); + if ($contents === false) { throw new Exception('The file "' . $file . '" does not exist'); } - static::validate($contents); + return $contents; } } diff --git a/kirby/src/Sane/Html.php b/kirby/src/Sane/Html.php new file mode 100644 index 0000000..01468d6 --- /dev/null +++ b/kirby/src/Sane/Html.php @@ -0,0 +1,144 @@ +, + * Lukas Bestle + * @link https://getkirby.com + * @copyright Bastian Allgeier GmbH + * @license https://opensource.org/licenses/MIT + */ +class Html extends DomHandler +{ + /** + * Global list of allowed attribute prefixes + * + * @var array + */ + public static $allowedAttrPrefixes = [ + 'aria-', + 'data-', + ]; + + /** + * Global list of allowed attributes + * + * @var array + */ + public static $allowedAttrs = [ + 'class', + 'id', + ]; + + /** + * Allowed hostnames for HTTP(S) URLs + * + * @var array + */ + public static $allowedDomains = true; + + /** + * Associative array of all allowed tag names with the value + * of either an array with the list of all allowed attributes + * for this tag, `true` to allow any attribute from the + * `allowedAttrs` list or `false` to allow the tag without + * any attributes + * + * @var array + */ + public static $allowedTags = [ + 'a' => ['href', 'rel', 'title', 'target'], + 'abbr' => ['title'], + 'b' => true, + 'body' => true, + 'blockquote' => true, + 'br' => true, + 'code' => true, + 'dl' => true, + 'dd' => true, + 'del' => true, + 'div' => true, + 'dt' => true, + 'em' => true, + 'footer' => true, + 'h1' => true, + 'h2' => true, + 'h3' => true, + 'h4' => true, + 'h5' => true, + 'h6' => true, + 'hr' => true, + 'html' => true, + 'i' => true, + 'ins' => true, + 'li' => true, + 'small' => true, + 'span' => true, + 'strong' => true, + 'sub' => true, + 'sup' => true, + 'ol' => true, + 'p' => true, + 'pre' => true, + 's' => true, + 'u' => true, + 'ul' => true, + ]; + + /** + * Array of explicitly disallowed tags + * + * IMPORTANT: Use lower-case names here because + * of the case-insensitive matching + * + * @var array + */ + public static $disallowedTags = [ + 'iframe', + 'meta', + 'object', + 'script', + 'style', + ]; + + /** + * List of attributes that may contain URLs + * + * @var array + */ + public static $urlAttrs = [ + 'href', + 'src', + 'xlink:href', + ]; + + /** + * The document type (`'HTML'` or `'XML'`) + * + * @var string + */ + protected static $type = 'HTML'; + + /** + * Returns the sanitization options for the handler + * + * @return array + */ + protected static function options(): array + { + return array_merge(parent::options(), [ + 'allowedAttrPrefixes' => static::$allowedAttrPrefixes, + 'allowedAttrs' => static::$allowedAttrs, + 'allowedNamespaces' => [], + 'allowedPIs' => [], + 'allowedTags' => static::$allowedTags, + 'disallowedTags' => static::$disallowedTags, + 'urlAttrs' => static::$urlAttrs, + ]); + } +} diff --git a/kirby/src/Sane/Sane.php b/kirby/src/Sane/Sane.php index a4d2116..df11b0b 100644 --- a/kirby/src/Sane/Sane.php +++ b/kirby/src/Sane/Sane.php @@ -2,8 +2,9 @@ namespace Kirby\Sane; +use Kirby\Exception\LogicException; use Kirby\Exception\NotFoundException; -use Kirby\Toolkit\F; +use Kirby\Filesystem\F; /** * The `Sane` class validates that files @@ -26,8 +27,10 @@ class Sane * @var array */ public static $aliases = [ - 'image/svg+xml' => 'svg', 'application/xml' => 'xml', + 'image/svg' => 'svg', + 'image/svg+xml' => 'svg', + 'text/html' => 'html', 'text/xml' => 'xml', ]; @@ -37,6 +40,7 @@ class Sane * @var array */ public static $handlers = [ + 'html' => 'Kirby\Sane\Html', 'svg' => 'Kirby\Sane\Svg', 'svgz' => 'Kirby\Sane\Svgz', 'xml' => 'Kirby\Sane\Xml', @@ -72,10 +76,68 @@ class Sane throw new NotFoundException('Missing handler for type: "' . $type . '"'); } + /** + * Sanitizes the given string with the specified handler + * @since 3.6.0 + * + * @param string $string + * @param string $type + * @return string + */ + public static function sanitize(string $string, string $type): string + { + return static::handler($type)->sanitize($string); + } + + /** + * Sanitizes the contents of a file by overwriting + * the file with the sanitized version; + * the sane handlers are automatically chosen by + * the extension and MIME type if not specified + * @since 3.6.0 + * + * @param string $file + * @param string|bool $typeLazy Explicit handler type string, + * `true` for lazy autodetection or + * `false` for normal autodetection + * @return void + * + * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + * @throws \Kirby\Exception\LogicException If more than one handler applies + * @throws \Kirby\Exception\NotFoundException If the handler was not found + * @throws \Kirby\Exception\Exception On other errors + */ + public static function sanitizeFile(string $file, $typeLazy = false): void + { + if (is_string($typeLazy) === true) { + static::handler($typeLazy)->sanitizeFile($file); + return; + } + + // try to find exactly one matching handler + $handlers = static::handlersForFile($file, $typeLazy === true); + switch (count($handlers)) { + case 0: + // lazy autodetection didn't find a handler + break; + case 1: + $handlers[0]->sanitizeFile($file); + break; + default: + // more than one matching handler; + // sanitizing with all handlers will not leave much in the output + $handlerNames = array_map('get_class', $handlers); + throw new LogicException( + 'Cannot sanitize file as more than one handler applies: ' . + implode(', ', $handlerNames) + ); + } + } + /** * Validates file contents with the specified handler * - * @param mixed $string + * @param string $string * @param string $type * @return void * @@ -110,20 +172,38 @@ class Sane return; } - $options = [F::extension($file), F::mime($file)]; - - // execute all handlers, but each class only once for performance; - // filter out all empty options - $usedHandlers = []; - foreach (array_filter($options) as $option) { - $handler = static::handler($option, $typeLazy === true); - $handlerClass = $handler ? get_class($handler) : null; - - if ($handler && in_array($handlerClass, $usedHandlers) === false) { - $handler->validateFile($file); - - $usedHandlers[] = $handlerClass; - } + foreach (static::handlersForFile($file, $typeLazy === true) as $handler) { + $handler->validateFile($file); } } + + /** + * Returns all handler objects that apply to the given file based on + * file extension and MIME type + * + * @param string $file + * @param bool $lazy If set to `true`, undefined handlers are skipped + * @return array<\Kirby\Sane\Handler> + */ + protected static function handlersForFile(string $file, bool $lazy = false): array + { + $handlers = $handlerClasses = []; + + // all values that can be used for the handler search; + // filter out all empty options + $options = array_filter([F::extension($file), F::mime($file)]); + + foreach ($options as $option) { + $handler = static::handler($option, $lazy); + $handlerClass = $handler ? get_class($handler) : null; + + // ensure that each handler class is only returned once + if ($handler && in_array($handlerClass, $handlerClasses) === false) { + $handlers[] = $handler; + $handlerClasses[] = $handlerClass; + } + } + + return $handlers; + } } diff --git a/kirby/src/Sane/Svg.php b/kirby/src/Sane/Svg.php index d3a30f7..b4bd24b 100644 --- a/kirby/src/Sane/Svg.php +++ b/kirby/src/Sane/Svg.php @@ -2,11 +2,12 @@ namespace Kirby\Sane; +use DOMAttr; use DOMDocumentType; -use DOMNode; -use DOMNodeList; +use DOMElement; use DOMXPath; use Kirby\Exception\InvalidArgumentException; +use Kirby\Toolkit\Dom; use Kirby\Toolkit\Str; /** @@ -29,7 +30,23 @@ class Svg extends Xml * @copyright 2015 Mario Heiderich * @license https://www.apache.org/licenses/LICENSE-2.0 */ - public static $allowedAttributes = [ + + /** + * Global list of allowed attribute prefixes + * + * @var array + */ + public static $allowedAttrPrefixes = [ + 'aria-', + 'data-', + ]; + + /** + * Global list of allowed attributes + * + * @var array + */ + public static $allowedAttrs = [ 'accent-height', 'accumulate', 'additive', @@ -213,90 +230,108 @@ class Svg extends Xml 'zoomAndPan', ]; - public static $allowedElements = [ - 'svg', - 'a', - 'altGlyph', - 'altGlyphDef', - 'altGlyphItem', - 'animateColor', - 'animateMotion', - 'animateTransform', - 'circle', - 'clipPath', - 'defs', - 'desc', - 'ellipse', - 'filter', - 'font', - 'g', - 'glyph', - 'glyphRef', - 'hkern', - 'image', - 'line', - 'linearGradient', - 'marker', - 'mask', - 'metadata', - 'mpath', - 'path', - 'pattern', - 'polygon', - 'polyline', - 'radialGradient', - 'rect', - 'stop', - 'style', - 'switch', - 'symbol', - 'text', - 'textPath', - 'title', - 'tref', - 'tspan', - 'use', - 'view', - 'vkern', - ]; - - public static $allowedFilters = [ - 'feBlend', - 'feColorMatrix', - 'feComponentTransfer', - 'feComposite', - 'feConvolveMatrix', - 'feDiffuseLighting', - 'feDisplacementMap', - 'feDistantLight', - 'feFlood', - 'feFuncA', - 'feFuncB', - 'feFuncG', - 'feFuncR', - 'feGaussianBlur', - 'feMerge', - 'feMergeNode', - 'feMorphology', - 'feOffset', - 'fePointLight', - 'feSpecularLighting', - 'feSpotLight', - 'feTile', - 'feTurbulence', - ]; - + /** + * Associative array of all allowed namespace URIs + * + * @var array + */ public static $allowedNamespaces = [ - 'xmlns' => 'http://www.w3.org/2000/svg', - 'xmlns:svg' => 'http://www.w3.org/2000/svg', - 'xmlns:xlink' => 'http://www.w3.org/1999/xlink' + '' => 'http://www.w3.org/2000/svg', + 'xlink' => 'http://www.w3.org/1999/xlink' ]; /** + * Associative array of all allowed tag names with the value + * of either an array with the list of all allowed attributes + * for this tag, `true` to allow any attribute from the + * `allowedAttrs` list or `false` to allow the tag without + * any attributes + * + * @todo Move attributes from the global list to their tags + * + * @var array + */ + public static $allowedTags = [ + 'svg' => true, + 'a' => true, + 'altGlyph' => true, + 'altGlyphDef' => true, + 'altGlyphItem' => true, + 'animateColor' => true, + 'animateMotion' => true, + 'animateTransform' => true, + 'circle' => true, + 'clipPath' => true, + 'defs' => true, + 'desc' => true, + 'ellipse' => true, + 'filter' => true, + 'font' => true, + 'g' => true, + 'glyph' => true, + 'glyphRef' => true, + 'hkern' => true, + 'image' => true, + 'line' => true, + 'linearGradient' => true, + 'marker' => true, + 'mask' => true, + 'metadata' => true, + 'mpath' => true, + 'path' => true, + 'pattern' => true, + 'polygon' => true, + 'polyline' => true, + 'radialGradient' => true, + 'rect' => true, + 'stop' => true, + 'style' => true, + 'switch' => true, + 'symbol' => true, + 'text' => true, + 'textPath' => true, + 'title' => true, + 'tref' => true, + 'tspan' => true, + 'use' => true, + 'view' => true, + 'vkern' => true, + + // filters + 'feBlend' => true, + 'feColorMatrix' => true, + 'feComponentTransfer' => true, + 'feComposite' => true, + 'feConvolveMatrix' => true, + 'feDiffuseLighting' => true, + 'feDisplacementMap' => true, + 'feDistantLight' => true, + 'feFlood' => true, + 'feFuncA' => true, + 'feFuncB' => true, + 'feFuncG' => true, + 'feFuncR' => true, + 'feGaussianBlur' => true, + 'feMerge' => true, + 'feMergeNode' => true, + 'feMorphology' => true, + 'feOffset' => true, + 'fePointLight' => true, + 'feSpecularLighting' => true, + 'feSpotLight' => true, + 'feTile' => true, + 'feTurbulence' => true, + ]; + + /** + * Array of explicitly disallowed tags + * * IMPORTANT: Use lower-case names here because * of the case-insensitive matching + * + * @var array */ - public static $disallowedElements = [ + public static $disallowedTags = [ 'animate', 'color-profile', 'cursor', @@ -323,164 +358,120 @@ class Svg extends Xml ]; /** - * Validates file contents + * Custom callback for additional attribute sanitization + * @internal * - * @param string $string - * @return void - * - * @throws \Kirby\Exception\InvalidArgumentException If the file didn't pass validation + * @param \DOMAttr $attr + * @return array Array with exception objects for each modification */ - public static function validate(string $string): void + public static function sanitizeAttr(DOMAttr $attr): array { - $svg = static::parse($string); + $element = $attr->ownerElement; + $name = $attr->name; + $value = $attr->value; + $errors = []; - $rootName = $svg->documentElement->nodeName; - if ($rootName !== 'svg') { - throw new InvalidArgumentException('The file is not a SVG (got <' . $rootName . '>)'); - } + // block nested elements ("Billion Laughs" DoS attack) + if ( + $element->localName === 'use' && + Str::contains($name, 'href') !== false && + Str::startsWith($value, '#') === true + ) { + // find the target (used element) + $id = str_replace('"', '', mb_substr($value, 1)); + $target = (new DOMXPath($attr->ownerDocument))->query('//*[@id="' . $id . '"]')->item(0); - parent::validateDom($svg); - } - - /** - * Validates the attributes of an element - * - * @param \DOMXPath $xPath - * @param \DOMNode $element - * @return void - * - * @throws \Kirby\Exception\InvalidArgumentException If any of the attributes is not valid - */ - protected static function validateAttrs(DOMXPath $xPath, DOMNode $element): void - { - $elementName = $element->nodeName; - - foreach ($element->attributes ?? [] as $attr) { - $attrName = $attr->nodeName; - $attrValue = $attr->nodeValue; - - // allow all aria and data attributes - $beginning = mb_substr($attrName, 0, 5); - if ($beginning === 'aria-' || $beginning === 'data-') { - continue; - } - - if (in_array($attrName, static::$allowedAttributes) !== true) { - throw new InvalidArgumentException( - 'The "' . $attrName . '" attribute (line ' . - $attr->getLineNo() . ') is not allowed in SVGs' - ); - } - - // block nested elements ("Billion Laughs" DoS attack) + // the target must not contain any other elements if ( - $elementName === 'use' && - Str::contains($attrName, 'href') !== false && - Str::startsWith($attrValue, '#') === true + is_a($target, 'DOMElement') === true && + $target->getElementsByTagName('use')->count() > 0 ) { - // find the target (used element) - $id = str_replace('"', '', mb_substr($attrValue, 1)); - $target = $xPath->query('//*[@id="' . $id . '"]')->item(0); - - // the target must not contain any other elements - if ( - is_a($target, 'DOMElement') === true && - $target->getElementsByTagName('use')->count() > 0 - ) { - throw new InvalidArgumentException( - 'Nested "use" elements are not allowed in SVGs (used in line ' . - $element->getLineNo() . ')' - ); - } + $errors[] = new InvalidArgumentException( + 'Nested "use" elements are not allowed' . + ' (used in line ' . $element->getLineNo() . ')' + ); + $element->removeAttributeNode($attr); } } - // validate `xmlns` attributes as well, which can only - // be properly extracted using SimpleXML - if (is_a($element, 'DOMElement') === true) { - $simpleXmlElement = simplexml_import_dom($element); - foreach ($simpleXmlElement->getDocNamespaces(false, false) as $namespace => $value) { - $namespace = 'xmlns' . ($namespace ? ':' . $namespace : ''); - - // check if the namespace is allowlisted - if ( - isset(static::$allowedNamespaces[$namespace]) !== true || - static::$allowedNamespaces[$namespace] !== $value - ) { - throw new InvalidArgumentException( - 'The namespace "' . $namespace . '" (around line ' . - $element->getLineNo() . ') is not allowed or has an invalid value' - ); - } - } - } - - parent::validateAttrs($xPath, $element); + return $errors; } /** - * Validates the doctype if present + * Custom callback for additional element sanitization + * @internal + * + * @param \DOMElement $element + * @return array Array with exception objects for each modification + */ + public static function sanitizeElement(DOMElement $element): array + { + $errors = []; + + // check for URLs inside + @@ -25,7 +26,7 @@
- + diff --git a/kirby/vendor/filp/whoops/src/Whoops/Run.php b/kirby/vendor/filp/whoops/src/Whoops/Run.php index 639b3ae..52486d0 100644 --- a/kirby/vendor/filp/whoops/src/Whoops/Run.php +++ b/kirby/vendor/filp/whoops/src/Whoops/Run.php @@ -74,7 +74,7 @@ final class Run implements RunInterface /** * Explicitly request your handler runs as the last of all currently registered handlers. * - * @param HandlerInterface $handler + * @param callable|HandlerInterface $handler * * @return Run */ @@ -87,7 +87,7 @@ final class Run implements RunInterface /** * Explicitly request your handler runs as the first of all currently registered handlers. * - * @param HandlerInterface $handler + * @param callable|HandlerInterface $handler * * @return Run */ @@ -100,7 +100,7 @@ final class Run implements RunInterface * Register your handler as the last of all currently registered handlers (to be executed first). * Prefer using appendHandler and prependHandler for clarity. * - * @param Callable|HandlerInterface $handler + * @param callable|HandlerInterface $handler * * @return Run * @@ -501,7 +501,7 @@ final class Run implements RunInterface /** * Resolves the giving handler. * - * @param HandlerInterface $handler + * @param callable|HandlerInterface $handler * * @return HandlerInterface * diff --git a/kirby/vendor/laminas/laminas-escaper/composer.json b/kirby/vendor/laminas/laminas-escaper/composer.json index d01ae2d..92515dc 100644 --- a/kirby/vendor/laminas/laminas-escaper/composer.json +++ b/kirby/vendor/laminas/laminas-escaper/composer.json @@ -21,15 +21,14 @@ "extra": { }, "require": { - "php": "^7.3 || ~8.0.0", - "laminas/laminas-zendframework-bridge": "^1.0" + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, "suggest": { "ext-iconv": "*", "ext-mbstring": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.3.0", "phpunit/phpunit": "^9.3", "psalm/plugin-phpunit": "^0.12.2", "vimeo/psalm": "^3.16" @@ -55,7 +54,7 @@ "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" }, - "replace": { - "zendframework/zend-escaper": "^2.6.1" + "conflict": { + "zendframework/zend-escaper": "*" } } diff --git a/kirby/vendor/laminas/laminas-escaper/composer.lock b/kirby/vendor/laminas/laminas-escaper/composer.lock new file mode 100644 index 0000000..b422858 --- /dev/null +++ b/kirby/vendor/laminas/laminas-escaper/composer.lock @@ -0,0 +1,4170 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "5c54f272d6c88f5ee83f3aaa6a9ed107", + "packages": [], + "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.6.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/caa95edeb1ca1bf7532e9118ede4a3c3126408cc", + "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-07-16T20:06:06+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.3", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "fff576ac850c045158a250e7e27666e146e78d18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/fff576ac850c045158a250e7e27666e146e78d18", + "reference": "fff576ac850c045158a250e7e27666e146e78d18", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.3" + }, + "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": "2021-08-17T13:49:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "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": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "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": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.6", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + }, + "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": "2021-03-25T17:01:18+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + }, + "time": "2021-02-22T14:02:09+00:00" + }, + { + "name": "laminas/laminas-coding-standard", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-coding-standard.git", + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "php": "^7.3 || ^8.0", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6", + "webimpress/coding-standard": "^1.2" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Laminas Coding Standard", + "homepage": "https://laminas.dev", + "keywords": [ + "Coding Standard", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-coding-standard/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-coding-standard/issues", + "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", + "source": "https://github.com/laminas/laminas-coding-standard" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-05-29T15:53:59+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "ba09f0e456d4f00cef84e012da5715625594407c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/ba09f0e456d4f00cef84e012da5715625594407c", + "reference": "ba09f0e456d4f00cef84e012da5715625594407c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v3.1.1" + }, + "time": "2020-11-02T19:19:54+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.12.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" + } + ], + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.5.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c", + "reference": "ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.87", + "phpstan/phpstan-strict-rules": "^0.12.5", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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/0.5.5" + }, + "time": "2021-06-11T13:24:46+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-08-31T06:47:40+00:00" + }, + { + "name": "psalm/plugin-phpunit", + "version": "0.12.2", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-phpunit.git", + "reference": "85ee5a080a5281e63085d933b30a06b1b1680758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/85ee5a080a5281e63085d933b30a06b1b1680758", + "reference": "85ee5a080a5281e63085d933b30a06b1b1680758", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.10", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "ext-simplexml": "*", + "php": "^7.1.3 || ^8.0", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", + "vimeo/psalm": "^3.6.2 || dev-master || dev-4.x" + }, + "require-dev": { + "codeception/codeception": "^4.0.3", + "squizlabs/php_codesniffer": "^3.3.1", + "weirdan/codeception-psalm-module": "^0.7.1", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Psalm\\PhpUnitPlugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Brown", + "email": "github@muglug.com" + } + ], + "description": "Psalm plugin for PHPUnit", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.12.2" + }, + "time": "2020-09-28T17:25:39+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "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/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "slevomat/coding-standard", + "version": "7.0.14", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "15b2b4630c148775debea8e412bc7e128d9868a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/15b2b4630c148775debea8e412bc7e128d9868a3", + "reference": "15b2b4630c148775debea8e412bc7e128d9868a3", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.5.1 - 0.5.5", + "squizlabs/php_codesniffer": "^3.6.0" + }, + "require-dev": { + "phing/phing": "2.16.4", + "php-parallel-lint/php-parallel-lint": "1.3.1", + "phpstan/phpstan": "0.12.96", + "phpstan/phpstan-deprecation-rules": "0.12.6", + "phpstan/phpstan-phpunit": "0.12.22", + "phpstan/phpstan-strict-rules": "0.12.11", + "phpunit/phpunit": "7.5.20|8.5.5|9.5.8" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.0.14" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2021-08-26T12:17:56+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" + }, + { + "name": "symfony/console", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.7" + }, + "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": "2021-08-25T20:02:16+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.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": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + }, + "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": "2021-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "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": "2021-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, + "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": "2021-07-28T13:41:28+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.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": "2021-04-01T10:43:52+00:00" + }, + { + "name": "symfony/string", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.7" + }, + "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": "2021-08-26T08:00:08+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "vimeo/psalm", + "version": "3.18.2", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/19aa905f7c3c7350569999a93c40ae91ae4e1626", + "reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.1", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.4", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0", + "nikic/php-parser": "4.3.* || 4.4.* || 4.5.* || 4.6.* || ^4.8", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1.3|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "webmozart/glob": "^4.1", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "amphp/amp": "^2.4.2", + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0.0", + "ext-curl": "*", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5", + "phpmyadmin/sql-parser": "5.1.0", + "phpspec/prophecy": ">=1.9.0", + "phpunit/phpunit": "^7.5.16 || ^8.5 || ^9.0", + "psalm/plugin-phpunit": "^0.11", + "slevomat/coding-standard": "^5.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-igbinary": "^2.0.5" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + }, + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/3.18.2" + }, + "time": "2020-10-20T13:48:22+00:00" + }, + { + "name": "webimpress/coding-standard", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/webimpress/coding-standard.git", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "autoload": { + "psr-4": { + "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Webimpress Coding Standard", + "keywords": [ + "Coding Standard", + "PSR-2", + "phpcs", + "psr-12", + "webimpress" + ], + "support": { + "issues": "https://github.com/webimpress/coding-standard/issues", + "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2021-04-12T12:51:27+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" + }, + "time": "2020-07-08T17:02:28+00:00" + }, + { + "name": "webmozart/glob", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/glob.git", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/06358fafde0f32edb4513f4fd88fe113a40c90ee", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0.0", + "webmozart/path-util": "^2.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.0", + "symfony/filesystem": "^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Glob\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A PHP implementation of Ant's glob.", + "support": { + "issues": "https://github.com/webmozarts/glob/issues", + "source": "https://github.com/webmozarts/glob/tree/4.3.0" + }, + "time": "2021-01-21T06:17:15+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^7.3 || ~8.0.0 || ~8.1.0" + }, + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/kirby/vendor/laminas/laminas-escaper/src/Escaper.php b/kirby/vendor/laminas/laminas-escaper/src/Escaper.php index 9f903a5..ca0f1a9 100644 --- a/kirby/vendor/laminas/laminas-escaper/src/Escaper.php +++ b/kirby/vendor/laminas/laminas-escaper/src/Escaper.php @@ -1,13 +1,30 @@ 'quot', // quotation mark - 38 => 'amp', // ampersand - 60 => 'lt', // less-than sign - 62 => 'gt', // greater-than sign + 34 => 'quot', // quotation mark + 38 => 'amp', // ampersand + 60 => 'lt', // less-than sign + 62 => 'gt', // greater-than sign ]; /** @@ -73,42 +90,61 @@ class Escaper * @var array */ protected $supportedEncodings = [ - 'iso-8859-1', 'iso8859-1', 'iso-8859-5', 'iso8859-5', - 'iso-8859-15', 'iso8859-15', 'utf-8', 'cp866', - 'ibm866', '866', 'cp1251', 'windows-1251', - 'win-1251', '1251', 'cp1252', 'windows-1252', - '1252', 'koi8-r', 'koi8-ru', 'koi8r', - 'big5', '950', 'gb2312', '936', - 'big5-hkscs', 'shift_jis', 'sjis', 'sjis-win', - 'cp932', '932', 'euc-jp', 'eucjp', - 'eucjp-win', 'macroman' + 'iso-8859-1', + 'iso8859-1', + 'iso-8859-5', + 'iso8859-5', + 'iso-8859-15', + 'iso8859-15', + 'utf-8', + 'cp866', + 'ibm866', + '866', + 'cp1251', + 'windows-1251', + 'win-1251', + '1251', + 'cp1252', + 'windows-1252', + '1252', + 'koi8-r', + 'koi8-ru', + 'koi8r', + 'big5', + '950', + 'gb2312', + '936', + 'big5-hkscs', + 'shift_jis', + 'sjis', + 'sjis-win', + 'cp932', + '932', + 'euc-jp', + 'eucjp', + 'eucjp-win', + 'macroman', ]; /** * Constructor: Single parameter allows setting of global encoding for use by * the current object. * - * @param string $encoding * @throws Exception\InvalidArgumentException */ - public function __construct($encoding = null) + public function __construct(?string $encoding = null) { if ($encoding !== null) { - if (! is_string($encoding)) { - throw new Exception\InvalidArgumentException( - get_class($this) . ' constructor parameter must be a string, received ' . gettype($encoding) - ); - } if ($encoding === '') { throw new Exception\InvalidArgumentException( - get_class($this) . ' constructor parameter does not allow a blank value' + static::class . ' constructor parameter does not allow a blank value' ); } $encoding = strtolower($encoding); if (! in_array($encoding, $this->supportedEncodings)) { throw new Exception\InvalidArgumentException( - 'Value of \'' . $encoding . '\' passed to ' . get_class($this) + 'Value of \'' . $encoding . '\' passed to ' . static::class . ' constructor parameter is invalid. Provide an encoding supported by htmlspecialchars()' ); } @@ -139,10 +175,9 @@ class Escaper * Escape a string for the HTML Body context where there are very few characters * of special meaning. Internally this will use htmlspecialchars(). * - * @param string $string * @return string */ - public function escapeHtml($string) + public function escapeHtml(string $string) { return htmlspecialchars($string, $this->htmlSpecialCharsFlags, $this->encoding); } @@ -152,10 +187,9 @@ class Escaper * to escape that are not covered by htmlspecialchars() to cover cases where an attribute * might be unquoted or quoted illegally (e.g. backticks are valid quotes for IE). * - * @param string $string * @return string */ - public function escapeHtmlAttr($string) + public function escapeHtmlAttr(string $string) { $string = $this->toUtf8($string); if ($string === '' || ctype_digit($string)) { @@ -175,10 +209,9 @@ class Escaper * Backslash escaping is not used as it still leaves the escaped character as-is and so * is not useful in a HTML context. * - * @param string $string * @return string */ - public function escapeJs($string) + public function escapeJs(string $string) { $string = $this->toUtf8($string); if ($string === '' || ctype_digit($string)) { @@ -194,10 +227,9 @@ class Escaper * an entire URI - only a subcomponent being inserted. The function is a simple proxy * to rawurlencode() which now implements RFC 3986 since PHP 5.3 completely. * - * @param string $string * @return string */ - public function escapeUrl($string) + public function escapeUrl(string $string) { return rawurlencode($string); } @@ -206,10 +238,9 @@ class Escaper * Escape a string for the CSS context. CSS escaping can be applied to any string being * inserted into CSS and escapes everything except alphanumerics. * - * @param string $string * @return string */ - public function escapeCss($string) + public function escapeCss(string $string) { $string = $this->toUtf8($string); if ($string === '' || ctype_digit($string)) { @@ -236,7 +267,8 @@ class Escaper * The following replaces characters undefined in HTML with the * hex entity for the Unicode replacement character. */ - if (($ord <= 0x1f && $chr != "\t" && $chr != "\n" && $chr != "\r") + if ( + ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r") || ($ord >= 0x7f && $ord <= 0x9f) ) { return '�'; @@ -276,7 +308,7 @@ class Escaper protected function jsMatcher($matches) { $chr = $matches[0]; - if (strlen($chr) == 1) { + if (strlen($chr) === 1) { return sprintf('\\x%02X', ord($chr)); } $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8'); @@ -285,7 +317,7 @@ class Escaper return sprintf('\\u%04s', $hex); } $highSurrogate = substr($hex, 0, 4); - $lowSurrogate = substr($hex, 4, 4); + $lowSurrogate = substr($hex, 4, 4); return sprintf('\\u%04s\\u%04s', $highSurrogate, $lowSurrogate); } @@ -299,7 +331,7 @@ class Escaper protected function cssMatcher($matches) { $chr = $matches[0]; - if (strlen($chr) == 1) { + if (strlen($chr) === 1) { $ord = ord($chr); } else { $chr = $this->convertEncoding($chr, 'UTF-32BE', 'UTF-8'); @@ -310,7 +342,6 @@ class Escaper /** * Converts a string to UTF-8 from the base encoding. The base encoding is set via this - * class' constructor. * * @param string $string * @throws Exception\RuntimeException @@ -335,7 +366,7 @@ class Escaper /** * Converts a string from UTF-8 to the base encoding. The base encoding is set via this - * class' constructor. + * * @param string $string * @return string */ @@ -356,7 +387,7 @@ class Escaper */ protected function isUtf8($string) { - return ($string === '' || preg_match('/^./su', $string)); + return $string === '' || preg_match('/^./su', $string); } /** @@ -377,7 +408,7 @@ class Escaper $result = mb_convert_encoding($string, $to, $from); } else { throw new Exception\RuntimeException( - get_class($this) + static::class . ' requires either the iconv or mbstring extension to be installed' . ' when escaping for non UTF-8 strings.' ); diff --git a/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php b/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php index 7ebe04e..87edfd2 100644 --- a/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php +++ b/kirby/vendor/laminas/laminas-escaper/src/Exception/ExceptionInterface.php @@ -1,10 +1,6 @@ 'zendframework/zendframework', - 'zend-developer-tools/toolbar/bjy' => 'zend-developer-tools/toolbar/bjy', - 'zend-developer-tools/toolbar/doctrine' => 'zend-developer-tools/toolbar/doctrine', - - // NAMESPACES - // Zend Framework components - 'Zend\\AuraDi\\Config' => 'Laminas\\AuraDi\\Config', - 'Zend\\Authentication' => 'Laminas\\Authentication', - 'Zend\\Barcode' => 'Laminas\\Barcode', - 'Zend\\Cache' => 'Laminas\\Cache', - 'Zend\\Captcha' => 'Laminas\\Captcha', - 'Zend\\Code' => 'Laminas\\Code', - 'ZendCodingStandard\\Sniffs' => 'LaminasCodingStandard\\Sniffs', - 'ZendCodingStandard\\Utils' => 'LaminasCodingStandard\\Utils', - 'Zend\\ComponentInstaller' => 'Laminas\\ComponentInstaller', - 'Zend\\Config' => 'Laminas\\Config', - 'Zend\\ConfigAggregator' => 'Laminas\\ConfigAggregator', - 'Zend\\ConfigAggregatorModuleManager' => 'Laminas\\ConfigAggregatorModuleManager', - 'Zend\\ConfigAggregatorParameters' => 'Laminas\\ConfigAggregatorParameters', - 'Zend\\Console' => 'Laminas\\Console', - 'Zend\\ContainerConfigTest' => 'Laminas\\ContainerConfigTest', - 'Zend\\Crypt' => 'Laminas\\Crypt', - 'Zend\\Db' => 'Laminas\\Db', - 'ZendDeveloperTools' => 'Laminas\\DeveloperTools', - 'Zend\\Di' => 'Laminas\\Di', - 'Zend\\Diactoros' => 'Laminas\\Diactoros', - 'ZendDiagnostics\\Check' => 'Laminas\\Diagnostics\\Check', - 'ZendDiagnostics\\Result' => 'Laminas\\Diagnostics\\Result', - 'ZendDiagnostics\\Runner' => 'Laminas\\Diagnostics\\Runner', - 'Zend\\Dom' => 'Laminas\\Dom', - 'Zend\\Escaper' => 'Laminas\\Escaper', - 'Zend\\EventManager' => 'Laminas\\EventManager', - 'Zend\\Feed' => 'Laminas\\Feed', - 'Zend\\File' => 'Laminas\\File', - 'Zend\\Filter' => 'Laminas\\Filter', - 'Zend\\Form' => 'Laminas\\Form', - 'Zend\\Http' => 'Laminas\\Http', - 'Zend\\HttpHandlerRunner' => 'Laminas\\HttpHandlerRunner', - 'Zend\\Hydrator' => 'Laminas\\Hydrator', - 'Zend\\I18n' => 'Laminas\\I18n', - 'Zend\\InputFilter' => 'Laminas\\InputFilter', - 'Zend\\Json' => 'Laminas\\Json', - 'Zend\\Ldap' => 'Laminas\\Ldap', - 'Zend\\Loader' => 'Laminas\\Loader', - 'Zend\\Log' => 'Laminas\\Log', - 'Zend\\Mail' => 'Laminas\\Mail', - 'Zend\\Math' => 'Laminas\\Math', - 'Zend\\Memory' => 'Laminas\\Memory', - 'Zend\\Mime' => 'Laminas\\Mime', - 'Zend\\ModuleManager' => 'Laminas\\ModuleManager', - 'Zend\\Mvc' => 'Laminas\\Mvc', - 'Zend\\Navigation' => 'Laminas\\Navigation', - 'Zend\\Paginator' => 'Laminas\\Paginator', - 'Zend\\Permissions' => 'Laminas\\Permissions', - 'Zend\\Pimple\\Config' => 'Laminas\\Pimple\\Config', - 'Zend\\ProblemDetails' => 'Mezzio\\ProblemDetails', - 'Zend\\ProgressBar' => 'Laminas\\ProgressBar', - 'Zend\\Psr7Bridge' => 'Laminas\\Psr7Bridge', - 'Zend\\Router' => 'Laminas\\Router', - 'Zend\\Serializer' => 'Laminas\\Serializer', - 'Zend\\Server' => 'Laminas\\Server', - 'Zend\\ServiceManager' => 'Laminas\\ServiceManager', - 'ZendService\\ReCaptcha' => 'Laminas\\ReCaptcha', - 'ZendService\\Twitter' => 'Laminas\\Twitter', - 'Zend\\Session' => 'Laminas\\Session', - 'Zend\\SkeletonInstaller' => 'Laminas\\SkeletonInstaller', - 'Zend\\Soap' => 'Laminas\\Soap', - 'Zend\\Stdlib' => 'Laminas\\Stdlib', - 'Zend\\Stratigility' => 'Laminas\\Stratigility', - 'Zend\\Tag' => 'Laminas\\Tag', - 'Zend\\Test' => 'Laminas\\Test', - 'Zend\\Text' => 'Laminas\\Text', - 'Zend\\Uri' => 'Laminas\\Uri', - 'Zend\\Validator' => 'Laminas\\Validator', - 'Zend\\View' => 'Laminas\\View', - 'ZendXml' => 'Laminas\\Xml', - 'Zend\\Xml2Json' => 'Laminas\\Xml2Json', - 'Zend\\XmlRpc' => 'Laminas\\XmlRpc', - 'ZendOAuth' => 'Laminas\\OAuth', - - // class ZendAcl in zend-expressive-authorization-acl - 'ZendAcl' => 'LaminasAcl', - 'Zend\\Expressive\\Authorization\\Acl\\ZendAcl' => 'Mezzio\\Authorization\\Acl\\LaminasAcl', - // class ZendHttpClientDecorator in zend-feed - 'ZendHttp' => 'LaminasHttp', - // class ZendModuleProvider in zend-config-aggregator-modulemanager - 'ZendModule' => 'LaminasModule', - // class ZendRbac in zend-expressive-authorization-rbac - 'ZendRbac' => 'LaminasRbac', - 'Zend\\Expressive\\Authorization\\Rbac\\ZendRbac' => 'Mezzio\\Authorization\\Rbac\\LaminasRbac', - // class ZendRouter in zend-expressive-router-zendrouter - 'ZendRouter' => 'LaminasRouter', - 'Zend\\Expressive\\Router\\ZendRouter' => 'Mezzio\\Router\\LaminasRouter', - // class ZendViewRenderer in zend-expressive-zendviewrenderer - 'ZendViewRenderer' => 'LaminasViewRenderer', - 'Zend\\Expressive\\ZendView\\ZendViewRenderer' => 'Mezzio\\LaminasView\\LaminasViewRenderer', - 'a\\Zend' => 'a\\Zend', - 'b\\Zend' => 'b\\Zend', - 'c\\Zend' => 'c\\Zend', - 'd\\Zend' => 'd\\Zend', - 'e\\Zend' => 'e\\Zend', - 'f\\Zend' => 'f\\Zend', - 'g\\Zend' => 'g\\Zend', - 'h\\Zend' => 'h\\Zend', - 'i\\Zend' => 'i\\Zend', - 'j\\Zend' => 'j\\Zend', - 'k\\Zend' => 'k\\Zend', - 'l\\Zend' => 'l\\Zend', - 'm\\Zend' => 'm\\Zend', - 'n\\Zend' => 'n\\Zend', - 'o\\Zend' => 'o\\Zend', - 'p\\Zend' => 'p\\Zend', - 'q\\Zend' => 'q\\Zend', - 'r\\Zend' => 'r\\Zend', - 's\\Zend' => 's\\Zend', - 't\\Zend' => 't\\Zend', - 'u\\Zend' => 'u\\Zend', - 'v\\Zend' => 'v\\Zend', - 'w\\Zend' => 'w\\Zend', - 'x\\Zend' => 'x\\Zend', - 'y\\Zend' => 'y\\Zend', - 'z\\Zend' => 'z\\Zend', - - // Expressive - 'Zend\\Expressive' => 'Mezzio', - 'ZendAuthentication' => 'LaminasAuthentication', - 'ZendAcl' => 'LaminasAcl', - 'ZendRbac' => 'LaminasRbac', - 'ZendRouter' => 'LaminasRouter', - 'ExpressiveUrlGenerator' => 'MezzioUrlGenerator', - 'ExpressiveInstaller' => 'MezzioInstaller', - - // Apigility - 'ZF\\Apigility' => 'Laminas\\ApiTools', - 'ZF\\ApiProblem' => 'Laminas\\ApiTools\\ApiProblem', - 'ZF\\AssetManager' => 'Laminas\\ApiTools\\AssetManager', - 'ZF\\ComposerAutoloading' => 'Laminas\\ComposerAutoloading', - 'ZF\\Configuration' => 'Laminas\\ApiTools\\Configuration', - 'ZF\\ContentNegotiation' => 'Laminas\\ApiTools\\ContentNegotiation', - 'ZF\\ContentValidation' => 'Laminas\\ApiTools\\ContentValidation', - 'ZF\\DevelopmentMode' => 'Laminas\\DevelopmentMode', - 'ZF\\Doctrine\\QueryBuilder' => 'Laminas\\ApiTools\\Doctrine\\QueryBuilder', - 'ZF\\Hal' => 'Laminas\\ApiTools\\Hal', - 'ZF\\HttpCache' => 'Laminas\\ApiTools\\HttpCache', - 'ZF\\MvcAuth' => 'Laminas\\ApiTools\\MvcAuth', - 'ZF\\OAuth2' => 'Laminas\\ApiTools\\OAuth2', - 'ZF\\Rest' => 'Laminas\\ApiTools\\Rest', - 'ZF\\Rpc' => 'Laminas\\ApiTools\\Rpc', - 'ZF\\Versioning' => 'Laminas\\ApiTools\\Versioning', - 'a\\ZF' => 'a\\ZF', - 'b\\ZF' => 'b\\ZF', - 'c\\ZF' => 'c\\ZF', - 'd\\ZF' => 'd\\ZF', - 'e\\ZF' => 'e\\ZF', - 'f\\ZF' => 'f\\ZF', - 'g\\ZF' => 'g\\ZF', - 'h\\ZF' => 'h\\ZF', - 'i\\ZF' => 'i\\ZF', - 'j\\ZF' => 'j\\ZF', - 'k\\ZF' => 'k\\ZF', - 'l\\ZF' => 'l\\ZF', - 'm\\ZF' => 'm\\ZF', - 'n\\ZF' => 'n\\ZF', - 'o\\ZF' => 'o\\ZF', - 'p\\ZF' => 'p\\ZF', - 'q\\ZF' => 'q\\ZF', - 'r\\ZF' => 'r\\ZF', - 's\\ZF' => 's\\ZF', - 't\\ZF' => 't\\ZF', - 'u\\ZF' => 'u\\ZF', - 'v\\ZF' => 'v\\ZF', - 'w\\ZF' => 'w\\ZF', - 'x\\ZF' => 'x\\ZF', - 'y\\ZF' => 'y\\ZF', - 'z\\ZF' => 'z\\ZF', - - 'ApigilityModuleInterface' => 'ApiToolsModuleInterface', - 'ApigilityProviderInterface' => 'ApiToolsProviderInterface', - 'ApigilityVersionController' => 'ApiToolsVersionController', - - // PACKAGES - // ZF components, MVC - 'zendframework/skeleton-application' => 'laminas/skeleton-application', - 'zendframework/zend-auradi-config' => 'laminas/laminas-auradi-config', - 'zendframework/zend-authentication' => 'laminas/laminas-authentication', - 'zendframework/zend-barcode' => 'laminas/laminas-barcode', - 'zendframework/zend-cache' => 'laminas/laminas-cache', - 'zendframework/zend-captcha' => 'laminas/laminas-captcha', - 'zendframework/zend-code' => 'laminas/laminas-code', - 'zendframework/zend-coding-standard' => 'laminas/laminas-coding-standard', - 'zendframework/zend-component-installer' => 'laminas/laminas-component-installer', - 'zendframework/zend-composer-autoloading' => 'laminas/laminas-composer-autoloading', - 'zendframework/zend-config-aggregator' => 'laminas/laminas-config-aggregator', - 'zendframework/zend-config' => 'laminas/laminas-config', - 'zendframework/zend-console' => 'laminas/laminas-console', - 'zendframework/zend-container-config-test' => 'laminas/laminas-container-config-test', - 'zendframework/zend-crypt' => 'laminas/laminas-crypt', - 'zendframework/zend-db' => 'laminas/laminas-db', - 'zendframework/zend-developer-tools' => 'laminas/laminas-developer-tools', - 'zendframework/zend-diactoros' => 'laminas/laminas-diactoros', - 'zendframework/zenddiagnostics' => 'laminas/laminas-diagnostics', - 'zendframework/zend-di' => 'laminas/laminas-di', - 'zendframework/zend-dom' => 'laminas/laminas-dom', - 'zendframework/zend-escaper' => 'laminas/laminas-escaper', - 'zendframework/zend-eventmanager' => 'laminas/laminas-eventmanager', - 'zendframework/zend-feed' => 'laminas/laminas-feed', - 'zendframework/zend-file' => 'laminas/laminas-file', - 'zendframework/zend-filter' => 'laminas/laminas-filter', - 'zendframework/zend-form' => 'laminas/laminas-form', - 'zendframework/zend-httphandlerrunner' => 'laminas/laminas-httphandlerrunner', - 'zendframework/zend-http' => 'laminas/laminas-http', - 'zendframework/zend-hydrator' => 'laminas/laminas-hydrator', - 'zendframework/zend-i18n' => 'laminas/laminas-i18n', - 'zendframework/zend-i18n-resources' => 'laminas/laminas-i18n-resources', - 'zendframework/zend-inputfilter' => 'laminas/laminas-inputfilter', - 'zendframework/zend-json' => 'laminas/laminas-json', - 'zendframework/zend-json-server' => 'laminas/laminas-json-server', - 'zendframework/zend-ldap' => 'laminas/laminas-ldap', - 'zendframework/zend-loader' => 'laminas/laminas-loader', - 'zendframework/zend-log' => 'laminas/laminas-log', - 'zendframework/zend-mail' => 'laminas/laminas-mail', - 'zendframework/zend-math' => 'laminas/laminas-math', - 'zendframework/zend-memory' => 'laminas/laminas-memory', - 'zendframework/zend-mime' => 'laminas/laminas-mime', - 'zendframework/zend-modulemanager' => 'laminas/laminas-modulemanager', - 'zendframework/zend-mvc' => 'laminas/laminas-mvc', - 'zendframework/zend-navigation' => 'laminas/laminas-navigation', - 'zendframework/zend-oauth' => 'laminas/laminas-oauth', - 'zendframework/zend-paginator' => 'laminas/laminas-paginator', - 'zendframework/zend-permissions-acl' => 'laminas/laminas-permissions-acl', - 'zendframework/zend-permissions-rbac' => 'laminas/laminas-permissions-rbac', - 'zendframework/zend-pimple-config' => 'laminas/laminas-pimple-config', - 'zendframework/zend-progressbar' => 'laminas/laminas-progressbar', - 'zendframework/zend-psr7bridge' => 'laminas/laminas-psr7bridge', - 'zendframework/zend-recaptcha' => 'laminas/laminas-recaptcha', - 'zendframework/zend-router' => 'laminas/laminas-router', - 'zendframework/zend-serializer' => 'laminas/laminas-serializer', - 'zendframework/zend-server' => 'laminas/laminas-server', - 'zendframework/zend-servicemanager' => 'laminas/laminas-servicemanager', - 'zendframework/zendservice-recaptcha' => 'laminas/laminas-recaptcha', - 'zendframework/zendservice-twitter' => 'laminas/laminas-twitter', - 'zendframework/zend-session' => 'laminas/laminas-session', - 'zendframework/zend-skeleton-installer' => 'laminas/laminas-skeleton-installer', - 'zendframework/zend-soap' => 'laminas/laminas-soap', - 'zendframework/zend-stdlib' => 'laminas/laminas-stdlib', - 'zendframework/zend-stratigility' => 'laminas/laminas-stratigility', - 'zendframework/zend-tag' => 'laminas/laminas-tag', - 'zendframework/zend-test' => 'laminas/laminas-test', - 'zendframework/zend-text' => 'laminas/laminas-text', - 'zendframework/zend-uri' => 'laminas/laminas-uri', - 'zendframework/zend-validator' => 'laminas/laminas-validator', - 'zendframework/zend-view' => 'laminas/laminas-view', - 'zendframework/zend-xml2json' => 'laminas/laminas-xml2json', - 'zendframework/zend-xml' => 'laminas/laminas-xml', - 'zendframework/zend-xmlrpc' => 'laminas/laminas-xmlrpc', - - // Expressive packages - 'zendframework/zend-expressive' => 'mezzio/mezzio', - 'zendframework/zend-expressive-zendrouter' => 'mezzio/mezzio-laminasrouter', - 'zendframework/zend-problem-details' => 'mezzio/mezzio-problem-details', - 'zendframework/zend-expressive-zendviewrenderer' => 'mezzio/mezzio-laminasviewrenderer', - - // Apigility packages - 'zfcampus/apigility-documentation' => 'laminas-api-tools/documentation', - 'zfcampus/statuslib-example' => 'laminas-api-tools/statuslib-example', - 'zfcampus/zf-apigility' => 'laminas-api-tools/api-tools', - 'zfcampus/zf-api-problem' => 'laminas-api-tools/api-tools-api-problem', - 'zfcampus/zf-asset-manager' => 'laminas-api-tools/api-tools-asset-manager', - 'zfcampus/zf-configuration' => 'laminas-api-tools/api-tools-configuration', - 'zfcampus/zf-content-negotiation' => 'laminas-api-tools/api-tools-content-negotiation', - 'zfcampus/zf-content-validation' => 'laminas-api-tools/api-tools-content-validation', - 'zfcampus/zf-development-mode' => 'laminas/laminas-development-mode', - 'zfcampus/zf-doctrine-querybuilder' => 'laminas-api-tools/api-tools-doctrine-querybuilder', - 'zfcampus/zf-hal' => 'laminas-api-tools/api-tools-hal', - 'zfcampus/zf-http-cache' => 'laminas-api-tools/api-tools-http-cache', - 'zfcampus/zf-mvc-auth' => 'laminas-api-tools/api-tools-mvc-auth', - 'zfcampus/zf-oauth2' => 'laminas-api-tools/api-tools-oauth2', - 'zfcampus/zf-rest' => 'laminas-api-tools/api-tools-rest', - 'zfcampus/zf-rpc' => 'laminas-api-tools/api-tools-rpc', - 'zfcampus/zf-versioning' => 'laminas-api-tools/api-tools-versioning', - - // CONFIG KEYS, SCRIPT NAMES, ETC - // ZF components - '::fromZend' => '::fromLaminas', // psr7bridge - '::toZend' => '::toLaminas', // psr7bridge - 'use_zend_loader' => 'use_laminas_loader', // zend-modulemanager - 'zend-config' => 'laminas-config', - 'zend-developer-tools/' => 'laminas-developer-tools/', - 'zend-tag-cloud' => 'laminas-tag-cloud', - 'zenddevelopertools' => 'laminas-developer-tools', - 'zendbarcode' => 'laminasbarcode', - 'ZendBarcode' => 'LaminasBarcode', - 'zendcache' => 'laminascache', - 'ZendCache' => 'LaminasCache', - 'zendconfig' => 'laminasconfig', - 'ZendConfig' => 'LaminasConfig', - 'zendfeed' => 'laminasfeed', - 'ZendFeed' => 'LaminasFeed', - 'zendfilter' => 'laminasfilter', - 'ZendFilter' => 'LaminasFilter', - 'zendform' => 'laminasform', - 'ZendForm' => 'LaminasForm', - 'zendi18n' => 'laminasi18n', - 'ZendI18n' => 'LaminasI18n', - 'zendinputfilter' => 'laminasinputfilter', - 'ZendInputFilter' => 'LaminasInputFilter', - 'zendlog' => 'laminaslog', - 'ZendLog' => 'LaminasLog', - 'zendmail' => 'laminasmail', - 'ZendMail' => 'LaminasMail', - 'zendmvc' => 'laminasmvc', - 'ZendMvc' => 'LaminasMvc', - 'zendpaginator' => 'laminaspaginator', - 'ZendPaginator' => 'LaminasPaginator', - 'zendserializer' => 'laminasserializer', - 'ZendSerializer' => 'LaminasSerializer', - 'zendtag' => 'laminastag', - 'ZendTag' => 'LaminasTag', - 'zendtext' => 'laminastext', - 'ZendText' => 'LaminasText', - 'zendvalidator' => 'laminasvalidator', - 'ZendValidator' => 'LaminasValidator', - 'zendview' => 'laminasview', - 'ZendView' => 'LaminasView', - 'zend-framework.flf' => 'laminas-project.flf', - - // Expressive-related - "'zend-expressive'" => "'mezzio'", - '"zend-expressive"' => '"mezzio"', - 'zend-expressive.' => 'mezzio.', - 'zend-expressive-authorization' => 'mezzio-authorization', - 'zend-expressive-hal' => 'mezzio-hal', - 'zend-expressive-session' => 'mezzio-session', - 'zend-expressive-swoole' => 'mezzio-swoole', - 'zend-expressive-tooling' => 'mezzio-tooling', - - // Apigility-related - "'zf-apigility'" => "'api-tools'", - '"zf-apigility"' => '"api-tools"', - 'zf-apigility/' => 'api-tools/', - 'zf-apigility-admin' => 'api-tools-admin', - 'zf-content-negotiation' => 'api-tools-content-negotiation', - 'zf-hal' => 'api-tools-hal', - 'zf-rest' => 'api-tools-rest', - 'zf-rpc' => 'api-tools-rpc', - 'zf-content-validation' => 'api-tools-content-validation', - 'zf-apigility-ui' => 'api-tools-ui', - 'zf-apigility-documentation-blueprint' => 'api-tools-documentation-blueprint', - 'zf-apigility-documentation-swagger' => 'api-tools-documentation-swagger', - 'zf-apigility-welcome' => 'api-tools-welcome', - 'zf-api-problem' => 'api-tools-api-problem', - 'zf-configuration' => 'api-tools-configuration', - 'zf-http-cache' => 'api-tools-http-cache', - 'zf-mvc-auth' => 'api-tools-mvc-auth', - 'zf-oauth2' => 'api-tools-oauth2', - 'zf-versioning' => 'api-tools-versioning', - 'ZfApigilityDoctrineQueryProviderManager' => 'LaminasApiToolsDoctrineQueryProviderManager', - 'ZfApigilityDoctrineQueryCreateFilterManager' => 'LaminasApiToolsDoctrineQueryCreateFilterManager', - 'zf-apigility-doctrine' => 'api-tools-doctrine', - 'zf-development-mode' => 'laminas-development-mode', - 'zf-doctrine-querybuilder' => 'api-tools-doctrine-querybuilder', - - // 3rd party Apigility packages - 'api-skeletons/zf-' => 'api-skeletons/zf-', // api-skeletons packages - 'zf-oauth2-' => 'zf-oauth2-', // api-skeletons OAuth2-related packages - 'ZF\\OAuth2\\Client' => 'ZF\\OAuth2\\Client', // api-skeletons/zf-oauth2-client - 'ZF\\OAuth2\\Doctrine' => 'ZF\\OAuth2\\Doctrine', // api-skeletons/zf-oauth2-doctrine -]; diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php deleted file mode 100644 index 261bb88..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php +++ /dev/null @@ -1,166 +0,0 @@ -loadClass($class)) { - $legacy = $namespaces[$check] - . strtr(substr($class, strlen($check)), [ - 'ApiTools' => 'Apigility', - 'Mezzio' => 'Expressive', - 'Laminas' => 'Zend', - ]); - class_alias($class, $legacy); - } - }; - } - - /** - * @return callable - */ - private static function createAppendAutoloader(array $namespaces, ArrayObject $loaded) - { - /** - * @param string $class Class name to autoload - * @return void - */ - return static function ($class) use ($namespaces, $loaded) { - $segments = explode('\\', $class); - - if ($segments[0] === 'ZendService' && isset($segments[1])) { - $segments[0] .= '\\' . $segments[1]; - unset($segments[1]); - $segments = array_values($segments); - } - - $i = 0; - $check = ''; - - // We are checking segments of the namespace to match quicker - while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) { - $check .= $segments[$i] . '\\'; - ++$i; - } - - if ($check === '') { - return; - } - - $alias = $namespaces[$check] - . strtr(substr($class, strlen($check)), [ - 'Apigility' => 'ApiTools', - 'Expressive' => 'Mezzio', - 'Zend' => 'Laminas', - 'AbstractZendServer' => 'AbstractZendServer', - 'ZendServerDisk' => 'ZendServerDisk', - 'ZendServerShm' => 'ZendServerShm', - 'ZendMonitor' => 'ZendMonitor', - ]); - - $loaded[$alias] = true; - if (class_exists($alias) || interface_exists($alias) || trait_exists($alias)) { - class_alias($alias, $class); - } - }; - } -} diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php deleted file mode 100644 index c3b601a..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php +++ /dev/null @@ -1,426 +0,0 @@ - true, - 'factories' => true, - 'invokables' => true, - 'services' => true, - ]; - - /** @var array String keys => string values */ - private $exactReplacements = [ - 'zend-expressive' => 'mezzio', - 'zf-apigility' => 'api-tools', - ]; - - /** @var Replacements */ - private $replacements; - - /** @var callable[] */ - private $rulesets; - - public function __construct() - { - $this->replacements = new Replacements(); - - /* Define the rulesets for replacements. - * - * Each ruleset has the following signature: - * - * @param mixed $value - * @param string[] $keys Full nested key hierarchy leading to the value - * @return null|callable - * - * If no match is made, a null is returned, allowing it to fallback to - * the next ruleset in the list. If a match is made, a callback is returned, - * and that will be used to perform the replacement on the value. - * - * The callback should have the following signature: - * - * @param mixed $value - * @param string[] $keys - * @return mixed The transformed value - */ - $this->rulesets = [ - // Exact values - function ($value) { - return is_string($value) && isset($this->exactReplacements[$value]) - ? [$this, 'replaceExactValue'] - : null; - }, - - // Router (MVC applications) - // We do not want to rewrite these. - function ($value, array $keys) { - $key = array_pop($keys); - // Only worried about a top-level "router" key. - return $key === 'router' && $keys === [] && is_array($value) - ? [$this, 'noopReplacement'] - : null; - }, - - // service- and pluginmanager handling - function ($value) { - return is_array($value) && array_intersect_key(self::SERVICE_MANAGER_KEYS_OF_INTEREST, $value) !== [] - ? [$this, 'replaceDependencyConfiguration'] - : null; - }, - - // Array values - function ($value, array $keys) { - return $keys !== [] && is_array($value) - ? [$this, '__invoke'] - : null; - }, - ]; - } - - /** - * @param string[] $keys Hierarchy of keys, for determining location in - * nested configuration. - * @return array - */ - public function __invoke(array $config, array $keys = []) - { - $rewritten = []; - - foreach ($config as $key => $value) { - // Determine new key from replacements - $newKey = is_string($key) ? $this->replace($key, $keys) : $key; - - // Keep original values with original key, if the key has changed, but only at the top-level. - if (empty($keys) && $newKey !== $key) { - $rewritten[$key] = $value; - } - - // Perform value replacements, if any - $newValue = $this->replace($value, $keys, $newKey); - - // Key does not already exist and/or is not an array value - if (! array_key_exists($newKey, $rewritten) || ! is_array($rewritten[$newKey])) { - // Do not overwrite existing values with null values - $rewritten[$newKey] = array_key_exists($newKey, $rewritten) && null === $newValue - ? $rewritten[$newKey] - : $newValue; - continue; - } - - // New value is null; nothing to do. - if (null === $newValue) { - continue; - } - - // Key already exists as an array value, but $value is not an array - if (! is_array($newValue)) { - $rewritten[$newKey][] = $newValue; - continue; - } - - // Key already exists as an array value, and $value is also an array - $rewritten[$newKey] = static::merge($rewritten[$newKey], $newValue); - } - - return $rewritten; - } - - /** - * Perform substitutions as needed on an individual value. - * - * The $key is provided to allow fine-grained selection of rewrite rules. - * - * @param mixed $value - * @param string[] $keys Key hierarchy - * @param null|int|string $key - * @return mixed - */ - private function replace($value, array $keys, $key = null) - { - // Add new key to the list of keys. - // We do not need to remove it later, as we are working on a copy of the array. - $keys[] = $key; - - // Identify rewrite strategy and perform replacements - $rewriteRule = $this->replacementRuleMatch($value, $keys); - return $rewriteRule($value, $keys); - } - - /** - * Merge two arrays together. - * - * If an integer key exists in both arrays, the value from the second array - * will be appended to the first array. If both values are arrays, they are - * merged together, else the value of the second array overwrites the one - * of the first array. - * - * Based on zend-stdlib Zend\Stdlib\ArrayUtils::merge - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) - * - * @return array - */ - public static function merge(array $a, array $b) - { - foreach ($b as $key => $value) { - if (! isset($a[$key]) && ! array_key_exists($key, $a)) { - $a[$key] = $value; - continue; - } - - if (null === $value && array_key_exists($key, $a)) { - // Leave as-is if value from $b is null - continue; - } - - if (is_int($key)) { - $a[] = $value; - continue; - } - - if (is_array($value) && is_array($a[$key])) { - $a[$key] = static::merge($a[$key], $value); - continue; - } - - $a[$key] = $value; - } - - return $a; - } - - /** - * @param mixed $value - * @param null|int|string $key - * @return callable Callable to invoke with value - */ - private function replacementRuleMatch($value, $key = null) - { - foreach ($this->rulesets as $ruleset) { - $result = $ruleset($value, $key); - if (is_callable($result)) { - return $result; - } - } - return [$this, 'fallbackReplacement']; - } - - /** - * Replace a value using the translation table, if the value is a string. - * - * @param mixed $value - * @return mixed - */ - private function fallbackReplacement($value) - { - return is_string($value) - ? $this->replacements->replace($value) - : $value; - } - - /** - * Replace a value matched exactly. - * - * @param mixed $value - * @return mixed - */ - private function replaceExactValue($value) - { - return $this->exactReplacements[$value]; - } - - private function replaceDependencyConfiguration(array $config) - { - $aliases = isset($config['aliases']) && is_array($config['aliases']) - ? $this->replaceDependencyAliases($config['aliases']) - : []; - - if ($aliases) { - $config['aliases'] = $aliases; - } - - $config = $this->replaceDependencyInvokables($config); - $config = $this->replaceDependencyFactories($config); - $config = $this->replaceDependencyServices($config); - - $keys = self::SERVICE_MANAGER_KEYS_OF_INTEREST; - foreach ($config as $key => $data) { - if (isset($keys[$key])) { - continue; - } - - $config[$key] = is_array($data) ? $this->__invoke($data, [$key]) : $data; - } - - return $config; - } - - /** - * Rewrite dependency aliases array - * - * In this case, we want to keep the alias as-is, but rewrite the target. - * - * We need also provide an additional alias if the alias key is a legacy class. - * - * @return array - */ - private function replaceDependencyAliases(array $aliases) - { - foreach ($aliases as $alias => $target) { - if (! is_string($alias) || ! is_string($target)) { - continue; - } - - $newTarget = $this->replacements->replace($target); - $newAlias = $this->replacements->replace($alias); - - $notIn = [$newTarget]; - $name = $newTarget; - while (isset($aliases[$name])) { - $notIn[] = $aliases[$name]; - $name = $aliases[$name]; - } - - if ($newAlias === $alias && ! in_array($alias, $notIn, true)) { - $aliases[$alias] = $newTarget; - continue; - } - - if (isset($aliases[$newAlias])) { - continue; - } - - if (! in_array($newAlias, $notIn, true)) { - $aliases[$alias] = $newAlias; - $aliases[$newAlias] = $newTarget; - } - } - - return $aliases; - } - - /** - * Rewrite dependency invokables array - * - * In this case, we want to keep the alias as-is, but rewrite the target. - * - * We need also provide an additional alias if invokable is defined with - * an alias which is a legacy class. - * - * @return array - */ - private function replaceDependencyInvokables(array $config) - { - if (empty($config['invokables']) || ! is_array($config['invokables'])) { - return $config; - } - - foreach ($config['invokables'] as $alias => $target) { - if (! is_string($alias)) { - continue; - } - - $newTarget = $this->replacements->replace($target); - $newAlias = $this->replacements->replace($alias); - - if ($alias === $target || isset($config['aliases'][$newAlias])) { - $config['invokables'][$alias] = $newTarget; - continue; - } - - $config['invokables'][$newAlias] = $newTarget; - - if ($newAlias === $alias) { - continue; - } - - $config['aliases'][$alias] = $newAlias; - - unset($config['invokables'][$alias]); - } - - return $config; - } - - /** - * @param mixed $value - * @return mixed Returns $value verbatim. - */ - private function noopReplacement($value) - { - return $value; - } - - private function replaceDependencyFactories(array $config) - { - if (empty($config['factories']) || ! is_array($config['factories'])) { - return $config; - } - - foreach ($config['factories'] as $service => $factory) { - if (! is_string($service)) { - continue; - } - - $replacedService = $this->replacements->replace($service); - $factory = is_string($factory) ? $this->replacements->replace($factory) : $factory; - $config['factories'][$replacedService] = $factory; - - if ($replacedService === $service) { - continue; - } - - unset($config['factories'][$service]); - if (isset($config['aliases'][$service])) { - continue; - } - - $config['aliases'][$service] = $replacedService; - } - - return $config; - } - - private function replaceDependencyServices(array $config) - { - if (empty($config['services']) || ! is_array($config['services'])) { - return $config; - } - - foreach ($config['services'] as $service => $serviceInstance) { - if (! is_string($service)) { - continue; - } - - $replacedService = $this->replacements->replace($service); - $serviceInstance = is_array($serviceInstance) ? $this->__invoke($serviceInstance) : $serviceInstance; - - $config['services'][$replacedService] = $serviceInstance; - - if ($service === $replacedService) { - continue; - } - - unset($config['services'][$service]); - - if (isset($config['aliases'][$service])) { - continue; - } - - $config['aliases'][$service] = $replacedService; - } - - return $config; - } -} diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Module.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/Module.php deleted file mode 100644 index 9bb1298..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Module.php +++ /dev/null @@ -1,48 +0,0 @@ -getEventManager() - ->attach('mergeConfig', [$this, 'onMergeConfig']); - } - - /** - * Perform substitutions in the merged configuration. - * - * Rewrites keys and values matching known ZF classes, namespaces, and - * configuration keys to their Laminas equivalents. - * - * Type-hinting deliberately omitted to allow unit testing - * without dependencies on packages that do not exist yet. - * - * @param ModuleEvent $event - */ - public function onMergeConfig($event) - { - /** @var ConfigMergerInterface */ - $configMerger = $event->getConfigListener(); - $processor = new ConfigPostProcessor(); - $configMerger->setMergedConfig( - $processor( - $configMerger->getMergedConfig($returnAsObject = false) - ) - ); - } -} diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php deleted file mode 100644 index 5a09ef1..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php +++ /dev/null @@ -1,40 +0,0 @@ -replacements = array_merge( - require __DIR__ . '/../config/replacements.php', - $additionalReplacements - ); - - // Provide multiple variants of strings containing namespace separators - foreach ($this->replacements as $original => $replacement) { - if (false === strpos($original, '\\')) { - continue; - } - $this->replacements[str_replace('\\', '\\\\', $original)] = str_replace('\\', '\\\\', $replacement); - $this->replacements[str_replace('\\', '\\\\\\\\', $original)] = str_replace('\\', '\\\\\\\\', $replacement); - } - } - - /** - * @param string $value - * @return string - */ - public function replace($value) - { - return strtr($value, $this->replacements); - } -} diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php deleted file mode 100644 index 61aa56d..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php +++ /dev/null @@ -1,73 +0,0 @@ - 'Mezzio\\ProblemDetails\\', - 'Zend\\Expressive\\' => 'Mezzio\\', - - // Laminas - 'Zend\\' => 'Laminas\\', - 'ZF\\ComposerAutoloading\\' => 'Laminas\\ComposerAutoloading\\', - 'ZF\\DevelopmentMode\\' => 'Laminas\\DevelopmentMode\\', - - // Apigility - 'ZF\\Apigility\\' => 'Laminas\\ApiTools\\', - 'ZF\\' => 'Laminas\\ApiTools\\', - - // ZendXml, API wrappers, zend-http OAuth support, zend-diagnostics, ZendDeveloperTools - 'ZendXml\\' => 'Laminas\\Xml\\', - 'ZendOAuth\\' => 'Laminas\\OAuth\\', - 'ZendDiagnostics\\' => 'Laminas\\Diagnostics\\', - 'ZendService\\ReCaptcha\\' => 'Laminas\\ReCaptcha\\', - 'ZendService\\Twitter\\' => 'Laminas\\Twitter\\', - 'ZendDeveloperTools\\' => 'Laminas\\DeveloperTools\\', - ]; - } - - /** - * @return array - */ - public static function namespaceReverse() - { - return [ - // ZendXml, ZendOAuth, ZendDiagnostics, ZendDeveloperTools - 'Laminas\\Xml\\' => 'ZendXml\\', - 'Laminas\\OAuth\\' => 'ZendOAuth\\', - 'Laminas\\Diagnostics\\' => 'ZendDiagnostics\\', - 'Laminas\\DeveloperTools\\' => 'ZendDeveloperTools\\', - - // Zend Service - 'Laminas\\ReCaptcha\\' => 'ZendService\\ReCaptcha\\', - 'Laminas\\Twitter\\' => 'ZendService\\Twitter\\', - - // Zend - 'Laminas\\' => 'Zend\\', - - // Expressive - 'Mezzio\\ProblemDetails\\' => 'Zend\\ProblemDetails\\', - 'Mezzio\\' => 'Zend\\Expressive\\', - - // Laminas to ZfCampus - 'Laminas\\ComposerAutoloading\\' => 'ZF\\ComposerAutoloading\\', - 'Laminas\\DevelopmentMode\\' => 'ZF\\DevelopmentMode\\', - - // Apigility - 'Laminas\\ApiTools\\Admin\\' => 'ZF\\Apigility\\Admin\\', - 'Laminas\\ApiTools\\Doctrine\\' => 'ZF\\Apigility\\Doctrine\\', - 'Laminas\\ApiTools\\Documentation\\' => 'ZF\\Apigility\\Documentation\\', - 'Laminas\\ApiTools\\Example\\' => 'ZF\\Apigility\\Example\\', - 'Laminas\\ApiTools\\Provider\\' => 'ZF\\Apigility\\Provider\\', - 'Laminas\\ApiTools\\Welcome\\' => 'ZF\\Apiglity\\Welcome\\', - 'Laminas\\ApiTools\\' => 'ZF\\', - ]; - } -} diff --git a/kirby/vendor/laminas/laminas-zendframework-bridge/src/autoload.php b/kirby/vendor/laminas/laminas-zendframework-bridge/src/autoload.php deleted file mode 100644 index e92ff58..0000000 --- a/kirby/vendor/laminas/laminas-zendframework-bridge/src/autoload.php +++ /dev/null @@ -1,3 +0,0 @@ - * @author Yoshi Sakai + * @author Arisophy */ $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。'; $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; $PHPMAILER_LANG['execute'] = '実行できませんでした: '; $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; -//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: '; $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; +$PHPMAILER_LANG['signing'] = '署名エラー: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: '; +$PHPMAILER_LANG['variable_set'] = '変数が存在しません: '; +$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: '; diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php index bf41ade..8229d5e 100644 --- a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php @@ -7,23 +7,28 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['buggy_php'] = 'PHP versie gededecteerd die onderhavig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de mail.add_x_header optie in uw php.ini file uit, gebruik MacOS of Linux, of pas de gebruikte PHP versie aan naar versie 7.0.17+ or 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; $PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; $PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; $PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; $PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; $PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; $PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; $PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; $PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['invalid_header'] = 'Ongeldige header naam of waarde'; $PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: '; $PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; $PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; $PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP code: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP informatie: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_detail'] = 'Detail: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; $PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; -$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; diff --git a/kirby/vendor/phpmailer/phpmailer/src/Exception.php b/kirby/vendor/phpmailer/phpmailer/src/Exception.php index a50a899..52eaf95 100644 --- a/kirby/vendor/phpmailer/phpmailer/src/Exception.php +++ b/kirby/vendor/phpmailer/phpmailer/src/Exception.php @@ -35,6 +35,6 @@ class Exception extends \Exception */ public function errorMessage() { - return '' . htmlspecialchars($this->getMessage()) . "
\n"; + return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n"; } } diff --git a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php index eb4b742..5b6dcfa 100644 --- a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -103,14 +103,14 @@ class PHPMailer * * @var string */ - public $From = 'root@localhost'; + public $From = ''; /** * The From name of the message. * * @var string */ - public $FromName = 'Root User'; + public $FromName = ''; /** * The envelope sender of the message. @@ -689,7 +689,7 @@ class PHPMailer protected $boundary = []; /** - * The array of available languages. + * The array of available text strings for the current language. * * @var array */ @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.5.0'; + const VERSION = '6.5.1'; /** * Error severity: message only, continue processing. @@ -1188,25 +1188,33 @@ class PHPMailer * * @return array */ - public static function parseAddresses($addrstr, $useimap = true) + public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591) { $addresses = []; if ($useimap && function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); + // Clear any potential IMAP errors to get rid of notices being thrown at end of script. + imap_errors(); foreach ($list as $address) { if ( - ('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress( - $address->mailbox . '@' . $address->host - ) + '.SYNTAX-ERROR.' !== $address->host && + static::validateAddress($address->mailbox . '@' . $address->host) ) { //Decode the name part if it's present and encoded if ( property_exists($address, 'personal') && - extension_loaded('mbstring') && - preg_match('/^=\?.*\?=$/', $address->personal) + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled + defined('MB_CASE_UPPER') && + preg_match('/^=\?.*\?=$/s', $address->personal) ) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $address->personal = str_replace('_', '=20', $address->personal); + //Decode the name $address->personal = mb_decode_mimeheader($address->personal); + mb_internal_encoding($origCharset); } $addresses[] = [ @@ -1234,9 +1242,16 @@ class PHPMailer $email = trim(str_replace('>', '', $email)); $name = trim($name); if (static::validateAddress($email)) { + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled //If this name is encoded, decode it - if (preg_match('/^=\?.*\?=$/', $name)) { + if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $name = str_replace('_', '=20', $name); + //Decode the name $name = mb_decode_mimeheader($name); + mb_internal_encoding($origCharset); } $addresses[] = [ //Remove any surrounding quotes and spaces from the name @@ -1508,12 +1523,7 @@ class PHPMailer && ini_get('mail.add_x_header') === '1' && stripos(PHP_OS, 'WIN') === 0 ) { - trigger_error( - 'Your version of PHP is affected by a bug that may result in corrupted messages.' . - ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . - ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', - E_USER_WARNING - ); + trigger_error($this->lang('buggy_php'), E_USER_WARNING); } try { @@ -1724,7 +1734,7 @@ class PHPMailer fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); - $addrinfo = static::parseAddresses($toAddr); + $addrinfo = static::parseAddresses($toAddr, true, $this->charSet); $this->doCallback( ($result === 0), [[$addrinfo['address'], $addrinfo['name']]], @@ -1884,7 +1894,7 @@ class PHPMailer if ($this->SingleTo && count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $addrinfo = static::parseAddresses($toAddr); + $addrinfo = static::parseAddresses($toAddr, true, $this->charSet); $this->doCallback( $result, [[$addrinfo['address'], $addrinfo['name']]], @@ -2181,14 +2191,15 @@ class PHPMailer /** * Set the language for error messages. - * Returns false if it cannot load the language file. * The default language is English. * * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * Optionally, the language code can be enhanced with a 4-character + * script annotation and/or a 2-character country annotation. * @param string $lang_path Path to the language file directory, with trailing separator (slash).D * Do not set this from user input! * - * @return bool + * @return bool Returns true if the requested language was loaded, false otherwise. */ public function setLanguage($langcode = 'en', $lang_path = '') { @@ -2211,44 +2222,77 @@ class PHPMailer //Define full set of translatable strings in English $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', + 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', 'encoding' => 'Unknown encoding: ', 'execute' => 'Could not execute: ', + 'extension_missing' => 'Extension missing: ', 'file_access' => 'Could not access file: ', 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', 'invalid_address' => 'Invalid address: ', + 'invalid_header' => 'Invalid header name or value', 'invalid_hostentry' => 'Invalid hostentry: ', 'invalid_host' => 'Invalid host: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', 'signing' => 'Signing Error: ', + 'smtp_code' => 'SMTP code: ', + 'smtp_code_ex' => 'Additional SMTP info: ', 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_detail' => 'Detail: ', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', - 'extension_missing' => 'Extension missing: ', ]; if (empty($lang_path)) { //Calculate an absolute path so it can work if CWD is not here $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } + //Validate $langcode - if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $foundlang = true; + $langcode = strtolower($langcode); + if ( + !preg_match('/^(?P[a-z]{2})(?P - - - + + + - - - + $icon): ?> + + - -