Version Description
(released: 03 May 2021) * Bugfix for PHP 8.0 - fread() does not permit second argument to be 0. Thanks to @trition for reporting and fixing this bug.
Download this release
Release Info
Developer | rosell.dk |
Plugin | WebP Express |
Version | 0.19.1 |
Comparing to | |
See all releases |
Code changes from version 0.19.0 to 0.19.1
- README.md +3 -3
- README.txt +29 -13
- changelog.txt +4 -0
- composer.lock +0 -518
- lib/classes/AdminInit.php +10 -1
- lib/classes/AdminUi.php +10 -0
- lib/classes/BulkConvert.php +18 -3
- lib/classes/ConvertHelperIndependent.php +1 -1
- lib/classes/FileHelper.php +5 -1
- lib/classes/WCFMApi.php +65 -0
- lib/classes/WCFMPage.php +40 -0
- lib/options/js/0.19.0/bulk-convert.js +2 -2
- lib/wcfm/style.css +1 -0
- lib/wcfm/wcfm-options.js +32 -0
- lib/wcfm/wcfm.js +1 -0
- webp-express.php +1 -1
README.md
CHANGED
@@ -34,10 +34,10 @@ The plugin implements the "WebP On Demand" solution described [here](https://git
|
|
34 |
|
35 |
### Benefits
|
36 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
37 |
-
- Better user experience (whether performance goes from terrible to bad, or from good to impressive, it is a benefit)
|
38 |
-
- Better ranking in Google searches (performance is taken into account by Google)
|
39 |
- Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
|
40 |
-
- Currently ~
|
41 |
- It's great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.
|
42 |
|
43 |
### Recent news
|
34 |
|
35 |
### Benefits
|
36 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
37 |
+
- Better user experience (whether performance goes from terrible to bad, or from good to impressive, it is a benefit).
|
38 |
+
- Better ranking in Google searches (performance is taken into account by Google).
|
39 |
- Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
|
40 |
+
- Currently ~94% of all traffic, and ~96% of mobile browsing traffic are done with browsers supporting webp. Check current numbers on [caniuse.com](https://caniuse.com/webp).
|
41 |
- It's great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.
|
42 |
|
43 |
### Recent news
|
README.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: rosell.dk
|
|
3 |
Donate link: https://ko-fi.com/rosell
|
4 |
Tags: webp, images, performance
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 0.19.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -37,10 +37,10 @@ The plugin implements the "WebP On Demand" solution described [here](https://git
|
|
37 |
|
38 |
### Benefits
|
39 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
40 |
-
- Better user experience (whether performance goes from terrible to bad, or from good to impressive, it is a benefit)
|
41 |
-
- Better ranking in Google searches (performance is taken into account by Google)
|
42 |
- Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
|
43 |
-
- Currently ~
|
44 |
- It's great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.
|
45 |
|
46 |
== Installation ==
|
@@ -136,22 +136,31 @@ Bread on the table don't come for free, even though this plugin does, and always
|
|
136 |
* [Mathieu Gollain-Dupont](https://www.linkedin.com/in/mathieu-gollain-dupont-9938a4a/)
|
137 |
* Ruben Solvang
|
138 |
|
139 |
-
**Persons who contributed with ko-fi
|
140 |
-
|
141 |
-
*
|
142 |
-
*
|
143 |
-
*
|
144 |
-
*
|
145 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
**Persons who contributed with extra generously amounts of coffee / lifetime backing (>30$) - thanks!:**
|
148 |
|
|
|
149 |
* Justin - BigScoots ($105)
|
150 |
* Bill Vallance ($102)
|
151 |
* Sebastian ($99)
|
152 |
* Tammy Lee ($90)
|
153 |
-
* Max Kreminsky ($80)
|
154 |
* Steven Sullivan ($51)
|
|
|
155 |
|
156 |
== Frequently Asked Questions ==
|
157 |
|
@@ -736,6 +745,10 @@ If you want to make sure that my coffee supplies don't run dry, you can even buy
|
|
736 |
|
737 |
== Changelog ==
|
738 |
|
|
|
|
|
|
|
|
|
739 |
= 0.19.0 =
|
740 |
*(released: 13 Nov 2020)*
|
741 |
* New convertion method: ffmpeg
|
@@ -1206,6 +1219,9 @@ For older releases, check out changelog.txt
|
|
1206 |
|
1207 |
== Upgrade Notice ==
|
1208 |
|
|
|
|
|
|
|
1209 |
= 0.19.0 =
|
1210 |
* Added new conversion method (ffmpeg)
|
1211 |
|
3 |
Donate link: https://ko-fi.com/rosell
|
4 |
Tags: webp, images, performance
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.7
|
7 |
+
Stable tag: 0.19.1
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
37 |
|
38 |
### Benefits
|
39 |
- Much faster load time for images in browsers that supports webp. The converted images are typically *less than half the size* (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
|
40 |
+
- Better user experience (whether performance goes from terrible to bad, or from good to impressive, it is a benefit).
|
41 |
+
- Better ranking in Google searches (performance is taken into account by Google).
|
42 |
- Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
|
43 |
+
- Currently ~94% of all traffic, and ~96% of mobile browsing traffic are done with browsers supporting webp. Check current numbers on [caniuse.com](https://caniuse.com/webp).
|
44 |
- It's great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.
|
45 |
|
46 |
== Installation ==
|
136 |
* [Mathieu Gollain-Dupont](https://www.linkedin.com/in/mathieu-gollain-dupont-9938a4a/)
|
137 |
* Ruben Solvang
|
138 |
|
139 |
+
**Persons who contributed with [ko-fi](https://ko-fi.com/rosell) since last plugin update - Thanks!**
|
140 |
+
|
141 |
+
* 3 May: Anonymous
|
142 |
+
* 2 May: Anonymous
|
143 |
+
* 13 Apr: Beachmat
|
144 |
+
* 30 Mar: Chris Gibbs
|
145 |
+
* 20 Mar: Mick Wall
|
146 |
+
* 28 Feb: Jim Shelton
|
147 |
+
* 3 Feb: Bjarne Olddrup
|
148 |
+
* 14 Jan: Maggie
|
149 |
+
* 6 Jan: Tim Schön
|
150 |
+
* 24 Dec: Enno Lenze
|
151 |
+
* 19 Dec: Anonymous
|
152 |
+
* 22 Nov: Flavioweb
|
153 |
+
* 16 Nov: WiredGorilla
|
154 |
|
155 |
**Persons who contributed with extra generously amounts of coffee / lifetime backing (>30$) - thanks!:**
|
156 |
|
157 |
+
* Max Kreminsky ($110)
|
158 |
* Justin - BigScoots ($105)
|
159 |
* Bill Vallance ($102)
|
160 |
* Sebastian ($99)
|
161 |
* Tammy Lee ($90)
|
|
|
162 |
* Steven Sullivan ($51)
|
163 |
+
* Mathieu Gollain-Dupont ($45)
|
164 |
|
165 |
== Frequently Asked Questions ==
|
166 |
|
745 |
|
746 |
== Changelog ==
|
747 |
|
748 |
+
= 0.19.1 =
|
749 |
+
*(released: 03 May 2021)*
|
750 |
+
* Bugfix for PHP 8.0 - fread() does not permit second argument to be 0. Thanks to @trition for reporting and fixing this bug.
|
751 |
+
|
752 |
= 0.19.0 =
|
753 |
*(released: 13 Nov 2020)*
|
754 |
* New convertion method: ffmpeg
|
1219 |
|
1220 |
== Upgrade Notice ==
|
1221 |
|
1222 |
+
= 0.19.1 =
|
1223 |
+
* Bugfix for PHP 8
|
1224 |
+
|
1225 |
= 0.19.0 =
|
1226 |
* Added new conversion method (ffmpeg)
|
1227 |
|
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
= 0.19.0 =
|
2 |
*(released: 13 Nov 2020)*
|
3 |
* New convertion method: ffmpeg
|
1 |
+
= 0.19.1 =
|
2 |
+
*(released: 03 May 2021)*
|
3 |
+
* Bugfix for PHP 8.0 - fread() does not permit second argument to be 0. Thanks to @trition for reporting and fixing this bug.
|
4 |
+
|
5 |
= 0.19.0 =
|
6 |
*(released: 13 Nov 2020)*
|
7 |
* New convertion method: ffmpeg
|
composer.lock
DELETED
@@ -1,518 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"content-hash": "8d87b7a5fbf478fb9601a085868d82b5",
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "composer/installers",
|
11 |
-
"version": "v1.9.0",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/composer/installers.git",
|
15 |
-
"reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
|
20 |
-
"reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"composer-plugin-api": "^1.0 || ^2.0"
|
25 |
-
},
|
26 |
-
"replace": {
|
27 |
-
"roundcube/plugin-installer": "*",
|
28 |
-
"shama/baton": "*"
|
29 |
-
},
|
30 |
-
"require-dev": {
|
31 |
-
"composer/composer": "1.6.* || 2.0.*@dev",
|
32 |
-
"composer/semver": "1.0.* || 2.0.*@dev",
|
33 |
-
"phpunit/phpunit": "^4.8.36",
|
34 |
-
"sebastian/comparator": "^1.2.4",
|
35 |
-
"symfony/process": "^2.3"
|
36 |
-
},
|
37 |
-
"type": "composer-plugin",
|
38 |
-
"extra": {
|
39 |
-
"class": "Composer\\Installers\\Plugin",
|
40 |
-
"branch-alias": {
|
41 |
-
"dev-master": "1.0-dev"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"autoload": {
|
45 |
-
"psr-4": {
|
46 |
-
"Composer\\Installers\\": "src/Composer/Installers"
|
47 |
-
}
|
48 |
-
},
|
49 |
-
"notification-url": "https://packagist.org/downloads/",
|
50 |
-
"license": [
|
51 |
-
"MIT"
|
52 |
-
],
|
53 |
-
"authors": [
|
54 |
-
{
|
55 |
-
"name": "Kyle Robinson Young",
|
56 |
-
"email": "kyle@dontkry.com",
|
57 |
-
"homepage": "https://github.com/shama"
|
58 |
-
}
|
59 |
-
],
|
60 |
-
"description": "A multi-framework Composer library installer",
|
61 |
-
"homepage": "https://composer.github.io/installers/",
|
62 |
-
"keywords": [
|
63 |
-
"Craft",
|
64 |
-
"Dolibarr",
|
65 |
-
"Eliasis",
|
66 |
-
"Hurad",
|
67 |
-
"ImageCMS",
|
68 |
-
"Kanboard",
|
69 |
-
"Lan Management System",
|
70 |
-
"MODX Evo",
|
71 |
-
"MantisBT",
|
72 |
-
"Mautic",
|
73 |
-
"Maya",
|
74 |
-
"OXID",
|
75 |
-
"Plentymarkets",
|
76 |
-
"Porto",
|
77 |
-
"RadPHP",
|
78 |
-
"SMF",
|
79 |
-
"Thelia",
|
80 |
-
"Whmcs",
|
81 |
-
"WolfCMS",
|
82 |
-
"agl",
|
83 |
-
"aimeos",
|
84 |
-
"annotatecms",
|
85 |
-
"attogram",
|
86 |
-
"bitrix",
|
87 |
-
"cakephp",
|
88 |
-
"chef",
|
89 |
-
"cockpit",
|
90 |
-
"codeigniter",
|
91 |
-
"concrete5",
|
92 |
-
"croogo",
|
93 |
-
"dokuwiki",
|
94 |
-
"drupal",
|
95 |
-
"eZ Platform",
|
96 |
-
"elgg",
|
97 |
-
"expressionengine",
|
98 |
-
"fuelphp",
|
99 |
-
"grav",
|
100 |
-
"installer",
|
101 |
-
"itop",
|
102 |
-
"joomla",
|
103 |
-
"known",
|
104 |
-
"kohana",
|
105 |
-
"laravel",
|
106 |
-
"lavalite",
|
107 |
-
"lithium",
|
108 |
-
"magento",
|
109 |
-
"majima",
|
110 |
-
"mako",
|
111 |
-
"mediawiki",
|
112 |
-
"modulework",
|
113 |
-
"modx",
|
114 |
-
"moodle",
|
115 |
-
"osclass",
|
116 |
-
"phpbb",
|
117 |
-
"piwik",
|
118 |
-
"ppi",
|
119 |
-
"puppet",
|
120 |
-
"pxcms",
|
121 |
-
"reindex",
|
122 |
-
"roundcube",
|
123 |
-
"shopware",
|
124 |
-
"silverstripe",
|
125 |
-
"sydes",
|
126 |
-
"sylius",
|
127 |
-
"symfony",
|
128 |
-
"typo3",
|
129 |
-
"wordpress",
|
130 |
-
"yawik",
|
131 |
-
"zend",
|
132 |
-
"zikula"
|
133 |
-
],
|
134 |
-
"time": "2020-04-07T06:57:05+00:00"
|
135 |
-
},
|
136 |
-
{
|
137 |
-
"name": "onnov/detect-encoding",
|
138 |
-
"version": "v1.2.0",
|
139 |
-
"source": {
|
140 |
-
"type": "git",
|
141 |
-
"url": "https://github.com/onnov/detect-encoding.git",
|
142 |
-
"reference": "c88cea4f0c83d7f7e0675f2801e0995f328de1ce"
|
143 |
-
},
|
144 |
-
"dist": {
|
145 |
-
"type": "zip",
|
146 |
-
"url": "https://api.github.com/repos/onnov/detect-encoding/zipball/c88cea4f0c83d7f7e0675f2801e0995f328de1ce",
|
147 |
-
"reference": "c88cea4f0c83d7f7e0675f2801e0995f328de1ce",
|
148 |
-
"shasum": ""
|
149 |
-
},
|
150 |
-
"require": {
|
151 |
-
"ext-iconv": "*",
|
152 |
-
"php": ">=7.2"
|
153 |
-
},
|
154 |
-
"require-dev": {
|
155 |
-
"infection/infection": "*",
|
156 |
-
"phpbench/phpbench": "*",
|
157 |
-
"phpcompatibility/php-compatibility": "*",
|
158 |
-
"phpmd/phpmd": "*",
|
159 |
-
"phpstan/phpstan": "*",
|
160 |
-
"phpstan/phpstan-strict-rules": "*",
|
161 |
-
"phpunit/phpunit": "*",
|
162 |
-
"roave/backward-compatibility-check": "*",
|
163 |
-
"squizlabs/php_codesniffer": "*"
|
164 |
-
},
|
165 |
-
"type": "library",
|
166 |
-
"autoload": {
|
167 |
-
"psr-4": {
|
168 |
-
"Onnov\\DetectEncoding\\": "src/"
|
169 |
-
}
|
170 |
-
},
|
171 |
-
"notification-url": "https://packagist.org/downloads/",
|
172 |
-
"license": [
|
173 |
-
"MIT"
|
174 |
-
],
|
175 |
-
"authors": [
|
176 |
-
{
|
177 |
-
"name": "onnov",
|
178 |
-
"email": "oblnn@yandex.ru"
|
179 |
-
}
|
180 |
-
],
|
181 |
-
"description": "Text encoding definition class instead of mb_detect_encoding. Defines: utf-8, windows-1251, koi8-r, iso-8859-5, ibm866, .....",
|
182 |
-
"homepage": "https://github.com/onnov/detect-encoding",
|
183 |
-
"keywords": [
|
184 |
-
"cyrillic",
|
185 |
-
"encoding",
|
186 |
-
"ibm866",
|
187 |
-
"iconv",
|
188 |
-
"iso-8859-5",
|
189 |
-
"koi8-r",
|
190 |
-
"mb_detect_encoding",
|
191 |
-
"utf-8",
|
192 |
-
"windows-1251"
|
193 |
-
],
|
194 |
-
"time": "2019-09-20T16:11:46+00:00"
|
195 |
-
},
|
196 |
-
{
|
197 |
-
"name": "rosell-dk/dom-util-for-webp",
|
198 |
-
"version": "0.4.0",
|
199 |
-
"source": {
|
200 |
-
"type": "git",
|
201 |
-
"url": "https://github.com/rosell-dk/dom-util-for-webp.git",
|
202 |
-
"reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6"
|
203 |
-
},
|
204 |
-
"dist": {
|
205 |
-
"type": "zip",
|
206 |
-
"url": "https://api.github.com/repos/rosell-dk/dom-util-for-webp/zipball/5928aecf64d59124b341dce23ce8ecf48a6eded6",
|
207 |
-
"reference": "5928aecf64d59124b341dce23ce8ecf48a6eded6",
|
208 |
-
"shasum": ""
|
209 |
-
},
|
210 |
-
"require-dev": {
|
211 |
-
"friendsofphp/php-cs-fixer": "^2.11",
|
212 |
-
"phpunit/phpunit": "5.7.27",
|
213 |
-
"squizlabs/php_codesniffer": "3.*"
|
214 |
-
},
|
215 |
-
"suggest": {
|
216 |
-
"phpstan/phpstan": "Suggested for dev, in order to analyse code before committing"
|
217 |
-
},
|
218 |
-
"type": "library",
|
219 |
-
"extra": {
|
220 |
-
"scripts-descriptions": {
|
221 |
-
"ci": "Run tests before CI",
|
222 |
-
"phpcs": "Checks coding styles (PSR2) of file/dir, which you must supply. To check all, supply 'src'",
|
223 |
-
"phpcbf": "Fix coding styles (PSR2) of file/dir, which you must supply. To fix all, supply 'src'",
|
224 |
-
"cs-fix-all": "Fix the coding style of all the source files, to comply with the PSR-2 coding standard",
|
225 |
-
"cs-fix": "Fix the coding style of a PHP file or directory, which you must specify.",
|
226 |
-
"test": "Launches the preconfigured PHPUnit"
|
227 |
-
}
|
228 |
-
},
|
229 |
-
"autoload": {
|
230 |
-
"psr-4": {
|
231 |
-
"DOMUtilForWebP\\": "src/"
|
232 |
-
}
|
233 |
-
},
|
234 |
-
"notification-url": "https://packagist.org/downloads/",
|
235 |
-
"license": [
|
236 |
-
"MIT"
|
237 |
-
],
|
238 |
-
"authors": [
|
239 |
-
{
|
240 |
-
"name": "Bjørn Rosell",
|
241 |
-
"homepage": "https://www.bitwise-it.dk/contact",
|
242 |
-
"role": "Project Author"
|
243 |
-
}
|
244 |
-
],
|
245 |
-
"description": "Replace image URLs found in HTML",
|
246 |
-
"keywords": [
|
247 |
-
"Webp",
|
248 |
-
"html",
|
249 |
-
"images",
|
250 |
-
"replace"
|
251 |
-
],
|
252 |
-
"time": "2020-02-02T11:16:27+00:00"
|
253 |
-
},
|
254 |
-
{
|
255 |
-
"name": "rosell-dk/htaccess-capability-tester",
|
256 |
-
"version": "0.9",
|
257 |
-
"source": {
|
258 |
-
"type": "git",
|
259 |
-
"url": "https://github.com/rosell-dk/htaccess-capability-tester.git",
|
260 |
-
"reference": "2eb2cf38a9f42fc3aa647d6e9c896e124bfebf4c"
|
261 |
-
},
|
262 |
-
"dist": {
|
263 |
-
"type": "zip",
|
264 |
-
"url": "https://api.github.com/repos/rosell-dk/htaccess-capability-tester/zipball/2eb2cf38a9f42fc3aa647d6e9c896e124bfebf4c",
|
265 |
-
"reference": "2eb2cf38a9f42fc3aa647d6e9c896e124bfebf4c",
|
266 |
-
"shasum": ""
|
267 |
-
},
|
268 |
-
"require": {
|
269 |
-
"php": "^5.6 | ^7.0"
|
270 |
-
},
|
271 |
-
"require-dev": {
|
272 |
-
"phpunit/php-code-coverage": "dev-4.0-dev as 4.0.4",
|
273 |
-
"phpunit/phpunit": "^5.7",
|
274 |
-
"squizlabs/php_codesniffer": "3.*"
|
275 |
-
},
|
276 |
-
"suggest": {
|
277 |
-
"php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
|
278 |
-
},
|
279 |
-
"type": "library",
|
280 |
-
"extra": {
|
281 |
-
"scripts-descriptions": {
|
282 |
-
"ci": "Run tests before CI",
|
283 |
-
"phpcs": "Checks coding styles (PSR2) of file/dir, which you must supply. To check all, supply 'src'",
|
284 |
-
"phpcbf": "Fix coding styles (PSR2) of file/dir, which you must supply. To fix all, supply 'src'",
|
285 |
-
"cs-fix-all": "Fix the coding style of all the source files, to comply with the PSR-2 coding standard",
|
286 |
-
"cs-fix": "Fix the coding style of a PHP file or directory, which you must specify.",
|
287 |
-
"test": "Launches the preconfigured PHPUnit"
|
288 |
-
}
|
289 |
-
},
|
290 |
-
"autoload": {
|
291 |
-
"psr-4": {
|
292 |
-
"HtaccessCapabilityTester\\": "src/"
|
293 |
-
}
|
294 |
-
},
|
295 |
-
"notification-url": "https://packagist.org/downloads/",
|
296 |
-
"license": [
|
297 |
-
"MIT"
|
298 |
-
],
|
299 |
-
"authors": [
|
300 |
-
{
|
301 |
-
"name": "Bjørn Rosell",
|
302 |
-
"homepage": "https://www.bitwise-it.dk/contact",
|
303 |
-
"role": "Project Author"
|
304 |
-
}
|
305 |
-
],
|
306 |
-
"description": "Test the capabilities of .htaccess files on the server using live tests",
|
307 |
-
"keywords": [
|
308 |
-
".htaccess",
|
309 |
-
"apache",
|
310 |
-
"litespeed"
|
311 |
-
],
|
312 |
-
"time": "2020-11-04T10:29:38+00:00"
|
313 |
-
},
|
314 |
-
{
|
315 |
-
"name": "rosell-dk/image-mime-type-guesser",
|
316 |
-
"version": "0.3",
|
317 |
-
"source": {
|
318 |
-
"type": "git",
|
319 |
-
"url": "https://github.com/rosell-dk/image-mime-type-guesser.git",
|
320 |
-
"reference": "204fd61ca81e3b0ba46c6165dab8f74816b1fe99"
|
321 |
-
},
|
322 |
-
"dist": {
|
323 |
-
"type": "zip",
|
324 |
-
"url": "https://api.github.com/repos/rosell-dk/image-mime-type-guesser/zipball/204fd61ca81e3b0ba46c6165dab8f74816b1fe99",
|
325 |
-
"reference": "204fd61ca81e3b0ba46c6165dab8f74816b1fe99",
|
326 |
-
"shasum": ""
|
327 |
-
},
|
328 |
-
"require-dev": {
|
329 |
-
"friendsofphp/php-cs-fixer": "^2.11",
|
330 |
-
"phpunit/phpunit": "^5.7.27",
|
331 |
-
"squizlabs/php_codesniffer": "3.*"
|
332 |
-
},
|
333 |
-
"type": "library",
|
334 |
-
"extra": {
|
335 |
-
"scripts-descriptions": {
|
336 |
-
"ci": "Run tests before CI",
|
337 |
-
"phpcs": "Checks coding styles (PSR2) of file/dir, which you must supply. To check all, supply 'src'",
|
338 |
-
"phpcbf": "Fix coding styles (PSR2) of file/dir, which you must supply. To fix all, supply 'src'",
|
339 |
-
"cs-fix-all": "Fix the coding style of all the source files, to comply with the PSR-2 coding standard",
|
340 |
-
"cs-fix": "Fix the coding style of a PHP file or directory, which you must specify.",
|
341 |
-
"test": "Launches the preconfigured PHPUnit"
|
342 |
-
}
|
343 |
-
},
|
344 |
-
"autoload": {
|
345 |
-
"psr-4": {
|
346 |
-
"ImageMimeTypeGuesser\\": "src/"
|
347 |
-
}
|
348 |
-
},
|
349 |
-
"notification-url": "https://packagist.org/downloads/",
|
350 |
-
"license": [
|
351 |
-
"MIT"
|
352 |
-
],
|
353 |
-
"authors": [
|
354 |
-
{
|
355 |
-
"name": "Bjørn Rosell",
|
356 |
-
"homepage": "https://www.bitwise-it.dk/contact",
|
357 |
-
"role": "Project Author"
|
358 |
-
}
|
359 |
-
],
|
360 |
-
"description": "Guess mime type of images",
|
361 |
-
"keywords": [
|
362 |
-
"image",
|
363 |
-
"images",
|
364 |
-
"mime",
|
365 |
-
"mime type"
|
366 |
-
],
|
367 |
-
"time": "2019-03-29T09:33:28+00:00"
|
368 |
-
},
|
369 |
-
{
|
370 |
-
"name": "rosell-dk/webp-convert",
|
371 |
-
"version": "2.4.0",
|
372 |
-
"source": {
|
373 |
-
"type": "git",
|
374 |
-
"url": "https://github.com/rosell-dk/webp-convert.git",
|
375 |
-
"reference": "187a578ee55730f7a128a2f07b4351524b10d47b"
|
376 |
-
},
|
377 |
-
"dist": {
|
378 |
-
"type": "zip",
|
379 |
-
"url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/187a578ee55730f7a128a2f07b4351524b10d47b",
|
380 |
-
"reference": "187a578ee55730f7a128a2f07b4351524b10d47b",
|
381 |
-
"shasum": ""
|
382 |
-
},
|
383 |
-
"require": {
|
384 |
-
"php": "^5.6 | ^7.0",
|
385 |
-
"rosell-dk/image-mime-type-guesser": "^0.3"
|
386 |
-
},
|
387 |
-
"require-dev": {
|
388 |
-
"friendsofphp/php-cs-fixer": "^2.11",
|
389 |
-
"phpunit/phpunit": "5.7.27",
|
390 |
-
"squizlabs/php_codesniffer": "3.*"
|
391 |
-
},
|
392 |
-
"suggest": {
|
393 |
-
"ext-gd": "to use GD extension for converting. Note: Gd must be compiled with webp support",
|
394 |
-
"ext-imagick": "to use Imagick extension for converting. Note: Gd must be compiled with webp support",
|
395 |
-
"ext-vips": "to use Vips extension for converting.",
|
396 |
-
"php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
|
397 |
-
},
|
398 |
-
"type": "library",
|
399 |
-
"extra": {
|
400 |
-
"scripts-descriptions": {
|
401 |
-
"ci": "Run tests before CI",
|
402 |
-
"phpcs": "Checks coding styles (PSR2) of file/dir, which you must supply. To check all, supply 'src'",
|
403 |
-
"phpcbf": "Fix coding styles (PSR2) of file/dir, which you must supply. To fix all, supply 'src'",
|
404 |
-
"cs-fix-all": "Fix the coding style of all the source files, to comply with the PSR-2 coding standard",
|
405 |
-
"cs-fix": "Fix the coding style of a PHP file or directory, which you must specify.",
|
406 |
-
"test": "Launches the preconfigured PHPUnit"
|
407 |
-
}
|
408 |
-
},
|
409 |
-
"autoload": {
|
410 |
-
"psr-4": {
|
411 |
-
"WebPConvert\\": "src/"
|
412 |
-
}
|
413 |
-
},
|
414 |
-
"notification-url": "https://packagist.org/downloads/",
|
415 |
-
"license": [
|
416 |
-
"MIT"
|
417 |
-
],
|
418 |
-
"authors": [
|
419 |
-
{
|
420 |
-
"name": "Bjørn Rosell",
|
421 |
-
"homepage": "https://www.bitwise-it.dk/contact",
|
422 |
-
"role": "Project Author"
|
423 |
-
},
|
424 |
-
{
|
425 |
-
"name": "Martin Folkers",
|
426 |
-
"homepage": "https://twobrain.io",
|
427 |
-
"role": "Collaborator"
|
428 |
-
}
|
429 |
-
],
|
430 |
-
"description": "Convert JPEG & PNG to WebP with PHP",
|
431 |
-
"keywords": [
|
432 |
-
"Webp",
|
433 |
-
"cwebp",
|
434 |
-
"gd",
|
435 |
-
"image conversion",
|
436 |
-
"images",
|
437 |
-
"imagick",
|
438 |
-
"jpg",
|
439 |
-
"jpg2webp",
|
440 |
-
"png",
|
441 |
-
"png2webp"
|
442 |
-
],
|
443 |
-
"time": "2020-11-10T11:24:50+00:00"
|
444 |
-
},
|
445 |
-
{
|
446 |
-
"name": "rosell-dk/webp-convert-cloud-service",
|
447 |
-
"version": "2.0.1",
|
448 |
-
"source": {
|
449 |
-
"type": "git",
|
450 |
-
"url": "https://github.com/rosell-dk/webp-convert-cloud-service.git",
|
451 |
-
"reference": "703c2f1c76d30468ee3977170bfa3da138d8c4ad"
|
452 |
-
},
|
453 |
-
"dist": {
|
454 |
-
"type": "zip",
|
455 |
-
"url": "https://api.github.com/repos/rosell-dk/webp-convert-cloud-service/zipball/703c2f1c76d30468ee3977170bfa3da138d8c4ad",
|
456 |
-
"reference": "703c2f1c76d30468ee3977170bfa3da138d8c4ad",
|
457 |
-
"shasum": ""
|
458 |
-
},
|
459 |
-
"require": {
|
460 |
-
"rosell-dk/webp-convert": "^2.0.0"
|
461 |
-
},
|
462 |
-
"require-dev": {
|
463 |
-
"friendsofphp/php-cs-fixer": "^2.11",
|
464 |
-
"phpunit/phpunit": "5.7.27",
|
465 |
-
"squizlabs/php_codesniffer": "3.*"
|
466 |
-
},
|
467 |
-
"type": "library",
|
468 |
-
"extra": {
|
469 |
-
"scripts-descriptions": {
|
470 |
-
"ci": "Run tests before CI",
|
471 |
-
"phpcs": "Checks coding styles (PSR2) of file/dir, which you must supply. To check all, supply 'src'",
|
472 |
-
"phpcbf": "Fix coding styles (PSR2) of file/dir, which you must supply. To fix all, supply 'src'",
|
473 |
-
"cs-fix-all": "Fix the coding style of all the source files, to comply with the PSR-2 coding standard",
|
474 |
-
"cs-fix": "Fix the coding style of a PHP file or directory, which you must specify.",
|
475 |
-
"test": "Launches the preconfigured PHPUnit"
|
476 |
-
}
|
477 |
-
},
|
478 |
-
"autoload": {
|
479 |
-
"psr-4": {
|
480 |
-
"WebPConvertCloudService\\": "src/"
|
481 |
-
}
|
482 |
-
},
|
483 |
-
"notification-url": "https://packagist.org/downloads/",
|
484 |
-
"license": [
|
485 |
-
"MIT"
|
486 |
-
],
|
487 |
-
"authors": [
|
488 |
-
{
|
489 |
-
"name": "Bjørn Rosell",
|
490 |
-
"role": "Project Author",
|
491 |
-
"homepage": "https://www.bitwise-it.dk/contact"
|
492 |
-
}
|
493 |
-
],
|
494 |
-
"description": "Cloud service for converting JPEG & PNG to WebP",
|
495 |
-
"keywords": [
|
496 |
-
"Webp",
|
497 |
-
"cwebp",
|
498 |
-
"gd",
|
499 |
-
"image conversion",
|
500 |
-
"images",
|
501 |
-
"imagick",
|
502 |
-
"jpg",
|
503 |
-
"jpg2webp",
|
504 |
-
"png",
|
505 |
-
"png2webp"
|
506 |
-
],
|
507 |
-
"time": "2019-06-30T08:28:35+00:00"
|
508 |
-
}
|
509 |
-
],
|
510 |
-
"packages-dev": [],
|
511 |
-
"aliases": [],
|
512 |
-
"minimum-stability": "stable",
|
513 |
-
"stability-flags": [],
|
514 |
-
"prefer-stable": false,
|
515 |
-
"prefer-lowest": false,
|
516 |
-
"platform": [],
|
517 |
-
"platform-dev": []
|
518 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/classes/AdminInit.php
CHANGED
@@ -52,6 +52,14 @@ class AdminInit
|
|
52 |
|
53 |
if (current_user_can('manage_options')) {
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
// Hooks related to options page
|
56 |
if (self::pageNowIs('options-general.php') || self::pageNowIs('settings.php')) {
|
57 |
if (isset($_GET['page']) && ('webp_express_settings_page' === $_GET['page'])) {
|
@@ -75,9 +83,10 @@ class AdminInit
|
|
75 |
add_action('wp_ajax_webpexpress_dismiss_message', array('\WebPExpress\DismissableMessages', 'processAjaxDismissMessage'));
|
76 |
add_action('wp_ajax_webpexpress_dismiss_global_message', array('\WebPExpress\DismissableGlobalMessages', 'processAjaxDismissGlobalMessage'));
|
77 |
add_action('wp_ajax_webpexpress_self_test', array('\WebPExpress\SelfTest', 'processAjax'));
|
|
|
78 |
|
79 |
|
80 |
-
// Add settings link on the plugins page
|
81 |
add_filter('plugin_action_links_' . plugin_basename(WEBPEXPRESS_PLUGIN), array('\WebPExpress\AdminUi', 'pluginActionLinksFilter'), 10, 2);
|
82 |
|
83 |
// Add settings link in multisite
|
52 |
|
53 |
if (current_user_can('manage_options')) {
|
54 |
|
55 |
+
// Hooks related to conversion page (in media)
|
56 |
+
if (self::pageNowIs('upload.php')) {
|
57 |
+
if (isset($_GET['page']) && ('webp_express_conversion_page' === $_GET['page'])) {
|
58 |
+
//add_action('admin_enqueue_scripts', array('\WebPExpress\WCFMPage', 'enqueueScripts'));
|
59 |
+
add_action('admin_head', array('\WebPExpress\WCFMPage', 'addToHead'));
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
// Hooks related to options page
|
64 |
if (self::pageNowIs('options-general.php') || self::pageNowIs('settings.php')) {
|
65 |
if (isset($_GET['page']) && ('webp_express_settings_page' === $_GET['page'])) {
|
83 |
add_action('wp_ajax_webpexpress_dismiss_message', array('\WebPExpress\DismissableMessages', 'processAjaxDismissMessage'));
|
84 |
add_action('wp_ajax_webpexpress_dismiss_global_message', array('\WebPExpress\DismissableGlobalMessages', 'processAjaxDismissGlobalMessage'));
|
85 |
add_action('wp_ajax_webpexpress_self_test', array('\WebPExpress\SelfTest', 'processAjax'));
|
86 |
+
add_action('wp_ajax_webpexpress-wcfm-api', array('\WebPExpress\WCFMApi', 'processRequest'));
|
87 |
|
88 |
|
89 |
+
// Add settings link on the plugins list page
|
90 |
add_filter('plugin_action_links_' . plugin_basename(WEBPEXPRESS_PLUGIN), array('\WebPExpress\AdminUi', 'pluginActionLinksFilter'), 10, 2);
|
91 |
|
92 |
// Add settings link in multisite
|
lib/classes/AdminUi.php
CHANGED
@@ -73,5 +73,15 @@ class AdminUi
|
|
73 |
array('\WebPExpress\OptionsPage', 'display') //The function to be called to output the content for this page.
|
74 |
);
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
}
|
73 |
array('\WebPExpress\OptionsPage', 'display') //The function to be called to output the content for this page.
|
74 |
);
|
75 |
|
76 |
+
// Add Media page
|
77 |
+
/* Uncommented until ready!
|
78 |
+
add_media_page(
|
79 |
+
'WebP Express', //Page Title
|
80 |
+
'WebP Express', //Menu Title
|
81 |
+
'manage_options', //capability
|
82 |
+
'webp_express_conversion_page', // slug
|
83 |
+
array('\WebPExpress\WCFMPage', 'display') //The function to be called to output the content for this page.
|
84 |
+
);
|
85 |
+
*/
|
86 |
}
|
87 |
}
|
lib/classes/BulkConvert.php
CHANGED
@@ -29,7 +29,8 @@ class BulkConvert
|
|
29 |
'only-converted' => false,
|
30 |
'only-unconverted' => true,
|
31 |
'image-types' => $config['image-types'],
|
32 |
-
]
|
|
|
33 |
];
|
34 |
|
35 |
$rootIds = Paths::filterOutSubRoots($config['scope']);
|
@@ -86,7 +87,15 @@ class BulkConvert
|
|
86 |
if (($filename != ".") && ($filename != "..")) {
|
87 |
|
88 |
if (@is_dir($dir . "/" . $filename)) {
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
} else {
|
91 |
// its a file - check if its a jpeg or png
|
92 |
|
@@ -217,7 +226,13 @@ class BulkConvert
|
|
217 |
}
|
218 |
|
219 |
}
|
220 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
}
|
222 |
}
|
223 |
}
|
29 |
'only-converted' => false,
|
30 |
'only-unconverted' => true,
|
31 |
'image-types' => $config['image-types'],
|
32 |
+
],
|
33 |
+
'flattenList' => true,
|
34 |
];
|
35 |
|
36 |
$rootIds = Paths::filterOutSubRoots($config['scope']);
|
87 |
if (($filename != ".") && ($filename != "..")) {
|
88 |
|
89 |
if (@is_dir($dir . "/" . $filename)) {
|
90 |
+
if ($listOptions['flattenList']) {
|
91 |
+
$results = array_merge($results, self::getListRecursively($relDir . "/" . $filename, $listOptions));
|
92 |
+
} else {
|
93 |
+
$results[] = [
|
94 |
+
'name' => $filename,
|
95 |
+
'isDir' => true,
|
96 |
+
'children' => self::getListRecursively($relDir . "/" . $filename, $listOptions)
|
97 |
+
];
|
98 |
+
}
|
99 |
} else {
|
100 |
// its a file - check if its a jpeg or png
|
101 |
|
226 |
}
|
227 |
|
228 |
}
|
229 |
+
if ($listOptions['flattenList']) {
|
230 |
+
$results[] = $path;
|
231 |
+
} else {
|
232 |
+
$results[] = [
|
233 |
+
'name' => basename($path)
|
234 |
+
];
|
235 |
+
}
|
236 |
}
|
237 |
}
|
238 |
}
|
lib/classes/ConvertHelperIndependent.php
CHANGED
@@ -571,7 +571,7 @@ APACHE
|
|
571 |
$text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
|
572 |
|
573 |
// TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
|
574 |
-
$text = 'WebP Express 0.19.
|
575 |
|
576 |
$logFile = self::getLogFilename($source, $logDir);
|
577 |
|
571 |
$text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
|
572 |
|
573 |
// TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
|
574 |
+
$text = 'WebP Express 0.19.1. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
|
575 |
|
576 |
$logFile = self::getLogFilename($source, $logDir);
|
577 |
|
lib/classes/FileHelper.php
CHANGED
@@ -225,7 +225,11 @@ class FileHelper
|
|
225 |
$handle = @fopen($filename, "r");
|
226 |
if ($handle !== false) {
|
227 |
// Return value is either file content or false
|
228 |
-
|
|
|
|
|
|
|
|
|
229 |
fclose($handle);
|
230 |
}
|
231 |
|
225 |
$handle = @fopen($filename, "r");
|
226 |
if ($handle !== false) {
|
227 |
// Return value is either file content or false
|
228 |
+
if (filesize($filename) == 0) {
|
229 |
+
$return = '';
|
230 |
+
} else {
|
231 |
+
$return = @fread($handle, filesize($filename));
|
232 |
+
}
|
233 |
fclose($handle);
|
234 |
}
|
235 |
|
lib/classes/WCFMApi.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebPExpress;
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
|
9 |
+
class WCFMApi
|
10 |
+
{
|
11 |
+
|
12 |
+
public static function processRequest() {
|
13 |
+
if (!check_ajax_referer('webpexpress-wcfm-nonce', 'nonce', false)) {
|
14 |
+
wp_send_json_error('The security nonce has expired. You need to reload (press F5) and try again)');
|
15 |
+
wp_die();
|
16 |
+
}
|
17 |
+
|
18 |
+
$result = self::processGetTree();
|
19 |
+
|
20 |
+
$json = wp_json_encode($result, JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
21 |
+
if ($json === false) {
|
22 |
+
// TODO: We can do better error handling than this!
|
23 |
+
echo '';
|
24 |
+
} else {
|
25 |
+
echo $json;
|
26 |
+
}
|
27 |
+
|
28 |
+
wp_die();
|
29 |
+
}
|
30 |
+
|
31 |
+
public static function processGetTree() {
|
32 |
+
$config = Config::loadConfigAndFix();
|
33 |
+
$rootIds = Paths::filterOutSubRoots($config['scope']);
|
34 |
+
|
35 |
+
$listOptions = [
|
36 |
+
//'root' => Paths::getUploadDirAbs(),
|
37 |
+
'ext' => $config['destination-extension'],
|
38 |
+
'destination-folder' => $config['destination-folder'], /* hm, "destination-folder" is a bad name... */
|
39 |
+
'webExpressContentDirAbs' => Paths::getWebPExpressContentDirAbs(),
|
40 |
+
'uploadDirAbs' => Paths::getUploadDirAbs(),
|
41 |
+
'useDocRootForStructuringCacheDir' => (($config['destination-structure'] == 'doc-root') && (Paths::canUseDocRootForStructuringCacheDir())),
|
42 |
+
'imageRoots' => new ImageRoots(Paths::getImageRootsDefForSelectedIds($config['scope'])), // (Paths::getImageRootsDef()
|
43 |
+
'filter' => [
|
44 |
+
'only-converted' => false,
|
45 |
+
'only-unconverted' => false,
|
46 |
+
'image-types' => $config['image-types'],
|
47 |
+
],
|
48 |
+
'flattenList' => false
|
49 |
+
];
|
50 |
+
|
51 |
+
$children = [];
|
52 |
+
foreach ($rootIds as $rootId) {
|
53 |
+
$listOptions['root'] = Paths::getAbsDirById($rootId);
|
54 |
+
$grandChildren = BulkConvert::getListRecursively('.', $listOptions);
|
55 |
+
$children[] = [
|
56 |
+
'name' => $rootId,
|
57 |
+
'isDir' => true,
|
58 |
+
'children' => $grandChildren
|
59 |
+
];
|
60 |
+
}
|
61 |
+
return ['name' => '', 'isDir' => true, 'isOpen' => true, 'children' => $children];
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
lib/classes/WCFMPage.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebPExpress;
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
|
9 |
+
class WCFMPage
|
10 |
+
{
|
11 |
+
|
12 |
+
// callback (registred in AdminUi)
|
13 |
+
public static function display() {
|
14 |
+
echo '<h1>WebP Express Conversion Manager</h1>';
|
15 |
+
echo '<p>Work in progress! Currently, actions are not working, only file browser</p>';
|
16 |
+
echo '<div id="webpconvert-filemanager">loading</div>';
|
17 |
+
//include WEBPEXPRESS_PLUGIN_DIR . '/lib/options/page.php';
|
18 |
+
}
|
19 |
+
|
20 |
+
/* We add directly to head instead, to get the type="module"
|
21 |
+
public static function enqueueScripts() {
|
22 |
+
$ver = '0';
|
23 |
+
wp_register_script('wcfileman', plugins_url('js/wcfm/index.js', WEBPEXPRESS_PLUGIN), [], $ver);
|
24 |
+
wp_enqueue_script('wcfileman');
|
25 |
+
}*/
|
26 |
+
|
27 |
+
public static function addToHead() {
|
28 |
+
$baseUrl = plugins_url('lib/wcfm', WEBPEXPRESS_PLUGIN);
|
29 |
+
//$url = plugins_url('js/conversion-manager/index.9149ea80.js', WEBPEXPRESS_PLUGIN);
|
30 |
+
|
31 |
+
$wcfmNonce = wp_create_nonce('webpexpress-wcfm-nonce');
|
32 |
+
echo '<scr' . 'ipt>window.webpExpressWCFMNonce = "' . $wcfmNonce . '";</scr' . 'ipt>';
|
33 |
+
|
34 |
+
echo '<scr' . 'ipt src="' . $baseUrl . '/wcfm-options.js?2"></scr' . 'ipt>';
|
35 |
+
echo '<scr' . 'ipt type="module" src="' . $baseUrl . '/wcfm.js"></scr' . 'ipt>';
|
36 |
+
|
37 |
+
echo '<link rel="stylesheet" href="' . $baseUrl . '/style.css">';
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
lib/options/js/0.19.0/bulk-convert.js
CHANGED
@@ -5,9 +5,9 @@ function openBulkConvertPopup() {
|
|
5 |
tb_show('Bulk Convert', '#TB_inline?inlineId=bulkconvertpopup');
|
6 |
|
7 |
var data = {
|
8 |
-
|
9 |
'nonce' : window.webpExpress['ajax-nonces']['list-unconverted-files'],
|
10 |
-
|
11 |
jQuery.ajax({
|
12 |
type: "POST",
|
13 |
url: ajaxurl,
|
5 |
tb_show('Bulk Convert', '#TB_inline?inlineId=bulkconvertpopup');
|
6 |
|
7 |
var data = {
|
8 |
+
'action': 'list_unconverted_files',
|
9 |
'nonce' : window.webpExpress['ajax-nonces']['list-unconverted-files'],
|
10 |
+
};
|
11 |
jQuery.ajax({
|
12 |
type: "POST",
|
13 |
url: ajaxurl,
|
lib/wcfm/style.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.fileitem[data-v-1d130b20]{vertical-align:middle;white-space:nowrap}.fileitem p[data-v-1d130b20]:hover{background:#eee}.fileitem p[data-v-1d130b20]{user-select:none;cursor:default;margin:0;padding:3px;line-height:25px;border-bottom:1px solid #f2f2f2}.fileitem p .foldUnfold[data-v-1d130b20]{user-select:none;cursor:pointer}.fileitem p button[data-v-1d130b20]{float:right;margin-top:2px;cursor:pointer;background-color:#fff;margin-right:10px}.fileitem p svg.icon-fold[data-v-1d130b20],.fileitem p svg.icon-unfold[data-v-1d130b20]{width:12px;height:12px;vertical-align:middle;padding:3px;margin-right:3px;display:inline-block;border:0 solid grey}.fileitem p svg.icon-file[data-v-1d130b20],.fileitem p svg.icon-folder[data-v-1d130b20]{width:20px;height:20px;display:inline;vertical-align:middle;padding-top:1px;padding-bottom:2px;padding-right:5px}.fileitem p svg.icon-file[data-v-1d130b20]{margin-left:22px}ul{list-style-type:none;padding:0;margin:0}li{margin:0 0 0 20px}.multipane{display:flex;align-items:stretch}.multipane.layout-h{flex-direction:column}.multipane.layout-v{flex-direction:row}.multipane div.pane{position:relative;z-index:1;padding:15px;overflow:auto;border:1px solid #ccc;background:#fff}@media (max-width:800px){.multipane{flex-direction:column!important}div.pane{width:100%!important;margin-bottom:8px;box-sizing:border-box}.multipane-resizer{display:none!important}}.multipane-resizer{display:block;position:relative;z-index:2}.layout-h>.multipane-resizer{height:10px;margin-top:-10px;top:5px;cursor:row-resize}.layout-v>.multipane-resizer{width:14px;cursor:col-resize}.layout-v>.multipane-resizer:before{display:block;content:"";width:3px;height:40px;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-2px;border-left:1px solid #ccc;border-right:1px solid #ccc}.layout-v>.multipane-resizer:hover:before{border-color:#999}#webpconvert-filemanager,.mainpanel{height:100%}.mainpanel{min-height:400px}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
lib/wcfm/wcfm-options.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
window["wcfmoptions"] = {};
|
3 |
+
|
4 |
+
window["wcfmoptions"]['poster'] = function(action, options, successCallback, errorCallback) {
|
5 |
+
|
6 |
+
// Call the API
|
7 |
+
jQuery.ajax({
|
8 |
+
type: "POST",
|
9 |
+
url: ajaxurl,
|
10 |
+
data: {
|
11 |
+
'action': 'webpexpress-wcfm-api',
|
12 |
+
'nonce' : window.webpExpressWCFMNonce,
|
13 |
+
'command': action,
|
14 |
+
'options': options
|
15 |
+
},
|
16 |
+
dataType: 'text',
|
17 |
+
timeout: 30000,
|
18 |
+
error: function (jqXHR, status, errorThrown) {
|
19 |
+
console.log(errorThrown);
|
20 |
+
},
|
21 |
+
success: function(responseText) {
|
22 |
+
console.log('ajax response', responseText);
|
23 |
+
//response = "[{name:'hello'}]";
|
24 |
+
try {
|
25 |
+
responseObj = JSON.parse(responseText);
|
26 |
+
successCallback(responseObj);
|
27 |
+
} catch (e) {
|
28 |
+
errorCallback(response)
|
29 |
+
}
|
30 |
+
}
|
31 |
+
});
|
32 |
+
}
|
lib/wcfm/wcfm.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function e(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e<o.length;e++)n[o[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(x(e)){const t={};for(let n=0;n<e.length;n++){const l=e[n],r=o(S(l)?s(l):l);if(r)for(const e in r)t[e]=r[e]}return t}if(O(e))return e}const l=/;(?![^(]*\))/g,r=/:(.+)/;function s(e){const t={};return e.split(l).forEach((e=>{if(e){const n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function i(e){let t="";if(S(e))t=e;else if(x(e))for(let n=0;n<e.length;n++)t+=i(e[n])+" ";else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const c=e=>null==e?"":O(e)?JSON.stringify(e,u,2):String(e),u=(e,t)=>w(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[t+" =>"]=n,e)),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()]}:!O(t)||x(t)||P(t)?t:String(t),a={},f=[],p=()=>{},d=()=>!1,h=/^on[^a-z]/,m=e=>h.test(e),g=e=>e.startsWith("onUpdate:"),v=Object.assign,y=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_=Object.prototype.hasOwnProperty,b=(e,t)=>_.call(e,t),x=Array.isArray,w=e=>"[object Map]"===R(e),C=e=>"[object Set]"===R(e),k=e=>"function"==typeof e,S=e=>"string"==typeof e,F=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,E=e=>O(e)&&k(e.then)&&k(e.catch),M=Object.prototype.toString,R=e=>M.call(e),P=e=>"[object Object]"===R(e),z=e=>S(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=e(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),I=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-(\w)/g,j=I((e=>e.replace(T,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,A=I((e=>e.replace(N,"-$1").toLowerCase())),V=I((e=>e.charAt(0).toUpperCase()+e.slice(1))),U=I((e=>e?"on"+V(e):"")),D=(e,t)=>e!==t&&(e==e||t==t),B=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},L=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},H=e=>{const t=parseFloat(e);return isNaN(t)?e:t},W=new WeakMap,K=[];let G;const q=Symbol(""),J=Symbol("");function X(e,t=a){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return t.scheduler?void 0:e();if(!K.includes(n)){Q(n);try{return te.push(ee),ee=!0,K.push(n),G=n,e()}finally{K.pop(),oe(),G=K[K.length-1]}}};return n.id=Z++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function Y(e){e.active&&(Q(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let Z=0;function Q(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let ee=!0;const te=[];function ne(){te.push(ee),ee=!1}function oe(){const e=te.pop();ee=void 0===e||e}function le(e,t,n){if(!ee||void 0===G)return;let o=W.get(e);o||W.set(e,o=new Map);let l=o.get(n);l||o.set(n,l=new Set),l.has(G)||(l.add(G),G.deps.push(l))}function re(e,t,n,o,l,r){const s=W.get(e);if(!s)return;const i=new Set,c=e=>{e&&e.forEach((e=>{(e!==G||e.allowRecurse)&&i.add(e)}))};if("clear"===t)s.forEach(c);else if("length"===n&&x(e))s.forEach(((e,t)=>{("length"===t||t>=o)&&c(e)}));else switch(void 0!==n&&c(s.get(n)),t){case"add":x(e)?z(n)&&c(s.get("length")):(c(s.get(q)),w(e)&&c(s.get(J)));break;case"delete":x(e)||(c(s.get(q)),w(e)&&c(s.get(J)));break;case"set":w(e)&&c(s.get(q))}i.forEach((e=>{e.options.scheduler?e.options.scheduler(e):e()}))}const se=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(F)),ie=pe(),ce=pe(!1,!0),ue=pe(!0),ae=pe(!0,!0),fe={};function pe(e=!1,t=!1){return function(n,o,l){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&l===(e?Ve:Ae).get(n))return n;const r=x(n);if(r&&b(fe,o))return Reflect.get(fe,o,l);const s=Reflect.get(n,o,l);if(F(o)?se.has(o):"__proto__"===o||"__v_isRef"===o)return s;if(e||le(n,0,o),t)return s;if(qe(s)){return!r||!z(o)?s.value:s}return O(s)?e?Be(s):De(s):s}}["includes","indexOf","lastIndexOf"].forEach((e=>{const t=Array.prototype[e];fe[e]=function(...e){const n=Ge(this);for(let e=0,t=this.length;e<t;e++)le(n,0,e+"");const o=t.apply(n,e);return-1===o||!1===o?t.apply(n,e.map(Ge)):o}})),["push","pop","shift","unshift","splice"].forEach((e=>{const t=Array.prototype[e];fe[e]=function(...e){ne();const n=t.apply(this,e);return oe(),n}}));function de(e=!1){return function(t,n,o,l){const r=t[n];if(!e&&(o=Ge(o),!x(t)&&qe(r)&&!qe(o)))return r.value=o,!0;const s=x(t)&&z(n)?Number(n)<t.length:b(t,n),i=Reflect.set(t,n,o,l);return t===Ge(l)&&(s?D(o,r)&&re(t,"set",n,o):re(t,"add",n,o)),i}}const he={get:ie,set:de(),deleteProperty:function(e,t){const n=b(e,t),o=(e[t],Reflect.deleteProperty(e,t));return o&&n&&re(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return F(t)&&se.has(t)||le(e,0,t),n},ownKeys:function(e){return le(e,0,x(e)?"length":q),Reflect.ownKeys(e)}},me={get:ue,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},ge=v({},he,{get:ce,set:de(!0)}),ve=(v({},me,{get:ae}),e=>O(e)?De(e):e),ye=e=>O(e)?Be(e):e,_e=e=>e,be=e=>Reflect.getPrototypeOf(e);function xe(e,t,n=!1,o=!1){const l=Ge(e=e.__v_raw),r=Ge(t);t!==r&&!n&&le(l,0,t),!n&&le(l,0,r);const{has:s}=be(l),i=n?ye:o?_e:ve;return s.call(l,t)?i(e.get(t)):s.call(l,r)?i(e.get(r)):void 0}function we(e,t=!1){const n=this.__v_raw,o=Ge(n),l=Ge(e);return e!==l&&!t&&le(o,0,e),!t&&le(o,0,l),e===l?n.has(e):n.has(e)||n.has(l)}function Ce(e,t=!1){return e=e.__v_raw,!t&&le(Ge(e),0,q),Reflect.get(e,"size",e)}function ke(e){e=Ge(e);const t=Ge(this),n=be(t).has.call(t,e),o=t.add(e);return n||re(t,"add",e,e),o}function Se(e,t){t=Ge(t);const n=Ge(this),{has:o,get:l}=be(n);let r=o.call(n,e);r||(e=Ge(e),r=o.call(n,e));const s=l.call(n,e),i=n.set(e,t);return r?D(t,s)&&re(n,"set",e,t):re(n,"add",e,t),i}function Fe(e){const t=Ge(this),{has:n,get:o}=be(t);let l=n.call(t,e);l||(e=Ge(e),l=n.call(t,e));o&&o.call(t,e);const r=t.delete(e);return l&&re(t,"delete",e,void 0),r}function Oe(){const e=Ge(this),t=0!==e.size,n=e.clear();return t&&re(e,"clear",void 0,void 0),n}function Ee(e,t){return function(n,o){const l=this,r=l.__v_raw,s=Ge(r),i=e?ye:t?_e:ve;return!e&&le(s,0,q),r.forEach(((e,t)=>n.call(o,i(e),i(t),l)))}}function Me(e,t,n){return function(...o){const l=this.__v_raw,r=Ge(l),s=w(r),i="entries"===e||e===Symbol.iterator&&s,c="keys"===e&&s,u=l[e](...o),a=t?ye:n?_e:ve;return!t&&le(r,0,c?J:q),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:i?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function Re(e){return function(...t){return"delete"!==e&&this}}const Pe={get(e){return xe(this,e)},get size(){return Ce(this)},has:we,add:ke,set:Se,delete:Fe,clear:Oe,forEach:Ee(!1,!1)},ze={get(e){return xe(this,e,!1,!0)},get size(){return Ce(this)},has:we,add:ke,set:Se,delete:Fe,clear:Oe,forEach:Ee(!1,!0)},$e={get(e){return xe(this,e,!0)},get size(){return Ce(this,!0)},has(e){return we.call(this,e,!0)},add:Re("add"),set:Re("set"),delete:Re("delete"),clear:Re("clear"),forEach:Ee(!0,!1)};function Ie(e,t){const n=t?ze:e?$e:Pe;return(t,o,l)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(b(n,o)&&o in t?n:t,o,l)}["keys","values","entries",Symbol.iterator].forEach((e=>{Pe[e]=Me(e,!1,!1),$e[e]=Me(e,!0,!1),ze[e]=Me(e,!1,!0)}));const Te={get:Ie(!1,!1)},je={get:Ie(!1,!0)},Ne={get:Ie(!0,!1)},Ae=new WeakMap,Ve=new WeakMap;function Ue(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>R(e).slice(8,-1))(e))}function De(e){return e&&e.__v_isReadonly?e:Le(e,!1,he,Te)}function Be(e){return Le(e,!0,me,Ne)}function Le(e,t,n,o){if(!O(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const l=t?Ve:Ae,r=l.get(e);if(r)return r;const s=Ue(e);if(0===s)return e;const i=new Proxy(e,2===s?o:n);return l.set(e,i),i}function He(e){return We(e)?He(e.__v_raw):!(!e||!e.__v_isReactive)}function We(e){return!(!e||!e.__v_isReadonly)}function Ke(e){return He(e)||We(e)}function Ge(e){return e&&Ge(e.__v_raw)||e}function qe(e){return Boolean(e&&!0===e.__v_isRef)}const Je={get:(e,t,n)=>{return qe(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const l=e[t];return qe(l)&&!qe(n)?(l.value=n,!0):Reflect.set(e,t,n,o)}};class Xe{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=X(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,re(Ge(this),"set","value"))}}),this.__v_isReadonly=n}get value(){return this._dirty&&(this._value=this.effect(),this._dirty=!1),le(Ge(this),0,"value"),this._value}set value(e){this._setter(e)}}function Ye(e,t,n,o){let l;try{l=o?e(...o):e()}catch(e){Qe(e,t,n)}return l}function Ze(e,t,n,o){if(k(e)){const l=Ye(e,t,n,o);return l&&E(l)&&l.catch((e=>{Qe(e,t,n)})),l}const l=[];for(let r=0;r<e.length;r++)l.push(Ze(e[r],t,n,o));return l}function Qe(e,t,n,o=!0){t&&t.vnode;if(t){let o=t.parent;const l=t.proxy,r=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,l,r))return;o=o.parent}const s=t.appContext.config.errorHandler;if(s)return void Ye(s,null,10,[e,l,r])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let et=!1,tt=!1;const nt=[];let ot=0;const lt=[];let rt=null,st=0;const it=[];let ct=null,ut=0;const at=Promise.resolve();let ft=null,pt=null;function dt(e){const t=ft||at;return e?t.then(this?e.bind(this):e):t}function ht(e){nt.length&&nt.includes(e,et&&e.allowRecurse?ot+1:ot)||e===pt||(nt.push(e),mt())}function mt(){et||tt||(tt=!0,ft=at.then(bt))}function gt(e,t,n,o){x(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),mt()}function vt(e,t=null){if(lt.length){for(pt=t,rt=[...new Set(lt)],lt.length=0,st=0;st<rt.length;st++)rt[st]();rt=null,st=0,pt=null,vt(e,t)}}function yt(e){if(it.length){const e=[...new Set(it)];if(it.length=0,ct)return void ct.push(...e);for(ct=e,ct.sort(((e,t)=>_t(e)-_t(t))),ut=0;ut<ct.length;ut++)ct[ut]();ct=null,ut=0}}const _t=e=>null==e.id?1/0:e.id;function bt(e){tt=!1,et=!0,vt(e),nt.sort(((e,t)=>_t(e)-_t(t)));try{for(ot=0;ot<nt.length;ot++){const e=nt[ot];e&&Ye(e,null,14)}}finally{ot=0,nt.length=0,yt(),et=!1,ft=null,(nt.length||it.length)&&bt(e)}}function xt(e,t,...n){const o=e.vnode.props||a;let l=n;const r=t.startsWith("update:"),s=r&&t.slice(7);if(s&&s in o){const e=("modelValue"===s?"model":s)+"Modifiers",{number:t,trim:r}=o[e]||a;r?l=n.map((e=>e.trim())):t&&(l=n.map(H))}let i=U(j(t)),c=o[i];!c&&r&&(i=U(A(t)),c=o[i]),c&&Ze(c,e,6,l);const u=o[i+"Once"];if(u){if(e.emitted){if(e.emitted[i])return}else(e.emitted={})[i]=!0;Ze(u,e,6,l)}}function wt(e,t,n=!1){if(!t.deopt&&void 0!==e.__emits)return e.__emits;const o=e.emits;let l={},r=!1;if(!k(e)){const o=e=>{r=!0,v(l,wt(e,t,!0))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return o||r?(x(o)?o.forEach((e=>l[e]=null)):v(l,o),e.__emits=l):e.__emits=null}function Ct(e,t){return!(!e||!m(t))&&(t=t.replace(/Once$/,""),b(e,t[2].toLowerCase()+t.slice(3))||b(e,t.slice(2)))}let kt=null;function St(e){kt=e}function Ft(e){const{type:t,vnode:n,proxy:o,withProxy:l,props:r,propsOptions:[s],slots:i,attrs:c,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:h}=e;let m;kt=e;try{let e;if(4&n.shapeFlag){const t=l||o;m=Yn(a.call(t,t,f,r,d,p,h)),e=c}else{const n=t;0,m=Yn(n.length>1?n(r,{attrs:c,slots:i,emit:u}):n(r,null)),e=t.props?c:Et(c)}let v=m;if(!1!==t.inheritAttrs&&e){const t=Object.keys(e),{shapeFlag:n}=v;t.length&&(1&n||6&n)&&(s&&t.some(g)&&(e=Mt(e,s)),v=qn(v,e))}n.dirs&&(v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&(v.transition=n.transition),m=v}catch(t){Qe(t,e,1),m=Gn(Tn)}return kt=null,m}function Ot(e){const t=e.filter((e=>!(Bn(e)&&e.type===Tn&&"v-if"!==e.children)));return 1===t.length&&Bn(t[0])?t[0]:null}const Et=e=>{let t;for(const n in e)("class"===n||"style"===n||m(n))&&((t||(t={}))[n]=e[n]);return t},Mt=(e,t)=>{const n={};for(const o in e)g(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Rt(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let l=0;l<o.length;l++){const r=o[l];if(t[r]!==e[r]&&!Ct(n,r))return!0}return!1}function Pt(e){if(k(e)&&(e=e()),x(e)){e=Ot(e)}return Yn(e)}let zt=0;const $t=e=>zt+=e;function It(e,t,n={},o){let l=e[t];zt++;const r=(Vn(),Dn($n,{key:n.key},l?l(n):o?o():[],1===e._?64:-2));return zt--,r}function Tt(e,t=kt){if(!t)return e;const n=(...n)=>{zt||Vn(!0);const o=kt;St(t);const l=e(...n);return St(o),zt||Un(),l};return n._c=!0,n}let jt=null;const Nt=[];function At(e){Nt.push(jt=e)}function Vt(){Nt.pop(),jt=Nt[Nt.length-1]||null}function Ut(e){return t=>Tt((function(){At(e);const n=t.apply(this,arguments);return Vt(),n}))}function Dt(e,t,n,o=!1){const l={},r={};L(r,Hn,1),Bt(e,t,l,r),n?e.props=o?l:Le(l,!1,ge,je):e.type.props?e.props=l:e.props=r,e.attrs=r}function Bt(e,t,n,o){const[l,r]=e.propsOptions;if(t)for(const r in t){const s=t[r];if($(r))continue;let i;l&&b(l,i=j(r))?n[i]=s:Ct(e.emitsOptions,r)||(o[r]=s)}if(r){const t=Ge(n);for(let o=0;o<r.length;o++){const s=r[o];n[s]=Lt(l,t,s,t[s],e)}}}function Lt(e,t,n,o,l){const r=e[n];if(null!=r){const e=b(r,"default");if(e&&void 0===o){const e=r.default;r.type!==Function&&k(e)?(yo(l),o=e(t),yo(null)):o=e}r[0]&&(b(t,n)||e?!r[1]||""!==o&&o!==A(n)||(o=!0):o=!1)}return o}function Ht(e,t,n=!1){if(!t.deopt&&e.__props)return e.__props;const o=e.props,l={},r=[];let s=!1;if(!k(e)){const o=e=>{s=!0;const[n,o]=Ht(e,t,!0);v(l,n),o&&r.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!o&&!s)return e.__props=f;if(x(o))for(let e=0;e<o.length;e++){const t=j(o[e]);Wt(t)&&(l[t]=a)}else if(o)for(const e in o){const t=j(e);if(Wt(t)){const n=o[e],s=l[t]=x(n)||k(n)?{type:n}:n;if(s){const e=qt(Boolean,s.type),n=qt(String,s.type);s[0]=e>-1,s[1]=n<0||e<n,(e>-1||b(s,"default"))&&r.push(t)}}}return e.__props=[l,r]}function Wt(e){return"$"!==e[0]}function Kt(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Gt(e,t){return Kt(e)===Kt(t)}function qt(e,t){if(x(t)){for(let n=0,o=t.length;n<o;n++)if(Gt(t[n],e))return n}else if(k(t))return Gt(t,e)?0:-1;return-1}function Jt(e,t,n=vo,o=!1){if(n){const l=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ne(),yo(n);const l=Ze(t,n,e,o);return yo(null),oe(),l});return o?l.unshift(r):l.push(r),r}}const Xt=e=>(t,n=vo)=>!_o&&Jt(e,t,n),Yt=Xt("bm"),Zt=Xt("m"),Qt=Xt("bu"),en=Xt("u"),tn=Xt("bum"),nn=Xt("um"),on=Xt("rtg"),ln=Xt("rtc"),rn={};function sn(e,t,n){return cn(e,t,n)}function cn(e,t,{immediate:n,deep:o,flush:l,onTrack:r,onTrigger:s}=a,i=vo){let c,u,f=!1;if(qe(e)?(c=()=>e.value,f=!!e._shallow):He(e)?(c=()=>e,o=!0):c=x(e)?()=>e.map((e=>qe(e)?e.value:He(e)?an(e):k(e)?Ye(e,i,2):void 0)):k(e)?t?()=>Ye(e,i,2):()=>{if(!i||!i.isUnmounted)return u&&u(),Ye(e,i,3,[d])}:p,t&&o){const e=c;c=()=>an(e())}const d=e=>{u=v.options.onStop=()=>{Ye(e,i,4)}};let h=x(e)?[]:rn;const m=()=>{if(v.active)if(t){const e=v();(o||f||D(e,h))&&(u&&u(),Ze(t,i,3,[e,h===rn?void 0:h,d]),h=e)}else v()};let g;m.allowRecurse=!!t,g="sync"===l?m:"post"===l?()=>kn(m,i&&i.suspense):()=>{!i||i.isMounted?function(e){gt(e,rt,lt,st)}(m):m()};const v=X(c,{lazy:!0,onTrack:r,onTrigger:s,scheduler:g});return wo(v),t?n?m():h=v():"post"===l?kn(v,i&&i.suspense):v(),()=>{Y(v),i&&y(i.effects,v)}}function un(e,t,n){const o=this.proxy;return cn(S(e)?()=>o[e]:e.bind(o),t.bind(o),n,this)}function an(e,t=new Set){if(!O(e)||t.has(e))return e;if(t.add(e),qe(e))an(e.value,t);else if(x(e))for(let n=0;n<e.length;n++)an(e[n],t);else if(C(e)||w(e))e.forEach((e=>{an(e,t)}));else for(const n in e)an(e[n],t);return e}const fn=e=>e.type.__isKeepAlive;function pn(e,t,n=vo){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(Jt(t,o,n),n){let e=n.parent;for(;e&&e.parent;)fn(e.parent.vnode)&&dn(o,t,n,e),e=e.parent}}function dn(e,t,n,o){const l=Jt(t,e,o,!0);nn((()=>{y(o[t],l)}),n)}const hn=e=>"_"===e[0]||"$stable"===e,mn=e=>x(e)?e.map(Yn):[Yn(e)],gn=(e,t,n)=>Tt((e=>mn(t(e))),n),vn=(e,t)=>{const n=e._ctx;for(const o in e){if(hn(o))continue;const l=e[o];if(k(l))t[o]=gn(0,l,n);else if(null!=l){const e=mn(l);t[o]=()=>e}}},yn=(e,t)=>{const n=mn(t);e.slots.default=()=>n};function _n(e,t,n,o){const l=e.dirs,r=t&&t.dirs;for(let s=0;s<l.length;s++){const i=l[s];r&&(i.oldValue=r[s].value);const c=i.dir[o];c&&Ze(c,n,8,[e.el,i,e,t])}}function bn(){return{app:null,config:{isNativeTag:d,performance:!1,globalProperties:{},optionMergeStrategies:{},isCustomElement:d,errorHandler:void 0,warnHandler:void 0},mixins:[],components:{},directives:{},provides:Object.create(null)}}let xn=0;function wn(e,t){return function(n,o=null){null==o||O(o)||(o=null);const l=bn(),r=new Set;let s=!1;const i=l.app={_uid:xn++,_component:n,_props:o,_container:null,_context:l,version:So,get config(){return l.config},set config(e){},use:(e,...t)=>(r.has(e)||(e&&k(e.install)?(r.add(e),e.install(i,...t)):k(e)&&(r.add(e),e(i,...t))),i),mixin:e=>(l.mixins.includes(e)||(l.mixins.push(e),(e.props||e.emits)&&(l.deopt=!0)),i),component:(e,t)=>t?(l.components[e]=t,i):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,i):l.directives[e],mount(r,c){if(!s){const u=Gn(n,o);return u.appContext=l,c&&t?t(u,r):e(u,r),s=!0,i._container=r,r.__vue_app__=i,u.component.proxy}},unmount(){s&&e(null,i._container)},provide:(e,t)=>(l.provides[e]=t,i)};return i}}const Cn={scheduler:ht,allowRecurse:!0},kn=function(e,t){t&&t.pendingBranch?x(e)?t.effects.push(...e):t.effects.push(e):gt(e,ct,it,ut)},Sn=(e,t,n,o,l)=>{if(x(e))return void e.forEach(((e,r)=>Sn(e,t&&(x(t)?t[r]:t),n,o,l)));let r;r=l?4&l.shapeFlag?l.component.proxy:l.el:null;const{i:s,r:i}=e,c=t&&t.r,u=s.refs===a?s.refs={}:s.refs,f=s.setupState;if(null!=c&&c!==i&&(S(c)?(u[c]=null,b(f,c)&&(f[c]=null)):qe(c)&&(c.value=null)),S(i)){const e=()=>{u[i]=r,b(f,i)&&(f[i]=r)};r?(e.id=-1,kn(e,o)):e()}else if(qe(i)){const e=()=>{i.value=r};r?(e.id=-1,kn(e,o)):e()}else k(i)&&Ye(i,n,12,[r,u])};function Fn(e){return function(e,t){const{insert:n,remove:o,patchProp:l,forcePatchProp:r,createElement:s,createText:i,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:m,setScopeId:g=p,cloneNode:y,insertStaticContent:_}=e,x=(e,t,n,o=null,l=null,r=null,s=!1,i=!1)=>{e&&!Ln(e,t)&&(o=te(e),q(e,l,r,!0),e=null),-2===t.patchFlag&&(i=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:a}=t;switch(c){case In:w(e,t,n,o);break;case Tn:C(e,t,n,o);break;case jn:null==e&&k(t,n,o,s);break;case $n:I(e,t,n,o,l,r,s,i);break;default:1&a?S(e,t,n,o,l,r,s,i):6&a?T(e,t,n,o,l,r,s,i):(64&a||128&a)&&c.process(e,t,n,o,l,r,s,i,se)}null!=u&&l&&Sn(u,e&&e.ref,l,r,t)},w=(e,t,o,l)=>{if(null==e)n(t.el=i(t.children),o,l);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},C=(e,t,o,l)=>{null==e?n(t.el=c(t.children||""),o,l):t.el=e.el},k=(e,t,n,o)=>{[e.el,e.anchor]=_(e.children,t,n,o)},S=(e,t,n,o,l,r,s,i)=>{s=s||"svg"===t.type,null==e?F(t,n,o,l,r,s,i):R(e,t,l,r,s,i)},F=(e,t,o,r,i,c,u)=>{let a,f;const{type:p,props:h,shapeFlag:m,transition:g,scopeId:v,patchFlag:_,dirs:b}=e;if(e.el&&void 0!==y&&-1===_)a=e.el=y(e.el);else{if(a=e.el=s(e.type,c,h&&h.is),8&m?d(a,e.children):16&m&&M(e.children,a,null,r,i,c&&"foreignObject"!==p,u||!!e.dynamicChildren),b&&_n(e,null,r,"created"),h){for(const t in h)$(t)||l(a,t,null,h[t],c,e.children,r,i,ee);(f=h.onVnodeBeforeMount)&&On(f,r,e)}O(a,v,e,r)}b&&_n(e,null,r,"beforeMount");const x=(!i||i&&!i.pendingBranch)&&g&&!g.persisted;x&&g.beforeEnter(a),n(a,t,o),((f=h&&h.onVnodeMounted)||x||b)&&kn((()=>{f&&On(f,r,e),x&&g.enter(a),b&&_n(e,null,r,"mounted")}),i)},O=(e,t,n,o)=>{if(t&&g(e,t),o){const l=o.type.__scopeId;l&&l!==t&&g(e,l+"-s"),n===o.subTree&&O(e,o.vnode.scopeId,o.vnode,o.parent)}},M=(e,t,n,o,l,r,s,i=0)=>{for(let c=i;c<e.length;c++){const i=e[c]=s?Zn(e[c]):Yn(e[c]);x(null,i,t,n,o,l,r,s)}},R=(e,t,n,o,s,i)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||a,m=t.props||a;let g;if((g=m.onVnodeBeforeUpdate)&&On(g,n,t,e),p&&_n(t,e,n,"beforeUpdate"),u>0){if(16&u)z(c,t,h,m,n,o,s);else if(2&u&&h.class!==m.class&&l(c,"class",null,m.class,s),4&u&&l(c,"style",h.style,m.style,s),8&u){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const u=i[t],a=h[u],f=m[u];(f!==a||r&&r(c,u))&&l(c,u,a,f,s,e.children,n,o,ee)}}1&u&&e.children!==t.children&&d(c,t.children)}else i||null!=f||z(c,t,h,m,n,o,s);const v=s&&"foreignObject"!==t.type;f?P(e.dynamicChildren,f,c,n,o,v):i||H(e,t,c,null,n,o,v),((g=m.onVnodeUpdated)||p)&&kn((()=>{g&&On(g,n,t,e),p&&_n(t,e,n,"updated")}),o)},P=(e,t,n,o,l,r)=>{for(let s=0;s<t.length;s++){const i=e[s],c=t[s],u=i.type===$n||!Ln(i,c)||6&i.shapeFlag||64&i.shapeFlag?h(i.el):n;x(i,c,u,null,o,l,r,!0)}},z=(e,t,n,o,s,i,c)=>{if(n!==o){for(const u in o){if($(u))continue;const a=o[u],f=n[u];(a!==f||r&&r(e,u))&&l(e,u,f,a,c,t.children,s,i,ee)}if(n!==a)for(const r in n)$(r)||r in o||l(e,r,n[r],null,c,t.children,s,i,ee)}},I=(e,t,o,l,r,s,c,u)=>{const a=t.el=e?e.el:i(""),f=t.anchor=e?e.anchor:i("");let{patchFlag:p,dynamicChildren:d}=t;p>0&&(u=!0),null==e?(n(a,o,l),n(f,o,l),M(t.children,o,f,r,s,c,u)):p>0&&64&p&&d?(P(e.dynamicChildren,d,o,r,s,c),(null!=t.key||r&&t===r.subTree)&&En(e,t,!0)):H(e,t,o,f,r,s,c,u)},T=(e,t,n,o,l,r,s,i)=>{null==e?512&t.shapeFlag?l.ctx.activate(t,n,o,s,i):N(t,n,o,l,r,s,i):V(e,t,i)},N=(e,t,n,o,l,r,s)=>{const i=e.component=function(e,t,n){const o=e.type,l=(t?t.appContext:e.appContext)||mo,r={uid:go++,vnode:e,type:o,parent:t,appContext:l,root:null,next:null,subTree:null,update:null,render:null,proxy:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(l.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ht(o,l),emitsOptions:wt(o,l),emit:null,emitted:null,ctx:a,data:a,props:a,attrs:a,slots:a,refs:a,setupState:a,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=xt.bind(null,r),r}(e,o,l);if(fn(e)&&(i.ctx.renderer=se),function(e,t=!1){_o=t;const{props:n,children:o,shapeFlag:l}=e.vnode,r=4&l;Dt(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=t,L(t,"_",n)):vn(t,e.slots={})}else e.slots={},t&&yn(e,t);L(e.slots,Hn,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,po);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){return{attrs:e.attrs,slots:e.slots,emit:e.emit}}(e):null;vo=e,ne();const l=Ye(o,e,0,[e.props,n]);if(oe(),vo=null,E(l)){if(t)return l.then((t=>{bo(e,t)}));e.asyncDep=l}else bo(e,l)}else xo(e)}(e,t):void 0;_o=!1}(i),i.asyncDep){if(l&&l.registerDep(i,U),!e.el){const e=i.subTree=Gn(Tn);C(null,e,t,n)}}else U(i,e,t,n,l,r,s)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:l,component:r}=e,{props:s,children:i,patchFlag:c}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>0))return!(!l&&!i||i&&i.$stable)||o!==s&&(o?!s||Rt(o,s,u):!!s);if(1024&c)return!0;if(16&c)return o?Rt(o,s,u):!!s;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==o[n]&&!Ct(u,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void D(o,t,n);o.next=t,function(e){const t=nt.indexOf(e);t>-1&&(nt[t]=null)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},U=(e,t,n,o,l,r,s)=>{e.update=X((function(){if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:u}=e,a=n;n?(n.el=u.el,D(e,n,s)):n=u,o&&B(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&On(t,c,n,u);const f=Ft(e),p=e.subTree;e.subTree=f,x(p,f,h(p.el),te(p),e,l,r),n.el=f.el,null===a&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,f.el),i&&kn(i,l),(t=n.props&&n.props.onVnodeUpdated)&&kn((()=>{On(t,c,n,u)}),l)}else{let s;const{el:i,props:c}=t,{bm:u,m:a,parent:f}=e;u&&B(u),(s=c&&c.onVnodeBeforeMount)&&On(s,f,t);const p=e.subTree=Ft(e);i&&ce?ce(t.el,p,e,l):(x(null,p,n,o,e,l,r),t.el=p.el),a&&kn(a,l),(s=c&&c.onVnodeMounted)&&kn((()=>{On(s,f,t)}),l);const{a:d}=e;d&&256&t.shapeFlag&&kn(d,l),e.isMounted=!0}}),Cn)},D=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:l,attrs:r,vnode:{patchFlag:s}}=e,i=Ge(l),[c]=e.propsOptions;if(!(o||s>0)||16&s){let o;Bt(e,t,l,r);for(const r in i)t&&(b(t,r)||(o=A(r))!==r&&b(t,o))||(c?!n||void 0===n[r]&&void 0===n[o]||(l[r]=Lt(c,t||a,r,void 0,e)):delete l[r]);if(r!==i)for(const e in r)t&&b(t,e)||delete r[e]}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){const s=n[o],u=t[s];if(c)if(b(r,s))r[s]=u;else{const t=j(s);l[t]=Lt(c,i,t,u,e)}else r[s]=u}}re(e,"set","$attrs")}(e,t.props,o,n),((e,t)=>{const{vnode:n,slots:o}=e;let l=!0,r=a;if(32&n.shapeFlag){const e=t._;e?1===e?l=!1:v(o,t):(l=!t.$stable,vn(t,o)),r=t}else t&&(yn(e,t),r={default:1});if(l)for(const e in o)hn(e)||e in r||delete o[e]})(e,t.children),vt(void 0,e.update)},H=(e,t,n,o,l,r,s,i=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,a=t.children,{patchFlag:f,shapeFlag:p}=t;if(f>0){if(128&f)return void K(c,a,n,o,l,r,s,i);if(256&f)return void W(c,a,n,o,l,r,s,i)}8&p?(16&u&&ee(c,l,r),a!==c&&d(n,a)):16&u?16&p?K(c,a,n,o,l,r,s,i):ee(c,l,r,!0):(8&u&&d(n,""),16&p&&M(a,n,o,l,r,s,i))},W=(e,t,n,o,l,r,s,i)=>{t=t||f;const c=(e=e||f).length,u=t.length,a=Math.min(c,u);let p;for(p=0;p<a;p++){const o=t[p]=i?Zn(t[p]):Yn(t[p]);x(e[p],o,n,null,l,r,s,i)}c>u?ee(e,l,r,!0,!1,a):M(t,n,o,l,r,s,i,a)},K=(e,t,n,o,l,r,s,i)=>{let c=0;const u=t.length;let a=e.length-1,p=u-1;for(;c<=a&&c<=p;){const o=e[c],u=t[c]=i?Zn(t[c]):Yn(t[c]);if(!Ln(o,u))break;x(o,u,n,null,l,r,s,i),c++}for(;c<=a&&c<=p;){const o=e[a],c=t[p]=i?Zn(t[p]):Yn(t[p]);if(!Ln(o,c))break;x(o,c,n,null,l,r,s,i),a--,p--}if(c>a){if(c<=p){const e=p+1,a=e<u?t[e].el:o;for(;c<=p;)x(null,t[c]=i?Zn(t[c]):Yn(t[c]),n,a,l,r,s),c++}}else if(c>p)for(;c<=a;)q(e[c],l,r,!0),c++;else{const d=c,h=c,m=new Map;for(c=h;c<=p;c++){const e=t[c]=i?Zn(t[c]):Yn(t[c]);null!=e.key&&m.set(e.key,c)}let g,v=0;const y=p-h+1;let _=!1,b=0;const w=new Array(y);for(c=0;c<y;c++)w[c]=0;for(c=d;c<=a;c++){const o=e[c];if(v>=y){q(o,l,r,!0);continue}let u;if(null!=o.key)u=m.get(o.key);else for(g=h;g<=p;g++)if(0===w[g-h]&&Ln(o,t[g])){u=g;break}void 0===u?q(o,l,r,!0):(w[u-h]=c+1,u>=b?b=u:_=!0,x(o,t[u],n,null,l,r,s,i),v++)}const C=_?function(e){const t=e.slice(),n=[0];let o,l,r,s,i;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(l=n[n.length-1],e[l]<c){t[o]=l,n.push(o);continue}for(r=0,s=n.length-1;r<s;)i=(r+s)/2|0,e[n[i]]<c?r=i+1:s=i;c<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}r=n.length,s=n[r-1];for(;r-- >0;)n[r]=s,s=t[s];return n}(w):f;for(g=C.length-1,c=y-1;c>=0;c--){const e=h+c,i=t[e],a=e+1<u?t[e+1].el:o;0===w[c]?x(null,i,n,a,l,r,s):_&&(g<0||c!==C[g]?G(i,n,a,2):g--)}}},G=(e,t,o,l,r=null)=>{const{el:s,type:i,transition:c,children:u,shapeFlag:a}=e;if(6&a)return void G(e.component.subTree,t,o,l);if(128&a)return void e.suspense.move(t,o,l);if(64&a)return void i.move(e,t,o,se);if(i===$n){n(s,t,o);for(let e=0;e<u.length;e++)G(u[e],t,o,l);return void n(e.anchor,t,o)}if(2!==l&&1&a&&c)if(0===l)c.beforeEnter(s),n(s,t,o),kn((()=>c.enter(s)),r);else{const{leave:e,delayLeave:l,afterLeave:r}=c,i=()=>n(s,t,o),u=()=>{e(s,(()=>{i(),r&&r()}))};l?l(s,i,u):u()}else n(s,t,o)},q=(e,t,n,o=!1,l=!1)=>{const{type:r,props:s,ref:i,children:c,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=i&&t&&Sn(i,null,t,n,null),256&a)return void t.ctx.deactivate(e);const d=1&a&&p;let h;if((h=s&&s.onVnodeBeforeUnmount)&&On(h,t,e),6&a)Q(e.component,n,o);else{if(128&a)return void e.suspense.unmount(n,o);d&&_n(e,null,t,"beforeUnmount"),u&&(r!==$n||f>0&&64&f)?ee(u,t,n,!1,!0):(r===$n&&(128&f||256&f)||!l&&16&a)&&ee(c,t,n),64&a&&(o||!Mn(e.props))&&e.type.remove(e,se),o&&J(e)}((h=s&&s.onVnodeUnmounted)||d)&&kn((()=>{h&&On(h,t,e),d&&_n(e,null,t,"unmounted")}),n)},J=e=>{const{type:t,el:n,anchor:l,transition:r}=e;if(t===$n)return void Z(n,l);const s=()=>{o(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,l=()=>t(n,s);o?o(e.el,s,l):l()}else s()},Z=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},Q=(e,t,n)=>{const{bum:o,effects:l,update:r,subTree:s,um:i}=e;if(o&&B(o),l)for(let e=0;e<l.length;e++)Y(l[e]);r&&(Y(r),q(s,e,t,n)),i&&kn(i,t),kn((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},ee=(e,t,n,o=!1,l=!1,r=0)=>{for(let s=r;s<e.length;s++)q(e[s],t,n,o,l)},te=e=>6&e.shapeFlag?te(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el),le=(e,t)=>{null==e?t._vnode&&q(t._vnode,null,null,!0):x(t._vnode||null,e,t),yt(),t._vnode=e},se={p:x,um:q,m:G,r:J,mt:N,mc:M,pc:H,pbc:P,n:te,o:e};let ie,ce;t&&([ie,ce]=t(se));return{render:le,hydrate:ie,createApp:wn(le,ie)}}(e)}function On(e,t,n,o=null){Ze(e,t,7,[n,o])}function En(e,t,n=!1){const o=e.children,l=t.children;if(x(o)&&x(l))for(let e=0;e<o.length;e++){const t=o[e];let r=l[e];1&r.shapeFlag&&!r.dynamicChildren&&((r.patchFlag<=0||32===r.patchFlag)&&(r=l[e]=Zn(l[e]),r.el=t.el),n||En(t,r))}}const Mn=e=>e&&(e.disabled||""===e.disabled);function Rn(e){return function(e,t,n=!0){const o=kt||vo;if(o){const n=o.type;if("components"===e){const e=n.displayName||n.name;if(e&&(e===t||e===j(t)||e===V(j(t))))return n}return zn(o[e]||n[e],t)||zn(o.appContext[e],t)}}("components",e)||e}const Pn=Symbol();function zn(e,t){return e&&(e[t]||e[j(t)]||e[V(j(t))])}const $n=Symbol(void 0),In=Symbol(void 0),Tn=Symbol(void 0),jn=Symbol(void 0),Nn=[];let An=null;function Vn(e=!1){Nn.push(An=e?null:[])}function Un(){Nn.pop(),An=Nn[Nn.length-1]||null}function Dn(e,t,n,o,l){const r=Gn(e,t,n,o,l,!0);return r.dynamicChildren=An||f,Un(),An&&An.push(r),r}function Bn(e){return!!e&&!0===e.__v_isVNode}function Ln(e,t){return e.type===t.type&&e.key===t.key}const Hn="__vInternal",Wn=({key:e})=>null!=e?e:null,Kn=({ref:e})=>null!=e?x(e)?e:{i:kt,r:e}:null,Gn=function(e,t=null,n=null,l=0,r=null,s=!1){e&&e!==Pn||(e=Tn);if(Bn(e)){const o=qn(e,t,!0);return n&&Qn(o,n),o}c=e,k(c)&&"__vccOpts"in c&&(e=e.__vccOpts);var c;if(t){(Ke(t)||Hn in t)&&(t=v({},t));let{class:e,style:n}=t;e&&!S(e)&&(t.class=i(e)),O(n)&&(Ke(n)&&!x(n)&&(n=v({},n)),t.style=o(n))}const u=S(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:O(e)?4:k(e)?2:0,a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wn(t),ref:t&&Kn(t),scopeId:jt,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null};if(Qn(a,n),128&u){const{content:e,fallback:t}=function(e){const{shapeFlag:t,children:n}=e;let o,l;return 32&t?(o=Pt(n.default),l=Pt(n.fallback)):(o=Pt(n),l=Yn(null)),{content:o,fallback:l}}(a);a.ssContent=e,a.ssFallback=t}!s&&An&&(l>0||6&u)&&32!==l&&An.push(a);return a};function qn(e,t,n=!1){const{props:l,ref:r,patchFlag:s}=e,c=t?function(...e){const t=v({},e[0]);for(let n=1;n<e.length;n++){const l=e[n];for(const e in l)if("class"===e)t.class!==l.class&&(t.class=i([t.class,l.class]));else if("style"===e)t.style=o([t.style,l.style]);else if(m(e)){const n=t[e],o=l[e];n!==o&&(t[e]=n?[].concat(n,l[e]):o)}else""!==e&&(t[e]=l[e])}return t}(l||{},t):l;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Wn(c),ref:t&&t.ref?n&&r?x(r)?r.concat(Kn(t)):[r,Kn(t)]:Kn(t):r,scopeId:e.scopeId,children:e.children,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$n?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qn(e.ssContent),ssFallback:e.ssFallback&&qn(e.ssFallback),el:e.el,anchor:e.anchor}}function Jn(e=" ",t=0){return Gn(In,null,e,t)}function Xn(e="",t=!1){return t?(Vn(),Dn(Tn,null,e)):Gn(Tn,null,e)}function Yn(e){return null==e||"boolean"==typeof e?Gn(Tn):x(e)?Gn($n,null,e):"object"==typeof e?null===e.el?e:qn(e):Gn(In,null,String(e))}function Zn(e){return null===e.el?e:qn(e)}function Qn(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(x(t))n=16;else if("object"==typeof t){if(1&o||64&o){const n=t.default;return void(n&&(n._c&&$t(1),Qn(e,n()),n._c&&$t(-1)))}{n=32;const o=t._;o||Hn in t?3===o&&kt&&(1024&kt.vnode.patchFlag?(t._=2,e.patchFlag|=1024):t._=1):t._ctx=kt}}else k(t)?(t={default:t,_ctx:kt},n=32):(t=String(t),64&o?(n=16,t=[Jn(t)]):n=8);e.children=t,e.shapeFlag|=n}function eo(e,t){if(vo){let n=vo.provides;const o=vo.parent&&vo.parent.provides;o===n&&(n=vo.provides=Object.create(o)),n[e]=t}else;}function to(e,t,n=!1){const o=vo||kt;if(o){const l=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(l&&e in l)return l[e];if(arguments.length>1)return n&&k(t)?t():t}}let no=!1;function oo(e,t,n=[],o=[],l=[],r=!1){const{mixins:s,extends:i,data:c,computed:u,methods:a,watch:f,provide:d,inject:h,components:m,directives:g,beforeMount:y,mounted:_,beforeUpdate:b,updated:w,activated:C,deactivated:S,beforeDestroy:F,beforeUnmount:E,destroyed:M,unmounted:R,render:P,renderTracked:z,renderTriggered:$,errorCaptured:I}=t,T=e.proxy,j=e.ctx,N=e.appContext.mixins;if(r&&P&&e.render===p&&(e.render=P),r||(no=!0,lo("beforeCreate","bc",t,e,N),no=!1,io(e,N,n,o,l)),i&&oo(e,i,n,o,l,!0),s&&io(e,s,n,o,l),h)if(x(h))for(let e=0;e<h.length;e++){const t=h[e];j[t]=to(t)}else for(const e in h){const t=h[e];O(t)?j[e]=to(t.from||e,t.default,!0):j[e]=to(t)}if(a)for(const e in a){const t=a[e];k(t)&&(j[e]=t.bind(T))}if(r?c&&n.push(c):(n.length&&n.forEach((t=>co(e,t,T))),c&&co(e,c,T)),u)for(const e in u){const t=u[e],n=Co({get:k(t)?t.bind(T,T):k(t.get)?t.get.bind(T,T):p,set:!k(t)&&k(t.set)?t.set.bind(T):p});Object.defineProperty(j,e,{enumerable:!0,configurable:!0,get:()=>n.value,set:e=>n.value=e})}var A;f&&o.push(f),!r&&o.length&&o.forEach((e=>{for(const t in e)uo(e[t],j,T,t)})),d&&l.push(d),!r&&l.length&&l.forEach((e=>{const t=k(e)?e.call(T):e;for(const e in t)eo(e,t[e])})),r&&(m&&v(e.components||(e.components=v({},e.type.components)),m),g&&v(e.directives||(e.directives=v({},e.type.directives)),g)),r||lo("created","c",t,e,N),y&&Yt(y.bind(T)),_&&Zt(_.bind(T)),b&&Qt(b.bind(T)),w&&en(w.bind(T)),C&&pn(C.bind(T),"a",A),S&&function(e,t){pn(e,"da",t)}(S.bind(T)),I&&((e,t=vo)=>{Jt("ec",e,t)})(I.bind(T)),z&&ln(z.bind(T)),$&&on($.bind(T)),E&&tn(E.bind(T)),R&&nn(R.bind(T))}function lo(e,t,n,o,l){so(e,t,l,o);const{extends:r,mixins:s}=n;r&&ro(e,t,r,o),s&&so(e,t,s,o);const i=n[e];i&&Ze(i.bind(o.proxy),o,t)}function ro(e,t,n,o){n.extends&&ro(e,t,n.extends,o);const l=n[e];l&&Ze(l.bind(o.proxy),o,t)}function so(e,t,n,o){for(let l=0;l<n.length;l++){const r=n[l].mixins;r&&so(e,t,r,o);const s=n[l][e];s&&Ze(s.bind(o.proxy),o,t)}}function io(e,t,n,o,l){for(let r=0;r<t.length;r++)oo(e,t[r],n,o,l,!0)}function co(e,t,n){const o=t.call(n,n);O(o)&&(e.data===a?e.data=De(o):v(e.data,o))}function uo(e,t,n,o){const l=o.includes(".")?function(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}(n,o):()=>n[o];if(S(e)){const n=t[e];k(n)&&sn(l,n)}else if(k(e))sn(l,e.bind(n));else if(O(e))if(x(e))e.forEach((e=>uo(e,t,n,o)));else{const o=k(e.handler)?e.handler.bind(n):t[e.handler];k(o)&&sn(l,o,e)}}function ao(e,t,n){const o=n.appContext.config.optionMergeStrategies,{mixins:l,extends:r}=t;r&&ao(e,r,n),l&&l.forEach((t=>ao(e,t,n)));for(const l in t)o&&b(o,l)?e[l]=o[l](e[l],t[l],n.proxy,l):e[l]=t[l]}const fo=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>e.parent&&e.parent.proxy,$root:e=>e.root&&e.root.proxy,$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{__merged:n,mixins:o,extends:l}=t;if(n)return n;const r=e.appContext.mixins;if(!r.length&&!o&&!l)return t;const s={};return r.forEach((t=>ao(s,t,e))),ao(s,t,e),t.__merged=s}(e),$forceUpdate:e=>()=>ht(e.update),$nextTick:e=>dt.bind(e.proxy),$watch:e=>un.bind(e)}),po={get({_:e},t){const{ctx:n,setupState:o,data:l,props:r,accessCache:s,type:i,appContext:c}=e;if("__v_skip"===t)return!0;let u;if("$"!==t[0]){const i=s[t];if(void 0!==i)switch(i){case 0:return o[t];case 1:return l[t];case 3:return n[t];case 2:return r[t]}else{if(o!==a&&b(o,t))return s[t]=0,o[t];if(l!==a&&b(l,t))return s[t]=1,l[t];if((u=e.propsOptions[0])&&b(u,t))return s[t]=2,r[t];if(n!==a&&b(n,t))return s[t]=3,n[t];no||(s[t]=4)}}const f=fo[t];let p,d;return f?("$attrs"===t&&le(e,0,t),f(e)):(p=i.__cssModules)&&(p=p[t])?p:n!==a&&b(n,t)?(s[t]=3,n[t]):(d=c.config.globalProperties,b(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:o,setupState:l,ctx:r}=e;if(l!==a&&b(l,t))l[t]=n;else if(o!==a&&b(o,t))o[t]=n;else if(t in e.props)return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:l,propsOptions:r}},s){let i;return void 0!==n[s]||e!==a&&b(e,s)||t!==a&&b(t,s)||(i=r[0])&&b(i,s)||b(o,s)||b(fo,s)||b(l.config.globalProperties,s)}},ho=v({},po,{get(e,t){if(t!==Symbol.unscopables)return po.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),mo=bn();let go=0;let vo=null;const yo=e=>{vo=e};let _o=!1;function bo(e,t,n){var o;k(t)?e.render=t:O(t)&&(e.setupState=He(o=t)?o:new Proxy(o,Je)),xo(e)}function xo(e,t){const n=e.type;e.render||(e.render=n.render||p,e.render._rc&&(e.withProxy=new Proxy(e.ctx,ho))),vo=e,oo(e,n),vo=null}function wo(e){vo&&(vo.effects||(vo.effects=[])).push(e)}function Co(e){const t=function(e){let t,n;return k(e)?(t=e,n=p):(t=e.get,n=e.set),new Xe(t,n,k(e)||!e.set)}(e);return wo(t.effect),t}function ko(e,t){let n;if(x(e)||S(e)){n=new Array(e.length);for(let o=0,l=e.length;o<l;o++)n[o]=t(e[o],o)}else if("number"==typeof e){n=new Array(e);for(let o=0;o<e;o++)n[o]=t(o+1,o)}else if(O(e))if(e[Symbol.iterator])n=Array.from(e,t);else{const o=Object.keys(e);n=new Array(o.length);for(let l=0,r=o.length;l<r;l++){const r=o[l];n[l]=t(e[r],r,l)}}else n=[];return n}const So="3.0.2",Fo="http://www.w3.org/2000/svg",Oo="undefined"!=typeof document?document:null;let Eo,Mo;const Ro={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n)=>t?Oo.createElementNS(Fo,e):Oo.createElement(e,n?{is:n}:void 0),createText:e=>Oo.createTextNode(e),createComment:e=>Oo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode:e=>e.cloneNode(!0),insertStaticContent(e,t,n,o){const l=o?Mo||(Mo=Oo.createElementNS(Fo,"svg")):Eo||(Eo=Oo.createElement("div"));l.innerHTML=e;const r=l.firstChild;let s=r,i=s;for(;s;)i=s,Ro.insert(s,t,n),s=l.firstChild;return[r,i]}};const Po=/\s*!important$/;function zo(e,t,n){if(x(n))n.forEach((n=>zo(e,t,n)));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Io[t];if(n)return n;let o=j(t);if("filter"!==o&&o in e)return Io[t]=o;o=V(o);for(let n=0;n<$o.length;n++){const l=$o[n]+o;if(l in e)return Io[t]=l}return t}(e,t);Po.test(n)?e.setProperty(A(o),n.replace(Po,""),"important"):e[o]=n}}const $o=["Webkit","Moz","ms"],Io={};const To="http://www.w3.org/1999/xlink";let jo=Date.now;"undefined"!=typeof document&&jo()>document.createEvent("Event").timeStamp&&(jo=()=>performance.now());let No=0;const Ao=Promise.resolve(),Vo=()=>{No=0};function Uo(e,t,n,o,l=null){const r=e._vei||(e._vei={}),s=r[t];if(o&&s)s.value=o;else{const[n,i]=function(e){let t;if(Do.test(e)){let n;for(t={};n=e.match(Do);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e.slice(2).toLowerCase(),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,r[t]=function(e,t){const n=e=>{(e.timeStamp||jo())>=n.attached-1&&Ze(function(e,t){if(x(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>No||(Ao.then(Vo),No=jo()))(),n}(o,l),i)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,i),r[t]=void 0)}}const Do=/(?:Once|Passive|Capture)$/;const Bo=/^on[a-z]/;const Lo=["ctrl","shift","alt","meta"],Ho={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Lo.some((n=>e[n+"Key"]&&!t.includes(n)))},Wo=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=Ho[t[e]];if(o&&o(n,t))return}return e(n,...o)},Ko=v({patchProp:(e,t,o,l,r=!1,s,i,c,u)=>{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,l,r);break;case"style":!function(e,t,n){const o=e.style;if(n)if(S(n))t!==n&&(o.cssText=n);else{for(const e in n)zo(o,e,n[e]);if(t&&!S(t))for(const e in t)null==n[e]&&zo(o,e,"")}else e.removeAttribute("style")}(e,o,l);break;default:m(t)?g(t)||Uo(e,t,0,l,i):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&Bo.test(t)&&k(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t&&"string"==typeof n)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if(Bo.test(t)&&S(n))return!1;return t in e}(e,t,l,r)?function(e,t,n,o,l,r,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,l,r),void(e[t]=null==n?"":n);if("value"!==t||"PROGRESS"===e.tagName)if(""===n&&"boolean"==typeof e[t])e[t]=!0;else if(null==n&&"string"==typeof e[t])e[t]="",e.removeAttribute(t);else try{e[t]=n}catch(e){}else{e._value=n;const t=null==n?"":n;e.value!==t&&(e.value=t)}}(e,t,l,s,i,c,u):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),function(e,t,o,l){if(l&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(To,t.slice(6,t.length)):e.setAttributeNS(To,t,o);else{const l=n(t);null==o||l&&!1===o?e.removeAttribute(t):e.setAttribute(t,l?"":o)}}(e,t,l,r))}},forcePatchProp:(e,t)=>"value"===t},Ro);let Go;class qo{static post(e,t,n){var o=this;window.wcfmoptions.poster(e,t,(function(e){n.call(o,e)}),(function(){console.log("failure")}))}}const Jo={style:{position:"absolute",width:"0",height:"0"},width:"0",height:"0",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},Xo=Gn("defs",null,[Gn("symbol",{id:"icon-folder",viewBox:"0 0 309.267 309.267"},[Gn("g",null,[Gn("path",{style:{fill:"#D0994B"},d:"M260.944,43.491H125.64c0,0-18.324-28.994-28.994-28.994H48.323c-10.67,0-19.329,8.65-19.329,19.329\n \t\tv222.286c0,10.67,8.659,19.329,19.329,19.329h212.621c10.67,0,19.329-8.659,19.329-19.329V62.82\n \t\tC280.273,52.15,271.614,43.491,260.944,43.491z"}),Gn("path",{style:{fill:"#E4E7E7"},d:"M28.994,72.484h251.279v77.317H28.994V72.484z"}),Gn("path",{style:{fill:"#F4B459"},d:"M19.329,91.814h270.609c10.67,0,19.329,8.65,19.329,19.329l-19.329,164.298\n \t\tc0,10.67-8.659,19.329-19.329,19.329H38.658c-10.67,0-19.329-8.659-19.329-19.329L0,111.143C0,100.463,8.659,91.814,19.329,91.814z\n \t\t"})])]),Gn("symbol",{id:"icon-unfold",viewBox:"0 0 32 32"},[Gn("path",{d:"M28,14H18V4c0-1.104-0.896-2-2-2s-2,0.896-2,2v10H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h10v10c0,1.104,0.896,2,2,2 s2-0.896,2-2V18h10c1.104,0,2-0.896,2-2S29.104,14,28,14z"})]),Gn("symbol",{id:"icon-fold",viewBox:"0 0 24 24"},[Gn("g",{fill:"none",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},[Gn("line",{x1:"5",y1:"12",x2:"19",y2:"12"})])]),Gn("symbol",{id:"icon-file",viewBox:"0 0 56 56"},[Gn("g",null,[Gn("path",{style:{fill:"#E9E9E0"},d:"M36.985,0H7.963C7.155,0,6.5,0.655,6.5,1.926V55c0,0.345,0.655,1,1.463,1h40.074\n \t\tc0.808,0,1.463-0.655,1.463-1V12.978c0-0.696-0.093-0.92-0.257-1.085L37.607,0.257C37.442,0.093,37.218,0,36.985,0z"}),Gn("polygon",{style:{fill:"#D9D7CA"},points:"37.5,0.151 37.5,12 49.349,12 \t"}),Gn("circle",{style:{fill:"#F3D55B"},cx:"18.931",cy:"14.431",r:"4.569"}),Gn("polygon",{style:{fill:"#26B99A"},points:"6.5,39 17.5,39 49.5,39 49.5,28 39.5,18.5 29,30 23.517,24.517 \t"}),Gn("path",{style:{fill:"#14A085"},d:"M48.037,56H7.963C7.155,56,6.5,55.345,6.5,54.537V39h43v15.537C49.5,55.345,48.845,56,48.037,56z"}),Gn("g")])])],-1);const Yo={render:function(e,t){return Vn(),Dn("svg",Jo,[Xo])}};var Zo={name:"FileItem",emits:["foldUnfoldClick"],props:{item:Object},data:()=>({hover:!1}),methods:{getWCFM(){var e=this.$parent;for(window.n=e;e;)if("WCFM"==(e=e.$parent).$.type.name)return e;return e},getFullPath(){for(var e=this.$parent,t=[];null!==e&&null!==e.$parent;)e.item&&t.push(e.item.name),e=e.$parent;return t.reverse().join("/")},infoClick(){this.getWCFM().onInfoClick(this.getFullPath())},convertClick(){this.getWCFM().onConvertClick(this.getFullPath())}}};const Qo=Ut("data-v-1d130b20");At("data-v-1d130b20");const el={key:0,class:"icon-fold"},tl=Gn("use",{"xlink:href":"#icon-fold"},null,-1),nl={key:1,class:"icon-unfold"},ol=Gn("use",{"xlink:href":"#icon-unfold"},null,-1),ll=Gn("use",{"xlink:href":"#icon-folder"},null,-1),rl={key:2,class:"icon-file"},sl=Gn("use",{"xlink:href":"#icon-file"},null,-1);Vt();const il=Qo((function(e,t,n,o,l,r){return Vn(),Dn("div",{class:"fileitem",onMouseover:t[5]||(t[5]=e=>l.hover=!0),onMouseleave:t[6]||(t[6]=e=>l.hover=!1)},[Gn("p",null,[n.item.isDir?(Vn(),Dn("span",{key:0,class:"foldUnfold",onClick:t[1]||(t[1]=e=>this.$emit("foldUnfoldClick"))},[n.item.isOpen?(Vn(),Dn("svg",el,[tl])):Xn("",!0),n.item.isOpen?Xn("",!0):(Vn(),Dn("svg",nl,[ol]))])):Xn("",!0),n.item.isDir?(Vn(),Dn("svg",{key:1,class:"icon-folder",onClick:t[2]||(t[2]=e=>this.$emit("foldUnfoldClick"))},[ll])):Xn("",!0),n.item.isDir?Xn("",!0):(Vn(),Dn("svg",rl,[sl])),Jn(" "+c(n.item.name)+" ",1),l.hover?(Vn(),Dn("button",{key:3,onClick:t[3]||(t[3]=Wo((e=>r.convertClick()),["stop"]))},"Convert")):Xn("",!0),l.hover?(Vn(),Dn("button",{key:4,onClick:t[4]||(t[4]=Wo((e=>r.infoClick()),["stop"]))},"Info")):Xn("",!0)])],32)}));Zo.render=il,Zo.__scopeId="data-v-1d130b20";var cl={name:"FileTree",components:{FileItem:Zo},props:{item:Object},methods:{toggle(){this.item.isOpen=!this.item.isOpen}}};const ul={key:0,class:"tree"};cl.render=function(e,t,n,o,l,r){const s=Rn("FileItem"),i=Rn("FileTree");return Vn(),Dn($n,null,[Gn(s,{item:n.item,onDblclick:t[1]||(t[1]=e=>r.toggle()),onClick:t[2]||(t[2]=e=>r.toggle())},null,8,["item"]),void 0!==n.item.children&&n.item.isOpen?(Vn(),Dn("ul",ul,[(Vn(!0),Dn($n,null,ko(n.item.children,(e=>(Vn(),Dn("li",null,[Gn(i,{item:e},null,8,["item"])])))),256))])):Xn("",!0)],64)};var al={name:"InfoPane",components:{},props:{info:Object},methods:{}};const fl={key:0},pl=Gn("h2",null,"Original",-1),dl=Gn("br",null,null,-1),hl=Gn("br",null,null,-1),ml={key:1},gl=Gn("h2",null,"Converted",-1),vl=Gn("br",null,null,-1),yl=Gn("br",null,null,-1),_l={key:2},bl=Gn("h2",null,"Conversion log",-1);al.render=function(e,t,n,o,l,r){return Vn(),Dn($n,null,[n.info.original?(Vn(),Dn("div",fl,[pl,Jn(" Filename: "+c(n.info.original.name),1),dl,Jn(" Size: "+c(n.info.original.size),1),hl])):Xn("",!0),n.info.converted?(Vn(),Dn("div",ml,[gl,Jn(" Filename: "+c(n.info.converted.name),1),vl,Jn(" Size: "+c(n.info.converted.size),1),yl])):Xn("",!0),n.info.log?(Vn(),Dn("div",_l,[bl,Jn(" "+c(n.info.log),1)])):Xn("",!0)],64)};var xl={name:"multipane",props:{layout:{type:String,default:"vertical"}},data:()=>({isResizing:!1}),computed:{classnames(){return["multipane","layout-"+this.layout.slice(0,1),this.isResizing?"is-resizing":""]},cursor(){return this.isResizing?"vertical"==this.layout?"col-resize":"row-resize":""},userSelect(){return this.isResizing?"none":""}},methods:{onMouseDown({target:e,pageX:t,pageY:n}){if("string"==typeof e.className&&e.className.match("multipane-resizer")){let o=this,{$el:l,layout:r}=o,s=e.previousElementSibling,{offsetWidth:i,offsetHeight:c}=s,u=!!(s.style.width+"").match("%");const{addEventListener:a,removeEventListener:f}=window,p=(e,t=0)=>{if(t-=30,"vertical"==r){let n=l.clientWidth,o=e+t;return s.style.width=u?o/n*100+"%":o+"px"}if("horizontal"==r){let n=l.clientHeight,o=e+t;return s.style.height=u?o/n*100+"%":o+"px"}};o.isResizing=!0;let d=p();o.$emit("paneResizeStart",s,e,d);const h=function({pageX:l,pageY:u}){d="vertical"==r?p(i,l-t):p(c,u-n),o.$emit("paneResize",s,e,d)},m=function(){d=p("vertical"==r?s.clientWidth:s.clientHeight),o.isResizing=!1,f("mousemove",h),f("mouseup",m),o.$emit("paneResizeStop",s,e,d)};a("mousemove",h),a("mouseup",m)}}}};xl.render=function(e,t,n,o,l,r){return Vn(),Dn("div",{class:r.classnames,style:{cursor:r.cursor,userSelect:r.userSelect},onMousedown:t[1]||(t[1]=(...e)=>r.onMouseDown(...e))},[It(e.$slots,"default")],38)};const wl={class:"multipane-resizer"},Cl=Gn("div",null,null,-1);const kl={render:function(e,t){return Vn(),Dn("div",wl,[Cl,It(e.$slots,"default")])}};var Sl={name:"WCFM",components:{SVGs:Yo,FileTree:cl,InfoPane:al,Multipane:xl,MultipaneResizer:kl},methods:{onConvertClick(e){alert(e)},onInfoClick(e){var t=this;qo.post("info",{path:e},(function(e){t.selectedInfo=e}))}},mounted(){var e=this;qo.post("get-tree",{folder:""},(function(t){e.item=t}))},data:()=>({selectedItem:null,item:{},selectedInfo:{}})};const Fl={class:"pane",style:{width:"48%"}},Ol={class:"pane",style:{flexGrow:1}};Sl.render=function(e,t,n,o,l,r){const s=Rn("SVGs"),i=Rn("FileTree"),c=Rn("multipane-resizer"),u=Rn("InfoPane"),a=Rn("multipane");return Vn(),Dn($n,null,[Gn(s),Gn(a,{class:"mainpanel",layout:"vertical"},{default:Tt((()=>[Gn("div",Fl,[Gn(i,{item:l.item},null,8,["item"])]),Gn(c),Gn("div",Ol,[Gn(u,{info:l.selectedInfo},null,8,["info"])])])),_:1})],64)};const El=((...e)=>{const t=(Go||(Go=Fn(Ko))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(S(e)){return document.querySelector(e)}return e}(e);if(!o)return;const l=t._component;k(l)||l.render||l.template||(l.template=o.innerHTML),o.innerHTML="";const r=n(o);return o.removeAttribute("v-cloak"),o.setAttribute("data-v-app",""),r},t})(Sl);window.wcfmoptions||(window.wcfmoptions={},window.wcfmoptions.poster=function(e,t,n,o){switch(e){case"get-tree":var l={name:"root",isDir:!0,isOpen:!0,children:[{name:"folder",isDir:!0,children:[{name:"file",isDir:!1},{name:"subfolder",isDir:!0,children:[{name:"file",isDir:!1}]},{name:"file",isDir:!1}]},{name:"file",isDir:!1},{name:"file2",isDir:!1}]};break;case"info":l={original:{name:"file.png",size:100,url:""},converted:{name:"file.png.webp",size:70,url:""},log:"blah blah blah"};break;default:l="ok"}n(l)}),El.mount("#webpconvert-filemanager");
|
webp-express.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
-
* Version: 0.19.
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
+
* Version: 0.19.1
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|