├── .php-cs-fixer.dist.php ├── CHANGELOG.md ├── LICENSE ├── README.md ├── assets ├── main.js └── main.min.js ├── composer.json ├── config.inc.php.dist ├── lib ├── composer.json └── vendor │ ├── autoload.php │ └── composer │ ├── ClassLoader.php │ ├── LICENSE │ ├── autoload_classmap.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── autoload_static.php │ └── installed.json ├── localization ├── cs_CZ.inc ├── de_DE.inc ├── en_US.inc ├── es_ES.inc ├── fr_FR.inc ├── hu_HU.inc ├── it_IT.inc ├── nb_NO.inc ├── pt_PT.inc ├── ru_RU.inc ├── zh_CN.inc └── zh_TW.inc ├── show_folder_size.php ├── skins ├── classic │ └── main.css ├── elastic │ └── main.css └── larry │ └── main.css └── src ├── AbstractRoundcubePlugin.php └── RoundcubeHelper.php /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | setIndent(' ') 5 | ->setLineEnding("\n") 6 | ->setCacheFile(__DIR__ . '/.php_cs.cache') 7 | ->setRiskyAllowed(true) 8 | ->setRules([ 9 | '@PHP71Migration' => true, 10 | '@PHP73Migration' => false, 11 | '@PhpCsFixer' => true, 12 | '@PhpCsFixer:risky' => true, 13 | '@PSR12' => true, 14 | '@Symfony' => true, 15 | '@Symfony:risky' => true, 16 | 'align_multiline_comment' => true, 17 | 'array_indentation' => true, 18 | 'array_syntax' => ['syntax' => 'short'], 19 | 'combine_consecutive_issets' => true, 20 | 'combine_consecutive_unsets' => true, 21 | 'combine_nested_dirname' => true, 22 | 'comment_to_phpdoc' => true, 23 | 'compact_nullable_typehint' => true, 24 | 'concat_space' => ['spacing' => 'one'], 25 | 'echo_tag_syntax' => ['format' => 'short'], 26 | 'escape_implicit_backslashes' => false, 27 | 'fully_qualified_strict_types' => true, 28 | 'linebreak_after_opening_tag' => true, 29 | 'list_syntax' => ['syntax' => 'short'], 30 | 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 31 | 'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'], 32 | 'native_constant_invocation' => ['scope' => 'all'], 33 | 'native_function_invocation' => ['scope' => 'all', 'include' => ['@compiler_optimized']], 34 | 'native_function_type_declaration_casing' => true, 35 | 'no_alternative_syntax' => true, 36 | 'no_null_property_initialization' => true, 37 | 'no_superfluous_elseif' => true, 38 | 'no_unneeded_control_parentheses' => true, 39 | 'no_useless_else' => true, 40 | 'no_useless_return' => true, 41 | 'not_operator_with_space' => false, 42 | 'not_operator_with_successor_space' => false, 43 | 'ordered_class_elements' => true, 44 | 'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'const', 'function']], 45 | 'ordered_interfaces' => true, 46 | 'php_unit_set_up_tear_down_visibility' => true, 47 | 'php_unit_strict' => true, 48 | 'php_unit_test_class_requires_covers' => true, 49 | 'phpdoc_add_missing_param_annotation' => true, 50 | 'phpdoc_order' => true, 51 | 'phpdoc_order_by_value' => ['annotations' => ['covers']], 52 | 'phpdoc_to_comment' => false, 53 | 'phpdoc_types_order' => true, 54 | 'pow_to_exponentiation' => true, 55 | 'random_api_migration' => true, 56 | 'return_assignment' => false, 57 | 'simple_to_complex_string_variable' => true, 58 | 'single_line_comment_style' => true, 59 | 'single_trait_insert_per_statement' => true, 60 | 'strict_comparison' => false, 61 | 'strict_param' => false, 62 | 'string_line_ending' => true, 63 | 'yoda_style' => false, 64 | ]) 65 | ->setFinder( 66 | PhpCsFixer\Finder::create() 67 | ->in(__DIR__) 68 | // both localization and php files 69 | ->name('/\.(inc|php)$/') 70 | // git worktree 71 | ->notPath('/branch-[^\\/]+/') 72 | // symfony 73 | ->exclude('bin') 74 | ->exclude('lib') 75 | ->exclude('var') 76 | ->exclude('vendor') 77 | // frontend 78 | ->exclude('node_modules') 79 | ); 80 | 81 | return $config; 82 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## VERSION 0 INIT 3 | 4 | * Version **0.7** - show in popup dialog 5 | * 2025-04-08 01:12 **0.7.21** Update Italian 6 | * 3d85d14 chore: update deps 7 | * e5ae3c0 chore: update Italian translation 8 | * 2024-07-07 02:49 **0.7.20** show total folder size 9 | * 1114a60 chore: recompile assets 10 | * f1c57e1 feat: show total folder size 11 | * d92fdf8 chore: update deps 12 | * 2022-06-29 08:43 **0.7.19** pt_PT localization 13 | * 7e33cf2 chore: recompile assets 14 | * a042f4f chore: update deps 15 | * 0981b2b chore: show version (#32) 16 | * 5b481f2 Create pt_PT.inc (#31) 17 | * 2022-06-08 17:48 **0.7.18** add cs_CZ localization 18 | * c25449b feat: add cs_CZ localization (by @RCejdik) 19 | * 2022-06-07 09:26 **0.7.17** Update deps 20 | * bd74aa2 chore: recompile assets 21 | * b3abbca chore: update deps 22 | * 2022-03-09 20:50 **0.7.16** add es_ES localization 23 | * bbe1a17 feat: add es_ES localization (by @nodo50) 24 | * 2022-03-09 19:44 **0.7.15** fix for folder name is numeric 25 | * 5f777c3 fix: 500 error when folder name is numeric 26 | * 0450ce8 chore: recompile assets 27 | * 5d1248d chore: update deps 28 | * d2e7f8e chore: license year +1 29 | * 0dde4e0 chore(ci): fix "Error: Must use import to load ES Module" 30 | * 727afda chore(ci): fix frontend CI not working 31 | * c113850 chore(ci): also test against PHP 8.0 32 | * 48523a6 refactor: simplify CSS rules 33 | * 2021-11-30 01:05 **0.7.14** fix color for RC 1.5 dark mode 34 | * 4f2d8f9 chore: recompile assets 35 | * 1d2cfc6 fix: bad folder name color with RC 1.5 dark theme 36 | * efc74e4 chore: update deps 37 | * 2021-08-11 12:19 **0.7.13** fix deps 38 | * 88317af chore: update deps 39 | * 971afce chore: remove `replace` directive from composer.json (#27) 40 | * 2021-07-26 15:50 **0.7.12** remove distributed RMT 41 | * e6001bb chore: no need to distribute RMT 42 | * 2021-07-25 12:27 **0.7.11** fix versioning 43 | * 0033c78 chore: add RMT executable 44 | * 893ad15 chore: update deps 45 | * 009495d chore: remove version info from composer.json 46 | * 30d735d chore: update lisence year 47 | * 43b623e docs: there is no configuration available at this moment 48 | * 2021-02-19 19:09 **0.7.10** Add ru_RU localization 49 | * 90e018a feat: add ru_RU localization (by @kotsar) 50 | * 2020-12-09 10:12 **0.7.9** add Italian/German localizations 51 | * 504d214 chore: exclude node_modules for php-cs-fixer 52 | * 624ce23 chore: recompile assets 53 | * 0560ef1 chore: update deps 54 | * 6c12023 Added italian translation (#24) 55 | * 929a1a6 Added german translation (#23) 56 | * 6464dce chore: recompile assets 57 | * 9e381a0 chore: update deps 58 | * 5fe8518 chore(ci): Composer 2 no longer needs hirak/prestissimo 59 | * 2020-08-21 03:38 **0.7.8** Update Hungarian localization 60 | * 50bd482 chore: update deps 61 | * cd95e3a Actualize hungarian translation (#21) 62 | * 05c58f6 chore: update deps 63 | * 2020-06-19 20:38 **0.7.7** add fr_FR localization 64 | * 5995c08 feat: add fr_FR localization (by @rdacn) 65 | * 3d5b59c chore: nits 66 | * 9bce887 chore: update build script 67 | * 2020-06-17 22:42 **0.7.6** fix: unsubscribed mailboxes make popup not shown 68 | * ed97a2c fix: unsubscribed mailboxes make popup not shown 69 | * 129afae chore: update deps 70 | * 3eaa32e docs: update readme for developers 71 | * e68e05d docs: update screenshot 72 | * 2020-06-11 00:33 **0.7.5** fix: no way closing the popup dialog on Elastic mobile 73 | * bddd3b3 fix: no way closing the popup dialog on Elastic mobile 74 | * 1da4c63 refactor: tidy codes 75 | * a395f2a docs: remove unexpected chars 76 | * 2020-06-10 15:43 **0.7.4** Show cumulative folder sizes 77 | * 6617d27 mod: use auto width table layout 78 | * d15efce docs: update screenshot 79 | * b2d837e chore: tidy codes 80 | * 9962ac7 feat: also show cumulative folder sizes 81 | * 3718ec7 chore: update deps 82 | * 2020-06-09 16:31 **0.7.3** Add localization: hu_HU 83 | * 4dabd19 Create hu_HU.inc 84 | * 0ef98e0 chore(ci): improve CI scripts 85 | * 221e6af chore: update deps 86 | * 2020-05-23 03:26 **0.7.2** feat: add translation: nb_NO 87 | * a206c1b Add translations nb_NO 88 | * 2020-05-21 18:21 **0.7.1** clickable folder name & non-modal dialog 89 | * a1c11fd fix: use non-modal dialog 90 | * f4ccf09 feat: clickable folder name 91 | * 2020-05-21 17:34 **0.7.0** initial release 92 | * 5cd2a1c chore: add translations: zh_CN and zh_TW 93 | * f50a568 refactor: tidy codes 94 | * cc7f9d9 chore: remove unused files and CSS rules 95 | * 6aa7a61 docs: update screenshot 96 | * 5e1965c refactor: improve popup dialog content 97 | * e240f4e refactor: use popup dialog to show folder size 98 | * c6ecdec chore: update deps 99 | * 044faea refactor: tidy codes 100 | 101 | * Version **0.6** - refactor 102 | * 2020-05-12 00:37 **0.6.4** feat: add nb_NO translation 103 | * 6cac2be Add: Norwegian 104 | * c6cebba refactor: tidy codes 105 | * 51ac19e refactor: use "get-folder-size" as the action name 106 | * 877cba3 chore: update deps 107 | * a37e18a refactor: make intelephense happy 108 | * 1c1a494 chore: add CI coding style chceking 109 | * 9e0c1bf chore: tidy codes 110 | * 6b02998 chore: add babel-eslint for linting latest JS syntax 111 | * 2020-04-30 16:41 **0.6.3** some refactoring 112 | * 572bfdb refactor: tidy codes 113 | * 457b474 chore: update RoundcubeHelper 114 | * e00efdb docs: update readme 115 | * ff31071 docs: update LICENSE year 116 | * aba6748 chore: allow installing with PHP 8 for test purpose 117 | * 2020-04-27 22:04 **0.6.2** nits 118 | * 9cb453b refactor: tidy codes 119 | * 2020-04-26 10:22 **0.6.1** some refactoring 120 | * 58de565 refactor: tidy codes 121 | * b909644 chore: update deps 122 | * 745329e chore: move js/ to assets/ 123 | * 54bfa18 refactor: simplify codes for auto_show_folder_size 124 | * 2020-04-26 03:09 **0.6.0** initial release 125 | * 4dcaec9 chore: update deps 126 | * e21c53b refactor: extract common methods between plugins 127 | * 1887d1f chore: move locales/ to localization/ 128 | * 4cd40e4 chore: add FUNDING.yml 129 | * 6888b1d chore: update package informations 130 | * 9e111ba Add bg_BG translation 131 | * 4890b64 docs: make markdownlint happy 132 | * 0b6e330 docs: update badges to packagist's 133 | * 03c1bad chore: update deps 134 | * 34df60b [ImgBot] Optimize images (#11) 135 | 136 | * Version **0.5** - PHP 7.1 137 | * 2020-01-19 13:11 **0.5.4** Add translations: de_DE and id_ID 138 | * 1336209 Release of new version 0.4.12 139 | * 6f57f1a Add translations: de_DE and id_ID 140 | * 2020-01-08 14:49 **0.5.3** Add translation: lv_LV 141 | * f7a87c4 Release of new version 0.4.11 142 | * 226eb5a Update deps 143 | * 37d1e53 Update deps 144 | * 9957f49 Add translation: lv_LV 145 | * 96b0532 Update readme 146 | * 2019-11-04 22:41 **0.5.2** Fix get_base_skin_name() for unsupported base skins 147 | * 2c79582 Adapt PHP 7 syntax 148 | * 95b1e10 Update deps 149 | * c719130 Release of new version 0.4.10 150 | * 3f99c1d Fix get_base_skin_name() for unsupported base skins 151 | * ef36a62 Update deps 152 | * 9f55195 Remove PHP ^7 from composer.json 153 | * a90b268 nits 154 | * ae1add0 $ composer fix 155 | * afe1e43 Update deps 156 | * c789a8a Fix readme for the php5 branch information 157 | * f657de6 Fix links in readme 158 | * 34c3769 Update readme (flat-square style badges) 159 | * 5dbf2ed nits 160 | * 0fcf32c Release of new version 0.4.9 161 | * eaee648 Lowercase variable names 162 | * 09a0497 Support extended skins 163 | * ecf3188 Fix PHP 5 compatibility 164 | * 2019-10-31 00:47 **0.5.1** Support extended skins 165 | * 5e39ae8 Update deps 166 | * e49ef91 Use strict_types 167 | * a64854c Lowercase all variable names 168 | * 9a5c9ef Tidy code for allowing extended skins 169 | * b57b153 Support extended skins 170 | * 2019-10-13 17:19 **0.5.0** initial release 171 | * a63095c Update deps 172 | * f7d3ab4 Bump min PHP version to 7.1.3 173 | * ccfb65c Update readme (flat-square style badges) 174 | * 663778d nits 175 | 176 | * Version **0.4** - Add mailbox options button 177 | * 2020-01-19 13:09 **0.4.12** Add translations: de_DE and id_ID 178 | * 6f57f1a Add translations: de_DE and id_ID 179 | * 2020-01-08 14:47 **0.4.11** Add translation: lv_LV 180 | * 226eb5a Update deps 181 | * 9957f49 Add translation: lv_LV 182 | * 96b0532 Update readme 183 | * 2019-11-04 22:34 **0.4.10** Fix get_base_skin_name() for unsupported base skins 184 | * fec0acd Fix get_base_skin_name() for unsupported base skins 185 | * a90b268 nits 186 | * f657de6 Fix links in readme 187 | * 34c3769 Update readme (flat-square style badges) 188 | * 5dbf2ed nits 189 | * 2019-10-31 01:02 **0.4.9** Fix PHP 5 compatibility 190 | * 97f2b94 test 191 | * eaee648 Lowercase variable names 192 | * 09a0497 Support extended skins 193 | * ecf3188 Fix PHP 5 compatibility 194 | * 2019-09-11 18:43 **0.4.8** fr_FR translation 195 | * a837ddf Update compiled assets 196 | * 5898ac9 Update deps 197 | * c010634 Add translation: fr_FR 198 | * d380868 Update readme to use badges from shields.io 199 | * 9b977ee Update readme 200 | * 2019-08-12 20:43 **0.4.7** nits 201 | * 91e0541 Update deps 202 | * ac4597c Better code structor (reuseable methods) 203 | * 9c11383 Fix compile.sh cleancss flag 204 | * f718a18 Update .gitignore 205 | * 9ad5dc4 Fix CVE-2019-10744 by lodash@^4.17.13 206 | * 2019-07-13 05:21 **0.4.6** revert "Remove can_stop_init()": 207 | * b53fb93 Update compiled assets 208 | * 37ab049 Update deps 209 | * 0e398ce Small code tweak (easier understanding) 210 | * 9c502df Revert "Remove can_stop_init()" 211 | * 2019-07-07 08:43 **0.4.5** nits 212 | * 64b7231 Remove can_stop_init() 213 | * 9bc87e4 Fix JSDoc 214 | * 2cf7d0b Some coding style tweaks 215 | * 5bdb7b8 Fix LESS indentation width 216 | * 6088e03 README.MD -> README.md 217 | * e21ecec Update readme 218 | * 2f2e4df nits 219 | * de2370d Re-compile assets 220 | * 53f3fc6 Simplify the JS compilation flow 221 | * fa48006 Add .gitattributes 222 | * 2019-07-02 00:25 **0.4.4** Do not fire useless API request 223 | * 5864bf5 Update compiled assets 224 | * 3c0ffb1 Do not fire API request if there is no mailbox list in the UI 225 | * 09a5c39 Change "PluginShowFolderSize" to "plugin_show_folder_size" 226 | * b45c197 Fix the compilation flows of JS files 227 | * 6101b8c Simplify LESS codes 228 | * 2019-06-26 18:10 **0.4.3** es_ES localization 229 | * b949aee Add liip/rmt as a dev dep to composer.json 230 | * 1593af2 Locale coding style fix 231 | * a660bd2 Add es_ES 232 | * f9ccec7 Toolbar title uses "show_folder_size (longer)" 233 | * cdc604d Update deps 234 | * 0d7e235 Fix compilation stopped when an input .less file is empty 235 | * 3573c87 Remove folders size before send a API request 236 | * 2019-06-22 04:49 **0.4.2** nits 237 | * 10eef4b Rename skins stylesheets to main.less 238 | * 389ebca Simplify CSS rules for Larray skin 239 | * a46100d Add skins/_variables.less 240 | * 1cc5035 Always uses initiated "rcube_storage" object 241 | * a362fb3 Stop init if _action is not set and not plugin API call 242 | * 2019-06-21 17:23 **0.4.1** nits 243 | * 4233e56 Fix Elastic mailbox options icon does not show up 244 | * 2019-06-21 17:12 **0.4.0** initial release 245 | * 5ed62f4 Update readme 246 | * 9aefe8f Update demo screenshot 247 | * fdb7663 Add a configurable button to mailbox options 248 | * 939a1d4 Update .editorconfig 249 | * 9efcbe2 API can response partial folder size (or all) 250 | * 7cc24e4 Shrink images 251 | 252 | * Version **0.3** - Support Elastic skin 253 | * 2019-06-21 08:50 **0.3.0** initial release 254 | * 15b7107 nits 255 | * 0fa6239 Update .php_cs 256 | * 018fe5a Fix the Classic skin show twice folder size 257 | * 1b38e8b Disable plugin button before the API responses 258 | * 043fc8e Add support for Elastic skin (since RC 1.4) 259 | * 3c0bff5 Code tidy 260 | * 8b605b2 Update button image 261 | * c2674f7 Update composer.json (bump php-cs-fixer) 262 | * ae5ed3b Code tidy 263 | 264 | * Version **0.2** - nits 265 | * 2019-06-21 05:27 **0.2.8** Reduce HTTP requests 266 | * 11ed356 Add a single API to get all folder sizes 267 | * e96553c Update .php_cs 268 | * 3eb4f54 Use markdown format for CHANGELOG 269 | * 5859dd3 Fix permission bits for compile.sh 270 | * 703ffaf Check asset files exists before compilation 271 | * 86d0e3f Rename repo to roundcube-plugin-show-folder-size 272 | * 2019-06-20 23:26 **0.2.7** Fix subfolder's size 273 | * 0127546 Config "auto_show_folder_size" is now false by default 274 | * fa77dc0 Use modern frontend tool for assets 275 | * d3d2ef8 Fix not showing subfolder's size 276 | * e2d9b98 Code tidy 277 | * 2019-06-20 08:41 **0.2.6** Fix composer package 278 | * c68fd00 Update readme 279 | * a1ef82f Try to fix installation via composer 280 | * 96c3e19 Code tidy 281 | * ff2b235 Update readme 282 | * 2019-06-19 02:47 **0.2.5** RoundCube plugin installer 283 | * e189d10 Update composer.json for RoundCube plugin installer 284 | * 2019-06-18 21:04 **0.2.4** fix tiny UI problem 285 | * 687b7f6 Bump version 286 | * 73b3f07 Do not show button on some pages 287 | * c3a7449 year++ 288 | * f431360 Update README 289 | * a5bbb31 Rename CHANGELOG.md -> CHANGELOG 290 | * 2018-08-11 04:49 **0.2.3** Fix typo 291 | * 2e07ea4 Fix typo 292 | * 2018-07-04 15:55 **0.2.2** initial release 293 | * 7239895 Add .rmt.yml 294 | * 227e645 Fix php-cs-fix rules for PHP ^5.4.0 295 | * 327ba38 Replace "show_folder_size" with \_\_CLASS\_\_ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2022 Jack Cherng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Roundcube Plugin: Show Folder Size 2 | 3 | [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/jfcherng-roundcube/plugin-show-folder-size/frontend/master?style=flat-square&label=build%20frontend)](https://github.com/jfcherng-roundcube/plugin-show-folder-size/actions) 4 | [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/jfcherng-roundcube/plugin-show-folder-size/backend/master?style=flat-square&label=build%20backend)](https://github.com/jfcherng-roundcube/plugin-show-folder-size/actions) 5 | [![Packagist](https://img.shields.io/packagist/dt/jfcherng-roundcube/show-folder-size?style=flat-square)](https://packagist.org/packages/jfcherng-roundcube/show-folder-size) 6 | [![Packagist Version](https://img.shields.io/packagist/v/jfcherng-roundcube/show-folder-size?style=flat-square)](https://packagist.org/packages/jfcherng-roundcube/show-folder-size) 7 | [![Project license](https://img.shields.io/github/license/jfcherng-roundcube/plugin-show-folder-size?style=flat-square)](https://github.com/jfcherng-roundcube/plugin-show-folder-size/blob/v6/LICENSE) 8 | [![GitHub stars](https://img.shields.io/github/stars/jfcherng-roundcube/plugin-show-folder-size?style=flat-square&logo=github)](https://github.com/jfcherng-roundcube/plugin-show-folder-size/stargazers) 9 | [![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-blue.svg?style=flat-square&logo=paypal)](https://www.paypal.me/jfcherng/5usd) 10 | 11 | A Roundcube plugin which shows folder size. 12 | 13 | ## Requirements 14 | 15 | I only test this plugin with following environments. Other setup may work with luck. 16 | 17 | - PHP: >= `7.1.3` 18 | - Roundcube: `1.3.9`, `1.4.0` 19 | - Supported skins: `Classic`, `Larry`, `Elastic` 20 | 21 | If you need support for PHP `5.4` ~ `7.0`, go to the 22 | [php5](https://github.com/jfcherng-roundcube/plugin-show-folder-size/tree/php5) 23 | branch or just let Composer decide the version to be installed. But note that 24 | I am not meant to maintain the `php5` branch because even PHP 5.6 is quite outdated nowadays. 25 | 26 | ## Demo 27 | 28 | ![demo](https://raw.githubusercontent.com/jfcherng-roundcube/plugin-show-folder-size/master/docs/screenshot/demo.png) 29 | 30 | ## How to install this plugin in Roundcube 31 | 32 | ### Install via Composer (Recommended) 33 | 34 | This plugin has been published on [Packagist](https://packagist.org) by the name of [jfcherng-roundcube/show-folder-size](https://packagist.org/packages/jfcherng-roundcube/show-folder-size). 35 | 36 | 1. Go to your `ROUNDCUBE_HOME` (i.e., the root directory of your Roundcube). 37 | 2. Run `composer require jfcherng-roundcube/show-folder-size`. 38 | 3. If you want to do plugin configuration, copy `config.inc.php.dist` to `config.inc.php` and then edit `config.inc.php`. 39 | 40 | ### Install manually 41 | 42 | 1. Create folder `show_folder_size` in `ROUNDCUBE_HOME/plugins` if it does not exist. 43 | 2. Copy all plugin files there. 44 | 3. If you want to do plugin configuration, copy `config.inc.php.dist` to `config.inc.php` and then edit `config.inc.php`. 45 | (You can skip this step since there is no configuration for this plugin at this moment.) 46 | 4. Edit your Roundcube's config file (`ROUNDCUBE_HOME/config/config.inc.php` or maybe `/etc/roundcube/config.inc.php`), locate `$config['plugins']` and add `'show_folder_size',`. 47 | 48 | ```php 49 | { 19 | const thresh = base_1k ? 1000 : 1024; 20 | 21 | if (Math.abs(bytes) < thresh) { 22 | return bytes + ' B'; 23 | } 24 | 25 | const units = base_1k 26 | ? ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] 27 | : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']; 28 | let u = -1; 29 | const r = 10 ** dp; 30 | 31 | do { 32 | bytes /= thresh; 33 | ++u; 34 | } while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1); 35 | 36 | return bytes.toFixed(dp) + ' ' + units[u]; 37 | }; 38 | 39 | const generatePopupContent = (resp) => { 40 | const entries = Object.entries(resp); 41 | entries.sort((a, b) => a[0].localeCompare(b[0])); // sort by mailbox name 42 | 43 | let html = ` 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | `; 54 | 55 | let total_size = 0; 56 | 57 | for (let [id, [size, cumulative_size]] of entries) { 58 | let mailbox = rcmail.env.mailboxes[id]; 59 | let level = (id.match(/\//g) ?? []).length; 60 | 61 | // skip unsubscribed mailboxes 62 | if (!mailbox) { 63 | continue; 64 | } 65 | 66 | total_size += size !== false ? size : 0; 67 | 68 | html += ` 69 | 70 | 77 | 80 | 83 | 84 | `; 85 | } 86 | 87 | html += ` 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
${rcmail.gettext('name', plugin_name)}${rcmail.gettext('size', plugin_name)}${rcmail.gettext('cumulative_size', plugin_name)}
75 |
${mailbox.name}
76 |
78 | ${size !== false ? humanizeBytes(size) : '-'} 79 | 81 | ${cumulative_size !== false ? humanizeBytes(cumulative_size) : '-'} 82 |
${rcmail.gettext('total', plugin_name)}${humanizeBytes(total_size)}-
97 | `; 98 | 99 | return html; 100 | }; 101 | 102 | rcmail.addEventListener('init', (evt) => { 103 | // register the main command 104 | rcmail.register_command( 105 | `plugin.${plugin_name}.show-data`, 106 | () => { 107 | rcmail.http_post( 108 | `plugin.${plugin_name}.get-folder-size`, 109 | { 110 | _callback: `plugin.${plugin_name}.show-data-callback`, 111 | }, 112 | rcmail.set_busy(true, 'loading') 113 | ); 114 | }, 115 | true 116 | ); 117 | 118 | // the callback function when server-side's API responses. 119 | rcmail.addEventListener(`plugin.${plugin_name}.show-data-callback`, (resp) => { 120 | delete resp.event; // unused entry 121 | 122 | rcmail.simple_dialog(generatePopupContent(resp), rcmail.gettext('folder_size', plugin_name), null, { 123 | modal: false, 124 | }); 125 | }); 126 | }); 127 | -------------------------------------------------------------------------------- /assets/main.min.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | !function n(t, e, r) { 4 | function i(o, a) { 5 | if (!e[o]) { 6 | if (!t[o]) { 7 | var l = "function" == typeof require && require; 8 | if (!a && l) return l(o, !0); 9 | if (s) return s(o, !0); 10 | var c = new Error("Cannot find module '" + o + "'"); 11 | throw c.code = "MODULE_NOT_FOUND", c; 12 | } 13 | var u = e[o] = { 14 | exports: {} 15 | }; 16 | t[o][0].call(u.exports, (function(n) { 17 | return i(t[o][1][n] || n); 18 | }), u, u.exports, n, t, e, r); 19 | } 20 | return e[o].exports; 21 | } 22 | for (var s = "function" == typeof require && require, o = 0; o < r.length; o++) i(r[o]); 23 | return i; 24 | }({ 25 | 1: [ function(n, t, e) { 26 | (function(t) { 27 | (function() { 28 | "use strict"; 29 | var e = n("@babel/runtime/helpers/interopRequireDefault"); 30 | n("core-js/modules/es.array.concat.js"), n("core-js/modules/es.array.sort.js"), 31 | n("core-js/modules/es.function.name.js"), n("core-js/modules/es.number.to-fixed.js"), 32 | n("core-js/modules/es.object.entries.js"), n("core-js/modules/es.regexp.exec.js"), 33 | n("core-js/modules/es.string.match.js"); 34 | var r, i, s = e(n("@babel/runtime/helpers/slicedToArray")), o = (t.$, t.rcmail), a = "show_folder_size", l = (r = o.env["".concat(a, ".config")], 35 | i = o.env["".concat(a, ".prefs")], function(n) { 36 | var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1, r = t ? 1e3 : 1024; 37 | if (Math.abs(n) < r) return n + " B"; 38 | var i = t ? [ "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ] : [ "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB" ], s = -1, o = Math.pow(10, e); 39 | do { 40 | n /= r, ++s; 41 | } while (Math.round(Math.abs(n) * o) / o >= r && s < i.length - 1); 42 | return n.toFixed(e) + " " + i[s]; 43 | }); 44 | o.addEventListener("init", (function(n) { 45 | o.register_command("plugin.".concat(a, ".show-data"), (function() { 46 | o.http_post("plugin.".concat(a, ".get-folder-size"), { 47 | _callback: "plugin.".concat(a, ".show-data-callback") 48 | }, o.set_busy(!0, "loading")); 49 | }), !0), o.addEventListener("plugin.".concat(a, ".show-data-callback"), (function(n) { 50 | delete n.event, o.simple_dialog(function(n) { 51 | var t = Object.entries(n); 52 | t.sort((function(n, t) { 53 | return n[0].localeCompare(t[0]); 54 | })); 55 | for (var e = '\n \n \n \n \n \n \n \n \n \n "), r = 0, i = 0, c = t; i < c.length; i++) { 56 | var u, f = (0, s.default)(c[i], 2), p = f[0], d = (0, s.default)(f[1], 2), b = d[0], y = d[1], g = o.env.mailboxes[p], v = (null !== (u = p.match(/\//g)) && void 0 !== u ? u : []).length; 57 | g && (r += !1 !== b ? b : 0, e += '\n \n \n
').concat(g.name, '
\n \n
\n \n \n ")); 58 | } 59 | return e + "\n \n \n \n \n \n \n \n \n
'.concat(o.gettext("name", a), "").concat(o.gettext("size", a), "").concat(o.gettext("cumulative_size", a), "
\n ').concat(!1 !== b ? l(b) : "-", '\n \n ').concat(!1 !== y ? l(y) : "-", "\n
".concat(o.gettext("total", a), '').concat(l(r), '-
\n '); 60 | }(n), o.gettext("folder_size", a), null, { 61 | modal: !1 62 | }); 63 | })); 64 | })); 65 | }).call(this); 66 | }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); 67 | }, { 68 | "@babel/runtime/helpers/interopRequireDefault": 4, 69 | "@babel/runtime/helpers/slicedToArray": 7, 70 | "core-js/modules/es.array.concat.js": 110, 71 | "core-js/modules/es.array.sort.js": 111, 72 | "core-js/modules/es.function.name.js": 112, 73 | "core-js/modules/es.number.to-fixed.js": 113, 74 | "core-js/modules/es.object.entries.js": 114, 75 | "core-js/modules/es.regexp.exec.js": 115, 76 | "core-js/modules/es.string.match.js": 116 77 | } ], 78 | 2: [ function(n, t, e) { 79 | t.exports = function(n, t) { 80 | (null == t || t > n.length) && (t = n.length); 81 | for (var e = 0, r = Array(t); e < t; e++) r[e] = n[e]; 82 | return r; 83 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 84 | }, {} ], 85 | 3: [ function(n, t, e) { 86 | t.exports = function(n) { 87 | if (Array.isArray(n)) return n; 88 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 89 | }, {} ], 90 | 4: [ function(n, t, e) { 91 | t.exports = function(n) { 92 | return n && n.__esModule ? n : { 93 | default: n 94 | }; 95 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 96 | }, {} ], 97 | 5: [ function(n, t, e) { 98 | t.exports = function(n, t) { 99 | var e = null == n ? null : "undefined" != typeof Symbol && n[Symbol.iterator] || n["@@iterator"]; 100 | if (null != e) { 101 | var r, i, s, o, a = [], l = !0, c = !1; 102 | try { 103 | if (s = (e = e.call(n)).next, 0 === t) { 104 | if (Object(e) !== e) return; 105 | l = !1; 106 | } else for (;!(l = (r = s.call(e)).done) && (a.push(r.value), a.length !== t); l = !0) ; 107 | } catch (n) { 108 | c = !0, i = n; 109 | } finally { 110 | try { 111 | if (!l && null != e.return && (o = e.return(), Object(o) !== o)) return; 112 | } finally { 113 | if (c) throw i; 114 | } 115 | } 116 | return a; 117 | } 118 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 119 | }, {} ], 120 | 6: [ function(n, t, e) { 121 | t.exports = function() { 122 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 123 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 124 | }, {} ], 125 | 7: [ function(n, t, e) { 126 | var r = n("./arrayWithHoles.js"), i = n("./iterableToArrayLimit.js"), s = n("./unsupportedIterableToArray.js"), o = n("./nonIterableRest.js"); 127 | t.exports = function(n, t) { 128 | return r(n) || i(n, t) || s(n, t) || o(); 129 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 130 | }, { 131 | "./arrayWithHoles.js": 3, 132 | "./iterableToArrayLimit.js": 5, 133 | "./nonIterableRest.js": 6, 134 | "./unsupportedIterableToArray.js": 8 135 | } ], 136 | 8: [ function(n, t, e) { 137 | var r = n("./arrayLikeToArray.js"); 138 | t.exports = function(n, t) { 139 | if (n) { 140 | if ("string" == typeof n) return r(n, t); 141 | var e = {}.toString.call(n).slice(8, -1); 142 | return "Object" === e && n.constructor && (e = n.constructor.name), "Map" === e || "Set" === e ? Array.from(n) : "Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? r(n, t) : void 0; 143 | } 144 | }, t.exports.__esModule = !0, t.exports.default = t.exports; 145 | }, { 146 | "./arrayLikeToArray.js": 2 147 | } ], 148 | 9: [ function(n, t, e) { 149 | "use strict"; 150 | var r = n("../internals/is-callable"), i = n("../internals/try-to-string"), s = TypeError; 151 | t.exports = function(n) { 152 | if (r(n)) return n; 153 | throw new s(i(n) + " is not a function"); 154 | }; 155 | }, { 156 | "../internals/is-callable": 57, 157 | "../internals/try-to-string": 104 158 | } ], 159 | 10: [ function(n, t, e) { 160 | "use strict"; 161 | var r = n("../internals/string-multibyte").charAt; 162 | t.exports = function(n, t, e) { 163 | return t + (e ? r(n, t).length : 1); 164 | }; 165 | }, { 166 | "../internals/string-multibyte": 91 167 | } ], 168 | 11: [ function(n, t, e) { 169 | "use strict"; 170 | var r = n("../internals/is-object"), i = String, s = TypeError; 171 | t.exports = function(n) { 172 | if (r(n)) return n; 173 | throw new s(i(n) + " is not an object"); 174 | }; 175 | }, { 176 | "../internals/is-object": 61 177 | } ], 178 | 12: [ function(n, t, e) { 179 | "use strict"; 180 | var r = n("../internals/to-indexed-object"), i = n("../internals/to-absolute-index"), s = n("../internals/length-of-array-like"), o = function(n) { 181 | return function(t, e, o) { 182 | var a = r(t), l = s(a); 183 | if (0 === l) return !n && -1; 184 | var c, u = i(o, l); 185 | if (n && e != e) { 186 | for (;l > u; ) if ((c = a[u++]) != c) return !0; 187 | } else for (;l > u; u++) if ((n || u in a) && a[u] === e) return n || u || 0; 188 | return !n && -1; 189 | }; 190 | }; 191 | t.exports = { 192 | includes: o(!0), 193 | indexOf: o(!1) 194 | }; 195 | }, { 196 | "../internals/length-of-array-like": 64, 197 | "../internals/to-absolute-index": 95, 198 | "../internals/to-indexed-object": 96 199 | } ], 200 | 13: [ function(n, t, e) { 201 | "use strict"; 202 | var r = n("../internals/fails"), i = n("../internals/well-known-symbol"), s = n("../internals/engine-v8-version"), o = i("species"); 203 | t.exports = function(n) { 204 | return s >= 51 || !r((function() { 205 | var t = []; 206 | return (t.constructor = {})[o] = function() { 207 | return { 208 | foo: 1 209 | }; 210 | }, 1 !== t[n](Boolean).foo; 211 | })); 212 | }; 213 | }, { 214 | "../internals/engine-v8-version": 36, 215 | "../internals/fails": 40, 216 | "../internals/well-known-symbol": 109 217 | } ], 218 | 14: [ function(n, t, e) { 219 | "use strict"; 220 | var r = n("../internals/fails"); 221 | t.exports = function(n, t) { 222 | var e = [][n]; 223 | return !!e && r((function() { 224 | e.call(null, t || function() { 225 | return 1; 226 | }, 1); 227 | })); 228 | }; 229 | }, { 230 | "../internals/fails": 40 231 | } ], 232 | 15: [ function(n, t, e) { 233 | "use strict"; 234 | var r = n("../internals/function-uncurry-this"); 235 | t.exports = r([].slice); 236 | }, { 237 | "../internals/function-uncurry-this": 45 238 | } ], 239 | 16: [ function(n, t, e) { 240 | "use strict"; 241 | var r = n("../internals/array-slice"), i = Math.floor, s = function(n, t) { 242 | var e = n.length; 243 | if (e < 8) for (var o, a, l = 1; l < e; ) { 244 | for (a = l, o = n[l]; a && t(n[a - 1], o) > 0; ) n[a] = n[--a]; 245 | a !== l++ && (n[a] = o); 246 | } else for (var c = i(e / 2), u = s(r(n, 0, c), t), f = s(r(n, c), t), p = u.length, d = f.length, b = 0, y = 0; b < p || y < d; ) n[b + y] = b < p && y < d ? t(u[b], f[y]) <= 0 ? u[b++] : f[y++] : b < p ? u[b++] : f[y++]; 247 | return n; 248 | }; 249 | t.exports = s; 250 | }, { 251 | "../internals/array-slice": 15 252 | } ], 253 | 17: [ function(n, t, e) { 254 | "use strict"; 255 | var r = n("../internals/is-array"), i = n("../internals/is-constructor"), s = n("../internals/is-object"), o = n("../internals/well-known-symbol")("species"), a = Array; 256 | t.exports = function(n) { 257 | var t; 258 | return r(n) && (t = n.constructor, (i(t) && (t === a || r(t.prototype)) || s(t) && null === (t = t[o])) && (t = void 0)), 259 | void 0 === t ? a : t; 260 | }; 261 | }, { 262 | "../internals/is-array": 56, 263 | "../internals/is-constructor": 58, 264 | "../internals/is-object": 61, 265 | "../internals/well-known-symbol": 109 266 | } ], 267 | 18: [ function(n, t, e) { 268 | "use strict"; 269 | var r = n("../internals/array-species-constructor"); 270 | t.exports = function(n, t) { 271 | return new (r(n))(0 === t ? 0 : t); 272 | }; 273 | }, { 274 | "../internals/array-species-constructor": 17 275 | } ], 276 | 19: [ function(n, t, e) { 277 | "use strict"; 278 | var r = n("../internals/function-uncurry-this"), i = r({}.toString), s = r("".slice); 279 | t.exports = function(n) { 280 | return s(i(n), 8, -1); 281 | }; 282 | }, { 283 | "../internals/function-uncurry-this": 45 284 | } ], 285 | 20: [ function(n, t, e) { 286 | "use strict"; 287 | var r = n("../internals/to-string-tag-support"), i = n("../internals/is-callable"), s = n("../internals/classof-raw"), o = n("../internals/well-known-symbol")("toStringTag"), a = Object, l = "Arguments" === s(function() { 288 | return arguments; 289 | }()); 290 | t.exports = r ? s : function(n) { 291 | var t, e, r; 292 | return void 0 === n ? "Undefined" : null === n ? "Null" : "string" == typeof (e = function(n, t) { 293 | try { 294 | return n[t]; 295 | } catch (n) {} 296 | }(t = a(n), o)) ? e : l ? s(t) : "Object" === (r = s(t)) && i(t.callee) ? "Arguments" : r; 297 | }; 298 | }, { 299 | "../internals/classof-raw": 19, 300 | "../internals/is-callable": 57, 301 | "../internals/to-string-tag-support": 102, 302 | "../internals/well-known-symbol": 109 303 | } ], 304 | 21: [ function(n, t, e) { 305 | "use strict"; 306 | var r = n("../internals/has-own-property"), i = n("../internals/own-keys"), s = n("../internals/object-get-own-property-descriptor"), o = n("../internals/object-define-property"); 307 | t.exports = function(n, t, e) { 308 | for (var a = i(t), l = o.f, c = s.f, u = 0; u < a.length; u++) { 309 | var f = a[u]; 310 | r(n, f) || e && r(e, f) || l(n, f, c(t, f)); 311 | } 312 | }; 313 | }, { 314 | "../internals/has-own-property": 49, 315 | "../internals/object-define-property": 69, 316 | "../internals/object-get-own-property-descriptor": 70, 317 | "../internals/own-keys": 80 318 | } ], 319 | 22: [ function(n, t, e) { 320 | "use strict"; 321 | var r = n("../internals/fails"); 322 | t.exports = !r((function() { 323 | function n() {} 324 | return n.prototype.constructor = null, Object.getPrototypeOf(new n) !== n.prototype; 325 | })); 326 | }, { 327 | "../internals/fails": 40 328 | } ], 329 | 23: [ function(n, t, e) { 330 | "use strict"; 331 | var r = n("../internals/descriptors"), i = n("../internals/object-define-property"), s = n("../internals/create-property-descriptor"); 332 | t.exports = r ? function(n, t, e) { 333 | return i.f(n, t, s(1, e)); 334 | } : function(n, t, e) { 335 | return n[t] = e, n; 336 | }; 337 | }, { 338 | "../internals/create-property-descriptor": 24, 339 | "../internals/descriptors": 30, 340 | "../internals/object-define-property": 69 341 | } ], 342 | 24: [ function(n, t, e) { 343 | "use strict"; 344 | t.exports = function(n, t) { 345 | return { 346 | enumerable: !(1 & n), 347 | configurable: !(2 & n), 348 | writable: !(4 & n), 349 | value: t 350 | }; 351 | }; 352 | }, {} ], 353 | 25: [ function(n, t, e) { 354 | "use strict"; 355 | var r = n("../internals/descriptors"), i = n("../internals/object-define-property"), s = n("../internals/create-property-descriptor"); 356 | t.exports = function(n, t, e) { 357 | r ? i.f(n, t, s(0, e)) : n[t] = e; 358 | }; 359 | }, { 360 | "../internals/create-property-descriptor": 24, 361 | "../internals/descriptors": 30, 362 | "../internals/object-define-property": 69 363 | } ], 364 | 26: [ function(n, t, e) { 365 | "use strict"; 366 | var r = n("../internals/make-built-in"), i = n("../internals/object-define-property"); 367 | t.exports = function(n, t, e) { 368 | return e.get && r(e.get, t, { 369 | getter: !0 370 | }), e.set && r(e.set, t, { 371 | setter: !0 372 | }), i.f(n, t, e); 373 | }; 374 | }, { 375 | "../internals/make-built-in": 65, 376 | "../internals/object-define-property": 69 377 | } ], 378 | 27: [ function(n, t, e) { 379 | "use strict"; 380 | var r = n("../internals/is-callable"), i = n("../internals/object-define-property"), s = n("../internals/make-built-in"), o = n("../internals/define-global-property"); 381 | t.exports = function(n, t, e, a) { 382 | a || (a = {}); 383 | var l = a.enumerable, c = void 0 !== a.name ? a.name : t; 384 | if (r(e) && s(e, c, a), a.global) l ? n[t] = e : o(t, e); else { 385 | try { 386 | a.unsafe ? n[t] && (l = !0) : delete n[t]; 387 | } catch (n) {} 388 | l ? n[t] = e : i.f(n, t, { 389 | value: e, 390 | enumerable: !1, 391 | configurable: !a.nonConfigurable, 392 | writable: !a.nonWritable 393 | }); 394 | } 395 | return n; 396 | }; 397 | }, { 398 | "../internals/define-global-property": 28, 399 | "../internals/is-callable": 57, 400 | "../internals/make-built-in": 65, 401 | "../internals/object-define-property": 69 402 | } ], 403 | 28: [ function(n, t, e) { 404 | "use strict"; 405 | var r = n("../internals/global"), i = Object.defineProperty; 406 | t.exports = function(n, t) { 407 | try { 408 | i(r, n, { 409 | value: t, 410 | configurable: !0, 411 | writable: !0 412 | }); 413 | } catch (e) { 414 | r[n] = t; 415 | } 416 | return t; 417 | }; 418 | }, { 419 | "../internals/global": 48 420 | } ], 421 | 29: [ function(n, t, e) { 422 | "use strict"; 423 | var r = n("../internals/try-to-string"), i = TypeError; 424 | t.exports = function(n, t) { 425 | if (!delete n[t]) throw new i("Cannot delete property " + r(t) + " of " + r(n)); 426 | }; 427 | }, { 428 | "../internals/try-to-string": 104 429 | } ], 430 | 30: [ function(n, t, e) { 431 | "use strict"; 432 | var r = n("../internals/fails"); 433 | t.exports = !r((function() { 434 | return 7 !== Object.defineProperty({}, 1, { 435 | get: function() { 436 | return 7; 437 | } 438 | })[1]; 439 | })); 440 | }, { 441 | "../internals/fails": 40 442 | } ], 443 | 31: [ function(n, t, e) { 444 | "use strict"; 445 | var r = n("../internals/global"), i = n("../internals/is-object"), s = r.document, o = i(s) && i(s.createElement); 446 | t.exports = function(n) { 447 | return o ? s.createElement(n) : {}; 448 | }; 449 | }, { 450 | "../internals/global": 48, 451 | "../internals/is-object": 61 452 | } ], 453 | 32: [ function(n, t, e) { 454 | "use strict"; 455 | var r = TypeError; 456 | t.exports = function(n) { 457 | if (n > 9007199254740991) throw r("Maximum allowed index exceeded"); 458 | return n; 459 | }; 460 | }, {} ], 461 | 33: [ function(n, t, e) { 462 | "use strict"; 463 | var r = n("../internals/engine-user-agent").match(/firefox\/(\d+)/i); 464 | t.exports = !!r && +r[1]; 465 | }, { 466 | "../internals/engine-user-agent": 35 467 | } ], 468 | 34: [ function(n, t, e) { 469 | "use strict"; 470 | var r = n("../internals/engine-user-agent"); 471 | t.exports = /MSIE|Trident/.test(r); 472 | }, { 473 | "../internals/engine-user-agent": 35 474 | } ], 475 | 35: [ function(n, t, e) { 476 | "use strict"; 477 | t.exports = "undefined" != typeof navigator && String(navigator.userAgent) || ""; 478 | }, {} ], 479 | 36: [ function(n, t, e) { 480 | "use strict"; 481 | var r, i, s = n("../internals/global"), o = n("../internals/engine-user-agent"), a = s.process, l = s.Deno, c = a && a.versions || l && l.version, u = c && c.v8; 482 | u && (i = (r = u.split("."))[0] > 0 && r[0] < 4 ? 1 : +(r[0] + r[1])), !i && o && (!(r = o.match(/Edge\/(\d+)/)) || r[1] >= 74) && (r = o.match(/Chrome\/(\d+)/)) && (i = +r[1]), 483 | t.exports = i; 484 | }, { 485 | "../internals/engine-user-agent": 35, 486 | "../internals/global": 48 487 | } ], 488 | 37: [ function(n, t, e) { 489 | "use strict"; 490 | var r = n("../internals/engine-user-agent").match(/AppleWebKit\/(\d+)\./); 491 | t.exports = !!r && +r[1]; 492 | }, { 493 | "../internals/engine-user-agent": 35 494 | } ], 495 | 38: [ function(n, t, e) { 496 | "use strict"; 497 | t.exports = [ "constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf" ]; 498 | }, {} ], 499 | 39: [ function(n, t, e) { 500 | "use strict"; 501 | var r = n("../internals/global"), i = n("../internals/object-get-own-property-descriptor").f, s = n("../internals/create-non-enumerable-property"), o = n("../internals/define-built-in"), a = n("../internals/define-global-property"), l = n("../internals/copy-constructor-properties"), c = n("../internals/is-forced"); 502 | t.exports = function(n, t) { 503 | var e, u, f, p, d, b = n.target, y = n.global, g = n.stat; 504 | if (e = y ? r : g ? r[b] || a(b, {}) : r[b] && r[b].prototype) for (u in t) { 505 | if (p = t[u], f = n.dontCallGetSet ? (d = i(e, u)) && d.value : e[u], !c(y ? u : b + (g ? "." : "#") + u, n.forced) && void 0 !== f) { 506 | if (typeof p == typeof f) continue; 507 | l(p, f); 508 | } 509 | (n.sham || f && f.sham) && s(p, "sham", !0), o(e, u, p, n); 510 | } 511 | }; 512 | }, { 513 | "../internals/copy-constructor-properties": 21, 514 | "../internals/create-non-enumerable-property": 23, 515 | "../internals/define-built-in": 27, 516 | "../internals/define-global-property": 28, 517 | "../internals/global": 48, 518 | "../internals/is-forced": 59, 519 | "../internals/object-get-own-property-descriptor": 70 520 | } ], 521 | 40: [ function(n, t, e) { 522 | "use strict"; 523 | t.exports = function(n) { 524 | try { 525 | return !!n(); 526 | } catch (n) { 527 | return !0; 528 | } 529 | }; 530 | }, {} ], 531 | 41: [ function(n, t, e) { 532 | "use strict"; 533 | n("../modules/es.regexp.exec"); 534 | var r = n("../internals/function-call"), i = n("../internals/define-built-in"), s = n("../internals/regexp-exec"), o = n("../internals/fails"), a = n("../internals/well-known-symbol"), l = n("../internals/create-non-enumerable-property"), c = a("species"), u = RegExp.prototype; 535 | t.exports = function(n, t, e, f) { 536 | var p = a(n), d = !o((function() { 537 | var t = {}; 538 | return t[p] = function() { 539 | return 7; 540 | }, 7 !== ""[n](t); 541 | })), b = d && !o((function() { 542 | var t = !1, e = /a/; 543 | return "split" === n && ((e = {}).constructor = {}, e.constructor[c] = function() { 544 | return e; 545 | }, e.flags = "", e[p] = /./[p]), e.exec = function() { 546 | return t = !0, null; 547 | }, e[p](""), !t; 548 | })); 549 | if (!d || !b || e) { 550 | var y = /./[p], g = t(p, ""[n], (function(n, t, e, i, o) { 551 | var a = t.exec; 552 | return a === s || a === u.exec ? d && !o ? { 553 | done: !0, 554 | value: r(y, t, e, i) 555 | } : { 556 | done: !0, 557 | value: r(n, e, t, i) 558 | } : { 559 | done: !1 560 | }; 561 | })); 562 | i(String.prototype, n, g[0]), i(u, p, g[1]); 563 | } 564 | f && l(u[p], "sham", !0); 565 | }; 566 | }, { 567 | "../internals/create-non-enumerable-property": 23, 568 | "../internals/define-built-in": 27, 569 | "../internals/fails": 40, 570 | "../internals/function-call": 43, 571 | "../internals/regexp-exec": 82, 572 | "../internals/well-known-symbol": 109, 573 | "../modules/es.regexp.exec": 115 574 | } ], 575 | 42: [ function(n, t, e) { 576 | "use strict"; 577 | var r = n("../internals/fails"); 578 | t.exports = !r((function() { 579 | var n = function() {}.bind(); 580 | return "function" != typeof n || n.hasOwnProperty("prototype"); 581 | })); 582 | }, { 583 | "../internals/fails": 40 584 | } ], 585 | 43: [ function(n, t, e) { 586 | "use strict"; 587 | var r = n("../internals/function-bind-native"), i = Function.prototype.call; 588 | t.exports = r ? i.bind(i) : function() { 589 | return i.apply(i, arguments); 590 | }; 591 | }, { 592 | "../internals/function-bind-native": 42 593 | } ], 594 | 44: [ function(n, t, e) { 595 | "use strict"; 596 | var r = n("../internals/descriptors"), i = n("../internals/has-own-property"), s = Function.prototype, o = r && Object.getOwnPropertyDescriptor, a = i(s, "name"), l = a && "something" === function() {}.name, c = a && (!r || r && o(s, "name").configurable); 597 | t.exports = { 598 | EXISTS: a, 599 | PROPER: l, 600 | CONFIGURABLE: c 601 | }; 602 | }, { 603 | "../internals/descriptors": 30, 604 | "../internals/has-own-property": 49 605 | } ], 606 | 45: [ function(n, t, e) { 607 | "use strict"; 608 | var r = n("../internals/function-bind-native"), i = Function.prototype, s = i.call, o = r && i.bind.bind(s, s); 609 | t.exports = r ? o : function(n) { 610 | return function() { 611 | return s.apply(n, arguments); 612 | }; 613 | }; 614 | }, { 615 | "../internals/function-bind-native": 42 616 | } ], 617 | 46: [ function(n, t, e) { 618 | "use strict"; 619 | var r = n("../internals/global"), i = n("../internals/is-callable"); 620 | t.exports = function(n, t) { 621 | return arguments.length < 2 ? (e = r[n], i(e) ? e : void 0) : r[n] && r[n][t]; 622 | var e; 623 | }; 624 | }, { 625 | "../internals/global": 48, 626 | "../internals/is-callable": 57 627 | } ], 628 | 47: [ function(n, t, e) { 629 | "use strict"; 630 | var r = n("../internals/a-callable"), i = n("../internals/is-null-or-undefined"); 631 | t.exports = function(n, t) { 632 | var e = n[t]; 633 | return i(e) ? void 0 : r(e); 634 | }; 635 | }, { 636 | "../internals/a-callable": 9, 637 | "../internals/is-null-or-undefined": 60 638 | } ], 639 | 48: [ function(n, t, e) { 640 | (function(n) { 641 | (function() { 642 | "use strict"; 643 | var e = function(n) { 644 | return n && n.Math === Math && n; 645 | }; 646 | t.exports = e("object" == typeof globalThis && globalThis) || e("object" == typeof window && window) || e("object" == typeof self && self) || e("object" == typeof n && n) || e("object" == typeof this && this) || function() { 647 | return this; 648 | }() || Function("return this")(); 649 | }).call(this); 650 | }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); 651 | }, {} ], 652 | 49: [ function(n, t, e) { 653 | "use strict"; 654 | var r = n("../internals/function-uncurry-this"), i = n("../internals/to-object"), s = r({}.hasOwnProperty); 655 | t.exports = Object.hasOwn || function(n, t) { 656 | return s(i(n), t); 657 | }; 658 | }, { 659 | "../internals/function-uncurry-this": 45, 660 | "../internals/to-object": 99 661 | } ], 662 | 50: [ function(n, t, e) { 663 | "use strict"; 664 | t.exports = {}; 665 | }, {} ], 666 | 51: [ function(n, t, e) { 667 | "use strict"; 668 | var r = n("../internals/get-built-in"); 669 | t.exports = r("document", "documentElement"); 670 | }, { 671 | "../internals/get-built-in": 46 672 | } ], 673 | 52: [ function(n, t, e) { 674 | "use strict"; 675 | var r = n("../internals/descriptors"), i = n("../internals/fails"), s = n("../internals/document-create-element"); 676 | t.exports = !r && !i((function() { 677 | return 7 !== Object.defineProperty(s("div"), "a", { 678 | get: function() { 679 | return 7; 680 | } 681 | }).a; 682 | })); 683 | }, { 684 | "../internals/descriptors": 30, 685 | "../internals/document-create-element": 31, 686 | "../internals/fails": 40 687 | } ], 688 | 53: [ function(n, t, e) { 689 | "use strict"; 690 | var r = n("../internals/function-uncurry-this"), i = n("../internals/fails"), s = n("../internals/classof-raw"), o = Object, a = r("".split); 691 | t.exports = i((function() { 692 | return !o("z").propertyIsEnumerable(0); 693 | })) ? function(n) { 694 | return "String" === s(n) ? a(n, "") : o(n); 695 | } : o; 696 | }, { 697 | "../internals/classof-raw": 19, 698 | "../internals/fails": 40, 699 | "../internals/function-uncurry-this": 45 700 | } ], 701 | 54: [ function(n, t, e) { 702 | "use strict"; 703 | var r = n("../internals/function-uncurry-this"), i = n("../internals/is-callable"), s = n("../internals/shared-store"), o = r(Function.toString); 704 | i(s.inspectSource) || (s.inspectSource = function(n) { 705 | return o(n); 706 | }), t.exports = s.inspectSource; 707 | }, { 708 | "../internals/function-uncurry-this": 45, 709 | "../internals/is-callable": 57, 710 | "../internals/shared-store": 89 711 | } ], 712 | 55: [ function(n, t, e) { 713 | "use strict"; 714 | var r, i, s, o = n("../internals/weak-map-basic-detection"), a = n("../internals/global"), l = n("../internals/is-object"), c = n("../internals/create-non-enumerable-property"), u = n("../internals/has-own-property"), f = n("../internals/shared-store"), p = n("../internals/shared-key"), d = n("../internals/hidden-keys"), b = "Object already initialized", y = a.TypeError, g = a.WeakMap; 715 | if (o || f.state) { 716 | var v = f.state || (f.state = new g); 717 | v.get = v.get, v.has = v.has, v.set = v.set, r = function(n, t) { 718 | if (v.has(n)) throw new y(b); 719 | return t.facade = n, v.set(n, t), t; 720 | }, i = function(n) { 721 | return v.get(n) || {}; 722 | }, s = function(n) { 723 | return v.has(n); 724 | }; 725 | } else { 726 | var h = p("state"); 727 | d[h] = !0, r = function(n, t) { 728 | if (u(n, h)) throw new y(b); 729 | return t.facade = n, c(n, h, t), t; 730 | }, i = function(n) { 731 | return u(n, h) ? n[h] : {}; 732 | }, s = function(n) { 733 | return u(n, h); 734 | }; 735 | } 736 | t.exports = { 737 | set: r, 738 | get: i, 739 | has: s, 740 | enforce: function(n) { 741 | return s(n) ? i(n) : r(n, {}); 742 | }, 743 | getterFor: function(n) { 744 | return function(t) { 745 | var e; 746 | if (!l(t) || (e = i(t)).type !== n) throw new y("Incompatible receiver, " + n + " required"); 747 | return e; 748 | }; 749 | } 750 | }; 751 | }, { 752 | "../internals/create-non-enumerable-property": 23, 753 | "../internals/global": 48, 754 | "../internals/has-own-property": 49, 755 | "../internals/hidden-keys": 50, 756 | "../internals/is-object": 61, 757 | "../internals/shared-key": 88, 758 | "../internals/shared-store": 89, 759 | "../internals/weak-map-basic-detection": 108 760 | } ], 761 | 56: [ function(n, t, e) { 762 | "use strict"; 763 | var r = n("../internals/classof-raw"); 764 | t.exports = Array.isArray || function(n) { 765 | return "Array" === r(n); 766 | }; 767 | }, { 768 | "../internals/classof-raw": 19 769 | } ], 770 | 57: [ function(n, t, e) { 771 | "use strict"; 772 | var r = "object" == typeof document && document.all; 773 | t.exports = void 0 === r && void 0 !== r ? function(n) { 774 | return "function" == typeof n || n === r; 775 | } : function(n) { 776 | return "function" == typeof n; 777 | }; 778 | }, {} ], 779 | 58: [ function(n, t, e) { 780 | "use strict"; 781 | var r = n("../internals/function-uncurry-this"), i = n("../internals/fails"), s = n("../internals/is-callable"), o = n("../internals/classof"), a = n("../internals/get-built-in"), l = n("../internals/inspect-source"), c = function() {}, u = a("Reflect", "construct"), f = /^\s*(?:class|function)\b/, p = r(f.exec), d = !f.test(c), b = function(n) { 782 | if (!s(n)) return !1; 783 | try { 784 | return u(c, [], n), !0; 785 | } catch (n) { 786 | return !1; 787 | } 788 | }, y = function(n) { 789 | if (!s(n)) return !1; 790 | switch (o(n)) { 791 | case "AsyncFunction": 792 | case "GeneratorFunction": 793 | case "AsyncGeneratorFunction": 794 | return !1; 795 | } 796 | try { 797 | return d || !!p(f, l(n)); 798 | } catch (n) { 799 | return !0; 800 | } 801 | }; 802 | y.sham = !0, t.exports = !u || i((function() { 803 | var n; 804 | return b(b.call) || !b(Object) || !b((function() { 805 | n = !0; 806 | })) || n; 807 | })) ? y : b; 808 | }, { 809 | "../internals/classof": 20, 810 | "../internals/fails": 40, 811 | "../internals/function-uncurry-this": 45, 812 | "../internals/get-built-in": 46, 813 | "../internals/inspect-source": 54, 814 | "../internals/is-callable": 57 815 | } ], 816 | 59: [ function(n, t, e) { 817 | "use strict"; 818 | var r = n("../internals/fails"), i = n("../internals/is-callable"), s = /#|\.prototype\./, o = function(n, t) { 819 | var e = l[a(n)]; 820 | return e === u || e !== c && (i(t) ? r(t) : !!t); 821 | }, a = o.normalize = function(n) { 822 | return String(n).replace(s, ".").toLowerCase(); 823 | }, l = o.data = {}, c = o.NATIVE = "N", u = o.POLYFILL = "P"; 824 | t.exports = o; 825 | }, { 826 | "../internals/fails": 40, 827 | "../internals/is-callable": 57 828 | } ], 829 | 60: [ function(n, t, e) { 830 | "use strict"; 831 | t.exports = function(n) { 832 | return null == n; 833 | }; 834 | }, {} ], 835 | 61: [ function(n, t, e) { 836 | "use strict"; 837 | var r = n("../internals/is-callable"); 838 | t.exports = function(n) { 839 | return "object" == typeof n ? null !== n : r(n); 840 | }; 841 | }, { 842 | "../internals/is-callable": 57 843 | } ], 844 | 62: [ function(n, t, e) { 845 | "use strict"; 846 | t.exports = !1; 847 | }, {} ], 848 | 63: [ function(n, t, e) { 849 | "use strict"; 850 | var r = n("../internals/get-built-in"), i = n("../internals/is-callable"), s = n("../internals/object-is-prototype-of"), o = n("../internals/use-symbol-as-uid"), a = Object; 851 | t.exports = o ? function(n) { 852 | return "symbol" == typeof n; 853 | } : function(n) { 854 | var t = r("Symbol"); 855 | return i(t) && s(t.prototype, a(n)); 856 | }; 857 | }, { 858 | "../internals/get-built-in": 46, 859 | "../internals/is-callable": 57, 860 | "../internals/object-is-prototype-of": 74, 861 | "../internals/use-symbol-as-uid": 106 862 | } ], 863 | 64: [ function(n, t, e) { 864 | "use strict"; 865 | var r = n("../internals/to-length"); 866 | t.exports = function(n) { 867 | return r(n.length); 868 | }; 869 | }, { 870 | "../internals/to-length": 98 871 | } ], 872 | 65: [ function(n, t, e) { 873 | "use strict"; 874 | var r = n("../internals/function-uncurry-this"), i = n("../internals/fails"), s = n("../internals/is-callable"), o = n("../internals/has-own-property"), a = n("../internals/descriptors"), l = n("../internals/function-name").CONFIGURABLE, c = n("../internals/inspect-source"), u = n("../internals/internal-state"), f = u.enforce, p = u.get, d = String, b = Object.defineProperty, y = r("".slice), g = r("".replace), v = r([].join), h = a && !i((function() { 875 | return 8 !== b((function() {}), "length", { 876 | value: 8 877 | }).length; 878 | })), x = String(String).split("String"), m = t.exports = function(n, t, e) { 879 | "Symbol(" === y(d(t), 0, 7) && (t = "[" + g(d(t), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), 880 | e && e.getter && (t = "get " + t), e && e.setter && (t = "set " + t), (!o(n, "name") || l && n.name !== t) && (a ? b(n, "name", { 881 | value: t, 882 | configurable: !0 883 | }) : n.name = t), h && e && o(e, "arity") && n.length !== e.arity && b(n, "length", { 884 | value: e.arity 885 | }); 886 | try { 887 | e && o(e, "constructor") && e.constructor ? a && b(n, "prototype", { 888 | writable: !1 889 | }) : n.prototype && (n.prototype = void 0); 890 | } catch (n) {} 891 | var r = f(n); 892 | return o(r, "source") || (r.source = v(x, "string" == typeof t ? t : "")), n; 893 | }; 894 | Function.prototype.toString = m((function() { 895 | return s(this) && p(this).source || c(this); 896 | }), "toString"); 897 | }, { 898 | "../internals/descriptors": 30, 899 | "../internals/fails": 40, 900 | "../internals/function-name": 44, 901 | "../internals/function-uncurry-this": 45, 902 | "../internals/has-own-property": 49, 903 | "../internals/inspect-source": 54, 904 | "../internals/internal-state": 55, 905 | "../internals/is-callable": 57 906 | } ], 907 | 66: [ function(n, t, e) { 908 | "use strict"; 909 | var r = Math.ceil, i = Math.floor; 910 | t.exports = Math.trunc || function(n) { 911 | var t = +n; 912 | return (t > 0 ? i : r)(t); 913 | }; 914 | }, {} ], 915 | 67: [ function(n, t, e) { 916 | "use strict"; 917 | var r, i = n("../internals/an-object"), s = n("../internals/object-define-properties"), o = n("../internals/enum-bug-keys"), a = n("../internals/hidden-keys"), l = n("../internals/html"), c = n("../internals/document-create-element"), u = n("../internals/shared-key"), f = "prototype", p = "script", d = u("IE_PROTO"), b = function() {}, y = function(n) { 918 | return "<" + p + ">" + n + ""; 919 | }, g = function(n) { 920 | n.write(y("")), n.close(); 921 | var t = n.parentWindow.Object; 922 | return n = null, t; 923 | }, v = function() { 924 | try { 925 | r = new ActiveXObject("htmlfile"); 926 | } catch (n) {} 927 | var n, t, e; 928 | v = "undefined" != typeof document ? document.domain && r ? g(r) : (t = c("iframe"), 929 | e = "java" + p + ":", t.style.display = "none", l.appendChild(t), t.src = String(e), 930 | (n = t.contentWindow.document).open(), n.write(y("document.F=Object")), n.close(), 931 | n.F) : g(r); 932 | for (var i = o.length; i--; ) delete v[f][o[i]]; 933 | return v(); 934 | }; 935 | a[d] = !0, t.exports = Object.create || function(n, t) { 936 | var e; 937 | return null !== n ? (b[f] = i(n), e = new b, b[f] = null, e[d] = n) : e = v(), void 0 === t ? e : s.f(e, t); 938 | }; 939 | }, { 940 | "../internals/an-object": 11, 941 | "../internals/document-create-element": 31, 942 | "../internals/enum-bug-keys": 38, 943 | "../internals/hidden-keys": 50, 944 | "../internals/html": 51, 945 | "../internals/object-define-properties": 68, 946 | "../internals/shared-key": 88 947 | } ], 948 | 68: [ function(n, t, e) { 949 | "use strict"; 950 | var r = n("../internals/descriptors"), i = n("../internals/v8-prototype-define-bug"), s = n("../internals/object-define-property"), o = n("../internals/an-object"), a = n("../internals/to-indexed-object"), l = n("../internals/object-keys"); 951 | e.f = r && !i ? Object.defineProperties : function(n, t) { 952 | o(n); 953 | for (var e, r = a(t), i = l(t), c = i.length, u = 0; c > u; ) s.f(n, e = i[u++], r[e]); 954 | return n; 955 | }; 956 | }, { 957 | "../internals/an-object": 11, 958 | "../internals/descriptors": 30, 959 | "../internals/object-define-property": 69, 960 | "../internals/object-keys": 76, 961 | "../internals/to-indexed-object": 96, 962 | "../internals/v8-prototype-define-bug": 107 963 | } ], 964 | 69: [ function(n, t, e) { 965 | "use strict"; 966 | var r = n("../internals/descriptors"), i = n("../internals/ie8-dom-define"), s = n("../internals/v8-prototype-define-bug"), o = n("../internals/an-object"), a = n("../internals/to-property-key"), l = TypeError, c = Object.defineProperty, u = Object.getOwnPropertyDescriptor, f = "enumerable", p = "configurable", d = "writable"; 967 | e.f = r ? s ? function(n, t, e) { 968 | if (o(n), t = a(t), o(e), "function" == typeof n && "prototype" === t && "value" in e && d in e && !e[d]) { 969 | var r = u(n, t); 970 | r && r[d] && (n[t] = e.value, e = { 971 | configurable: p in e ? e[p] : r[p], 972 | enumerable: f in e ? e[f] : r[f], 973 | writable: !1 974 | }); 975 | } 976 | return c(n, t, e); 977 | } : c : function(n, t, e) { 978 | if (o(n), t = a(t), o(e), i) try { 979 | return c(n, t, e); 980 | } catch (n) {} 981 | if ("get" in e || "set" in e) throw new l("Accessors not supported"); 982 | return "value" in e && (n[t] = e.value), n; 983 | }; 984 | }, { 985 | "../internals/an-object": 11, 986 | "../internals/descriptors": 30, 987 | "../internals/ie8-dom-define": 52, 988 | "../internals/to-property-key": 101, 989 | "../internals/v8-prototype-define-bug": 107 990 | } ], 991 | 70: [ function(n, t, e) { 992 | "use strict"; 993 | var r = n("../internals/descriptors"), i = n("../internals/function-call"), s = n("../internals/object-property-is-enumerable"), o = n("../internals/create-property-descriptor"), a = n("../internals/to-indexed-object"), l = n("../internals/to-property-key"), c = n("../internals/has-own-property"), u = n("../internals/ie8-dom-define"), f = Object.getOwnPropertyDescriptor; 994 | e.f = r ? f : function(n, t) { 995 | if (n = a(n), t = l(t), u) try { 996 | return f(n, t); 997 | } catch (n) {} 998 | if (c(n, t)) return o(!i(s.f, n, t), n[t]); 999 | }; 1000 | }, { 1001 | "../internals/create-property-descriptor": 24, 1002 | "../internals/descriptors": 30, 1003 | "../internals/function-call": 43, 1004 | "../internals/has-own-property": 49, 1005 | "../internals/ie8-dom-define": 52, 1006 | "../internals/object-property-is-enumerable": 77, 1007 | "../internals/to-indexed-object": 96, 1008 | "../internals/to-property-key": 101 1009 | } ], 1010 | 71: [ function(n, t, e) { 1011 | "use strict"; 1012 | var r = n("../internals/object-keys-internal"), i = n("../internals/enum-bug-keys").concat("length", "prototype"); 1013 | e.f = Object.getOwnPropertyNames || function(n) { 1014 | return r(n, i); 1015 | }; 1016 | }, { 1017 | "../internals/enum-bug-keys": 38, 1018 | "../internals/object-keys-internal": 75 1019 | } ], 1020 | 72: [ function(n, t, e) { 1021 | "use strict"; 1022 | e.f = Object.getOwnPropertySymbols; 1023 | }, {} ], 1024 | 73: [ function(n, t, e) { 1025 | "use strict"; 1026 | var r = n("../internals/has-own-property"), i = n("../internals/is-callable"), s = n("../internals/to-object"), o = n("../internals/shared-key"), a = n("../internals/correct-prototype-getter"), l = o("IE_PROTO"), c = Object, u = c.prototype; 1027 | t.exports = a ? c.getPrototypeOf : function(n) { 1028 | var t = s(n); 1029 | if (r(t, l)) return t[l]; 1030 | var e = t.constructor; 1031 | return i(e) && t instanceof e ? e.prototype : t instanceof c ? u : null; 1032 | }; 1033 | }, { 1034 | "../internals/correct-prototype-getter": 22, 1035 | "../internals/has-own-property": 49, 1036 | "../internals/is-callable": 57, 1037 | "../internals/shared-key": 88, 1038 | "../internals/to-object": 99 1039 | } ], 1040 | 74: [ function(n, t, e) { 1041 | "use strict"; 1042 | var r = n("../internals/function-uncurry-this"); 1043 | t.exports = r({}.isPrototypeOf); 1044 | }, { 1045 | "../internals/function-uncurry-this": 45 1046 | } ], 1047 | 75: [ function(n, t, e) { 1048 | "use strict"; 1049 | var r = n("../internals/function-uncurry-this"), i = n("../internals/has-own-property"), s = n("../internals/to-indexed-object"), o = n("../internals/array-includes").indexOf, a = n("../internals/hidden-keys"), l = r([].push); 1050 | t.exports = function(n, t) { 1051 | var e, r = s(n), c = 0, u = []; 1052 | for (e in r) !i(a, e) && i(r, e) && l(u, e); 1053 | for (;t.length > c; ) i(r, e = t[c++]) && (~o(u, e) || l(u, e)); 1054 | return u; 1055 | }; 1056 | }, { 1057 | "../internals/array-includes": 12, 1058 | "../internals/function-uncurry-this": 45, 1059 | "../internals/has-own-property": 49, 1060 | "../internals/hidden-keys": 50, 1061 | "../internals/to-indexed-object": 96 1062 | } ], 1063 | 76: [ function(n, t, e) { 1064 | "use strict"; 1065 | var r = n("../internals/object-keys-internal"), i = n("../internals/enum-bug-keys"); 1066 | t.exports = Object.keys || function(n) { 1067 | return r(n, i); 1068 | }; 1069 | }, { 1070 | "../internals/enum-bug-keys": 38, 1071 | "../internals/object-keys-internal": 75 1072 | } ], 1073 | 77: [ function(n, t, e) { 1074 | "use strict"; 1075 | var r = {}.propertyIsEnumerable, i = Object.getOwnPropertyDescriptor, s = i && !r.call({ 1076 | 1: 2 1077 | }, 1); 1078 | e.f = s ? function(n) { 1079 | var t = i(this, n); 1080 | return !!t && t.enumerable; 1081 | } : r; 1082 | }, {} ], 1083 | 78: [ function(n, t, e) { 1084 | "use strict"; 1085 | var r = n("../internals/descriptors"), i = n("../internals/fails"), s = n("../internals/function-uncurry-this"), o = n("../internals/object-get-prototype-of"), a = n("../internals/object-keys"), l = n("../internals/to-indexed-object"), c = s(n("../internals/object-property-is-enumerable").f), u = s([].push), f = r && i((function() { 1086 | var n = Object.create(null); 1087 | return n[2] = 2, !c(n, 2); 1088 | })), p = function(n) { 1089 | return function(t) { 1090 | for (var e, i = l(t), s = a(i), p = f && null === o(i), d = s.length, b = 0, y = []; d > b; ) e = s[b++], 1091 | r && !(p ? e in i : c(i, e)) || u(y, n ? [ e, i[e] ] : i[e]); 1092 | return y; 1093 | }; 1094 | }; 1095 | t.exports = { 1096 | entries: p(!0), 1097 | values: p(!1) 1098 | }; 1099 | }, { 1100 | "../internals/descriptors": 30, 1101 | "../internals/fails": 40, 1102 | "../internals/function-uncurry-this": 45, 1103 | "../internals/object-get-prototype-of": 73, 1104 | "../internals/object-keys": 76, 1105 | "../internals/object-property-is-enumerable": 77, 1106 | "../internals/to-indexed-object": 96 1107 | } ], 1108 | 79: [ function(n, t, e) { 1109 | "use strict"; 1110 | var r = n("../internals/function-call"), i = n("../internals/is-callable"), s = n("../internals/is-object"), o = TypeError; 1111 | t.exports = function(n, t) { 1112 | var e, a; 1113 | if ("string" === t && i(e = n.toString) && !s(a = r(e, n))) return a; 1114 | if (i(e = n.valueOf) && !s(a = r(e, n))) return a; 1115 | if ("string" !== t && i(e = n.toString) && !s(a = r(e, n))) return a; 1116 | throw new o("Can't convert object to primitive value"); 1117 | }; 1118 | }, { 1119 | "../internals/function-call": 43, 1120 | "../internals/is-callable": 57, 1121 | "../internals/is-object": 61 1122 | } ], 1123 | 80: [ function(n, t, e) { 1124 | "use strict"; 1125 | var r = n("../internals/get-built-in"), i = n("../internals/function-uncurry-this"), s = n("../internals/object-get-own-property-names"), o = n("../internals/object-get-own-property-symbols"), a = n("../internals/an-object"), l = i([].concat); 1126 | t.exports = r("Reflect", "ownKeys") || function(n) { 1127 | var t = s.f(a(n)), e = o.f; 1128 | return e ? l(t, e(n)) : t; 1129 | }; 1130 | }, { 1131 | "../internals/an-object": 11, 1132 | "../internals/function-uncurry-this": 45, 1133 | "../internals/get-built-in": 46, 1134 | "../internals/object-get-own-property-names": 71, 1135 | "../internals/object-get-own-property-symbols": 72 1136 | } ], 1137 | 81: [ function(n, t, e) { 1138 | "use strict"; 1139 | var r = n("../internals/function-call"), i = n("../internals/an-object"), s = n("../internals/is-callable"), o = n("../internals/classof-raw"), a = n("../internals/regexp-exec"), l = TypeError; 1140 | t.exports = function(n, t) { 1141 | var e = n.exec; 1142 | if (s(e)) { 1143 | var c = r(e, n, t); 1144 | return null !== c && i(c), c; 1145 | } 1146 | if ("RegExp" === o(n)) return r(a, n, t); 1147 | throw new l("RegExp#exec called on incompatible receiver"); 1148 | }; 1149 | }, { 1150 | "../internals/an-object": 11, 1151 | "../internals/classof-raw": 19, 1152 | "../internals/function-call": 43, 1153 | "../internals/is-callable": 57, 1154 | "../internals/regexp-exec": 82 1155 | } ], 1156 | 82: [ function(n, t, e) { 1157 | "use strict"; 1158 | var r, i, s = n("../internals/function-call"), o = n("../internals/function-uncurry-this"), a = n("../internals/to-string"), l = n("../internals/regexp-flags"), c = n("../internals/regexp-sticky-helpers"), u = n("../internals/shared"), f = n("../internals/object-create"), p = n("../internals/internal-state").get, d = n("../internals/regexp-unsupported-dot-all"), b = n("../internals/regexp-unsupported-ncg"), y = u("native-string-replace", String.prototype.replace), g = RegExp.prototype.exec, v = g, h = o("".charAt), x = o("".indexOf), m = o("".replace), j = o("".slice), w = (i = /b*/g, 1159 | s(g, r = /a/, "a"), s(g, i, "a"), 0 !== r.lastIndex || 0 !== i.lastIndex), k = c.BROKEN_CARET, O = void 0 !== /()??/.exec("")[1]; 1160 | (w || O || k || d || b) && (v = function(n) { 1161 | var t, e, r, i, o, c, u, d = this, b = p(d), S = a(n), E = b.raw; 1162 | if (E) return E.lastIndex = d.lastIndex, t = s(v, E, S), d.lastIndex = E.lastIndex, 1163 | t; 1164 | var I = b.groups, A = k && d.sticky, _ = s(l, d), T = d.source, P = 0, M = S; 1165 | if (A && (_ = m(_, "y", ""), -1 === x(_, "g") && (_ += "g"), M = j(S, d.lastIndex), 1166 | d.lastIndex > 0 && (!d.multiline || d.multiline && "\n" !== h(S, d.lastIndex - 1)) && (T = "(?: " + T + ")", 1167 | M = " " + M, P++), e = new RegExp("^(?:" + T + ")", _)), O && (e = new RegExp("^" + T + "$(?!\\s)", _)), 1168 | w && (r = d.lastIndex), i = s(g, A ? e : d, M), A ? i ? (i.input = j(i.input, P), 1169 | i[0] = j(i[0], P), i.index = d.lastIndex, d.lastIndex += i[0].length) : d.lastIndex = 0 : w && i && (d.lastIndex = d.global ? i.index + i[0].length : r), 1170 | O && i && i.length > 1 && s(y, i[0], e, (function() { 1171 | for (o = 1; o < arguments.length - 2; o++) void 0 === arguments[o] && (i[o] = void 0); 1172 | })), i && I) for (i.groups = c = f(null), o = 0; o < I.length; o++) c[(u = I[o])[0]] = i[u[1]]; 1173 | return i; 1174 | }), t.exports = v; 1175 | }, { 1176 | "../internals/function-call": 43, 1177 | "../internals/function-uncurry-this": 45, 1178 | "../internals/internal-state": 55, 1179 | "../internals/object-create": 67, 1180 | "../internals/regexp-flags": 83, 1181 | "../internals/regexp-sticky-helpers": 84, 1182 | "../internals/regexp-unsupported-dot-all": 85, 1183 | "../internals/regexp-unsupported-ncg": 86, 1184 | "../internals/shared": 90, 1185 | "../internals/to-string": 103 1186 | } ], 1187 | 83: [ function(n, t, e) { 1188 | "use strict"; 1189 | var r = n("../internals/an-object"); 1190 | t.exports = function() { 1191 | var n = r(this), t = ""; 1192 | return n.hasIndices && (t += "d"), n.global && (t += "g"), n.ignoreCase && (t += "i"), 1193 | n.multiline && (t += "m"), n.dotAll && (t += "s"), n.unicode && (t += "u"), n.unicodeSets && (t += "v"), 1194 | n.sticky && (t += "y"), t; 1195 | }; 1196 | }, { 1197 | "../internals/an-object": 11 1198 | } ], 1199 | 84: [ function(n, t, e) { 1200 | "use strict"; 1201 | var r = n("../internals/fails"), i = n("../internals/global").RegExp, s = r((function() { 1202 | var n = i("a", "y"); 1203 | return n.lastIndex = 2, null !== n.exec("abcd"); 1204 | })), o = s || r((function() { 1205 | return !i("a", "y").sticky; 1206 | })), a = s || r((function() { 1207 | var n = i("^r", "gy"); 1208 | return n.lastIndex = 2, null !== n.exec("str"); 1209 | })); 1210 | t.exports = { 1211 | BROKEN_CARET: a, 1212 | MISSED_STICKY: o, 1213 | UNSUPPORTED_Y: s 1214 | }; 1215 | }, { 1216 | "../internals/fails": 40, 1217 | "../internals/global": 48 1218 | } ], 1219 | 85: [ function(n, t, e) { 1220 | "use strict"; 1221 | var r = n("../internals/fails"), i = n("../internals/global").RegExp; 1222 | t.exports = r((function() { 1223 | var n = i(".", "s"); 1224 | return !(n.dotAll && n.test("\n") && "s" === n.flags); 1225 | })); 1226 | }, { 1227 | "../internals/fails": 40, 1228 | "../internals/global": 48 1229 | } ], 1230 | 86: [ function(n, t, e) { 1231 | "use strict"; 1232 | var r = n("../internals/fails"), i = n("../internals/global").RegExp; 1233 | t.exports = r((function() { 1234 | var n = i("(?b)", "g"); 1235 | return "b" !== n.exec("b").groups.a || "bc" !== "b".replace(n, "$c"); 1236 | })); 1237 | }, { 1238 | "../internals/fails": 40, 1239 | "../internals/global": 48 1240 | } ], 1241 | 87: [ function(n, t, e) { 1242 | "use strict"; 1243 | var r = n("../internals/is-null-or-undefined"), i = TypeError; 1244 | t.exports = function(n) { 1245 | if (r(n)) throw new i("Can't call method on " + n); 1246 | return n; 1247 | }; 1248 | }, { 1249 | "../internals/is-null-or-undefined": 60 1250 | } ], 1251 | 88: [ function(n, t, e) { 1252 | "use strict"; 1253 | var r = n("../internals/shared"), i = n("../internals/uid"), s = r("keys"); 1254 | t.exports = function(n) { 1255 | return s[n] || (s[n] = i(n)); 1256 | }; 1257 | }, { 1258 | "../internals/shared": 90, 1259 | "../internals/uid": 105 1260 | } ], 1261 | 89: [ function(n, t, e) { 1262 | "use strict"; 1263 | var r = n("../internals/is-pure"), i = n("../internals/global"), s = n("../internals/define-global-property"), o = "__core-js_shared__", a = t.exports = i[o] || s(o, {}); 1264 | (a.versions || (a.versions = [])).push({ 1265 | version: "3.37.1", 1266 | mode: r ? "pure" : "global", 1267 | copyright: "© 2014-2024 Denis Pushkarev (zloirock.ru)", 1268 | license: "https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE", 1269 | source: "https://github.com/zloirock/core-js" 1270 | }); 1271 | }, { 1272 | "../internals/define-global-property": 28, 1273 | "../internals/global": 48, 1274 | "../internals/is-pure": 62 1275 | } ], 1276 | 90: [ function(n, t, e) { 1277 | "use strict"; 1278 | var r = n("../internals/shared-store"); 1279 | t.exports = function(n, t) { 1280 | return r[n] || (r[n] = t || {}); 1281 | }; 1282 | }, { 1283 | "../internals/shared-store": 89 1284 | } ], 1285 | 91: [ function(n, t, e) { 1286 | "use strict"; 1287 | var r = n("../internals/function-uncurry-this"), i = n("../internals/to-integer-or-infinity"), s = n("../internals/to-string"), o = n("../internals/require-object-coercible"), a = r("".charAt), l = r("".charCodeAt), c = r("".slice), u = function(n) { 1288 | return function(t, e) { 1289 | var r, u, f = s(o(t)), p = i(e), d = f.length; 1290 | return p < 0 || p >= d ? n ? "" : void 0 : (r = l(f, p)) < 55296 || r > 56319 || p + 1 === d || (u = l(f, p + 1)) < 56320 || u > 57343 ? n ? a(f, p) : r : n ? c(f, p, p + 2) : u - 56320 + (r - 55296 << 10) + 65536; 1291 | }; 1292 | }; 1293 | t.exports = { 1294 | codeAt: u(!1), 1295 | charAt: u(!0) 1296 | }; 1297 | }, { 1298 | "../internals/function-uncurry-this": 45, 1299 | "../internals/require-object-coercible": 87, 1300 | "../internals/to-integer-or-infinity": 97, 1301 | "../internals/to-string": 103 1302 | } ], 1303 | 92: [ function(n, t, e) { 1304 | "use strict"; 1305 | var r = n("../internals/to-integer-or-infinity"), i = n("../internals/to-string"), s = n("../internals/require-object-coercible"), o = RangeError; 1306 | t.exports = function(n) { 1307 | var t = i(s(this)), e = "", a = r(n); 1308 | if (a < 0 || a === 1 / 0) throw new o("Wrong number of repetitions"); 1309 | for (;a > 0; (a >>>= 1) && (t += t)) 1 & a && (e += t); 1310 | return e; 1311 | }; 1312 | }, { 1313 | "../internals/require-object-coercible": 87, 1314 | "../internals/to-integer-or-infinity": 97, 1315 | "../internals/to-string": 103 1316 | } ], 1317 | 93: [ function(n, t, e) { 1318 | "use strict"; 1319 | var r = n("../internals/engine-v8-version"), i = n("../internals/fails"), s = n("../internals/global").String; 1320 | t.exports = !!Object.getOwnPropertySymbols && !i((function() { 1321 | var n = Symbol("symbol detection"); 1322 | return !s(n) || !(Object(n) instanceof Symbol) || !Symbol.sham && r && r < 41; 1323 | })); 1324 | }, { 1325 | "../internals/engine-v8-version": 36, 1326 | "../internals/fails": 40, 1327 | "../internals/global": 48 1328 | } ], 1329 | 94: [ function(n, t, e) { 1330 | "use strict"; 1331 | var r = n("../internals/function-uncurry-this"); 1332 | t.exports = r(1..valueOf); 1333 | }, { 1334 | "../internals/function-uncurry-this": 45 1335 | } ], 1336 | 95: [ function(n, t, e) { 1337 | "use strict"; 1338 | var r = n("../internals/to-integer-or-infinity"), i = Math.max, s = Math.min; 1339 | t.exports = function(n, t) { 1340 | var e = r(n); 1341 | return e < 0 ? i(e + t, 0) : s(e, t); 1342 | }; 1343 | }, { 1344 | "../internals/to-integer-or-infinity": 97 1345 | } ], 1346 | 96: [ function(n, t, e) { 1347 | "use strict"; 1348 | var r = n("../internals/indexed-object"), i = n("../internals/require-object-coercible"); 1349 | t.exports = function(n) { 1350 | return r(i(n)); 1351 | }; 1352 | }, { 1353 | "../internals/indexed-object": 53, 1354 | "../internals/require-object-coercible": 87 1355 | } ], 1356 | 97: [ function(n, t, e) { 1357 | "use strict"; 1358 | var r = n("../internals/math-trunc"); 1359 | t.exports = function(n) { 1360 | var t = +n; 1361 | return t != t || 0 === t ? 0 : r(t); 1362 | }; 1363 | }, { 1364 | "../internals/math-trunc": 66 1365 | } ], 1366 | 98: [ function(n, t, e) { 1367 | "use strict"; 1368 | var r = n("../internals/to-integer-or-infinity"), i = Math.min; 1369 | t.exports = function(n) { 1370 | var t = r(n); 1371 | return t > 0 ? i(t, 9007199254740991) : 0; 1372 | }; 1373 | }, { 1374 | "../internals/to-integer-or-infinity": 97 1375 | } ], 1376 | 99: [ function(n, t, e) { 1377 | "use strict"; 1378 | var r = n("../internals/require-object-coercible"), i = Object; 1379 | t.exports = function(n) { 1380 | return i(r(n)); 1381 | }; 1382 | }, { 1383 | "../internals/require-object-coercible": 87 1384 | } ], 1385 | 100: [ function(n, t, e) { 1386 | "use strict"; 1387 | var r = n("../internals/function-call"), i = n("../internals/is-object"), s = n("../internals/is-symbol"), o = n("../internals/get-method"), a = n("../internals/ordinary-to-primitive"), l = n("../internals/well-known-symbol"), c = TypeError, u = l("toPrimitive"); 1388 | t.exports = function(n, t) { 1389 | if (!i(n) || s(n)) return n; 1390 | var e, l = o(n, u); 1391 | if (l) { 1392 | if (void 0 === t && (t = "default"), e = r(l, n, t), !i(e) || s(e)) return e; 1393 | throw new c("Can't convert object to primitive value"); 1394 | } 1395 | return void 0 === t && (t = "number"), a(n, t); 1396 | }; 1397 | }, { 1398 | "../internals/function-call": 43, 1399 | "../internals/get-method": 47, 1400 | "../internals/is-object": 61, 1401 | "../internals/is-symbol": 63, 1402 | "../internals/ordinary-to-primitive": 79, 1403 | "../internals/well-known-symbol": 109 1404 | } ], 1405 | 101: [ function(n, t, e) { 1406 | "use strict"; 1407 | var r = n("../internals/to-primitive"), i = n("../internals/is-symbol"); 1408 | t.exports = function(n) { 1409 | var t = r(n, "string"); 1410 | return i(t) ? t : t + ""; 1411 | }; 1412 | }, { 1413 | "../internals/is-symbol": 63, 1414 | "../internals/to-primitive": 100 1415 | } ], 1416 | 102: [ function(n, t, e) { 1417 | "use strict"; 1418 | var r = {}; 1419 | r[n("../internals/well-known-symbol")("toStringTag")] = "z", t.exports = "[object z]" === String(r); 1420 | }, { 1421 | "../internals/well-known-symbol": 109 1422 | } ], 1423 | 103: [ function(n, t, e) { 1424 | "use strict"; 1425 | var r = n("../internals/classof"), i = String; 1426 | t.exports = function(n) { 1427 | if ("Symbol" === r(n)) throw new TypeError("Cannot convert a Symbol value to a string"); 1428 | return i(n); 1429 | }; 1430 | }, { 1431 | "../internals/classof": 20 1432 | } ], 1433 | 104: [ function(n, t, e) { 1434 | "use strict"; 1435 | var r = String; 1436 | t.exports = function(n) { 1437 | try { 1438 | return r(n); 1439 | } catch (n) { 1440 | return "Object"; 1441 | } 1442 | }; 1443 | }, {} ], 1444 | 105: [ function(n, t, e) { 1445 | "use strict"; 1446 | var r = n("../internals/function-uncurry-this"), i = 0, s = Math.random(), o = r(1..toString); 1447 | t.exports = function(n) { 1448 | return "Symbol(" + (void 0 === n ? "" : n) + ")_" + o(++i + s, 36); 1449 | }; 1450 | }, { 1451 | "../internals/function-uncurry-this": 45 1452 | } ], 1453 | 106: [ function(n, t, e) { 1454 | "use strict"; 1455 | var r = n("../internals/symbol-constructor-detection"); 1456 | t.exports = r && !Symbol.sham && "symbol" == typeof Symbol.iterator; 1457 | }, { 1458 | "../internals/symbol-constructor-detection": 93 1459 | } ], 1460 | 107: [ function(n, t, e) { 1461 | "use strict"; 1462 | var r = n("../internals/descriptors"), i = n("../internals/fails"); 1463 | t.exports = r && i((function() { 1464 | return 42 !== Object.defineProperty((function() {}), "prototype", { 1465 | value: 42, 1466 | writable: !1 1467 | }).prototype; 1468 | })); 1469 | }, { 1470 | "../internals/descriptors": 30, 1471 | "../internals/fails": 40 1472 | } ], 1473 | 108: [ function(n, t, e) { 1474 | "use strict"; 1475 | var r = n("../internals/global"), i = n("../internals/is-callable"), s = r.WeakMap; 1476 | t.exports = i(s) && /native code/.test(String(s)); 1477 | }, { 1478 | "../internals/global": 48, 1479 | "../internals/is-callable": 57 1480 | } ], 1481 | 109: [ function(n, t, e) { 1482 | "use strict"; 1483 | var r = n("../internals/global"), i = n("../internals/shared"), s = n("../internals/has-own-property"), o = n("../internals/uid"), a = n("../internals/symbol-constructor-detection"), l = n("../internals/use-symbol-as-uid"), c = r.Symbol, u = i("wks"), f = l ? c.for || c : c && c.withoutSetter || o; 1484 | t.exports = function(n) { 1485 | return s(u, n) || (u[n] = a && s(c, n) ? c[n] : f("Symbol." + n)), u[n]; 1486 | }; 1487 | }, { 1488 | "../internals/global": 48, 1489 | "../internals/has-own-property": 49, 1490 | "../internals/shared": 90, 1491 | "../internals/symbol-constructor-detection": 93, 1492 | "../internals/uid": 105, 1493 | "../internals/use-symbol-as-uid": 106 1494 | } ], 1495 | 110: [ function(n, t, e) { 1496 | "use strict"; 1497 | var r = n("../internals/export"), i = n("../internals/fails"), s = n("../internals/is-array"), o = n("../internals/is-object"), a = n("../internals/to-object"), l = n("../internals/length-of-array-like"), c = n("../internals/does-not-exceed-safe-integer"), u = n("../internals/create-property"), f = n("../internals/array-species-create"), p = n("../internals/array-method-has-species-support"), d = n("../internals/well-known-symbol"), b = n("../internals/engine-v8-version"), y = d("isConcatSpreadable"), g = b >= 51 || !i((function() { 1498 | var n = []; 1499 | return n[y] = !1, n.concat()[0] !== n; 1500 | })), v = function(n) { 1501 | if (!o(n)) return !1; 1502 | var t = n[y]; 1503 | return void 0 !== t ? !!t : s(n); 1504 | }; 1505 | r({ 1506 | target: "Array", 1507 | proto: !0, 1508 | arity: 1, 1509 | forced: !g || !p("concat") 1510 | }, { 1511 | concat: function(n) { 1512 | var t, e, r, i, s, o = a(this), p = f(o, 0), d = 0; 1513 | for (t = -1, r = arguments.length; t < r; t++) if (v(s = -1 === t ? o : arguments[t])) for (i = l(s), 1514 | c(d + i), e = 0; e < i; e++, d++) e in s && u(p, d, s[e]); else c(d + 1), u(p, d++, s); 1515 | return p.length = d, p; 1516 | } 1517 | }); 1518 | }, { 1519 | "../internals/array-method-has-species-support": 13, 1520 | "../internals/array-species-create": 18, 1521 | "../internals/create-property": 25, 1522 | "../internals/does-not-exceed-safe-integer": 32, 1523 | "../internals/engine-v8-version": 36, 1524 | "../internals/export": 39, 1525 | "../internals/fails": 40, 1526 | "../internals/is-array": 56, 1527 | "../internals/is-object": 61, 1528 | "../internals/length-of-array-like": 64, 1529 | "../internals/to-object": 99, 1530 | "../internals/well-known-symbol": 109 1531 | } ], 1532 | 111: [ function(n, t, e) { 1533 | "use strict"; 1534 | var r = n("../internals/export"), i = n("../internals/function-uncurry-this"), s = n("../internals/a-callable"), o = n("../internals/to-object"), a = n("../internals/length-of-array-like"), l = n("../internals/delete-property-or-throw"), c = n("../internals/to-string"), u = n("../internals/fails"), f = n("../internals/array-sort"), p = n("../internals/array-method-is-strict"), d = n("../internals/engine-ff-version"), b = n("../internals/engine-is-ie-or-edge"), y = n("../internals/engine-v8-version"), g = n("../internals/engine-webkit-version"), v = [], h = i(v.sort), x = i(v.push), m = u((function() { 1535 | v.sort(void 0); 1536 | })), j = u((function() { 1537 | v.sort(null); 1538 | })), w = p("sort"), k = !u((function() { 1539 | if (y) return y < 70; 1540 | if (!(d && d > 3)) { 1541 | if (b) return !0; 1542 | if (g) return g < 603; 1543 | var n, t, e, r, i = ""; 1544 | for (n = 65; n < 76; n++) { 1545 | switch (t = String.fromCharCode(n), n) { 1546 | case 66: 1547 | case 69: 1548 | case 70: 1549 | case 72: 1550 | e = 3; 1551 | break; 1552 | 1553 | case 68: 1554 | case 71: 1555 | e = 4; 1556 | break; 1557 | 1558 | default: 1559 | e = 2; 1560 | } 1561 | for (r = 0; r < 47; r++) v.push({ 1562 | k: t + r, 1563 | v: e 1564 | }); 1565 | } 1566 | for (v.sort((function(n, t) { 1567 | return t.v - n.v; 1568 | })), r = 0; r < v.length; r++) t = v[r].k.charAt(0), i.charAt(i.length - 1) !== t && (i += t); 1569 | return "DGBEFHACIJK" !== i; 1570 | } 1571 | })); 1572 | r({ 1573 | target: "Array", 1574 | proto: !0, 1575 | forced: m || !j || !w || !k 1576 | }, { 1577 | sort: function(n) { 1578 | void 0 !== n && s(n); 1579 | var t = o(this); 1580 | if (k) return void 0 === n ? h(t) : h(t, n); 1581 | var e, r, i = [], u = a(t); 1582 | for (r = 0; r < u; r++) r in t && x(i, t[r]); 1583 | for (f(i, function(n) { 1584 | return function(t, e) { 1585 | return void 0 === e ? -1 : void 0 === t ? 1 : void 0 !== n ? +n(t, e) || 0 : c(t) > c(e) ? 1 : -1; 1586 | }; 1587 | }(n)), e = a(i), r = 0; r < e; ) t[r] = i[r++]; 1588 | for (;r < u; ) l(t, r++); 1589 | return t; 1590 | } 1591 | }); 1592 | }, { 1593 | "../internals/a-callable": 9, 1594 | "../internals/array-method-is-strict": 14, 1595 | "../internals/array-sort": 16, 1596 | "../internals/delete-property-or-throw": 29, 1597 | "../internals/engine-ff-version": 33, 1598 | "../internals/engine-is-ie-or-edge": 34, 1599 | "../internals/engine-v8-version": 36, 1600 | "../internals/engine-webkit-version": 37, 1601 | "../internals/export": 39, 1602 | "../internals/fails": 40, 1603 | "../internals/function-uncurry-this": 45, 1604 | "../internals/length-of-array-like": 64, 1605 | "../internals/to-object": 99, 1606 | "../internals/to-string": 103 1607 | } ], 1608 | 112: [ function(n, t, e) { 1609 | "use strict"; 1610 | var r = n("../internals/descriptors"), i = n("../internals/function-name").EXISTS, s = n("../internals/function-uncurry-this"), o = n("../internals/define-built-in-accessor"), a = Function.prototype, l = s(a.toString), c = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/, u = s(c.exec); 1611 | r && !i && o(a, "name", { 1612 | configurable: !0, 1613 | get: function() { 1614 | try { 1615 | return u(c, l(this))[1]; 1616 | } catch (n) { 1617 | return ""; 1618 | } 1619 | } 1620 | }); 1621 | }, { 1622 | "../internals/define-built-in-accessor": 26, 1623 | "../internals/descriptors": 30, 1624 | "../internals/function-name": 44, 1625 | "../internals/function-uncurry-this": 45 1626 | } ], 1627 | 113: [ function(n, t, e) { 1628 | "use strict"; 1629 | var r = n("../internals/export"), i = n("../internals/function-uncurry-this"), s = n("../internals/to-integer-or-infinity"), o = n("../internals/this-number-value"), a = n("../internals/string-repeat"), l = n("../internals/fails"), c = RangeError, u = String, f = Math.floor, p = i(a), d = i("".slice), b = i(1..toFixed), y = function(n, t, e) { 1630 | return 0 === t ? e : t % 2 == 1 ? y(n, t - 1, e * n) : y(n * n, t / 2, e); 1631 | }, g = function(n, t, e) { 1632 | for (var r = -1, i = e; ++r < 6; ) i += t * n[r], n[r] = i % 1e7, i = f(i / 1e7); 1633 | }, v = function(n, t) { 1634 | for (var e = 6, r = 0; --e >= 0; ) r += n[e], n[e] = f(r / t), r = r % t * 1e7; 1635 | }, h = function(n) { 1636 | for (var t = 6, e = ""; --t >= 0; ) if ("" !== e || 0 === t || 0 !== n[t]) { 1637 | var r = u(n[t]); 1638 | e = "" === e ? r : e + p("0", 7 - r.length) + r; 1639 | } 1640 | return e; 1641 | }; 1642 | r({ 1643 | target: "Number", 1644 | proto: !0, 1645 | forced: l((function() { 1646 | return "0.000" !== b(8e-5, 3) || "1" !== b(.9, 0) || "1.25" !== b(1.255, 2) || "1000000000000000128" !== b(0xde0b6b3a7640080, 0); 1647 | })) || !l((function() { 1648 | b({}); 1649 | })) 1650 | }, { 1651 | toFixed: function(n) { 1652 | var t, e, r, i, a = o(this), l = s(n), f = [ 0, 0, 0, 0, 0, 0 ], b = "", x = "0"; 1653 | if (l < 0 || l > 20) throw new c("Incorrect fraction digits"); 1654 | if (a != a) return "NaN"; 1655 | if (a <= -1e21 || a >= 1e21) return u(a); 1656 | if (a < 0 && (b = "-", a = -a), a > 1e-21) if (e = (t = function(n) { 1657 | for (var t = 0, e = n; e >= 4096; ) t += 12, e /= 4096; 1658 | for (;e >= 2; ) t += 1, e /= 2; 1659 | return t; 1660 | }(a * y(2, 69, 1)) - 69) < 0 ? a * y(2, -t, 1) : a / y(2, t, 1), e *= 4503599627370496, 1661 | (t = 52 - t) > 0) { 1662 | for (g(f, 0, e), r = l; r >= 7; ) g(f, 1e7, 0), r -= 7; 1663 | for (g(f, y(10, r, 1), 0), r = t - 1; r >= 23; ) v(f, 1 << 23), r -= 23; 1664 | v(f, 1 << r), g(f, 1, 1), v(f, 2), x = h(f); 1665 | } else g(f, 0, e), g(f, 1 << -t, 0), x = h(f) + p("0", l); 1666 | return x = l > 0 ? b + ((i = x.length) <= l ? "0." + p("0", l - i) + x : d(x, 0, i - l) + "." + d(x, i - l)) : b + x; 1667 | } 1668 | }); 1669 | }, { 1670 | "../internals/export": 39, 1671 | "../internals/fails": 40, 1672 | "../internals/function-uncurry-this": 45, 1673 | "../internals/string-repeat": 92, 1674 | "../internals/this-number-value": 94, 1675 | "../internals/to-integer-or-infinity": 97 1676 | } ], 1677 | 114: [ function(n, t, e) { 1678 | "use strict"; 1679 | var r = n("../internals/export"), i = n("../internals/object-to-array").entries; 1680 | r({ 1681 | target: "Object", 1682 | stat: !0 1683 | }, { 1684 | entries: function(n) { 1685 | return i(n); 1686 | } 1687 | }); 1688 | }, { 1689 | "../internals/export": 39, 1690 | "../internals/object-to-array": 78 1691 | } ], 1692 | 115: [ function(n, t, e) { 1693 | "use strict"; 1694 | var r = n("../internals/export"), i = n("../internals/regexp-exec"); 1695 | r({ 1696 | target: "RegExp", 1697 | proto: !0, 1698 | forced: /./.exec !== i 1699 | }, { 1700 | exec: i 1701 | }); 1702 | }, { 1703 | "../internals/export": 39, 1704 | "../internals/regexp-exec": 82 1705 | } ], 1706 | 116: [ function(n, t, e) { 1707 | "use strict"; 1708 | var r = n("../internals/function-call"), i = n("../internals/fix-regexp-well-known-symbol-logic"), s = n("../internals/an-object"), o = n("../internals/is-null-or-undefined"), a = n("../internals/to-length"), l = n("../internals/to-string"), c = n("../internals/require-object-coercible"), u = n("../internals/get-method"), f = n("../internals/advance-string-index"), p = n("../internals/regexp-exec-abstract"); 1709 | i("match", (function(n, t, e) { 1710 | return [ function(t) { 1711 | var e = c(this), i = o(t) ? void 0 : u(t, n); 1712 | return i ? r(i, t, e) : new RegExp(t)[n](l(e)); 1713 | }, function(n) { 1714 | var r = s(this), i = l(n), o = e(t, r, i); 1715 | if (o.done) return o.value; 1716 | if (!r.global) return p(r, i); 1717 | var c = r.unicode; 1718 | r.lastIndex = 0; 1719 | for (var u, d = [], b = 0; null !== (u = p(r, i)); ) { 1720 | var y = l(u[0]); 1721 | d[b] = y, "" === y && (r.lastIndex = f(i, a(r.lastIndex), c)), b++; 1722 | } 1723 | return 0 === b ? null : d; 1724 | } ]; 1725 | })); 1726 | }, { 1727 | "../internals/advance-string-index": 10, 1728 | "../internals/an-object": 11, 1729 | "../internals/fix-regexp-well-known-symbol-logic": 41, 1730 | "../internals/function-call": 43, 1731 | "../internals/get-method": 47, 1732 | "../internals/is-null-or-undefined": 60, 1733 | "../internals/regexp-exec-abstract": 81, 1734 | "../internals/require-object-coercible": 87, 1735 | "../internals/to-length": 98, 1736 | "../internals/to-string": 103 1737 | } ] 1738 | }, {}, [ 1 ]); 1739 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jfcherng-roundcube/show-folder-size", 3 | "description": "A Roundcube plugin which shows folder size.", 4 | "type": "roundcube-plugin", 5 | "license": "MIT", 6 | "homepage": "https://github.com/jfcherng-roundcube/plugin-show-folder-size", 7 | "version": "0.7.20", 8 | "authors": [ 9 | { 10 | "name": "Jack Cherng", 11 | "email": "jfcherng@gmail.com" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=7.1.3", 16 | "roundcube/plugin-installer": "~0.1" 17 | }, 18 | "require-dev": { 19 | "friendsofphp/php-cs-fixer": "^3", 20 | "liip/rmt": "^1.5" 21 | }, 22 | "config": { 23 | "platform": { 24 | "php": "7.1.3" 25 | }, 26 | "sort-packages": true, 27 | "allow-plugins": { 28 | "roundcube/plugin-installer": true 29 | } 30 | }, 31 | "scripts": { 32 | "fix": [ 33 | "php-cs-fixer fix --verbose" 34 | ], 35 | "lint": [ 36 | "php-cs-fixer fix --verbose --dry-run --stop-on-violation" 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config.inc.php.dist: -------------------------------------------------------------------------------- 1 | 7 | * Jordi Boggiano 8 | * 9 | * For the full copyright and license information, please view the LICENSE 10 | * file that was distributed with this source code. 11 | */ 12 | 13 | namespace Composer\Autoload; 14 | 15 | /** 16 | * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. 17 | * 18 | * $loader = new \Composer\Autoload\ClassLoader(); 19 | * 20 | * // register classes with namespaces 21 | * $loader->add('Symfony\Component', __DIR__.'/component'); 22 | * $loader->add('Symfony', __DIR__.'/framework'); 23 | * 24 | * // activate the autoloader 25 | * $loader->register(); 26 | * 27 | * // to enable searching the include path (eg. for PEAR packages) 28 | * $loader->setUseIncludePath(true); 29 | * 30 | * In this example, if you try to use a class in the Symfony\Component 31 | * namespace or one of its children (Symfony\Component\Console for instance), 32 | * the autoloader will first look for the class under the component/ 33 | * directory, and it will then fallback to the framework/ directory if not 34 | * found before giving up. 35 | * 36 | * This class is loosely based on the Symfony UniversalClassLoader. 37 | * 38 | * @author Fabien Potencier 39 | * @author Jordi Boggiano 40 | * @see http://www.php-fig.org/psr/psr-0/ 41 | * @see http://www.php-fig.org/psr/psr-4/ 42 | */ 43 | class ClassLoader 44 | { 45 | // PSR-4 46 | private $prefixLengthsPsr4 = array(); 47 | private $prefixDirsPsr4 = array(); 48 | private $fallbackDirsPsr4 = array(); 49 | 50 | // PSR-0 51 | private $prefixesPsr0 = array(); 52 | private $fallbackDirsPsr0 = array(); 53 | 54 | private $useIncludePath = false; 55 | private $classMap = array(); 56 | private $classMapAuthoritative = false; 57 | private $missingClasses = array(); 58 | private $apcuPrefix; 59 | 60 | public function getPrefixes() 61 | { 62 | if (!empty($this->prefixesPsr0)) { 63 | return call_user_func_array('array_merge', $this->prefixesPsr0); 64 | } 65 | 66 | return array(); 67 | } 68 | 69 | public function getPrefixesPsr4() 70 | { 71 | return $this->prefixDirsPsr4; 72 | } 73 | 74 | public function getFallbackDirs() 75 | { 76 | return $this->fallbackDirsPsr0; 77 | } 78 | 79 | public function getFallbackDirsPsr4() 80 | { 81 | return $this->fallbackDirsPsr4; 82 | } 83 | 84 | public function getClassMap() 85 | { 86 | return $this->classMap; 87 | } 88 | 89 | /** 90 | * @param array $classMap Class to filename map 91 | */ 92 | public function addClassMap(array $classMap) 93 | { 94 | if ($this->classMap) { 95 | $this->classMap = array_merge($this->classMap, $classMap); 96 | } else { 97 | $this->classMap = $classMap; 98 | } 99 | } 100 | 101 | /** 102 | * Registers a set of PSR-0 directories for a given prefix, either 103 | * appending or prepending to the ones previously set for this prefix. 104 | * 105 | * @param string $prefix The prefix 106 | * @param array|string $paths The PSR-0 root directories 107 | * @param bool $prepend Whether to prepend the directories 108 | */ 109 | public function add($prefix, $paths, $prepend = false) 110 | { 111 | if (!$prefix) { 112 | if ($prepend) { 113 | $this->fallbackDirsPsr0 = array_merge( 114 | (array) $paths, 115 | $this->fallbackDirsPsr0 116 | ); 117 | } else { 118 | $this->fallbackDirsPsr0 = array_merge( 119 | $this->fallbackDirsPsr0, 120 | (array) $paths 121 | ); 122 | } 123 | 124 | return; 125 | } 126 | 127 | $first = $prefix[0]; 128 | if (!isset($this->prefixesPsr0[$first][$prefix])) { 129 | $this->prefixesPsr0[$first][$prefix] = (array) $paths; 130 | 131 | return; 132 | } 133 | if ($prepend) { 134 | $this->prefixesPsr0[$first][$prefix] = array_merge( 135 | (array) $paths, 136 | $this->prefixesPsr0[$first][$prefix] 137 | ); 138 | } else { 139 | $this->prefixesPsr0[$first][$prefix] = array_merge( 140 | $this->prefixesPsr0[$first][$prefix], 141 | (array) $paths 142 | ); 143 | } 144 | } 145 | 146 | /** 147 | * Registers a set of PSR-4 directories for a given namespace, either 148 | * appending or prepending to the ones previously set for this namespace. 149 | * 150 | * @param string $prefix The prefix/namespace, with trailing '\\' 151 | * @param array|string $paths The PSR-4 base directories 152 | * @param bool $prepend Whether to prepend the directories 153 | * 154 | * @throws \InvalidArgumentException 155 | */ 156 | public function addPsr4($prefix, $paths, $prepend = false) 157 | { 158 | if (!$prefix) { 159 | // Register directories for the root namespace. 160 | if ($prepend) { 161 | $this->fallbackDirsPsr4 = array_merge( 162 | (array) $paths, 163 | $this->fallbackDirsPsr4 164 | ); 165 | } else { 166 | $this->fallbackDirsPsr4 = array_merge( 167 | $this->fallbackDirsPsr4, 168 | (array) $paths 169 | ); 170 | } 171 | } elseif (!isset($this->prefixDirsPsr4[$prefix])) { 172 | // Register directories for a new namespace. 173 | $length = strlen($prefix); 174 | if ('\\' !== $prefix[$length - 1]) { 175 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); 176 | } 177 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 178 | $this->prefixDirsPsr4[$prefix] = (array) $paths; 179 | } elseif ($prepend) { 180 | // Prepend directories for an already registered namespace. 181 | $this->prefixDirsPsr4[$prefix] = array_merge( 182 | (array) $paths, 183 | $this->prefixDirsPsr4[$prefix] 184 | ); 185 | } else { 186 | // Append directories for an already registered namespace. 187 | $this->prefixDirsPsr4[$prefix] = array_merge( 188 | $this->prefixDirsPsr4[$prefix], 189 | (array) $paths 190 | ); 191 | } 192 | } 193 | 194 | /** 195 | * Registers a set of PSR-0 directories for a given prefix, 196 | * replacing any others previously set for this prefix. 197 | * 198 | * @param string $prefix The prefix 199 | * @param array|string $paths The PSR-0 base directories 200 | */ 201 | public function set($prefix, $paths) 202 | { 203 | if (!$prefix) { 204 | $this->fallbackDirsPsr0 = (array) $paths; 205 | } else { 206 | $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; 207 | } 208 | } 209 | 210 | /** 211 | * Registers a set of PSR-4 directories for a given namespace, 212 | * replacing any others previously set for this namespace. 213 | * 214 | * @param string $prefix The prefix/namespace, with trailing '\\' 215 | * @param array|string $paths The PSR-4 base directories 216 | * 217 | * @throws \InvalidArgumentException 218 | */ 219 | public function setPsr4($prefix, $paths) 220 | { 221 | if (!$prefix) { 222 | $this->fallbackDirsPsr4 = (array) $paths; 223 | } else { 224 | $length = strlen($prefix); 225 | if ('\\' !== $prefix[$length - 1]) { 226 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); 227 | } 228 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 229 | $this->prefixDirsPsr4[$prefix] = (array) $paths; 230 | } 231 | } 232 | 233 | /** 234 | * Turns on searching the include path for class files. 235 | * 236 | * @param bool $useIncludePath 237 | */ 238 | public function setUseIncludePath($useIncludePath) 239 | { 240 | $this->useIncludePath = $useIncludePath; 241 | } 242 | 243 | /** 244 | * Can be used to check if the autoloader uses the include path to check 245 | * for classes. 246 | * 247 | * @return bool 248 | */ 249 | public function getUseIncludePath() 250 | { 251 | return $this->useIncludePath; 252 | } 253 | 254 | /** 255 | * Turns off searching the prefix and fallback directories for classes 256 | * that have not been registered with the class map. 257 | * 258 | * @param bool $classMapAuthoritative 259 | */ 260 | public function setClassMapAuthoritative($classMapAuthoritative) 261 | { 262 | $this->classMapAuthoritative = $classMapAuthoritative; 263 | } 264 | 265 | /** 266 | * Should class lookup fail if not found in the current class map? 267 | * 268 | * @return bool 269 | */ 270 | public function isClassMapAuthoritative() 271 | { 272 | return $this->classMapAuthoritative; 273 | } 274 | 275 | /** 276 | * APCu prefix to use to cache found/not-found classes, if the extension is enabled. 277 | * 278 | * @param string|null $apcuPrefix 279 | */ 280 | public function setApcuPrefix($apcuPrefix) 281 | { 282 | $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; 283 | } 284 | 285 | /** 286 | * The APCu prefix in use, or null if APCu caching is not enabled. 287 | * 288 | * @return string|null 289 | */ 290 | public function getApcuPrefix() 291 | { 292 | return $this->apcuPrefix; 293 | } 294 | 295 | /** 296 | * Registers this instance as an autoloader. 297 | * 298 | * @param bool $prepend Whether to prepend the autoloader or not 299 | */ 300 | public function register($prepend = false) 301 | { 302 | spl_autoload_register(array($this, 'loadClass'), true, $prepend); 303 | } 304 | 305 | /** 306 | * Unregisters this instance as an autoloader. 307 | */ 308 | public function unregister() 309 | { 310 | spl_autoload_unregister(array($this, 'loadClass')); 311 | } 312 | 313 | /** 314 | * Loads the given class or interface. 315 | * 316 | * @param string $class The name of the class 317 | * @return bool|null True if loaded, null otherwise 318 | */ 319 | public function loadClass($class) 320 | { 321 | if ($file = $this->findFile($class)) { 322 | includeFile($file); 323 | 324 | return true; 325 | } 326 | } 327 | 328 | /** 329 | * Finds the path to the file where the class is defined. 330 | * 331 | * @param string $class The name of the class 332 | * 333 | * @return string|false The path if found, false otherwise 334 | */ 335 | public function findFile($class) 336 | { 337 | // class map lookup 338 | if (isset($this->classMap[$class])) { 339 | return $this->classMap[$class]; 340 | } 341 | if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { 342 | return false; 343 | } 344 | if (null !== $this->apcuPrefix) { 345 | $file = apcu_fetch($this->apcuPrefix.$class, $hit); 346 | if ($hit) { 347 | return $file; 348 | } 349 | } 350 | 351 | $file = $this->findFileWithExtension($class, '.php'); 352 | 353 | // Search for Hack files if we are running on HHVM 354 | if (false === $file && defined('HHVM_VERSION')) { 355 | $file = $this->findFileWithExtension($class, '.hh'); 356 | } 357 | 358 | if (null !== $this->apcuPrefix) { 359 | apcu_add($this->apcuPrefix.$class, $file); 360 | } 361 | 362 | if (false === $file) { 363 | // Remember that this class does not exist. 364 | $this->missingClasses[$class] = true; 365 | } 366 | 367 | return $file; 368 | } 369 | 370 | private function findFileWithExtension($class, $ext) 371 | { 372 | // PSR-4 lookup 373 | $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; 374 | 375 | $first = $class[0]; 376 | if (isset($this->prefixLengthsPsr4[$first])) { 377 | $subPath = $class; 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { 379 | $subPath = substr($subPath, 0, $lastPos); 380 | $search = $subPath . '\\'; 381 | if (isset($this->prefixDirsPsr4[$search])) { 382 | $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); 383 | foreach ($this->prefixDirsPsr4[$search] as $dir) { 384 | if (file_exists($file = $dir . $pathEnd)) { 385 | return $file; 386 | } 387 | } 388 | } 389 | } 390 | } 391 | 392 | // PSR-4 fallback dirs 393 | foreach ($this->fallbackDirsPsr4 as $dir) { 394 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { 395 | return $file; 396 | } 397 | } 398 | 399 | // PSR-0 lookup 400 | if (false !== $pos = strrpos($class, '\\')) { 401 | // namespaced class name 402 | $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) 403 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); 404 | } else { 405 | // PEAR-like class name 406 | $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; 407 | } 408 | 409 | if (isset($this->prefixesPsr0[$first])) { 410 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { 411 | if (0 === strpos($class, $prefix)) { 412 | foreach ($dirs as $dir) { 413 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { 414 | return $file; 415 | } 416 | } 417 | } 418 | } 419 | } 420 | 421 | // PSR-0 fallback dirs 422 | foreach ($this->fallbackDirsPsr0 as $dir) { 423 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { 424 | return $file; 425 | } 426 | } 427 | 428 | // PSR-0 include paths. 429 | if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { 430 | return $file; 431 | } 432 | 433 | return false; 434 | } 435 | } 436 | 437 | /** 438 | * Scope isolated include. 439 | * 440 | * Prevents access to $this/self from included files. 441 | */ 442 | function includeFile($file) 443 | { 444 | include $file; 445 | } 446 | -------------------------------------------------------------------------------- /lib/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /lib/vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array($baseDir . '/../src'), 10 | ); 11 | -------------------------------------------------------------------------------- /lib/vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 | if ($useStaticLoader) { 31 | require_once __DIR__ . '/autoload_static.php'; 32 | 33 | call_user_func(\Composer\Autoload\ComposerStaticInit0b012ee14e4273e2509fd76c56c51ddf::getInitializer($loader)); 34 | } else { 35 | $map = require __DIR__ . '/autoload_namespaces.php'; 36 | foreach ($map as $namespace => $path) { 37 | $loader->set($namespace, $path); 38 | } 39 | 40 | $map = require __DIR__ . '/autoload_psr4.php'; 41 | foreach ($map as $namespace => $path) { 42 | $loader->setPsr4($namespace, $path); 43 | } 44 | 45 | $classMap = require __DIR__ . '/autoload_classmap.php'; 46 | if ($classMap) { 47 | $loader->addClassMap($classMap); 48 | } 49 | } 50 | 51 | $loader->register(true); 52 | 53 | return $loader; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Jfcherng\\Roundcube\\Plugin\\ShowFolderSize\\' => 41, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'Jfcherng\\Roundcube\\Plugin\\ShowFolderSize\\' => 18 | array ( 19 | 0 => __DIR__ . '/../..' . '/../src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInit0b012ee14e4273e2509fd76c56c51ddf::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInit0b012ee14e4273e2509fd76c56c51ddf::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /localization/cs_CZ.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jfcherng-roundcube/plugin-show-folder-size/5de14a43f36ed0b659e635427b3540f1110112f7/localization/cs_CZ.inc -------------------------------------------------------------------------------- /localization/de_DE.inc: -------------------------------------------------------------------------------- 1 | 'getFolderSizeAction', 21 | ]; 22 | 23 | /** 24 | * {@inheritdoc} 25 | */ 26 | public $hooks = []; 27 | 28 | /** 29 | * {@inheritdoc} 30 | */ 31 | public function init(): void 32 | { 33 | parent::init(); 34 | 35 | $this->add_texts($this->localizationDir, true); 36 | 37 | // only shown in the main "mail" page 38 | if ($this->rcmail->action === '') { 39 | $this->include_stylesheet("{$this->skinPath}/main.css"); 40 | $this->include_script('assets/main.min.js'); 41 | $this->addPluginButtons(); 42 | } 43 | } 44 | 45 | /** 46 | * {@inheritdoc} 47 | */ 48 | public function getDefaultPluginPreferences(): array 49 | { 50 | return []; 51 | } 52 | 53 | /** 54 | * Handler for plugin's "get-folder-size" action. 55 | */ 56 | public function getFolderSizeAction(): void 57 | { 58 | /** @var rcmail_output_json */ 59 | $output = $this->rcmail->output; 60 | 61 | // sanitize: _callback 62 | $callback = filter_input(\INPUT_POST, '_callback'); 63 | 64 | $sizes = $this->getFolderSizes(); 65 | 66 | $callback && $output->command($callback, $sizes); 67 | $output->send(); 68 | } 69 | 70 | /** 71 | * Add plugin buttons. 72 | */ 73 | private function addPluginButtons(): void 74 | { 75 | $this->add_buttons_mailboxoptions([ 76 | [ 77 | 'type' => 'link-menuitem', 78 | 'label' => "{$this->ID}.show_folder_size", 79 | 'class' => 'show-folder-size active', 80 | 'href' => '#', 81 | 'command' => "plugin.{$this->ID}.show-data", 82 | ], 83 | ]); 84 | } 85 | 86 | /** 87 | * Get size for all folders. 88 | * 89 | * @return array an array in the form of [ 90 | * folder_1 => [size_1, cumulative_1], 91 | * ... ] 92 | */ 93 | private function getFolderSizes(): array 94 | { 95 | $storage = $this->rcmail->get_storage(); 96 | $folders = array_unique($storage->list_folders()); 97 | 98 | /** @var array $rawSizes the non-cumulative folder sizes */ 99 | $rawSizes = []; 100 | foreach ($folders as $folder) { 101 | $rawSizes[$folder] = $storage->folder_size($folder); 102 | } 103 | 104 | $cumulativeSizes = $this->calcualteCumulativeSizes($rawSizes); 105 | 106 | $ret = []; 107 | foreach ($folders as $folder) { 108 | $ret[$folder] = [$rawSizes[$folder], $cumulativeSizes[$folder]]; 109 | } 110 | 111 | return $ret; 112 | } 113 | 114 | /** 115 | * Calculates cumulative folder sizes from raw sizes. 116 | * 117 | * @param array $rawSizes the raw sizes 118 | * 119 | * @return array the cumulative folder sizes 120 | */ 121 | private function calcualteCumulativeSizes(array $rawSizes): array 122 | { 123 | /** @var string[] $folders sorted folder names by name length ascending */ 124 | $folders = array_map('strval', array_keys($rawSizes)); 125 | usort($folders, static function (string $folder1, string $folder2): int { 126 | return \strlen($folder1) <=> \strlen($folder2); 127 | }); 128 | 129 | /** @var array $children folder => its child folders */ 130 | $children = []; 131 | for ($i = \count($folders) - 1; $i >= 0; --$i) { 132 | $child = $folders[$i]; 133 | 134 | for ($j = $i; $j >= 0; --$j) { 135 | $parent = $folders[$j]; 136 | 137 | if ($this->isFolderParentAndChild($parent, $child, true)) { 138 | $children[$parent] = $children[$parent] ?? []; 139 | $children[$parent][] = $child; 140 | } 141 | } 142 | } 143 | 144 | /** @var array $sumSizes the cumulative folder sizes */ 145 | $sumSizes = []; 146 | foreach ($folders as $folder) { 147 | $sumSizes[$folder] = 0; 148 | 149 | foreach ($children[$folder] as $child) { 150 | $sumSizes[$folder] += $rawSizes[$child]; 151 | } 152 | } 153 | 154 | return $sumSizes; 155 | } 156 | 157 | /** 158 | * Determine if folders are in a parent-child relationship. 159 | * 160 | * @param string $parent the parent 161 | * @param string $child the child 162 | * @param bool $sameIsTrue return true if folders are the same 163 | * 164 | * @return bool true if parent and child folder, false otherwise 165 | */ 166 | private function isFolderParentAndChild(string $parent, string $child, bool $sameIsTrue = false): bool 167 | { 168 | static $delimiter = '/'; 169 | 170 | if ($parent === $child) { 171 | return $sameIsTrue; 172 | } 173 | 174 | $parent .= $delimiter; 175 | 176 | return substr($child, 0, \strlen($parent)) === $parent; 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /skins/classic/main.css: -------------------------------------------------------------------------------- 1 | #show-folder-size-table { 2 | width: 100% 3 | } 4 | #show-folder-size-table tbody tr:hover td, 5 | #show-folder-size-table tbody tr:hover th { 6 | background-color: rgba(252,225,126,.2) 7 | } 8 | #show-folder-size-table .name { 9 | cursor: pointer; 10 | color: #000 11 | } 12 | #show-folder-size-table .name.virtual { 13 | cursor: default; 14 | color: #666 15 | } -------------------------------------------------------------------------------- /skins/elastic/main.css: -------------------------------------------------------------------------------- 1 | #show-folder-size-table { 2 | width: 100% 3 | } 4 | #show-folder-size-table tbody tr:hover td, 5 | #show-folder-size-table tbody tr:hover th { 6 | background-color: rgba(252,225,126,.2) 7 | } 8 | #show-folder-size-table .name { 9 | cursor: pointer 10 | } 11 | #show-folder-size-table .name.virtual { 12 | cursor: default; 13 | opacity: .4 14 | } 15 | .menu a.show-folder-size:before, 16 | .toolbar a.show-folder-size:before, 17 | .toolbarmenu li a.show-folder-size:before { 18 | content: '\f200' 19 | } -------------------------------------------------------------------------------- /skins/larry/main.css: -------------------------------------------------------------------------------- 1 | #show-folder-size-table { 2 | width: 100% 3 | } 4 | #show-folder-size-table tbody tr:hover td, 5 | #show-folder-size-table tbody tr:hover th { 6 | background-color: rgba(252,225,126,.2) 7 | } 8 | #show-folder-size-table .name { 9 | cursor: pointer; 10 | color: #376572 11 | } 12 | #show-folder-size-table .name.virtual { 13 | cursor: default; 14 | color: #aaa 15 | } -------------------------------------------------------------------------------- /src/AbstractRoundcubePlugin.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public $actions = []; 18 | 19 | /** 20 | * Plugin hooks and handlers. 21 | * 22 | * @var array 23 | */ 24 | public $hooks = []; 25 | 26 | /** 27 | * The plugin configuration. 28 | * 29 | * @var array 30 | */ 31 | protected $config = []; 32 | 33 | /** 34 | * The plugin user preferences. 35 | * 36 | * @var array 37 | */ 38 | protected $prefs = []; 39 | 40 | /** 41 | * The directory where localization files are located. 42 | * 43 | * @var string 44 | */ 45 | protected $localizationDir = 'localization/'; 46 | 47 | /** 48 | * The corresponding usable skin path for this plugin. 49 | * 50 | * @var string like "skins/larry" 51 | */ 52 | protected $skinPath = ''; 53 | 54 | /** 55 | * The corresponding usable skin name for this plugin. 56 | * 57 | * @var string like "larry" 58 | */ 59 | protected $skinName = ''; 60 | 61 | /** 62 | * The rcmail singleton. 63 | * 64 | * @var rcmail 65 | */ 66 | protected $rcmail; 67 | 68 | /** 69 | * Get the default plugin preferences. 70 | * 71 | * @return array the default plugin preferences 72 | */ 73 | abstract public function getDefaultPluginPreferences(): array; 74 | 75 | /** 76 | * The initiator method for child classes. 77 | * 78 | * This should be called in the very beginning of chile class' init() method. 79 | */ 80 | public function init(): void 81 | { 82 | $this->rcmail = rcmail::get_instance(); 83 | 84 | $this->loadPluginConfigurations(); 85 | $this->loadPluginPreferences(); 86 | $this->exposePluginPreferences(); 87 | $this->registerPluginActions(); 88 | $this->registerPluginHooks(); 89 | 90 | $this->add_texts($this->localizationDir, false); 91 | 92 | $this->skinPath = $this->local_skin_path(); 93 | $this->skinName = substr($this->skinPath, 6); // remove prefixed "skins/" 94 | } 95 | 96 | /** 97 | * Add buttons to the "attachmentmenu" container. 98 | * 99 | * @todo refactor this method into another helper class 100 | * 101 | * @param array[] $btns the buttons 102 | * @param null|string $skin the skin name 103 | */ 104 | public function add_buttons_attachmentmenu(array $btns, ?string $skin = null): void 105 | { 106 | $skin = $skin ?? RoundcubeHelper::getBaseSkinName(); 107 | 108 | $btns = array_map(function (array $btn) use ($skin): array { 109 | $btn['_id'] = $btn['_id'] ?? 'WTF_NO_BASE_ID'; 110 | $btn['class'] = $btn['class'] ?? ''; 111 | $btn['classact'] = $btn['classact'] ?? ''; 112 | $btn['innerclass'] = $btn['innerclass'] ?? ''; 113 | 114 | $btn['type'] = 'link-menuitem'; 115 | $btn['id'] = "attachmenu{$btn['_id']}"; 116 | 117 | switch ($skin) { 118 | case 'classic': 119 | $btn['class'] .= " {$btn['_id']}link"; 120 | $btn['classact'] .= " {$btn['_id']}link active"; 121 | $btn['innerclass'] .= " {$btn['_id']}link"; 122 | break; 123 | case 'elastic': 124 | $btn['class'] .= " {$btn['_id']} disabled"; 125 | $btn['classact'] .= " {$btn['_id']} active"; 126 | break; 127 | case 'larry': 128 | $btn['class'] .= ' icon'; 129 | $btn['classact'] .= ' icon active'; 130 | $btn['innerclass'] .= " icon {$btn['_id']}"; 131 | break; 132 | default: 133 | break; 134 | } 135 | 136 | return $btn; 137 | }, $btns); 138 | 139 | foreach ($btns as $btn) { 140 | $this->add_button($btn, 'attachmentmenu'); 141 | } 142 | } 143 | 144 | /** 145 | * Add buttons to the "loginfooter" container. 146 | * 147 | * @param array[] $btns the buttons 148 | * @param null|string $skin the skin name 149 | */ 150 | public function add_buttons_loginfooter(array $btns, ?string $skin = null): void 151 | { 152 | $skin = $skin ?? RoundcubeHelper::getBaseSkinName(); 153 | 154 | $btns = array_map(function (array $btn) use ($skin): array { 155 | $btn['type'] = 'link'; 156 | $btn['class'] = $btn['class'] ?? ''; 157 | $btn['innerclass'] = $btn['innerclass'] ?? ''; 158 | $btn['badgeType'] = $btn['badgeType'] ?? 'secondary'; 159 | 160 | // should always has 'support-link' class 161 | $btn['class'] .= ' support-link'; 162 | 163 | if ($skin === 'elastic') { 164 | $btn['class'] .= " badge badge-{$btn['badgeType']}"; 165 | $btn['data-toggle'] = $btn['data-toggle'] ?? 'tooltip'; 166 | } 167 | 168 | return $btn; 169 | }, $btns); 170 | 171 | foreach ($btns as $btn) { 172 | $this->add_button($btn, 'loginfooter'); 173 | } 174 | } 175 | 176 | /** 177 | * Add buttons to the "mailboxoptions" container. 178 | * 179 | * @param array[] $btns the buttons 180 | * @param null|string $skin the skin name 181 | */ 182 | public function add_buttons_mailboxoptions(array $btns, ?string $skin = null): void 183 | { 184 | $skin = $skin ?? RoundcubeHelper::getBaseSkinName(); 185 | 186 | foreach ($btns as $btn) { 187 | $this->add_button($btn, 'mailboxoptions'); 188 | } 189 | } 190 | 191 | /** 192 | * Add buttons to the "taskbar" container. 193 | * 194 | * @param array[] $btns the buttons 195 | * @param null|string $skin the skin name 196 | */ 197 | public function add_buttons_taskbar(array $btns, ?string $skin = null): void 198 | { 199 | $skin = $skin ?? RoundcubeHelper::getBaseSkinName(); 200 | 201 | $btns = array_map(function (array $btn) use ($skin): array { 202 | $btn['type'] = 'link'; 203 | $btn['class'] = $btn['class'] ?? ''; 204 | $btn['innerclass'] = $btn['innerclass'] ?? ''; 205 | 206 | switch ($skin) { 207 | case 'classic': 208 | $btn['class'] .= ' button-nthu-ee'; 209 | break; 210 | case 'elastic': 211 | $btn['class'] .= ' nthu-ee manual'; 212 | $btn['innerclass'] .= ' inner'; 213 | break; 214 | case 'larry': 215 | $btn['class'] .= ' button-nthu-ee'; 216 | $btn['innerclass'] .= ' button-inner'; 217 | break; 218 | default: 219 | break; 220 | } 221 | 222 | return $btn; 223 | }, $btns); 224 | 225 | foreach ($btns as $btn) { 226 | $this->add_button($btn, 'taskbar'); 227 | } 228 | } 229 | 230 | /** 231 | * Add buttons to the "toolbar" container. 232 | * 233 | * @param array[] $btns the buttons 234 | * @param null|string $skin the skin name 235 | */ 236 | public function add_buttons_toolbar(array $btns, ?string $skin = null): void 237 | { 238 | $skin = $skin ?? RoundcubeHelper::getBaseSkinName(); 239 | 240 | $btns = array_map(function (array $btn) use ($skin): array { 241 | switch ($skin) { 242 | case 'classic': 243 | $btn['class'] .= ' button'; 244 | break; 245 | case 'elastic': 246 | $btn['innerclass'] .= ' inner'; 247 | break; 248 | case 'larry': 249 | $btn['class'] .= ' button'; 250 | break; 251 | default: 252 | break; 253 | } 254 | 255 | return $btn; 256 | }, $btns); 257 | 258 | foreach ($btns as $btn) { 259 | $this->add_button($btn, 'toolbar'); 260 | } 261 | } 262 | 263 | /** 264 | * Load plugin configurations. 265 | */ 266 | protected function loadPluginConfigurations(): void 267 | { 268 | $configFiles = [ 269 | "{$this->home}/config.inc.php.dist", 270 | "{$this->home}/config.inc.php", 271 | ]; 272 | 273 | $this->config = array_reduce( 274 | $configFiles, 275 | function (array $carry, string $file): array { 276 | is_file($file) && (include $file); 277 | 278 | return array_merge($carry, (array) ($config ?? [])); 279 | }, 280 | [] 281 | ); 282 | 283 | $this->rcmail->config->merge([$this->ID => $this->config]); 284 | } 285 | 286 | /** 287 | * Load user plugin preferences. 288 | */ 289 | protected function loadPluginPreferences(): void 290 | { 291 | $this->prefs = array_merge( 292 | $this->getDefaultPluginPreferences(), 293 | $this->rcmail->user->get_prefs()[$this->ID] ?? [] 294 | ); 295 | } 296 | 297 | /** 298 | * Expose plugin configurations. 299 | * 300 | * @param null|array $keys the keys which will be exposed, null will expose all 301 | */ 302 | protected function exposePluginConfigurations(?array $keys = null): void 303 | { 304 | if (null === $keys) { 305 | $config = $this->config; 306 | } else { 307 | $config = []; 308 | foreach ($keys as $key) { 309 | $config[$key] = $this->config[$key] ?? null; 310 | } 311 | } 312 | 313 | $this->rcmail->output->set_env("{$this->ID}.config", $config); 314 | } 315 | 316 | /** 317 | * Expose plugin preferences. 318 | * 319 | * @param null|array $keys the keys which will be exposed, null will expose all 320 | */ 321 | protected function exposePluginPreferences(?array $keys = null): void 322 | { 323 | if (null === $keys) { 324 | $prefs = $this->prefs; 325 | } else { 326 | $prefs = []; 327 | foreach ($keys as $key) { 328 | $prefs[$key] = $this->prefs[$key] ?? null; 329 | } 330 | } 331 | 332 | $this->rcmail->output->set_env("{$this->ID}.prefs", $prefs); 333 | } 334 | 335 | /** 336 | * Register plugin actions. 337 | */ 338 | protected function registerPluginActions(): void 339 | { 340 | $actions = (array) ($this->actions ?? []); 341 | 342 | foreach ($actions as $action => $handler) { 343 | $this->register_action("plugin.{$this->ID}.{$action}", [$this, $handler]); 344 | } 345 | } 346 | 347 | /** 348 | * Register plugin hooks. 349 | */ 350 | protected function registerPluginHooks(): void 351 | { 352 | $hooks = (array) ($this->hooks ?? []); 353 | 354 | foreach ($hooks as $hook => $handler) { 355 | $this->add_hook($hook, [$this, $handler]); 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /src/RoundcubeHelper.php: -------------------------------------------------------------------------------- 1 | output->skins; 46 | 47 | foreach ($base_skins as $base_skin) { 48 | if (isset($skins[$base_skin])) { 49 | return $base_skin; 50 | } 51 | } 52 | 53 | return $skins[0] ?? ''; 54 | } 55 | 56 | /** 57 | * Assemble URL parts back to string URL. 58 | * 59 | * @param array $parts the parts 60 | */ 61 | public static function unparseUrl(array $parts): string 62 | { 63 | return 64 | (isset($parts['scheme']) ? "{$parts['scheme']}://" : '') . 65 | ($parts['user'] ?? '') . 66 | (isset($parts['pass']) ? ":{$parts['pass']}" : '') . 67 | (isset($parts['user']) ? '@' : '') . 68 | ($parts['host'] ?? '') . 69 | (isset($parts['port']) ? ":{$parts['port']}" : '') . 70 | ($parts['path'] ?? '') . 71 | (isset($parts['query']) ? "?{$parts['query']}" : '') . 72 | (isset($parts['fragment']) ? "#{$parts['fragment']}" : ''); 73 | } 74 | } 75 | --------------------------------------------------------------------------------