From 9df99dc74a5c406bb5e66cdae088d45b56c8e50b Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Tue, 11 Jul 2023 09:31:34 +0800 Subject: [PATCH 01/71] Add GH action for manifest update --- .github/workflows/manifest.yml | 71 +++++++++++++++++++++++ modules/system/console/WinterManifest.php | 2 +- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/manifest.yml diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml new file mode 100644 index 0000000000..ee7baafec0 --- /dev/null +++ b/.github/workflows/manifest.yml @@ -0,0 +1,71 @@ +name: Manifest + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + updateManifest: + name: Update manifest + runs-on: ubuntu-latest + env: + phpVersion: '8.0' + extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip + key: winter-cms-cache-develop + steps: + - name: Cancel previous incomplete runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout changes + uses: actions/checkout@v3 + + - name: Setup extension cache + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ env.phpVersion }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v3 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ env.phpVersion }} + extensions: ${{ env.extensions }} + + - name: Setup dependency cache + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: composer install --no-interaction --no-progress --no-scripts + + - name: Download manifest + run: wget -O builds.json https://github.com/wintercms/meta/raw/master/manifest/builds.json + + - name: Run manifest + run: php artisan winter:manifest builds.json + + - name: Create artifact + uses: actions/upload-artifact@v3 + with: + name: winter-manifest + path: builds.json diff --git a/modules/system/console/WinterManifest.php b/modules/system/console/WinterManifest.php index 2860a174b3..e406dce476 100644 --- a/modules/system/console/WinterManifest.php +++ b/modules/system/console/WinterManifest.php @@ -227,7 +227,7 @@ public function handle() protected function getVersionInt(string $version) { // Get major.minor.patch versions - if (!preg_match('/^([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $versionParts)) { + if (!preg_match('/^v?([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $versionParts)) { throw new ApplicationException('Invalid version string - must be of the format "major.minor.path"'); } From 7a8f69f884f741252fb88bcc99f08f498772c432 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Tue, 11 Jul 2023 09:50:31 +0800 Subject: [PATCH 02/71] Add autocommit of manifest updates --- .github/workflows/manifest.yml | 37 ++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml index ee7baafec0..e565f8327a 100644 --- a/.github/workflows/manifest.yml +++ b/.github/workflows/manifest.yml @@ -11,7 +11,7 @@ jobs: name: Update manifest runs-on: ubuntu-latest env: - phpVersion: '8.0' + phpVersion: '8.1' extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip key: winter-cms-cache-develop steps: @@ -45,13 +45,13 @@ jobs: extensions: ${{ env.extensions }} - name: Setup dependency cache - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies uses: actions/cache@v3 with: - path: ${{ steps.composercache.outputs.dir }} + path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- @@ -69,3 +69,32 @@ jobs: with: name: winter-manifest path: builds.json + commitManifest: + name: Commit manifest + runs-on: ubuntu-latest + needs: updateManifest + steps: + - name: Cancel previous incomplete runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout changes + uses: actions/checkout@v3 + with: + repository: wintercms/meta + ref: main + token: ${{ secrets.WINTER_BOT_TOKEN }} + + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: winter-manifest + path: manifest + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Update manifest + commit_user_name: Winter Bot + commit_user_email: 80384029+WinterCMSBot@users.noreply.github.com From 788ea70354964004ed49c096983b3d50f442ea51 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Tue, 11 Jul 2023 10:01:05 +0800 Subject: [PATCH 03/71] Use correct branch for meta --- .github/workflows/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml index e565f8327a..72597a5329 100644 --- a/.github/workflows/manifest.yml +++ b/.github/workflows/manifest.yml @@ -83,7 +83,7 @@ jobs: uses: actions/checkout@v3 with: repository: wintercms/meta - ref: main + ref: master token: ${{ secrets.WINTER_BOT_TOKEN }} - name: Download artifact From 003e10853617c4e6cb8eb5cc2206a4b216f2799c Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Tue, 11 Jul 2023 10:31:20 +0800 Subject: [PATCH 04/71] Add excluded files from "exports", tweak tests workflow --- .gitattributes | 11 ++++++++++- .github/workflows/tests.yml | 17 +++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitattributes b/.gitattributes index 2125666142..0c3b228c51 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,10 @@ -* text=auto \ No newline at end of file +* text=auto + +*.md diff=markdown +*.php diff=php + +/.github export-ignore +/.gitpod export-ignore +.gitattributes export-ignore +.gitpod.yml export-ignore +CHANGELOG.md export-ignore diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 923e5b08a6..0ca70cacc9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,13 +65,13 @@ jobs: run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2" - name: Setup dependency cache - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies uses: actions/cache@v3 with: - path: ${{ steps.composercache.outputs.dir }} + path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- @@ -133,9 +133,6 @@ jobs: php-version: ${{ matrix.phpVersion }} extensions: ${{ env.extensions }} - - name: Echo branches - run: echo "${{ github.ref }} | ${{ github.head_ref }} | ${{ github.ref_name }} | ${{ github.base_ref }}" - - name: Switch library dependency (develop) if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop' run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.2" @@ -153,13 +150,13 @@ jobs: run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2" - name: Setup dependency cache - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: ${{ steps.composercache.outputs.dir }} + path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- From 4c9840493eb79da8af104bc9ddaa4260cabb7661 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Tue, 11 Jul 2023 10:35:24 +0800 Subject: [PATCH 05/71] Partially revert previous changes, Windows didn't like it --- .github/workflows/tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ca70cacc9..6dd83f4063 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,13 +65,13 @@ jobs: run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2" - name: Setup dependency cache - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies uses: actions/cache@v3 with: - path: ${{ steps.composer-cache.outputs.dir }} + path: ${{ steps.composercache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- @@ -150,13 +150,13 @@ jobs: run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2" - name: Setup dependency cache - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies - uses: actions/cache@v3 + uses: actions/cache@v2 with: - path: ${{ steps.composer-cache.outputs.dir }} + path: ${{ steps.composercache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- From 30ef051387d63867176550846bb989a595e0f502 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 12 Jul 2023 21:11:52 -0600 Subject: [PATCH 06/71] Add the bootstrap/cache folder This folder is expected to exist by several core Laravel commands related to caching. --- bootstrap/cache/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 bootstrap/cache/.gitignore diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 0000000000..c96a04f008 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file From 8c0d2f490030d04187aab7d0605465021b5022d2 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 14:45:01 -0600 Subject: [PATCH 07/71] Fix exception when accessing a SettingsModel before the table exists Related: octobercms/october#3208. This solves an issue when attempting to access any SettingsModel before initial migrations have been run but the database exists (which is all App::hasDatabase() looks for). --- modules/system/behaviors/SettingsModel.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/system/behaviors/SettingsModel.php b/modules/system/behaviors/SettingsModel.php index cf7c8b06ff..8a15b2d4ec 100644 --- a/modules/system/behaviors/SettingsModel.php +++ b/modules/system/behaviors/SettingsModel.php @@ -5,6 +5,7 @@ use Cache; use Log; use Exception; +use Illuminate\Database\QueryException; use System\Classes\ModelBehavior; /** @@ -108,9 +109,8 @@ public function resetDefault() /** * Checks if the model has been set up previously, intended as a static method - * @return bool */ - public function isConfigured() + public function isConfigured(): bool { return App::hasDatabase() && $this->getSettingsRecord() !== null; } @@ -127,7 +127,15 @@ public function getSettingsRecord() $query = $query->remember($this->cacheTtl, $this->getCacheKey()); } - $record = $query->first(); + try { + $record = $query->first(); + } catch (QueryException $ex) { + // SQLSTATE[42S02]: Base table or view not found - migrations haven't run yet + if ($ex->getCode() === '42S02') { + $record = null; + traceLog($ex); + } + } return $record ?: null; } From 4441fcfbd07d19ef9e29c075a41e181f885bc32e Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 14:45:41 -0600 Subject: [PATCH 08/71] Minor code tidying --- modules/system/models/EventLog.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/modules/system/models/EventLog.php b/modules/system/models/EventLog.php index 7836f17e87..f72c4f459c 100644 --- a/modules/system/models/EventLog.php +++ b/modules/system/models/EventLog.php @@ -1,9 +1,9 @@ message = $message; @@ -66,10 +61,8 @@ public static function add($message, $level = 'info', $details = null) /** * Beautify level value. - * @param string $level - * @return string */ - public function getLevelAttribute($level) + public function getLevelAttribute(string $level): string { return ucfirst($level); } @@ -77,9 +70,8 @@ public function getLevelAttribute($level) /** * Creates a shorter version of the message attribute, * extracts the exception message or limits by 100 characters. - * @return string */ - public function getSummaryAttribute() + public function getSummaryAttribute(): string { if (preg_match("/with message '(.+)' in/", $this->message, $match)) { return $match[1]; From 71fcf8eef9584ddcc428809f867429118aa74129 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 14:51:00 -0600 Subject: [PATCH 09/71] Limit plugins loaded for CLI requests when database is configured but not initialized yet Related: octobercms/october#3208. This issue surfaces when deployment tools attempt to run various commands not already protected (i.e. vapor:health-check) before running any migrations, which causes issues if plugins attempt to access the database during their registration or booting process. In theory we could also apply this logic to HTTP requests, however it is generally easier to see and handle the reported exception of the table being missing in an HTTP context, so it's acceptable to limit this protection to the CLI. As a reminder, plugins making use of the $elevated permissions are responsible for defensive measures to reliably operate in potentially unstable states of the application. --- modules/system/ServiceProvider.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/modules/system/ServiceProvider.php b/modules/system/ServiceProvider.php index 2dc967b27e..e2ee3e6438 100644 --- a/modules/system/ServiceProvider.php +++ b/modules/system/ServiceProvider.php @@ -147,9 +147,7 @@ protected function registerPrivilegedActions() $requests = ['/combine/', '@/system/updates', '@/system/install', '@/backend/auth']; $commands = ['migrate', 'winter:up', 'winter:update', 'winter:env', 'winter:version', 'winter:manifest']; - /* - * Requests - */ + // Requests $path = RouterHelper::normalizeUrl(Request::path()); $backendUri = RouterHelper::normalizeUrl(Config::get('cms.backendUri', 'backend')); foreach ($requests as $request) { @@ -162,10 +160,20 @@ protected function registerPrivilegedActions() } } - /* - * CLI - */ - if ($this->app->runningInConsole() && count(array_intersect($commands, Request::server('argv', []))) > 0) { + // CLI + if ($this->app->runningInConsole() + && ( + // Protected command + count(array_intersect($commands, Request::server('argv', []))) > 0 + + // Database configured but not initialized yet + // @see octobercms/october#3208 + || ( + $this->app->hasDatabase() + && !Schema::hasTable(UpdateManager::instance()->getMigrationTableName()) + ) + ) + ) { PluginManager::$noInit = true; } } @@ -228,11 +236,6 @@ protected function registerConsole() * Allow plugins to use the scheduler */ Event::listen('console.schedule', function ($schedule) { - // Fix initial system migration with plugins that use settings for scheduling - see #3208 - if ($this->app->hasDatabase() && !Schema::hasTable(UpdateManager::instance()->getMigrationTableName())) { - return; - } - $plugins = PluginManager::instance()->getPlugins(); foreach ($plugins as $plugin) { if (method_exists($plugin, 'registerSchedule')) { From 433d1bc7a02d4f78a7982f95c63fe854f973205b Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 14:54:54 -0600 Subject: [PATCH 10/71] Code tidying --- modules/backend/classes/BackendController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/backend/classes/BackendController.php b/modules/backend/classes/BackendController.php index 3b0fc14365..1dfb370d4e 100644 --- a/modules/backend/classes/BackendController.php +++ b/modules/backend/classes/BackendController.php @@ -1,17 +1,17 @@ call($this, $params[1] ?? $this); } - return \Closure::fromCallable($params[0])->call($this, $params[1] ?? $this); + return Closure::fromCallable($params[0])->call($this, $params[1] ?? $this); } return $this->extendableCall($name, $params); From 5b297aeb2868f430cd51a06550e93f00af05f8ba Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 15:31:21 -0600 Subject: [PATCH 11/71] Use new hasDatabaseTable() helpers --- modules/cms/classes/Theme.php | 23 +++++++++++------------ modules/cms/console/ThemeSync.php | 2 +- modules/cms/models/ThemeLog.php | 23 ++++++++--------------- modules/system/classes/PluginManager.php | 3 +-- 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/modules/cms/classes/Theme.php b/modules/cms/classes/Theme.php index 56b401dab7..335e7833ee 100644 --- a/modules/cms/classes/Theme.php +++ b/modules/cms/classes/Theme.php @@ -1,23 +1,22 @@ laravel->hasDatabase()) { return $this->error("The application is not using a database."); } diff --git a/modules/cms/models/ThemeLog.php b/modules/cms/models/ThemeLog.php index 332735f2ab..6183a1862b 100644 --- a/modules/cms/models/ThemeLog.php +++ b/modules/cms/models/ThemeLog.php @@ -1,13 +1,11 @@ getTable()) - ) { - return; + if (!LogSetting::hasDatabaseTable()) { + return null; } if (!LogSetting::get('log_theme')) { - return; + return null; } if (!$type) { @@ -78,7 +72,7 @@ public static function add(HalcyonModel $template, $type = null) $oldContent = $template->getOriginal('content'); if ($newContent === $oldContent && $templateName === $oldTemplateName && !$isDelete) { - return; + return null; } $record = new self; @@ -95,8 +89,7 @@ public static function add(HalcyonModel $template, $type = null) try { $record->save(); - } - catch (Exception $ex) { + } catch (Exception $ex) { } return $record; diff --git a/modules/system/classes/PluginManager.php b/modules/system/classes/PluginManager.php index cd39f86472..5bc1d61fc1 100644 --- a/modules/system/classes/PluginManager.php +++ b/modules/system/classes/PluginManager.php @@ -662,8 +662,7 @@ protected function loadDisabled(): void // Check the database for disabled plugins if ( - $this->app->hasDatabase() - && Schema::hasTable('system_plugin_versions') + $this->app->hasDatabaseTable('system_plugin_versions') ) { $userDisabled = Db::table('system_plugin_versions')->where('is_disabled', 1)->lists('code') ?? []; foreach ($userDisabled as $code) { From cd2d7694026e6cddd17b3663e52995ba28bf02e9 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 16:41:48 -0600 Subject: [PATCH 12/71] Code tidying for console commands Also switches theme:list, plugin:list, and mix:list to output nicely formatted tables. --- modules/backend/console/WinterPasswd.php | 21 +++-------- modules/cms/console/CreateTheme.php | 2 +- modules/cms/console/ThemeInstall.php | 26 +++++-------- modules/cms/console/ThemeList.php | 44 +++++++++++----------- modules/cms/console/ThemeRemove.php | 39 +++++-------------- modules/cms/console/ThemeSync.php | 42 ++++++--------------- modules/cms/console/ThemeUse.php | 34 +++++------------ modules/system/classes/UpdateManager.php | 5 +++ modules/system/console/CreateMigration.php | 4 +- modules/system/console/MixList.php | 17 +++++---- modules/system/console/PluginList.php | 38 +++++-------------- modules/system/console/WinterInstall.php | 29 +++++++------- modules/system/console/WinterVersion.php | 8 ++-- 13 files changed, 114 insertions(+), 195 deletions(-) diff --git a/modules/backend/console/WinterPasswd.php b/modules/backend/console/WinterPasswd.php index ecaf088067..42da7c872f 100644 --- a/modules/backend/console/WinterPasswd.php +++ b/modules/backend/console/WinterPasswd.php @@ -1,10 +1,10 @@ (eg: admin or admin@example.com)} - {password? : The new password to set.}'; + {password? : The new password to set.} + '; /** * @var string The console command description. */ protected $description = 'Change the password of a Backend user.'; - + /** * @var array List of commands that this command replaces (aliases) */ protected $replaces = [ + 'october:passwd', 'winter:password', ]; @@ -44,17 +46,6 @@ class WinterPasswd extends Command */ protected $generatedPassword = false; - /** - * Create a new command instance. - */ - public function __construct() - { - parent::__construct(); - - // Register aliases for backwards compatibility with October - $this->setAliases(['october:passwd']); - } - /** * Execute the console command. * @return int diff --git a/modules/cms/console/CreateTheme.php b/modules/cms/console/CreateTheme.php index 86f2c850a7..557337dd64 100644 --- a/modules/cms/console/CreateTheme.php +++ b/modules/cms/console/CreateTheme.php @@ -1,7 +1,7 @@ (eg: AuthorName.ThemeName)} + {dirName? : Destination directory name for the theme installation.} + '; + /** * The console command description. * @var string @@ -121,16 +127,4 @@ protected function themeCodeToDir($themeCode) { return strtolower(str_replace('.', '-', $themeCode)); } - - /** - * Get the console command arguments. - * @return array - */ - protected function getArguments() - { - return [ - ['name', InputArgument::REQUIRED, 'The name of the theme. Eg: AuthorName.ThemeName'], - ['dirName', InputArgument::OPTIONAL, 'Destination directory name for the theme installation.'], - ]; - } } diff --git a/modules/cms/console/ThemeList.php b/modules/cms/console/ThemeList.php index 92e835c111..61b3de5063 100644 --- a/modules/cms/console/ThemeList.php +++ b/modules/cms/console/ThemeList.php @@ -1,10 +1,9 @@ isActiveTheme() ? '[*] ' : '[-] '; - $themeId = $theme->getId(); - $themeName = $themeManager->findByDirName($themeId) ?: $themeId; - $this->info($flag . $themeName); + $results[] = [ + 'code' => $theme->getId(), + 'is_active' => $theme->isActiveTheme() ? 'Yes': 'No', + 'is_installed' => 'Yes', + ]; } if ($this->option('include-marketplace')) { - // @todo List everything in the marketplace - not just popular. - + // @TODO List everything in the marketplace - not just popular. $popularThemes = $updateManager->requestPopularProducts('theme'); - foreach ($popularThemes as $popularTheme) { - if (!$themeManager->isInstalled($popularTheme['code'])) { - $this->info('[ ] '.$popularTheme['code']); - } + $results[] = [ + 'code' => $popularTheme['code'], + 'is_active' => 'No', + 'is_installed' => $themeManager->isInstalled($popularTheme['code']) ? 'Yes': 'No', + ]; } } - $this->info(PHP_EOL."[*] Active [-] Installed [ ] Not installed"); - } - - /** - * Get the console command options. - */ - protected function getOptions() - { - return [ - ['include-marketplace', 'm', InputOption::VALUE_NONE, 'Include downloadable themes from the Winter marketplace.'] - ]; + $this->table(['Theme', 'Active', 'Installed'], $results); } } diff --git a/modules/cms/console/ThemeRemove.php b/modules/cms/console/ThemeRemove.php index c583c012bb..9df51d7ac7 100644 --- a/modules/cms/console/ThemeRemove.php +++ b/modules/cms/console/ThemeRemove.php @@ -2,10 +2,8 @@ use Cms\Classes\Theme; use Cms\Classes\ThemeManager; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputArgument; -use Illuminate\Console\Command; use Exception; +use Winter\Storm\Console\Command; /** * Console command to remove a theme. @@ -17,7 +15,6 @@ */ class ThemeRemove extends Command { - use \Illuminate\Console\ConfirmableTrait; /** @@ -26,6 +23,14 @@ class ThemeRemove extends Command */ protected $name = 'theme:remove'; + /** + * @var string The name and signature of this command. + */ + protected $signature = 'theme:remove + {name : The name of the theme to delete. (eg: mytheme)} + {--f|force : Force the operation to run.} + '; + /** * The console command description. * @var string @@ -57,33 +62,9 @@ public function handle() try { $themeManager->deleteTheme($themeName); - $this->info(sprintf('The theme %s has been deleted.', $themeName)); - } - catch (Exception $ex) { + } catch (Exception $ex) { $this->error($ex->getMessage()); } } - - /** - * Get the console command arguments. - * @return array - */ - protected function getArguments() - { - return [ - ['name', InputArgument::REQUIRED, 'The name of the theme. (directory name)'], - ]; - } - - /** - * Get the console command options. - * @return array - */ - protected function getOptions() - { - return [ - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run.'], - ]; - } } diff --git a/modules/cms/console/ThemeSync.php b/modules/cms/console/ThemeSync.php index 87c7f0c3dc..1be393c001 100644 --- a/modules/cms/console/ThemeSync.php +++ b/modules/cms/console/ThemeSync.php @@ -1,13 +1,9 @@ applyHttpAttributes($http, $postData); }); + // @TODO: Refactor when marketplace API finalized + if ($result->body === 'Package not found') { + $result->code = 500; + } + if ($result->code == 404) { throw new ApplicationException(Lang::get('system::lang.server.response_not_found')); } diff --git a/modules/system/console/CreateMigration.php b/modules/system/console/CreateMigration.php index 5d730e6ad6..8e6f89a242 100644 --- a/modules/system/console/CreateMigration.php +++ b/modules/system/console/CreateMigration.php @@ -1,9 +1,9 @@ $package) { - if ($package['ignored'] ?? false) { - $this->warn($name); - } else { - $this->info($name); - } - - $this->line(' Path: ' . $package['path']); - $this->line(' Configuration: ' . $package['mix']); + $rows[] = [ + 'name' => $name, + 'active' => $package['ignored'] ?? false ? 'No' : 'Yes', + 'path' => $package['path'], + 'configuration' => $package['mix'], + ]; if (!File::exists($package['mix'])) { $errors[] = "The mix file for $name doesn't exist, try running artisan mix:install"; } } + $this->table(['Name', 'Active', 'Path', 'Configuration'], $rows); + $this->line(''); if (!empty($errors)) { diff --git a/modules/system/console/PluginList.php b/modules/system/console/PluginList.php index 21473f4cb2..f7883c34d4 100644 --- a/modules/system/console/PluginList.php +++ b/modules/system/console/PluginList.php @@ -1,9 +1,9 @@ output); - - // Set the table headers. - $table->setHeaders([ - 'Plugin name', 'Version', 'Updates enabled', 'Plugin enabled' - ]); - - // Create a new TableSeparator instance. - $separator = new TableSeparator; - - $pluginTable = []; - - $row = 0; + $rows = []; foreach ($allPlugins as $plugin) { - $row++; - - $pluginTable[] = [$plugin->code, $plugin->version, (!$plugin->is_frozen) ? 'Yes': 'No', (!$plugin->is_disabled) ? 'Yes': 'No']; - - if ($row < $pluginsCount) { - $pluginTable[] = $separator; - } + $rows[] = [ + $plugin->code, + $plugin->version, + (!$plugin->is_frozen) ? 'Yes': 'No', + (!$plugin->is_disabled) ? 'Yes': 'No', + ]; } - // Set the contents of the table. - $table->setRows($pluginTable); - - // Render the table to the output. - $table->render(); + $this->table(['Plugin name', 'Version', 'Updates enabled', 'Plugin enabled'], $rows); } } diff --git a/modules/system/console/WinterInstall.php b/modules/system/console/WinterInstall.php index 5edc260aa7..5f600f6402 100644 --- a/modules/system/console/WinterInstall.php +++ b/modules/system/console/WinterInstall.php @@ -1,18 +1,17 @@ configWriter = new ConfigWriter; - - // Register aliases for backwards compatibility with October - $this->setAliases(['october:install']); } /** @@ -64,7 +67,7 @@ public function handle() $this->displayIntro(); if ( - App::hasDatabase() && + $this->laravel->hasDatabase() && !$this->confirm('Application appears to be installed already. Continue anyway?', false) ) { return; diff --git a/modules/system/console/WinterVersion.php b/modules/system/console/WinterVersion.php index a7cfa1f7d7..4f8d49e831 100644 --- a/modules/system/console/WinterVersion.php +++ b/modules/system/console/WinterVersion.php @@ -1,6 +1,5 @@ comment('*** Detecting Winter CMS build...'); - if (!App::hasDatabase()) { + if (!$this->laravel->hasDatabase()) { $build = UpdateManager::instance()->getBuildNumberManually($this->option('changes')); // Skip setting the build number if no database is detected to set it within From 7eba7e7b0ad259b99e3acaa2212079cd880a37a4 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Jul 2023 20:24:20 -0600 Subject: [PATCH 13/71] Fix type conflict --- modules/backend/behaviors/UserPreferencesModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/behaviors/UserPreferencesModel.php b/modules/backend/behaviors/UserPreferencesModel.php index 0c17d53f13..52e2cd7575 100644 --- a/modules/backend/behaviors/UserPreferencesModel.php +++ b/modules/backend/behaviors/UserPreferencesModel.php @@ -51,7 +51,7 @@ public function instance() /** * Checks if the model has been set up previously, intended as a static method */ - public function isConfigured() + public function isConfigured(): bool { return $this->getSettingsRecord() !== null; } From 7ad522fc892050df28420491bbf33325dd0648aa Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Mon, 17 Jul 2023 20:02:09 +0800 Subject: [PATCH 14/71] Add support for "grid" repeater (#926) By setting "mode" to "grid" in the repeater config, the repeater will be formatted as a grid and will add items horizontally, crossing to a new row when the "columns" amount is met. Docs: https://github.com/wintercms/docs/pull/134 Refs: https://github.com/wintercms/wn-blocks-plugin/pull/17 --- modules/backend/.eslintrc.json | 9 ++ modules/backend/formwidgets/Repeater.php | 112 +++++++++++------- .../repeater/assets/css/repeater.css | 17 ++- .../repeater/assets/js/repeater.js | 52 +++++--- .../repeater/assets/less/repeater.less | 81 +++++++++++++ .../repeater/partials/_repeater.php | 27 ++--- .../repeater/partials/_repeater_add_item.php | 26 ++++ .../repeater/partials/_repeater_item.php | 8 +- modules/system/assets/ui/storm.css | 4 +- 9 files changed, 253 insertions(+), 83 deletions(-) create mode 100644 modules/backend/formwidgets/repeater/partials/_repeater_add_item.php diff --git a/modules/backend/.eslintrc.json b/modules/backend/.eslintrc.json index 96bf04b4ef..c6255996e7 100644 --- a/modules/backend/.eslintrc.json +++ b/modules/backend/.eslintrc.json @@ -10,6 +10,15 @@ "airbnb-base", "plugin:vue/vue3-recommended" ], + "ignorePatterns": [ + "assets/js", + "assets/vendor", + "behaviors/**/*.js", + "controllers/**/*.js", + "formwidgets/**/*.js", + "reportwidgets/**/*.js", + "widgets/**/*.js" + ], "rules": { "class-methods-use-this": ["off"], "indent": ["error", 4, { diff --git a/modules/backend/formwidgets/Repeater.php b/modules/backend/formwidgets/Repeater.php index fe9631abb8..6c145ba130 100644 --- a/modules/backend/formwidgets/Repeater.php +++ b/modules/backend/formwidgets/Repeater.php @@ -14,114 +14,139 @@ class Repeater extends FormWidgetBase // /** - * @var array Form field configuration + * Form field configuration */ - public $form; + public array $form = []; /** - * @var string Prompt text for adding new items. + * Repeater mode. Can be either `list` (default) to display items in a vertical list, or `grid` to + * display items in a grid. */ - public $prompt; + public string $mode = 'list'; /** - * @var bool Items can be sorted. + * Prompt text for adding new items. */ - public $sortable = true; + public string $prompt = 'backend::lang.repeater.add_new_item'; /** - * @var string Field name to use for the title of collapsed items + * If `true`, items can be sorted. */ - public $titleFrom = false; + public bool $sortable = true; /** - * @var int Minimum items required. Pre-displays those items when not using groups + * Field name to use for the title of collapsed items */ - public $minItems; + public ?string $titleFrom = null; /** - * @var int Maximum items permitted + * Minimum items required. Pre-displays those items when not using groups. Set to `0` to not enforce a minimum. */ - public $maxItems; + public int $minItems = 0; /** - * @var string The style of the repeater. Can be one of three values: + * Maximum items permitted. Set to `0` to not enforce a limit. + */ + public int $maxItems = 0; + + /** + * Number of columns in a grid mode repeater. Can be between 2 and 6. Defaults to `4`. + */ + public int $columns = 4; + + /** + * The row height, in pixels, of a grid mode repeater. Defaults to `120`. Note that if items are larger than this + * value, the row will scale accordingly. + */ + public int $rowHeight = 120; + + /** + * The style of the repeater. Can be one of three values: * - "default": Shows all repeater items expanded on load. * - "collapsed": Shows all repeater items collapsed on load. * - "accordion": Shows only the first repeater item expanded on load. When another item is clicked, all other open * items are collapsed. + * + * Ignored when using `grid` mode. */ - public $style; + public string $style = 'default'; // // Object properties // /** - * @inheritDoc + * {@inheritDoc} */ protected $defaultAlias = 'repeater'; /** - * @var array Meta data associated to each field, organised by index + * Meta data associated to each field, organised by index */ - protected $indexMeta = []; + protected array $indexMeta = []; /** - * @var array Collection of form widgets. + * Collection of form widgets. */ - protected $formWidgets = []; + protected array $formWidgets = []; /** - * @var bool Stops nested repeaters populating from previous sibling. + * Stops nested repeaters populating from previous sibling. */ - protected static $onAddItemCalled = false; + protected static bool $onAddItemCalled = false; /** * Determines if a child repeater has made an AJAX request to add an item - * - * @var bool */ - protected $childAddItemCalled = false; + protected bool $childAddItemCalled = false; /** * Determines which child index has made the AJAX request to add an item - * - * @var int */ - protected $childIndexCalled; + protected ?int $childIndexCalled = null; - protected $useGroups = false; + /** + * If `true`, sets the repeater to use "grouped" items. Grouped items are selectable form configurations that can + * be different for each item in the repeater. + */ + protected bool $useGroups = false; - protected $groupDefinitions = []; + /** + * Defines the group item form definitions available for the repeater. + */ + protected array $groupDefinitions = []; /** * Determines if repeater has been initialised previously - * - * @var boolean */ - protected $loaded = false; + protected bool $loaded = false; /** - * @inheritDoc + * {@inheritDoc} */ public function init() { - $this->prompt = Lang::get('backend::lang.repeater.add_new_item'); - $this->fillFromConfig([ 'form', + 'mode', 'style', 'prompt', 'sortable', 'titleFrom', 'minItems', 'maxItems', + 'columns', + 'rowHeight', ]); if ($this->formField->disabled) { $this->previewMode = true; } + if ($this->columns < 2 || $this->columns > 6) { + $this->columns = 4; + } + // Check for loaded flag in POST if ((bool) post($this->alias . '_loaded') === true) { $this->loaded = true; @@ -136,7 +161,7 @@ public function init() } /** - * @inheritDoc + * {@inheritDoc} */ public function render() { @@ -162,12 +187,15 @@ public function prepareVars() } $this->vars['prompt'] = $this->prompt; + $this->vars['mode'] = in_array($this->mode, ['list', 'grid']) ? $this->mode : 'list'; $this->vars['formWidgets'] = $this->formWidgets; $this->vars['titleFrom'] = $this->titleFrom; - $this->vars['minItems'] = $this->minItems; - $this->vars['maxItems'] = $this->maxItems; - $this->vars['sortable'] = $this->sortable; - $this->vars['style'] = $this->style; + $this->vars['minItems'] = (int) $this->minItems; + $this->vars['maxItems'] = (int) $this->maxItems; + $this->vars['sortable'] = (bool) $this->sortable; + $this->vars['style'] = in_array($this->style, ['default', 'collapsed', 'accordion']) ? $this->style : 'default'; + $this->vars['columns'] = (int) $this->columns; + $this->vars['rowHeight'] = (int) $this->rowHeight; $this->vars['useGroups'] = $this->useGroups; $this->vars['groupDefinitions'] = $this->groupDefinitions; @@ -348,9 +376,11 @@ public function onAddItem() $this->vars['indexValue'] = $index; $itemContainer = '@#' . $this->getId('items'); + $addItemContainer = '#' . $this->getId('add-item'); return [ - $itemContainer => $this->makePartial('repeater_item') + $addItemContainer => '', + $itemContainer => $this->makePartial('repeater_item') . $this->makePartial('repeater_add_item') ]; } diff --git a/modules/backend/formwidgets/repeater/assets/css/repeater.css b/modules/backend/formwidgets/repeater/assets/css/repeater.css index f99a16b536..7de5800bd2 100644 --- a/modules/backend/formwidgets/repeater/assets/css/repeater.css +++ b/modules/backend/formwidgets/repeater/assets/css/repeater.css @@ -51,4 +51,19 @@ .field-repeater .field-repeater-add-item:focus>a{color:#fff} .field-repeater .field-repeater-add-item:active{background:#3498db;border-color:transparent} .field-repeater .field-repeater-add-item:active>a{color:#fff} -.field-repeater .field-repeater-add-item.in-progress{border-color:#e0e0e0 !important;background:transparent !important} \ No newline at end of file +.field-repeater .field-repeater-add-item.in-progress{border-color:#e0e0e0 !important;background:transparent !important} +.field-repeater[data-mode="grid"] ul.field-repeater-items{display:grid;gap:20px} +.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-item{margin-bottom:0 !important} +.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{margin-top:0} +.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item a{display:flex;flex-direction:column;justify-content:center;height:100%} +.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item:before{display:none} +.field-repeater[data-mode="grid"][data-columns="2"] ul.field-repeater-items{grid-template-columns:repeat(2,1fr)} +.field-repeater[data-mode="grid"][data-columns="3"] ul.field-repeater-items{grid-template-columns:repeat(3,1fr)} +.field-repeater[data-mode="grid"][data-columns="4"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)} +@media (max-width:1600px){.field-repeater[data-mode="grid"][data-columns="4"] ul.field-repeater-items{grid-template-columns:repeat(3,1fr)}} +.field-repeater[data-mode="grid"][data-columns="5"] ul.field-repeater-items{grid-template-columns:repeat(5,1fr)} +@media (max-width:1600px){.field-repeater[data-mode="grid"][data-columns="5"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)}} +.field-repeater[data-mode="grid"][data-columns="6"] ul.field-repeater-items{grid-template-columns:repeat(6,1fr)} +@media (max-width:1600px){.field-repeater[data-mode="grid"][data-columns="6"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)}} +@media (min-width:768px) and (max-width:1199px){.field-repeater[data-mode="grid"] ul.field-repeater-items{grid-template-columns:repeat(2,1fr) !important}} +@media (max-width:767px){.field-repeater[data-mode="grid"] ul.field-repeater-items{grid-template-columns:1fr !important}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-item,.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{min-height:0 !important}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{margin-top:10px}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item::before{display:block}} \ No newline at end of file diff --git a/modules/backend/formwidgets/repeater/assets/js/repeater.js b/modules/backend/formwidgets/repeater/assets/js/repeater.js index cc32839d16..1f86457fde 100644 --- a/modules/backend/formwidgets/repeater/assets/js/repeater.js +++ b/modules/backend/formwidgets/repeater/assets/js/repeater.js @@ -39,6 +39,7 @@ minItems: null, maxItems: null, sortable: false, + mode: 'list', style: 'default', } @@ -48,9 +49,9 @@ } this.$el.on('ajaxDone', '> .field-repeater-items > .field-repeater-item > .repeater-item-remove > [data-repeater-remove]', this.proxy(this.onRemoveItemSuccess)) - this.$el.on('ajaxDone', '> .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess)) + this.$el.on('ajaxDone', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess)) this.$el.on('click', '> ul > li > .repeater-item-collapse .repeater-item-collapse-one', this.proxy(this.toggleCollapse)) - this.$el.on('click', '> .field-repeater-add-item > [data-repeater-add-group]', this.proxy(this.clickAddGroupButton)) + this.$el.on('click', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add-group]', this.proxy(this.clickAddGroupButton)) this.$el.one('dispose-control', this.proxy(this.dispose)) @@ -64,9 +65,9 @@ } this.$el.off('ajaxDone', '> .field-repeater-items > .field-repeater-item > .repeater-item-remove > [data-repeater-remove]', this.proxy(this.onRemoveItemSuccess)) - this.$el.off('ajaxDone', '> .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess)) - this.$el.off('click', '> .field-repeater-items > .field-repeater-item > .repeater-item-collapse .repeater-item-collapse-one', this.proxy(this.toggleCollapse)) - this.$el.off('click', '> .field-repeater-add-item > [data-repeater-add-group]', this.proxy(this.clickAddGroupButton)) + this.$el.off('ajaxDone', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add]', this.proxy(this.onAddItemSuccess)) + this.$el.off('click', '> ul > li > .repeater-item-collapse .repeater-item-collapse-one', this.proxy(this.toggleCollapse)) + this.$el.off('click', '> .field-repeater-items > .field-repeater-add-item > [data-repeater-add-group]', this.proxy(this.clickAddGroupButton)) this.$el.off('dispose-control', this.proxy(this.dispose)) this.$el.removeData('oc.repeater') @@ -86,14 +87,15 @@ Repeater.prototype.bindSorting = function() { var sortableOptions = { handle: this.options.sortableHandle, - nested: false + nested: false, + vertical: this.options.mode === 'list', } this.$sortable.sortable(sortableOptions) } Repeater.prototype.clickAddGroupButton = function(ev) { - var $self = this; + var $self = this var templateHtml = $('> [data-group-palette-template]', this.$el).html(), $target = $(ev.target), $form = this.$el.closest('form'), @@ -115,9 +117,14 @@ .on('ajaxPromise', '[data-repeater-add]', function(ev, context) { $loadContainer.loadIndicator() - $form.one('ajaxComplete', function() { + $(window).one('ajaxUpdateComplete', function() { $loadContainer.loadIndicator('hide') $self.togglePrompt() + $($self.$el).find('.field-repeater-items > .field-repeater-add-item').each(function () { + if ($(this).children().length === 0) { + $(this).remove() + } + }) }) }) @@ -145,15 +152,20 @@ Repeater.prototype.onAddItemSuccess = function(ev) { window.requestAnimationFrame(() => { - this.togglePrompt(); + this.togglePrompt() $(ev.target).closest('[data-field-name]').trigger('change.oc.formwidget') - }); + $(this.$el).find('.field-repeater-items > .field-repeater-add-item').each(function () { + if ($(this).children().length === 0) { + $(this).remove() + } + }) + }) } Repeater.prototype.togglePrompt = function () { if (this.options.minItems && this.options.minItems > 0) { var repeatedItems = this.$el.find('> .field-repeater-items > .field-repeater-item').length, - $removeItemBtn = this.$el.find('> .field-repeater-items > .field-repeater-item > .repeater-item-remove'); + $removeItemBtn = this.$el.find('> .field-repeater-items > .field-repeater-item > .repeater-item-remove') $removeItemBtn.toggleClass('disabled', !(repeatedItems > this.options.minItems)) } @@ -207,7 +219,7 @@ Repeater.prototype.collapse = function($item) { $item.addClass('collapsed') - $('.repeater-item-collapsed-title', $item).text(this.getCollapseTitle($item)); + $('.repeater-item-collapsed-title', $item).text(this.getCollapseTitle($item)) } Repeater.prototype.expand = function($item) { @@ -236,13 +248,13 @@ $target = $item } - var $textInput = $('input[type=text]:first, select:first', $target).first(); + var $textInput = $('input[type=text]:first, select:first', $target).first() if ($textInput.length) { switch($textInput.prop("tagName")) { case 'SELECT': - return $textInput.find('option:selected').text(); + return $textInput.find('option:selected').text() default: - return $textInput.val(); + return $textInput.val() } } else { var $disabledTextInput = $('.text-field:first > .form-control', $target) @@ -255,17 +267,21 @@ } Repeater.prototype.getStyle = function() { - var style = 'default'; + var style = 'default' // Validate style if (this.options.style && ['collapsed', 'accordion'].indexOf(this.options.style) !== -1) { style = this.options.style } - return style; + return style } Repeater.prototype.applyStyle = function() { + if (this.options.mode === 'grid') { + return + } + var style = this.getStyle(), self = this, items = $(this.$el).children('.field-repeater-items').children('.field-repeater-item') @@ -318,6 +334,6 @@ $(document).render(function() { $('[data-control="fieldrepeater"]').fieldRepeater() - }); + }) }(window.jQuery); diff --git a/modules/backend/formwidgets/repeater/assets/less/repeater.less b/modules/backend/formwidgets/repeater/assets/less/repeater.less index dbacf02d10..e390e3ba53 100644 --- a/modules/backend/formwidgets/repeater/assets/less/repeater.less +++ b/modules/backend/formwidgets/repeater/assets/less/repeater.less @@ -1,3 +1,5 @@ +// out: false + @import "../../../../assets/less/core/boot.less"; .field-repeater { @@ -239,4 +241,83 @@ background: transparent !important; } } + + &[data-mode="grid"] { + ul.field-repeater-items { + display: grid; + gap: 20px; + + .field-repeater-item { + margin-bottom: 0 !important; + } + + .field-repeater-add-item { + margin-top: 0; + + a { + display: flex; + flex-direction: column; + justify-content: center; + height: 100%; + } + + &:before { + display: none; + } + } + } + + &[data-columns="2"] ul.field-repeater-items { + grid-template-columns: repeat(2, 1fr); + } + &[data-columns="3"] ul.field-repeater-items { + grid-template-columns: repeat(3, 1fr); + } + &[data-columns="4"] ul.field-repeater-items { + grid-template-columns: repeat(4, 1fr); + + @media (max-width: 1600px) { + grid-template-columns: repeat(3, 1fr); + } + } + &[data-columns="5"] ul.field-repeater-items { + grid-template-columns: repeat(5, 1fr); + + @media (max-width: 1600px) { + grid-template-columns: repeat(4, 1fr); + } + } + &[data-columns="6"] ul.field-repeater-items { + grid-template-columns: repeat(6, 1fr); + + @media (max-width: 1600px) { + grid-template-columns: repeat(4, 1fr); + } + } + + @media (min-width: @screen-sm-min) and (max-width: @screen-md-max) { + ul.field-repeater-items { + grid-template-columns: repeat(2, 1fr) !important;; + } + } + + @media (max-width: @screen-xs-max) { + ul.field-repeater-items { + grid-template-columns: 1fr !important; + + .field-repeater-item, + .field-repeater-add-item { + min-height: 0 !important; + } + + .field-repeater-add-item { + margin-top: 10px; + + &::before { + display: block; + } + } + } + } + } } diff --git a/modules/backend/formwidgets/repeater/partials/_repeater.php b/modules/backend/formwidgets/repeater/partials/_repeater.php index 4f70e64ae6..0faf7e6a6d 100644 --- a/modules/backend/formwidgets/repeater/partials/_repeater.php +++ b/modules/backend/formwidgets/repeater/partials/_repeater.php @@ -4,6 +4,10 @@ + data-mode="" + + data-columns="" + data-sortable="true" data-sortable-container="#getId('items') ?>" @@ -14,31 +18,14 @@ $widget): ?> makePartial('repeater_item', [ 'widget' => $widget, - 'indexValue' => $index + 'indexValue' => $index, ]) ?> + + makePartial('repeater_add_item') ?> previewMode): ?> -
- - - - - - - - - -
- diff --git a/modules/backend/formwidgets/repeater/partials/_repeater_add_item.php b/modules/backend/formwidgets/repeater/partials/_repeater_add_item.php new file mode 100644 index 0000000000..5aac704704 --- /dev/null +++ b/modules/backend/formwidgets/repeater/partials/_repeater_add_item.php @@ -0,0 +1,26 @@ +previewMode): ?> +
  • + style="min-height: px" + + > + + + + + + + + + +
  • + diff --git a/modules/backend/formwidgets/repeater/partials/_repeater_item.php b/modules/backend/formwidgets/repeater/partials/_repeater_item.php index 2f88eebd59..e18f189a45 100644 --- a/modules/backend/formwidgets/repeater/partials/_repeater_item.php +++ b/modules/backend/formwidgets/repeater/partials/_repeater_item.php @@ -4,7 +4,11 @@ ?>
  • - class="field-repeater-item"> + class="field-repeater-item" + + style="min-height: px" + +> previewMode): ?> @@ -27,6 +31,7 @@ class="close" +
    +
    Date: Tue, 18 Jul 2023 14:21:26 -0400 Subject: [PATCH 15/71] Added support for Asset URLs in Snowboard - Added url().asset() method to the Url Snowboard plugin - Switched the AssetLoader Snowboard plugin to use url().asset() --- modules/cms/twig/SnowboardNode.php | 16 ++--- .../system/assets/js/build/system.debug.js | 2 +- modules/system/assets/js/build/system.js | 2 +- .../snowboard/build/snowboard.base.debug.js | 2 +- .../js/snowboard/build/snowboard.base.js | 2 +- .../js/snowboard/build/snowboard.extras.js | 2 +- .../js/snowboard/build/snowboard.vendor.js | 6 +- .../assets/js/snowboard/extras/AssetLoader.js | 22 ++++++- .../assets/js/snowboard/utilities/Url.js | 64 ++++++++++++++++++- 9 files changed, 100 insertions(+), 18 deletions(-) diff --git a/modules/cms/twig/SnowboardNode.php b/modules/cms/twig/SnowboardNode.php index 2acf40a026..7f93d8d32c 100644 --- a/modules/cms/twig/SnowboardNode.php +++ b/modules/cms/twig/SnowboardNode.php @@ -1,12 +1,11 @@ write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); $vendorJs = $moduleMap['vendor']; $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); // Add base script $baseJs = $moduleMap['base']; $baseUrl = Url::to('/'); + $assetUrl = Url::asset('/'); $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); static::$baseLoaded = true; } @@ -73,7 +73,7 @@ public function compile(TwigCompiler $compiler) foreach ($modules as $module) { $moduleJs = $moduleMap[$module]; $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); } } } diff --git a/modules/system/assets/js/build/system.debug.js b/modules/system/assets/js/build/system.debug.js index 6295880f04..f365457950 100644 --- a/modules/system/assets/js/build/system.debug.js +++ b/modules/system/assets/js/build/system.debug.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[714,450,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z(!0,!0),i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(165),t(640),t(136)}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[714,450,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z(!0,!0),i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(165),t(640),t(136)}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/build/system.js b/modules/system/assets/js/build/system.js index 2ec7a07bb2..6002336fd5 100644 --- a/modules/system/assets/js/build/system.js +++ b/modules/system/assets/js/build/system.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,243,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z,i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(236),t(640),t(136)}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,243,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z,i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(236),t(640),t(136)}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.base.debug.js b/modules/system/assets/js/snowboard/build/snowboard.base.debug.js index b8211d7999..3ce9335c39 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.base.debug.js +++ b/modules/system/assets/js/snowboard/build/snowboard.base.debug.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(579);class r extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),r=n(281),s={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,s),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),r=0;rthis.instances.splice(this.instances.indexOf(r),1),r.construct(...n),this.instances.push(r),r}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof r.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),r=0;r{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends r.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,r=null,s="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");s='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let r=t+1;r=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let r=t;r="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class g extends r.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,r]=n;if(r.isFunction())return;if(!r.dependenciesFulfilled())return;if(!r.hasMethod("listens"))return;const s=r.callMethod("listens");"string"!=typeof s[e]&&"function"!=typeof s[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!s)if("function"==typeof r)try{!1===r.apply(i,n)&&(s=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{!1===i[r](...n)&&(s=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!s&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!s)try{!1===t(...n)&&(s=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!s}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof r)try{const e=r.apply(i,n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{const e=i[r](...n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;s.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===s.length?Promise.resolve():Promise.all(s)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,r=new Array(i>3?i-3:0),s=3;s{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z(!0,!0),r.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=165,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(579);class s extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),s=n(281),r={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,r),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),s=0;s0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),s=0;sthis.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof s.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),s=0;s{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends s.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,s=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let s=t+1;s=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let s=t;s="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class d extends s.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;const r=s.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!r)if("function"==typeof s)try{!1===s.apply(i,n)&&(r=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{!1===i[s](...n)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...n)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof s)try{const e=s.apply(i,n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{const e=i[s](...n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z(!0,!0),s.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=165,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.base.js b/modules/system/assets/js/snowboard/build/snowboard.base.js index a94056e5cb..615b22c53d 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.base.js +++ b/modules/system/assets/js/snowboard/build/snowboard.base.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(579);class r extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),r=n(281),s={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,s),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),r=0;rthis.instances.splice(this.instances.indexOf(r),1),r.construct(...n),this.instances.push(r),r}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof r.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),r=0;r{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends r.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,r=null,s="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");s='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let r=t+1;r=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let r=t;r="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class g extends r.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,r]=n;if(r.isFunction())return;if(!r.dependenciesFulfilled())return;if(!r.hasMethod("listens"))return;const s=r.callMethod("listens");"string"!=typeof s[e]&&"function"!=typeof s[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!s)if("function"==typeof r)try{!1===r.apply(i,n)&&(s=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{!1===i[r](...n)&&(s=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!s&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!s)try{!1===t(...n)&&(s=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!s}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof r)try{const e=r.apply(i,n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{const e=i[r](...n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;s.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===s.length?Promise.resolve():Promise.all(s)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,r=new Array(i>3?i-3:0),s=3;s{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z,r.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=236,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(579);class s extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),s=n(281),r={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,r),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),s=0;s0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),s=0;sthis.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof s.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),s=0;s{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends s.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,s=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let s=t+1;s=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let s=t;s="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class d extends s.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;const r=s.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!r)if("function"==typeof s)try{!1===s.apply(i,n)&&(r=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{!1===i[s](...n)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...n)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof s)try{const e=s.apply(i,n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{const e=i[s](...n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z,s.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=236,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.extras.js b/modules/system/assets/js/snowboard/build/snowboard.extras.js index a3025fd871..8774b3a4ae 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.extras.js +++ b/modules/system/assets/js/snowboard/build/snowboard.extras.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{579:function(e,t,s){s.d(t,{Z:function(){return a}});class a{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,a),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(a)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,a),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(a)}))}loadImage(e){return new Promise(((t,s)=>{const a=new Image;a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,a),s(new Error(`Unable to load image file: "${e}"`))})),a.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(e instanceof a.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s,a,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=a?this.parseDuration(a):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,a]=e;-1!==t.indexOf(s)&&i.push(a)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},820:function(e,t,s){var a=s(270),i=s(281);class r extends i.Z{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((e=>{this.snowboard.flash(e.innerHTML,e.dataset.flashType,e.dataset.flashDuration),e.remove()}))}ajaxErrorMessage(e){return this.snowboard.flash(e,"error"),!1}ajaxFlashMessages(e){return Object.entries(e).forEach((e=>{const[t,s]=e;this.snowboard.flash(s,t)})),!1}}class n extends i.Z{construct(){this.errorBags=[]}listens(){return{ready:"ready",ajaxStart:"clearValidation",ajaxValidationErrors:"doValidation"}}ready(){this.collectErrorBags(document)}doValidation(e,t,s){if(void 0===s.element.dataset.requestValidate)return null;if(!e)return null;return this.errorBags.filter((t=>t.form===e)).forEach((e=>{this.showErrorBag(e,t)})),!1}clearValidation(e,t){if(void 0===t.element.dataset.requestValidate)return;if(!t.form)return;this.errorBags.filter((e=>e.form===t.form)).forEach((e=>{this.hideErrorBag(e)}))}collectErrorBags(e){e.querySelectorAll("[data-validate-error], [data-validate-for]").forEach((e=>{const t=e.closest("form[data-request-validate]");if(!t)return void e.parentNode.removeChild(e);let s=null;e.matches("[data-validate-error]")&&(s=e.querySelector("[data-message]"));const a=document.createComment(""),i={element:e,form:t,validateFor:e.dataset.validateFor?e.dataset.validateFor.split(/\s*,\s*/):"*",placeholder:a,messageListElement:s?s.cloneNode(!0):null,messageListAnchor:null,customMessage:!!e.dataset.validateFor&&(""!==e.textContent||e.childNodes.length>0)};if(s){const e=document.createComment("");s.parentNode.replaceChild(e,s),i.messageListAnchor=e}e.parentNode.replaceChild(a,e),this.errorBags.push(i)}))}hideErrorBag(e){e.element.isConnected&&e.element.parentNode.replaceChild(e.placeholder,e.element)}showErrorBag(e,t){if(this.errorBagValidatesField(e,t))if(e.element.isConnected||e.placeholder.parentNode.replaceChild(e.element,e.placeholder),"*"!==e.validateFor){if(!e.customMessage){const s=Object.keys(t).filter((t=>e.validateFor.includes(t))).shift();[e.element.innerHTML]=t[s]}}else e.messageListElement?(e.element.querySelectorAll("[data-validation-message]").forEach((e=>{e.parentNode.removeChild(e)})),Object.entries(t).forEach((t=>{const[,s]=t;s.forEach((t=>{const s=e.messageListElement.cloneNode(!0);s.dataset.validationMessage="",s.innerHTML=t,e.messageListAnchor.after(s)}))}))):[e.element.innerHTML]=t[Object.keys(t).shift()]}errorBagValidatesField(e,t){return"*"===e.validateFor||Object.keys(t).filter((t=>e.validateFor.includes(t))).length>0}}var o,l=s(269),d=s(553),c=s(277),h=s(32),u=s(809),m=s(763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(o=window.Snowboard).addPlugin("assetLoader",u.Z),o.addPlugin("dataConfig",m.Z),o.addPlugin("extrasStyles",h.Z),o.addPlugin("transition",l.Z),o.addPlugin("flash",a.Z),o.addPlugin("flashListener",r),o.addPlugin("formValidation",n),o.addPlugin("attachLoading",d.Z),o.addPlugin("stripeLoader",c.Z)}},function(e){var t;t=820,e(e.s=t)}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{579:function(e,t,s){s.d(t,{Z:function(){return a}});class a{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,a),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(a)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,a),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(a)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const a=new Image;a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,a),s(new Error(`Unable to load image file: "${e}"`))})),a.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(e instanceof a.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s,a,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=a?this.parseDuration(a):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,a]=e;-1!==t.indexOf(s)&&i.push(a)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},820:function(e,t,s){var a=s(270),i=s(281);class r extends i.Z{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((e=>{this.snowboard.flash(e.innerHTML,e.dataset.flashType,e.dataset.flashDuration),e.remove()}))}ajaxErrorMessage(e){return this.snowboard.flash(e,"error"),!1}ajaxFlashMessages(e){return Object.entries(e).forEach((e=>{const[t,s]=e;this.snowboard.flash(s,t)})),!1}}class n extends i.Z{construct(){this.errorBags=[]}listens(){return{ready:"ready",ajaxStart:"clearValidation",ajaxValidationErrors:"doValidation"}}ready(){this.collectErrorBags(document)}doValidation(e,t,s){if(void 0===s.element.dataset.requestValidate)return null;if(!e)return null;return this.errorBags.filter((t=>t.form===e)).forEach((e=>{this.showErrorBag(e,t)})),!1}clearValidation(e,t){if(void 0===t.element.dataset.requestValidate)return;if(!t.form)return;this.errorBags.filter((e=>e.form===t.form)).forEach((e=>{this.hideErrorBag(e)}))}collectErrorBags(e){e.querySelectorAll("[data-validate-error], [data-validate-for]").forEach((e=>{const t=e.closest("form[data-request-validate]");if(!t)return void e.parentNode.removeChild(e);let s=null;e.matches("[data-validate-error]")&&(s=e.querySelector("[data-message]"));const a=document.createComment(""),i={element:e,form:t,validateFor:e.dataset.validateFor?e.dataset.validateFor.split(/\s*,\s*/):"*",placeholder:a,messageListElement:s?s.cloneNode(!0):null,messageListAnchor:null,customMessage:!!e.dataset.validateFor&&(""!==e.textContent||e.childNodes.length>0)};if(s){const e=document.createComment("");s.parentNode.replaceChild(e,s),i.messageListAnchor=e}e.parentNode.replaceChild(a,e),this.errorBags.push(i)}))}hideErrorBag(e){e.element.isConnected&&e.element.parentNode.replaceChild(e.placeholder,e.element)}showErrorBag(e,t){if(this.errorBagValidatesField(e,t))if(e.element.isConnected||e.placeholder.parentNode.replaceChild(e.element,e.placeholder),"*"!==e.validateFor){if(!e.customMessage){const s=Object.keys(t).filter((t=>e.validateFor.includes(t))).shift();[e.element.innerHTML]=t[s]}}else e.messageListElement?(e.element.querySelectorAll("[data-validation-message]").forEach((e=>{e.parentNode.removeChild(e)})),Object.entries(t).forEach((t=>{const[,s]=t;s.forEach((t=>{const s=e.messageListElement.cloneNode(!0);s.dataset.validationMessage="",s.innerHTML=t,e.messageListAnchor.after(s)}))}))):[e.element.innerHTML]=t[Object.keys(t).shift()]}errorBagValidatesField(e,t){return"*"===e.validateFor||Object.keys(t).filter((t=>e.validateFor.includes(t))).length>0}}var o,l=s(269),d=s(553),c=s(277),h=s(32),u=s(809),m=s(763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(o=window.Snowboard).addPlugin("assetLoader",u.Z),o.addPlugin("dataConfig",m.Z),o.addPlugin("extrasStyles",h.Z),o.addPlugin("transition",l.Z),o.addPlugin("flash",a.Z),o.addPlugin("flashListener",r),o.addPlugin("formValidation",n),o.addPlugin("attachLoading",d.Z),o.addPlugin("stripeLoader",c.Z)}},function(e){var t;t=820,e(e.s=t)}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.vendor.js b/modules/system/assets/js/snowboard/build/snowboard.vendor.js index f331cbe693..7038746c39 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.vendor.js +++ b/modules/system/assets/js/snowboard/build/snowboard.vendor.js @@ -1,3 +1,3 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[109],{805:function(e,t){ -/*! js-cookie v3.0.1 | MIT */ -function n(e){for(var t=1;t { + // Resolve script URL + script = this.snowboard.url().asset(script); + // Check that script is not already loaded const loaded = document.querySelector(`script[src="${script}"]`); if (loaded) { @@ -123,11 +137,14 @@ export default class AssetLoader extends Singleton { * * The stylesheet will be appended before the closing `` tag. * - * @param {String} script + * @param {String} style * @returns {Promise} */ loadStyle(style) { return new Promise((resolve, reject) => { + // Resolve style URL + style = this.snowboard.url().asset(style); + // Check that stylesheet is not already loaded const loaded = document.querySelector(`link[rel="stylesheet"][href="${style}"]`); if (loaded) { @@ -161,6 +178,9 @@ export default class AssetLoader extends Singleton { */ loadImage(image) { return new Promise((resolve, reject) => { + // Resolve script URL + image = this.snowboard.url().asset(image); + const img = new Image(); img.addEventListener('load', () => { this.snowboard.globalEvent('assetLoader.loaded', 'image', image, img); diff --git a/modules/system/assets/js/snowboard/utilities/Url.js b/modules/system/assets/js/snowboard/utilities/Url.js index 3dce11ab0b..5c0bf3eb01 100644 --- a/modules/system/assets/js/snowboard/utilities/Url.js +++ b/modules/system/assets/js/snowboard/utilities/Url.js @@ -11,7 +11,9 @@ import Singleton from '../abstracts/Singleton'; export default class Url extends Singleton { construct() { this.foundBaseUrl = null; + this.foundAssetUrl = null; this.baseUrl(); + this.assetUrl(); } /** @@ -34,6 +36,26 @@ export default class Url extends Singleton { return `${this.baseUrl()}${theUrl}`; } + /** + * Gets an Asset URL based on a relative path. + * + * If an absolute URL is provided, it will be returned unchanged. + * + * @param {string} url + * @returns {string} + */ + asset(url) { + const urlRegex = /[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i; + + if (url.match(urlRegex)) { + return url; + } + + const theUrl = url.replace(/^\/+/, ''); + + return `${this.assetUrl()}${theUrl}`; + } + /** * Helper method to get the base URL of this install. * @@ -74,6 +96,46 @@ export default class Url extends Singleton { return this.foundBaseUrl; } + /** + * Helper method to get the asset URL of this install. + * + * This determines the base URL from three sources, in order: + * - If Snowboard is loaded via the `{% snowboard %}` tag, it will retrieve the asset URL that + * is automatically included there. + * - If a `` tag is available, it will use the URL specified in the link tag. + * - Finally, it will take a guess from the current location. This will likely not work for sites + * that reside in subdirectories. + * + * The asset URL will always contain a trailing backslash. + * + * @returns {string} + */ + assetUrl() { + if (this.foundAssetUrl !== null) { + return this.foundAssetUrl; + } + + if (document.querySelector('script[data-module="snowboard-base"]') !== null) { + this.foundAssetUrl = this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl); + return this.foundAssetUrl; + } + + if (document.querySelector('link[rel="asset_url"]') !== null) { + this.foundAssetUrl = this.validateBaseUrl(document.querySelector('link[rel="asset_url"]').getAttribute('href')); + return this.foundAssetUrl; + } + + const urlParts = [ + window.location.protocol, + '//', + window.location.host, + '/', + ]; + this.foundAssetUrl = urlParts.join(''); + + return this.foundAssetUrl; + } + /** * Validates the base URL, ensuring it is a HTTP/HTTPs URL. * @@ -83,7 +145,7 @@ export default class Url extends Singleton { * @param {string} url * @returns {string} */ - validateBaseUrl(url) { + validateBaseUrl(url) { const urlRegex = /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i; const urlParts = urlRegex.exec(url); const protocol = urlParts[2]; From 4566d8a15c0f21b962b1e6afd91ee546303075ed Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 18 Jul 2023 14:53:58 -0400 Subject: [PATCH 16/71] Typo fix and recompile snowboard assets --- modules/backend/assets/ui/js/build/manifest.js | 2 +- modules/backend/assets/ui/js/build/vendor.js | 2 +- .../formwidgets/colorpicker/assets/js/dist/colorpicker.js | 2 +- .../backend/formwidgets/iconpicker/assets/js/dist/iconpicker.js | 2 +- modules/system/assets/js/build/system.debug.js | 2 +- modules/system/assets/js/build/system.js | 2 +- .../system/assets/js/snowboard/build/snowboard.base.debug.js | 2 +- modules/system/assets/js/snowboard/build/snowboard.base.js | 2 +- modules/system/assets/js/snowboard/build/snowboard.data-attr.js | 2 +- modules/system/assets/js/snowboard/build/snowboard.request.js | 2 +- modules/system/assets/js/snowboard/utilities/Url.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/backend/assets/ui/js/build/manifest.js b/modules/backend/assets/ui/js/build/manifest.js index 2de8a0b779..ffa6226fac 100644 --- a/modules/backend/assets/ui/js/build/manifest.js +++ b/modules/backend/assets/ui/js/build/manifest.js @@ -1 +1 @@ -!function(){"use strict";var n,e={},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={id:n,exports:{}};return e[n](i,i.exports,t),i.exports}t.m=e,n=[],t.O=function(e,r,o,i){if(!r){var u=1/0;for(l=0;l=i)&&Object.keys(t.O).every((function(n){return t.O[n](r[c])}))?r.splice(c--,1):(f=!1,i0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[r,o,i]},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},t.d=function(n,e){for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},function(){var n={207:0};t.O.j=function(e){return 0===n[e]};var e=function(e,r){var o,i,u=r[0],f=r[1],c=r[2],a=0;if(u.some((function(e){return 0!==n[e]}))){for(o in f)t.o(f,o)&&(t.m[o]=f[o]);if(c)var l=c(t)}for(e&&e(r);a=i)&&Object.keys(t.O).every((function(n){return t.O[n](r[c])}))?r.splice(c--,1):(f=!1,i0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[r,o,i]},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},t.d=function(n,e){for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},function(){var n={207:0};t.O.j=function(e){return 0===n[e]};var e=function(e,r){var o,i,u=r[0],f=r[1],c=r[2],a=0;if(u.some((function(e){return 0!==n[e]}))){for(o in f)t.o(f,o)&&(t.m[o]=f[o]);if(c)var l=c(t)}for(e&&e(r);a{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},471:function(e,t,n){n.r(t),n.d(t,{BaseTransition:function(){return lr},Comment:function(){return Yo},EffectScope:function(){return le},Fragment:function(){return Jo},KeepAlive:function(){return _r},ReactiveEffect:function(){return xe},Static:function(){return Qo},Suspense:function(){return Hn},Teleport:function(){return qo},Text:function(){return Zo},Transition:function(){return Bi},TransitionGroup:function(){return rc},VueElement:function(){return Pi},callWithAsyncErrorHandling:function(){return tn},callWithErrorHandling:function(){return en},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return bs},compatUtils:function(){return hi},compile:function(){return Tf},computed:function(){return Gs},createApp:function(){return $c},createBlock:function(){return ls},createCommentVNode:function(){return xs},createElementBlock:function(){return cs},createElementVNode:function(){return ms},createHydrationRenderer:function(){return Bo},createPropsRestProxy:function(){return ri},createRenderer:function(){return Lo},createSSRApp:function(){return Fc},createSlots:function(){return Zr},createStaticVNode:function(){return Ss},createTextVNode:function(){return _s},createVNode:function(){return gs},customRef:function(){return qt},defineAsyncComponent:function(){return vr},defineComponent:function(){return mr},defineCustomElement:function(){return Ri},defineEmits:function(){return Zs},defineExpose:function(){return Ys},defineProps:function(){return Js},defineSSRCustomElement:function(){return Oi},devtools:function(){return xn},effect:function(){return we},effectScope:function(){return ue},getCurrentInstance:function(){return Ps},getCurrentScope:function(){return fe},getTransitionRawChildren:function(){return hr},guardReactiveProps:function(){return ys},h:function(){return si},handleError:function(){return nn},hydrate:function(){return Ic},initCustomFormatter:function(){return li},initDirectivesForSSR:function(){return Bc},inject:function(){return Zn},isMemoSame:function(){return ai},isProxy:function(){return Ot},isReactive:function(){return Tt},isReadonly:function(){return Nt},isRef:function(){return Vt},isRuntimeOnly:function(){return Ds},isShallow:function(){return Rt},isVNode:function(){return us},markRaw:function(){return Pt},mergeDefaults:function(){return ni},mergeProps:function(){return Es},nextTick:function(){return dn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return xr},onBeforeMount:function(){return Or},onBeforeUnmount:function(){return Ir},onBeforeUpdate:function(){return Pr},onDeactivated:function(){return Cr},onErrorCaptured:function(){return Br},onMounted:function(){return Mr},onRenderTracked:function(){return Lr},onRenderTriggered:function(){return Vr},onScopeDispose:function(){return pe},onServerPrefetch:function(){return Fr},onUnmounted:function(){return $r},onUpdated:function(){return Ar},openBlock:function(){return ts},popScopeId:function(){return An},provide:function(){return Jn},proxyRefs:function(){return zt},pushScopeId:function(){return Pn},queuePostFlushCb:function(){return gn},reactive:function(){return xt},readonly:function(){return wt},ref:function(){return Lt},registerRuntimeCompiler:function(){return Us},render:function(){return Ac},renderList:function(){return Jr},renderSlot:function(){return Yr},resolveComponent:function(){return Hr},resolveDirective:function(){return Kr},resolveDynamicComponent:function(){return zr},resolveFilter:function(){return di},resolveTransitionHooks:function(){return ar},setBlockTracking:function(){return ss},setDevtoolsHook:function(){return kn},setTransitionHooks:function(){return dr},shallowReactive:function(){return Ct},shallowReadonly:function(){return kt},shallowRef:function(){return Bt},ssrContextKey:function(){return ii},ssrUtils:function(){return pi},stop:function(){return ke},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return Xr},toRaw:function(){return Mt},toRef:function(){return Zt},toRefs:function(){return Gt},transformVNodeArgs:function(){return fs},triggerRef:function(){return Dt},unref:function(){return Ht},useAttrs:function(){return ei},useCssModule:function(){return Ai},useCssVars:function(){return Ii},useSSRContext:function(){return ci},useSlots:function(){return Xs},useTransitionState:function(){return ir},vModelCheckbox:function(){return fc},vModelDynamic:function(){return yc},vModelRadio:function(){return dc},vModelSelect:function(){return hc},vModelText:function(){return ac},vShow:function(){return Ec},version:function(){return fi},warn:function(){return Xt},watch:function(){return tr},watchEffect:function(){return Yn},watchPostEffect:function(){return Qn},watchSyncEffect:function(){return Xn},withAsyncContext:function(){return oi},withCtx:function(){return $n},withDefaults:function(){return Qs},withDirectives:function(){return jr},withKeys:function(){return kc},withMemo:function(){return ui},withModifiers:function(){return Cc},withScopeId:function(){return In}});var r={};function o(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}n.r(r),n.d(r,{BaseTransition:function(){return lr},Comment:function(){return Yo},EffectScope:function(){return le},Fragment:function(){return Jo},KeepAlive:function(){return _r},ReactiveEffect:function(){return xe},Static:function(){return Qo},Suspense:function(){return Hn},Teleport:function(){return qo},Text:function(){return Zo},Transition:function(){return Bi},TransitionGroup:function(){return rc},VueElement:function(){return Pi},callWithAsyncErrorHandling:function(){return tn},callWithErrorHandling:function(){return en},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return bs},compatUtils:function(){return hi},computed:function(){return Gs},createApp:function(){return $c},createBlock:function(){return ls},createCommentVNode:function(){return xs},createElementBlock:function(){return cs},createElementVNode:function(){return ms},createHydrationRenderer:function(){return Bo},createPropsRestProxy:function(){return ri},createRenderer:function(){return Lo},createSSRApp:function(){return Fc},createSlots:function(){return Zr},createStaticVNode:function(){return Ss},createTextVNode:function(){return _s},createVNode:function(){return gs},customRef:function(){return qt},defineAsyncComponent:function(){return vr},defineComponent:function(){return mr},defineCustomElement:function(){return Ri},defineEmits:function(){return Zs},defineExpose:function(){return Ys},defineProps:function(){return Js},defineSSRCustomElement:function(){return Oi},devtools:function(){return xn},effect:function(){return we},effectScope:function(){return ue},getCurrentInstance:function(){return Ps},getCurrentScope:function(){return fe},getTransitionRawChildren:function(){return hr},guardReactiveProps:function(){return ys},h:function(){return si},handleError:function(){return nn},hydrate:function(){return Ic},initCustomFormatter:function(){return li},initDirectivesForSSR:function(){return Bc},inject:function(){return Zn},isMemoSame:function(){return ai},isProxy:function(){return Ot},isReactive:function(){return Tt},isReadonly:function(){return Nt},isRef:function(){return Vt},isRuntimeOnly:function(){return Ds},isShallow:function(){return Rt},isVNode:function(){return us},markRaw:function(){return Pt},mergeDefaults:function(){return ni},mergeProps:function(){return Es},nextTick:function(){return dn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return xr},onBeforeMount:function(){return Or},onBeforeUnmount:function(){return Ir},onBeforeUpdate:function(){return Pr},onDeactivated:function(){return Cr},onErrorCaptured:function(){return Br},onMounted:function(){return Mr},onRenderTracked:function(){return Lr},onRenderTriggered:function(){return Vr},onScopeDispose:function(){return pe},onServerPrefetch:function(){return Fr},onUnmounted:function(){return $r},onUpdated:function(){return Ar},openBlock:function(){return ts},popScopeId:function(){return An},provide:function(){return Jn},proxyRefs:function(){return zt},pushScopeId:function(){return Pn},queuePostFlushCb:function(){return gn},reactive:function(){return xt},readonly:function(){return wt},ref:function(){return Lt},registerRuntimeCompiler:function(){return Us},render:function(){return Ac},renderList:function(){return Jr},renderSlot:function(){return Yr},resolveComponent:function(){return Hr},resolveDirective:function(){return Kr},resolveDynamicComponent:function(){return zr},resolveFilter:function(){return di},resolveTransitionHooks:function(){return ar},setBlockTracking:function(){return ss},setDevtoolsHook:function(){return kn},setTransitionHooks:function(){return dr},shallowReactive:function(){return Ct},shallowReadonly:function(){return kt},shallowRef:function(){return Bt},ssrContextKey:function(){return ii},ssrUtils:function(){return pi},stop:function(){return ke},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return Xr},toRaw:function(){return Mt},toRef:function(){return Zt},toRefs:function(){return Gt},transformVNodeArgs:function(){return fs},triggerRef:function(){return Dt},unref:function(){return Ht},useAttrs:function(){return ei},useCssModule:function(){return Ai},useCssVars:function(){return Ii},useSSRContext:function(){return ci},useSlots:function(){return Xs},useTransitionState:function(){return ir},vModelCheckbox:function(){return fc},vModelDynamic:function(){return yc},vModelRadio:function(){return dc},vModelSelect:function(){return hc},vModelText:function(){return ac},vShow:function(){return Ec},version:function(){return fi},warn:function(){return Xt},watch:function(){return tr},watchEffect:function(){return Yn},watchPostEffect:function(){return Qn},watchSyncEffect:function(){return Xn},withAsyncContext:function(){return oi},withCtx:function(){return $n},withDefaults:function(){return Qs},withDirectives:function(){return jr},withKeys:function(){return kc},withMemo:function(){return ui},withModifiers:function(){return Cc},withScopeId:function(){return In}});const s=o("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function i(e){if(I(e)){const t={};for(let n=0;n{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function f(e){let t="";if(B(e))t=e;else if(I(e))for(let n=0;nb(e,t)))}const S=e=>B(e)?e:null==e?"":I(e)||U(e)&&(e.toString===H||!L(e.toString))?JSON.stringify(e,x,2):String(e),x=(e,t)=>t&&t.__v_isRef?x(e,t.value):$(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:F(t)?{[`Set(${t.size})`]:[...t.values()]}:!U(t)||I(t)||z(t)?t:String(t),C={},w=[],k=()=>{},E=()=>!1,T=/^on[^a-z]/,N=e=>T.test(e),R=e=>e.startsWith("onUpdate:"),O=Object.assign,M=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},P=Object.prototype.hasOwnProperty,A=(e,t)=>P.call(e,t),I=Array.isArray,$=e=>"[object Map]"===W(e),F=e=>"[object Set]"===W(e),V=e=>"[object Date]"===W(e),L=e=>"function"==typeof e,B=e=>"string"==typeof e,j=e=>"symbol"==typeof e,U=e=>null!==e&&"object"==typeof e,D=e=>U(e)&&L(e.then)&&L(e.catch),H=Object.prototype.toString,W=e=>H.call(e),z=e=>"[object Object]"===W(e),K=e=>B(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,q=o(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G=o("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),J=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,Y=J((e=>e.replace(Z,((e,t)=>t?t.toUpperCase():"")))),Q=/\B([A-Z])/g,X=J((e=>e.replace(Q,"-$1").toLowerCase())),ee=J((e=>e.charAt(0).toUpperCase()+e.slice(1))),te=J((e=>e?`on${ee(e)}`:"")),ne=(e,t)=>!Object.is(e,t),re=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},se=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ie;let ce;class le{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=ce,!e&&ce&&(this.index=(ce.scopes||(ce.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ce;try{return ce=this,e()}finally{ce=t}}else 0}on(){ce=this}off(){ce=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},he=e=>(e.w&ye)>0,me=e=>(e.n&ye)>0,ge=new WeakMap;let ve=0,ye=1;let be;const _e=Symbol(""),Se=Symbol("");class xe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ae(this,n)}run(){if(!this.active)return this.fn();let e=be,t=Ee;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=be,be=this,Ee=!0,ye=1<<++ve,ve<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{("length"===n||n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(i.get(n)),t){case"add":I(e)?K(n)&&c.push(i.get("length")):(c.push(i.get(_e)),$(e)&&c.push(i.get(Se)));break;case"delete":I(e)||(c.push(i.get(_e)),$(e)&&c.push(i.get(Se)));break;case"set":$(e)&&c.push(i.get(_e))}if(1===c.length)c[0]&&Ae(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Ae(de(e))}}function Ae(e,t){const n=I(e)?e:[...e];for(const e of n)e.computed&&Ie(e,t);for(const e of n)e.computed||Ie(e,t)}function Ie(e,t){(e!==be||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const $e=o("__proto__,__v_isRef,__isVue"),Fe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(j)),Ve=He(),Le=He(!1,!0),Be=He(!0),je=He(!0,!0),Ue=De();function De(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Mt(this);for(let e=0,t=this.length;e{e[t]=function(...e){Ne();const n=Mt(this)[t].apply(this,e);return Re(),n}})),e}function He(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?_t:bt:t?yt:vt).get(n))return n;const s=I(n);if(!e&&s&&A(Ue,r))return Reflect.get(Ue,r,o);const i=Reflect.get(n,r,o);return(j(r)?Fe.has(r):$e(r))?i:(e||Oe(n,0,r),t?i:Vt(i)?s&&K(r)?i:i.value:U(i)?e?wt(i):xt(i):i)}}function We(e=!1){return function(t,n,r,o){let s=t[n];if(Nt(s)&&Vt(s)&&!Vt(r))return!1;if(!e&&(Rt(r)||Nt(r)||(s=Mt(s),r=Mt(r)),!I(t)&&Vt(s)&&!Vt(r)))return s.value=r,!0;const i=I(t)&&K(n)?Number(n)e,Ze=e=>Reflect.getPrototypeOf(e);function Ye(e,t,n=!1,r=!1){const o=Mt(e=e.__v_raw),s=Mt(t);n||(t!==s&&Oe(o,0,t),Oe(o,0,s));const{has:i}=Ze(o),c=r?Je:n?It:At;return i.call(o,t)?c(e.get(t)):i.call(o,s)?c(e.get(s)):void(e!==o&&e.get(t))}function Qe(e,t=!1){const n=this.__v_raw,r=Mt(n),o=Mt(e);return t||(e!==o&&Oe(r,0,e),Oe(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Xe(e,t=!1){return e=e.__v_raw,!t&&Oe(Mt(e),0,_e),Reflect.get(e,"size",e)}function et(e){e=Mt(e);const t=Mt(this);return Ze(t).has.call(t,e)||(t.add(e),Pe(t,"add",e,e)),this}function tt(e,t){t=Mt(t);const n=Mt(this),{has:r,get:o}=Ze(n);let s=r.call(n,e);s||(e=Mt(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?ne(t,i)&&Pe(n,"set",e,t):Pe(n,"add",e,t),this}function nt(e){const t=Mt(this),{has:n,get:r}=Ze(t);let o=n.call(t,e);o||(e=Mt(e),o=n.call(t,e));r&&r.call(t,e);const s=t.delete(e);return o&&Pe(t,"delete",e,void 0),s}function rt(){const e=Mt(this),t=0!==e.size,n=e.clear();return t&&Pe(e,"clear",void 0,void 0),n}function ot(e,t){return function(n,r){const o=this,s=o.__v_raw,i=Mt(s),c=t?Je:e?It:At;return!e&&Oe(i,0,_e),s.forEach(((e,t)=>n.call(r,c(e),c(t),o)))}}function st(e,t,n){return function(...r){const o=this.__v_raw,s=Mt(o),i=$(s),c="entries"===e||e===Symbol.iterator&&i,l="keys"===e&&i,u=o[e](...r),a=n?Je:t?It:At;return!t&&Oe(s,0,l?Se:_e),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function it(e){return function(...t){return"delete"!==e&&this}}function ct(){const e={get(e){return Ye(this,e)},get size(){return Xe(this)},has:Qe,add:et,set:tt,delete:nt,clear:rt,forEach:ot(!1,!1)},t={get(e){return Ye(this,e,!1,!0)},get size(){return Xe(this)},has:Qe,add:et,set:tt,delete:nt,clear:rt,forEach:ot(!1,!0)},n={get(e){return Ye(this,e,!0)},get size(){return Xe(this,!0)},has(e){return Qe.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!1)},r={get(e){return Ye(this,e,!0,!0)},get size(){return Xe(this,!0)},has(e){return Qe.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=st(o,!1,!1),n[o]=st(o,!0,!1),t[o]=st(o,!1,!0),r[o]=st(o,!0,!0)})),[e,n,t,r]}const[lt,ut,at,ft]=ct();function pt(e,t){const n=t?e?ft:at:e?ut:lt;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(A(n,r)&&r in t?n:t,r,o)}const dt={get:pt(!1,!1)},ht={get:pt(!1,!0)},mt={get:pt(!0,!1)},gt={get:pt(!0,!0)};const vt=new WeakMap,yt=new WeakMap,bt=new WeakMap,_t=new WeakMap;function St(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>W(e).slice(8,-1))(e))}function xt(e){return Nt(e)?e:Et(e,!1,ze,dt,vt)}function Ct(e){return Et(e,!1,qe,ht,yt)}function wt(e){return Et(e,!0,Ke,mt,bt)}function kt(e){return Et(e,!0,Ge,gt,_t)}function Et(e,t,n,r,o){if(!U(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=St(e);if(0===i)return e;const c=new Proxy(e,2===i?r:n);return o.set(e,c),c}function Tt(e){return Nt(e)?Tt(e.__v_raw):!(!e||!e.__v_isReactive)}function Nt(e){return!(!e||!e.__v_isReadonly)}function Rt(e){return!(!e||!e.__v_isShallow)}function Ot(e){return Tt(e)||Nt(e)}function Mt(e){const t=e&&e.__v_raw;return t?Mt(t):e}function Pt(e){return oe(e,"__v_skip",!0),e}const At=e=>U(e)?xt(e):e,It=e=>U(e)?wt(e):e;function $t(e){Ee&&be&&Me((e=Mt(e)).dep||(e.dep=de()))}function Ft(e,t){(e=Mt(e)).dep&&Ae(e.dep)}function Vt(e){return!(!e||!0!==e.__v_isRef)}function Lt(e){return jt(e,!1)}function Bt(e){return jt(e,!0)}function jt(e,t){return Vt(e)?e:new Ut(e,t)}class Ut{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Mt(e),this._value=t?e:At(e)}get value(){return $t(this),this._value}set value(e){const t=this.__v_isShallow||Rt(e)||Nt(e);e=t?e:Mt(e),ne(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:At(e),Ft(this))}}function Dt(e){Ft(e)}function Ht(e){return Vt(e)?e.value:e}const Wt={get:(e,t,n)=>Ht(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Vt(o)&&!Vt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function zt(e){return Tt(e)?e:new Proxy(e,Wt)}class Kt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>$t(this)),(()=>Ft(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function qt(e){return new Kt(e)}function Gt(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=Zt(e,n);return t}class Jt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Zt(e,t,n){const r=e[t];return Vt(r)?r:new Jt(e,t,n)}var Yt;class Qt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[Yt]=!1,this._dirty=!0,this.effect=new xe(e,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=Mt(this);return $t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}Yt="__v_isReadonly";function Xt(e,...t){}function en(e,t,n,r){let o;try{o=r?e(...r):e()}catch(e){nn(e,t,n)}return o}function tn(e,t,n,r){if(L(e)){const o=en(e,t,n,r);return o&&D(o)&&o.catch((e=>{nn(e,t,n)})),o}const o=[];for(let s=0;s>>1;bn(sn[r])bn(e)-bn(t))),an=0;annull==e.id?1/0:e.id,_n=(e,t)=>{const n=bn(e)-bn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Sn(e){on=!1,rn=!0,sn.sort(_n);try{for(cn=0;cnxn.emit(e,...t))),Cn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{kn(e,t)})),setTimeout((()=>{xn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,wn=!0,Cn=[])}),3e3)}else wn=!0,Cn=[]}function En(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||C;let o=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in r){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=r[e]||C;s&&(o=n.map((e=>B(e)?e.trim():e))),t&&(o=n.map(se))}let c;let l=r[c=te(t)]||r[c=te(Y(t))];!l&&s&&(l=r[c=te(X(t))]),l&&tn(l,e,6,o);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,tn(u,e,6,o)}}function Tn(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(void 0!==o)return o;const s=e.emits;let i={},c=!1;if(!L(e)){const r=e=>{const n=Tn(e,t,!0);n&&(c=!0,O(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return s||c?(I(s)?s.forEach((e=>i[e]=null)):O(i,s),U(e)&&r.set(e,i),i):(U(e)&&r.set(e,null),null)}function Nn(e,t){return!(!e||!N(t))&&(t=t.slice(2).replace(/Once$/,""),A(e,t[0].toLowerCase()+t.slice(1))||A(e,X(t))||A(e,t))}let Rn=null,On=null;function Mn(e){const t=Rn;return Rn=e,On=e&&e.type.__scopeId||null,t}function Pn(e){On=e}function An(){On=null}const In=e=>$n;function $n(e,t=Rn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&ss(-1);const o=Mn(t);let s;try{s=e(...n)}finally{Mn(o),r._d&&ss(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:c,attrs:l,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=Mn(e);try{if(4&n.shapeFlag){const e=o||r;g=Cs(a.call(e,e,f,s,d,p,h)),v=l}else{const e=t;0,g=Cs(e.length>1?e(s,{attrs:l,slots:c,emit:u}):e(s,null)),v=t.props?l:Ln(l)}}catch(t){Xo.length=0,nn(t,e,1),g=gs(Yo)}let b=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(R)&&(v=Bn(v,i)),b=bs(b,v))}return n.dirs&&(b=bs(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,Mn(y),g}function Vn(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||N(n))&&((t||(t={}))[n]=e[n]);return t},Bn=(e,t)=>{const n={};for(const r in e)R(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function jn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;oe.__isSuspense,Hn={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,i,c,l,u){null==e?function(e,t,n,r,o,s,i,c,l){const{p:u,o:{createElement:a}}=l,f=a("div"),p=e.suspense=zn(e,o,r,t,f,n,s,i,c,l);u(null,p.pendingBranch=e.ssContent,f,null,r,p,s,i),p.deps>0?(Wn(e,"onPending"),Wn(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,i),Gn(p,e.ssFallback)):p.resolve()}(t,n,r,o,s,i,c,l,u):function(e,t,n,r,o,s,i,c,{p:l,um:u,o:{createElement:a}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=f;if(m)f.pendingBranch=p,as(p,m)?(l(m,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():g&&(l(h,d,n,r,o,null,s,i,c),Gn(f,d))):(f.pendingId++,v?(f.isHydrating=!1,f.activeBranch=m):u(m,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=a("div"),g?(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():(l(h,d,n,r,o,null,s,i,c),Gn(f,d))):h&&as(p,h)?(l(h,p,n,r,o,f,s,i,c),f.resolve(!0)):(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0&&f.resolve()));else if(h&&as(p,h))l(h,p,n,r,o,f,s,i,c),Gn(f,p);else if(Wn(t,"onPending"),f.pendingBranch=p,f.pendingId++,l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,r,o,i,c,l,u)},hydrate:function(e,t,n,r,o,s,i,c,l){const u=t.suspense=zn(t,r,n,e.parentNode,document.createElement("div"),null,o,s,i,c,!0),a=l(e,u.pendingBranch=t.ssContent,n,u,s,i);0===u.deps&&u.resolve();return a},create:zn,normalize:function(e){const{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=Kn(r?n.default:n),e.ssFallback=r?Kn(n.fallback):gs(Yo)}};function Wn(e,t){const n=e.props&&e.props[t];L(n)&&n()}function zn(e,t,n,r,o,s,i,c,l,u,a=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:g}}=u,v=se(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:r,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:a,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:r,pendingId:o,effects:s,parentComponent:i,container:c}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&r.transition&&"out-in"===r.transition.mode;e&&(n.transition.afterLeave=()=>{o===y.pendingId&&p(r,c,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||p(r,c,t,0)}Gn(y,r),y.pendingBranch=null,y.isInFallback=!1;let l=y.parent,u=!1;for(;l;){if(l.pendingBranch){l.effects.push(...s),u=!0;break}l=l.parent}u||gn(s),y.effects=[],Wn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:r,container:o,isSVG:s}=y;Wn(t,"onFallback");const i=h(n),u=()=>{y.isInFallback&&(f(null,e,o,i,r,null,s,c,l),Gn(y,e))},a=e.transition&&"out-in"===e.transition.mode;a&&(n.transition.afterLeave=u),y.isInFallback=!0,d(n,r,null,!0),a||u()},move(e,t,n){y.activeBranch&&p(y.activeBranch,e,t,n),y.container=e},next(){return y.activeBranch&&h(y.activeBranch)},registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{nn(t,e,0)})).then((o=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;js(e,o,!1),r&&(s.el=r);const c=!r&&e.subTree.el;t(e,s,m(r||e.subTree.el),r?null:h(e.subTree),y,i,l),c&&g(c),Un(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Kn(e){let t;if(L(e)){const n=os&&e._c;n&&(e._d=!1,ts()),e=e(),n&&(e._d=!0,t=es,ns())}if(I(e)){const t=Vn(e);0,e=t}return e=Cs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function qn(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):gn(e)}function Gn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,Un(r,o))}function Jn(e,t){if(Ms){let n=Ms.provides;const r=Ms.parent&&Ms.parent.provides;r===n&&(n=Ms.provides=Object.create(r)),n[e]=t}else 0}function Zn(e,t,n=!1){const r=Ms||Rn;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&L(t)?t.call(r.proxy):t}else 0}function Yn(e,t){return nr(e,null,t)}function Qn(e,t){return nr(e,null,{flush:"post"})}function Xn(e,t){return nr(e,null,{flush:"sync"})}const er={};function tr(e,t,n){return nr(e,t,n)}function nr(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=C){const c=Ms;let l,u,a=!1,f=!1;if(Vt(e)?(l=()=>e.value,a=Rt(e)):Tt(e)?(l=()=>e,r=!0):I(e)?(f=!0,a=e.some((e=>Tt(e)||Rt(e))),l=()=>e.map((e=>Vt(e)?e.value:Tt(e)?sr(e):L(e)?en(e,c,2):void 0))):l=L(e)?t?()=>en(e,c,2):()=>{if(!c||!c.isUnmounted)return u&&u(),tn(e,c,3,[d])}:k,t&&r){const e=l;l=()=>sr(e())}let p,d=e=>{u=v.onStop=()=>{en(e,c,4)}};if(Ls){if(d=k,t?n&&tn(t,c,3,[l(),f?[]:void 0,d]):l(),"sync"!==o)return k;{const e=ci();p=e.__watcherHandles||(e.__watcherHandles=[])}}let h=f?new Array(e.length).fill(er):er;const m=()=>{if(v.active)if(t){const e=v.run();(r||a||(f?e.some(((e,t)=>ne(e,h[t]))):ne(e,h)))&&(u&&u(),tn(t,c,3,[e,h===er?void 0:f&&h[0]===er?[]:h,d]),h=e)}else v.run()};let g;m.allowRecurse=!!t,"sync"===o?g=m:"post"===o?g=()=>Vo(m,c&&c.suspense):(m.pre=!0,c&&(m.id=c.uid),g=()=>hn(m));const v=new xe(l,g);t?n?m():h=v.run():"post"===o?Vo(v.run.bind(v),c&&c.suspense):v.run();const y=()=>{v.stop(),c&&c.scope&&M(c.scope.effects,v)};return p&&p.push(y),y}function rr(e,t,n){const r=this.proxy,o=B(e)?e.includes(".")?or(r,e):()=>r[e]:e.bind(r,r);let s;L(t)?s=t:(s=t.handler,n=t);const i=Ms;As(this);const c=nr(o,s.bind(r),n);return i?As(i):Is(),c}function or(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{sr(e,t)}));else if(z(e))for(const n in e)sr(e[n],t);return e}function ir(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Mr((()=>{e.isMounted=!0})),Ir((()=>{e.isUnmounting=!0})),e}const cr=[Function,Array],lr={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cr,onEnter:cr,onAfterEnter:cr,onEnterCancelled:cr,onBeforeLeave:cr,onLeave:cr,onAfterLeave:cr,onLeaveCancelled:cr,onBeforeAppear:cr,onAppear:cr,onAfterAppear:cr,onAppearCancelled:cr},setup(e,{slots:t}){const n=Ps(),r=ir();let o;return()=>{const s=t.default&&hr(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==Yo){0,i=t,e=!0;break}}const c=Mt(e),{mode:l}=c;if(r.isLeaving)return fr(i);const u=pr(i);if(!u)return fr(i);const a=ar(u,c,r,n);dr(u,a);const f=n.subTree,p=f&&pr(f);let d=!1;const{getTransitionKey:h}=u.type;if(h){const e=h();void 0===o?o=e:e!==o&&(o=e,d=!0)}if(p&&p.type!==Yo&&(!as(u,p)||d)){const e=ar(p,c,r,n);if(dr(p,e),"out-in"===l)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,!1!==n.update.active&&n.update()},fr(i);"in-out"===l&&u.type!==Yo&&(e.delayLeave=(e,t,n)=>{ur(r,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete a.delayedLeave},a.delayedLeave=n})}return i}}};function ur(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ar(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=ur(n,e),S=(e,t)=>{e&&tn(e,r,9,t)},x=(e,t)=>{const n=t[1];S(e,t),I(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let r=c;if(!n.isMounted){if(!o)return;r=m||c}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&as(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(r,[t])},enter(e){let t=l,r=u,s=a;if(!n.isMounted){if(!o)return;t=g||l,r=v||u,s=y||a}let i=!1;const c=e._enterCb=t=>{i||(i=!0,S(t?s:r,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,c]):c()},leave(t,r){const o=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();S(f,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,r(),S(n?h:d,[t]),t._leaveCb=void 0,_[o]===e&&delete _[o])};_[o]=e,p?x(p,[t,i]):i()},clone(e){return ar(e,t,n,r)}};return C}function fr(e){if(br(e))return(e=bs(e)).children=null,e}function pr(e){return br(e)?e.children?e.children[0]:void 0:e}function dr(e,t){6&e.shapeFlag&&e.component?dr(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hr(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let e=0;e!!e.type.__asyncLoader;function vr(e){L(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:c}=e;let l,u=null,a=0;const f=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((a++,u=null,f()))),(()=>n(e)),a+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return mr({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return l},setup(){const e=Ms;if(l)return()=>yr(l,e);const t=t=>{u=null,nn(t,e,13,!r)};if(i&&e.suspense||Ls)return f().then((t=>()=>yr(t,e))).catch((e=>(t(e),()=>r?gs(r,{error:e}):null)));const c=Lt(!1),a=Lt(),p=Lt(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=s&&setTimeout((()=>{if(!c.value&&!a.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),a.value=e}}),s),f().then((()=>{c.value=!0,e.parent&&br(e.parent.vnode)&&hn(e.parent.update)})).catch((e=>{t(e),a.value=e})),()=>c.value&&l?yr(l,e):a.value&&r?gs(r,{error:a.value}):n&&!p.value?gs(n):void 0}})}function yr(e,t){const{ref:n,props:r,children:o,ce:s}=t.vnode,i=gs(e,r,o);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const br=e=>e.type.__isKeepAlive,_r={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ps(),r=n.ctx;if(!r.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const o=new Map,s=new Set;let i=null;const c=n.suspense,{renderer:{p:l,m:u,um:a,o:{createElement:f}}}=r,p=f("div");function d(e){Er(e),a(e,n,c,!0)}function h(e){o.forEach(((t,n)=>{const r=Ks(t.type);!r||e&&e(r)||m(n)}))}function m(e){const t=o.get(e);i&&t.type===i.type?i&&Er(i):d(t),o.delete(e),s.delete(e)}r.activate=(e,t,n,r,o)=>{const s=e.component;u(e,t,n,0,c),l(s.vnode,e,t,n,s,c,r,e.slotScopeIds,o),Vo((()=>{s.isDeactivated=!1,s.a&&re(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Ts(t,s.parent,e)}),c)},r.deactivate=e=>{const t=e.component;u(e,p,null,1,c),Vo((()=>{t.da&&re(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Ts(n,t.parent,e),t.isDeactivated=!0}),c)},tr((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Sr(e,t))),t&&h((e=>!Sr(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,Tr(n.subTree))};return Mr(v),Ar(v),Ir((()=>{o.forEach((e=>{const{subTree:t,suspense:r}=n,o=Tr(t);if(e.type!==o.type)d(e);else{Er(o);const e=o.component.da;e&&Vo(e,r)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),r=n[0];if(n.length>1)return i=null,n;if(!(us(r)&&(4&r.shapeFlag||128&r.shapeFlag)))return i=null,r;let c=Tr(r);const l=c.type,u=Ks(gr(c)?c.type.__asyncResolved||{}:l),{include:a,exclude:f,max:p}=e;if(a&&(!u||!Sr(a,u))||f&&u&&Sr(f,u))return i=c,r;const d=null==c.key?l:c.key,h=o.get(d);return c.el&&(c=bs(c),128&r.shapeFlag&&(r.ssContent=c)),g=d,h?(c.el=h.el,c.component=h.component,c.transition&&dr(c,c.transition),c.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),c.shapeFlag|=256,i=c,Dn(r.type)?r:c}}};function Sr(e,t){return I(e)?e.some((e=>Sr(e,t))):B(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function xr(e,t){wr(e,"a",t)}function Cr(e,t){wr(e,"da",t)}function wr(e,t,n=Ms){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Nr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)br(e.parent.vnode)&&kr(r,t,n,e),e=e.parent}}function kr(e,t,n,r){const o=Nr(t,e,r,!0);$r((()=>{M(r[t],o)}),n)}function Er(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Tr(e){return 128&e.shapeFlag?e.ssContent:e}function Nr(e,t,n=Ms,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;Ne(),As(n);const o=tn(t,n,e,r);return Is(),Re(),o});return r?o.unshift(s):o.push(s),s}}const Rr=e=>(t,n=Ms)=>(!Ls||"sp"===e)&&Nr(e,((...e)=>t(...e)),n),Or=Rr("bm"),Mr=Rr("m"),Pr=Rr("bu"),Ar=Rr("u"),Ir=Rr("bum"),$r=Rr("um"),Fr=Rr("sp"),Vr=Rr("rtg"),Lr=Rr("rtc");function Br(e,t=Ms){Nr("ec",e,t)}function jr(e,t){const n=Rn;if(null===n)return e;const r=zs(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let e=0;et(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let r=0,i=n.length;r{const t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function Yr(e,t,n={},r,o){if(Rn.isCE||Rn.parent&&gr(Rn.parent)&&Rn.parent.isCE)return"default"!==t&&(n.name=t),gs("slot",n,r&&r());let s=e[t];s&&s._c&&(s._d=!1),ts();const i=s&&Qr(s(n)),c=ls(Jo,{key:n.key||i&&i.key||`_${t}`},i||(r?r():[]),i&&1===e._?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function Qr(e){return e.some((e=>!us(e)||e.type!==Yo&&!(e.type===Jo&&!Qr(e.children))))?e:null}function Xr(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:te(r)]=e[r];return n}const eo=e=>e?$s(e)?zs(e)||e.proxy:eo(e.parent):null,to=O(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>eo(e.parent),$root:e=>eo(e.root),$emit:e=>e.emit,$options:e=>uo(e),$forceUpdate:e=>e.f||(e.f=()=>hn(e.update)),$nextTick:e=>e.n||(e.n=dn.bind(e.proxy)),$watch:e=>rr.bind(e)}),no=(e,t)=>e!==C&&!e.__isScriptSetup&&A(e,t),ro={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:c,appContext:l}=e;let u;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(no(r,t))return i[t]=1,r[t];if(o!==C&&A(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&A(u,t))return i[t]=3,s[t];if(n!==C&&A(n,t))return i[t]=4,n[t];so&&(i[t]=0)}}const a=to[t];let f,p;return a?("$attrs"===t&&Oe(e,0,t),a(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==C&&A(n,t)?(i[t]=4,n[t]):(p=l.config.globalProperties,A(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return no(o,t)?(o[t]=n,!0):r!==C&&A(r,t)?(r[t]=n,!0):!A(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let c;return!!n[i]||e!==C&&A(e,i)||no(t,i)||(c=s[0])&&A(c,i)||A(r,i)||A(to,i)||A(o.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:A(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const oo=O({},ro,{get(e,t){if(t!==Symbol.unscopables)return ro.get(e,t,e)},has(e,t){return"_"!==t[0]&&!s(t)}});let so=!0;function io(e){const t=uo(e),n=e.proxy,r=e.ctx;so=!1,t.beforeCreate&&co(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:c,provide:l,inject:u,created:a,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:_,render:S,renderTracked:x,renderTriggered:C,errorCaptured:w,serverPrefetch:E,expose:T,inheritAttrs:N,components:R,directives:O,filters:M}=t;if(u&&function(e,t,n=k,r=!1){I(e)&&(e=ho(e));for(const n in e){const o=e[n];let s;s=U(o)?"default"in o?Zn(o.from||n,o.default,!0):Zn(o.from||n):Zn(o),Vt(s)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[n]=s}}(u,r,null,e.appContext.config.unwrapInjectedRef),i)for(const e in i){const t=i[e];L(t)&&(r[e]=t.bind(n))}if(o){0;const t=o.call(n,n);0,U(t)&&(e.data=xt(t))}if(so=!0,s)for(const e in s){const t=s[e],o=L(t)?t.bind(n,n):L(t.get)?t.get.bind(n,n):k;0;const i=!L(t)&&L(t.set)?t.set.bind(n):k,c=Gs({get:o,set:i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)lo(c[e],r,n,e);if(l){const e=L(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{Jn(t,e[t])}))}function P(e,t){I(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(a&&co(a,e,"c"),P(Or,f),P(Mr,p),P(Pr,d),P(Ar,h),P(xr,m),P(Cr,g),P(Br,w),P(Lr,x),P(Vr,C),P(Ir,y),P($r,_),P(Fr,E),I(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===k&&(e.render=S),null!=N&&(e.inheritAttrs=N),R&&(e.components=R),O&&(e.directives=O)}function co(e,t,n){tn(I(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function lo(e,t,n,r){const o=r.includes(".")?or(n,r):()=>n[r];if(B(e)){const n=t[e];L(n)&&tr(o,n)}else if(L(e))tr(o,e.bind(n));else if(U(e))if(I(e))e.forEach((e=>lo(e,t,n,r)));else{const r=L(e.handler)?e.handler.bind(n):t[e.handler];L(r)&&tr(o,r,e)}else 0}function uo(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let l;return c?l=c:o.length||n||r?(l={},o.length&&o.forEach((e=>ao(l,e,i,!0))),ao(l,t,i)):l=t,U(t)&&s.set(t,l),l}function ao(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&ao(e,s,n,!0),o&&o.forEach((t=>ao(e,t,n,!0)));for(const o in t)if(r&&"expose"===o);else{const r=fo[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const fo={data:po,props:go,emits:go,methods:go,computed:go,beforeCreate:mo,created:mo,beforeMount:mo,mounted:mo,beforeUpdate:mo,updated:mo,beforeDestroy:mo,beforeUnmount:mo,destroyed:mo,unmounted:mo,activated:mo,deactivated:mo,errorCaptured:mo,serverPrefetch:mo,components:go,directives:go,watch:function(e,t){if(!e)return t;if(!t)return e;const n=O(Object.create(null),e);for(const r in t)n[r]=mo(e[r],t[r]);return n},provide:po,inject:function(e,t){return go(ho(e),ho(t))}};function po(e,t){return t?e?function(){return O(L(e)?e.call(this,this):e,L(t)?t.call(this,this):t)}:t:e}function ho(e){if(I(e)){const t={};for(let n=0;n{l=!0;const[n,r]=bo(e,t,!0);O(i,n),r&&c.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!l)return U(e)&&r.set(e,w),w;if(I(s))for(let e=0;e-1,r[1]=n<0||e-1||A(r,"default"))&&c.push(t)}}}}const u=[i,c];return U(e)&&r.set(e,u),u}function _o(e){return"$"!==e[0]}function So(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function xo(e,t){return So(e)===So(t)}function Co(e,t){return I(t)?t.findIndex((t=>xo(t,e))):L(t)&&xo(t,e)?0:-1}const wo=e=>"_"===e[0]||"$stable"===e,ko=e=>I(e)?e.map(Cs):[Cs(e)],Eo=(e,t,n)=>{if(t._n)return t;const r=$n(((...e)=>ko(t(...e))),n);return r._c=!1,r},To=(e,t,n)=>{const r=e._ctx;for(const n in e){if(wo(n))continue;const o=e[n];if(L(o))t[n]=Eo(0,o,r);else if(null!=o){0;const e=ko(o);t[n]=()=>e}}},No=(e,t)=>{const n=ko(t);e.slots.default=()=>n};function Ro(){return{app:null,config:{isNativeTag:E,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Oo=0;function Mo(e,t){return function(n,r=null){L(n)||(n=Object.assign({},n)),null==r||U(r)||(r=null);const o=Ro(),s=new Set;let i=!1;const c=o.app={_uid:Oo++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:fi,get config(){return o.config},set config(e){0},use(e,...t){return s.has(e)||(e&&L(e.install)?(s.add(e),e.install(c,...t)):L(e)&&(s.add(e),e(c,...t))),c},mixin(e){return o.mixins.includes(e)||o.mixins.push(e),c},component(e,t){return t?(o.components[e]=t,c):o.components[e]},directive(e,t){return t?(o.directives[e]=t,c):o.directives[e]},mount(s,l,u){if(!i){0;const a=gs(n,r);return a.appContext=o,l&&t?t(a,s):e(a,s,u),i=!0,c._container=s,s.__vue_app__=c,zs(a.component)||a.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return o.provides[e]=t,c}};return c}}function Po(e,t,n,r,o=!1){if(I(e))return void e.forEach(((e,s)=>Po(e,t&&(I(t)?t[s]:t),n,r,o)));if(gr(r)&&!o)return;const s=4&r.shapeFlag?zs(r.component)||r.component.proxy:r.el,i=o?null:s,{i:c,r:l}=e;const u=t&&t.r,a=c.refs===C?c.refs={}:c.refs,f=c.setupState;if(null!=u&&u!==l&&(B(u)?(a[u]=null,A(f,u)&&(f[u]=null)):Vt(u)&&(u.value=null)),L(l))en(l,c,12,[i,a]);else{const t=B(l),r=Vt(l);if(t||r){const c=()=>{if(e.f){const n=t?A(f,l)?f[l]:a[l]:l.value;o?I(n)&&M(n,s):I(n)?n.includes(s)||n.push(s):t?(a[l]=[s],A(f,l)&&(f[l]=a[l])):(l.value=[s],e.k&&(a[e.k]=l.value))}else t?(a[l]=i,A(f,l)&&(f[l]=i)):r&&(l.value=i,e.k&&(a[e.k]=i))};i?(c.id=-1,Vo(c,n)):c()}else 0}}let Ao=!1;const Io=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,$o=e=>8===e.nodeType;function Fo(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:c,insert:l,createComment:u}}=e,a=(n,r,c,u,g,v=!1)=>{const y=$o(n)&&"["===n.data,b=()=>h(n,r,c,u,g,y),{type:_,ref:S,shapeFlag:x,patchFlag:C}=r;let w=n.nodeType;r.el=n,-2===C&&(v=!1,r.dynamicChildren=null);let k=null;switch(_){case Zo:3!==w?""===r.children?(l(r.el=o(""),i(n),n),k=n):k=b():(n.data!==r.children&&(Ao=!0,n.data=r.children),k=s(n));break;case Yo:k=8!==w||y?b():s(n);break;case Qo:if(y&&(w=(n=s(n)).nodeType),1===w||3===w){k=n;const e=!r.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:l,props:u,patchFlag:a,shapeFlag:f,dirs:d}=t,h="input"===l&&d||"option"===l;if(h||-1!==a){if(d&&Ur(t,null,n,"created"),u)if(h||!i||48&a)for(const t in u)(h&&t.endsWith("value")||N(t)&&!q(t))&&r(e,t,null,u[t],!1,void 0,n);else u.onClick&&r(e,"onClick",null,u.onClick,!1,void 0,n);let l;if((l=u&&u.onVnodeBeforeMount)&&Ts(l,n,t),d&&Ur(t,null,n,"beforeMount"),((l=u&&u.onVnodeMounted)||d)&&qn((()=>{l&&Ts(l,n,t),d&&Ur(t,null,n,"mounted")}),o),16&f&&(!u||!u.innerHTML&&!u.textContent)){let r=p(e.firstChild,t,e,n,o,s,i);for(;r;){Ao=!0;const e=r;r=r.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(Ao=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,r,o,s,i,c)=>{c=c||!!t.dynamicChildren;const l=t.children,u=l.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(o=o?o.concat(a):a);const f=i(e),d=p(s(e),t,f,n,r,o,c);return d&&$o(d)&&"]"===d.data?s(t.anchor=d):(Ao=!0,l(t.anchor=u("]"),f,d),d)},h=(e,t,r,o,l,u)=>{if(Ao=!0,t.el=null,u){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const a=s(e),f=i(e);return c(e),n(null,t,f,a,r,o,Io(f),l),a},m=e=>{let t=0;for(;e;)if((e=s(e))&&$o(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),yn(),void(t._vnode=e);Ao=!1,a(t.firstChild,e,null,null,null),yn(),t._vnode=e,Ao&&console.error("Hydration completed but contains mismatches.")},a]}const Vo=qn;function Lo(e){return jo(e)}function Bo(e){return jo(e,Fo)}function jo(e,t){(ie||(ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{})).__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:c,createComment:l,setText:u,setElementText:a,parentNode:f,nextSibling:p,setScopeId:d=k,insertStaticContent:h}=e,m=(e,t,n,r=null,o=null,s=null,i=!1,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!as(e,t)&&(r=G(e),D(e,o,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Zo:g(e,t,n,r);break;case Yo:v(e,t,n,r);break;case Qo:null==e&&y(t,n,r,i);break;case Jo:M(e,t,n,r,o,s,i,c,l);break;default:1&f?_(e,t,n,r,o,s,i,c,l):6&f?P(e,t,n,r,o,s,i,c,l):(64&f||128&f)&&u.process(e,t,n,r,o,s,i,c,l,Z)}null!=a&&o&&Po(a,e&&e.ref,s,t||e,!t)},g=(e,t,n,o)=>{if(null==e)r(t.el=c(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},v=(e,t,n,o)=>{null==e?r(t.el=l(t.children||""),n,o):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=h(e.children,t,n,r,e.el,e.anchor)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),o(e),e=n;o(t)},_=(e,t,n,r,o,s,i,c,l)=>{i=i||"svg"===t.type,null==e?S(t,n,r,o,s,i,c,l):T(e,t,o,s,i,c,l)},S=(e,t,n,o,c,l,u,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:v,dirs:y}=e;if(p=e.el=i(e.type,l,m&&m.is,m),8&g?a(p,e.children):16&g&&E(e.children,p,null,o,c,l&&"foreignObject"!==h,u,f),y&&Ur(e,null,o,"created"),m){for(const t in m)"value"===t||q(t)||s(p,t,null,m[t],l,e.children,o,c,K);"value"in m&&s(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&Ts(d,o,e)}x(p,e,e.scopeId,u,o),y&&Ur(e,null,o,"beforeMount");const b=(!c||c&&!c.pendingBranch)&&v&&!v.persisted;b&&v.beforeEnter(p),r(p,t,n),((d=m&&m.onVnodeMounted)||b||y)&&Vo((()=>{d&&Ts(d,o,e),b&&v.enter(p),y&&Ur(e,null,o,"mounted")}),c)},x=(e,t,n,r,o)=>{if(n&&d(e,n),r)for(let t=0;t{for(let u=l;u{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const d=e.props||C,h=t.props||C;let m;n&&Uo(n,!1),(m=h.onVnodeBeforeUpdate)&&Ts(m,n,t,e),p&&Ur(t,e,n,"beforeUpdate"),n&&Uo(n,!0);const g=o&&"foreignObject"!==t.type;if(f?N(e.dynamicChildren,f,l,n,r,g,i):c||L(e,t,l,null,n,r,g,i,!1),u>0){if(16&u)R(l,t,d,h,n,r,o);else if(2&u&&d.class!==h.class&&s(l,"class",null,h.class,o),4&u&&s(l,"style",d.style,h.style,o),8&u){const i=t.dynamicProps;for(let t=0;t{m&&Ts(m,n,t,e),p&&Ur(t,e,n,"updated")}),r)},N=(e,t,n,r,o,s,i)=>{for(let c=0;c{if(n!==r){if(n!==C)for(const l in n)q(l)||l in r||s(e,l,n[l],null,c,t.children,o,i,K);for(const l in r){if(q(l))continue;const u=r[l],a=n[l];u!==a&&"value"!==l&&s(e,l,a,u,c,t.children,o,i,K)}"value"in r&&s(e,"value",n.value,r.value)}},M=(e,t,n,o,s,i,l,u,a)=>{const f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(u=u?u.concat(m):m),null==e?(r(f,n,o),r(p,n,o),E(t.children,n,p,s,i,l,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,n,s,i,l,u),(null!=t.key||s&&t===s.subTree)&&Do(e,t,!0)):L(e,t,n,p,s,i,l,u,a)},P=(e,t,n,r,o,s,i,c,l)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,i,l):I(t,n,r,o,s,i,l):$(e,t,l)},I=(e,t,n,r,o,s,i)=>{const c=e.component=Os(e,r,o);if(br(e)&&(c.ctx.renderer=Z),Bs(c),c.asyncDep){if(o&&o.registerDep(c,F),!e.el){const e=c.subTree=gs(Yo);v(null,e,t,n)}}else F(c,e,t,n,o,s,i)},$=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:c,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!c||c&&c.$stable)||r!==i&&(r?!i||jn(r,i,u):!!i);if(1024&l)return!0;if(16&l)return r?jn(r,i,u):!!i;if(8&l){const e=t.dynamicProps;for(let t=0;tcn&&sn.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},F=(e,t,n,r,o,s,i)=>{const c=e.effect=new xe((()=>{if(e.isMounted){let t,{next:n,bu:r,u:c,parent:l,vnode:u}=e,a=n;0,Uo(e,!1),n?(n.el=u.el,V(e,n,i)):n=u,r&&re(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Ts(t,l,n,u),Uo(e,!0);const p=Fn(e);0;const d=e.subTree;e.subTree=p,m(d,p,f(d.el),G(d),e,o,s),n.el=p.el,null===a&&Un(e,p.el),c&&Vo(c,o),(t=n.props&&n.props.onVnodeUpdated)&&Vo((()=>Ts(t,l,n,u)),o)}else{let i;const{el:c,props:l}=t,{bm:u,m:a,parent:f}=e,p=gr(t);if(Uo(e,!1),u&&re(u),!p&&(i=l&&l.onVnodeBeforeMount)&&Ts(i,f,t),Uo(e,!0),c&&ee){const n=()=>{e.subTree=Fn(e),ee(c,e.subTree,e,o,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{0;const i=e.subTree=Fn(e);0,m(null,i,n,r,e,o,s),t.el=i.el}if(a&&Vo(a,o),!p&&(i=l&&l.onVnodeMounted)){const e=t;Vo((()=>Ts(i,f,e)),o)}(256&t.shapeFlag||f&&gr(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&Vo(e.a,o),e.isMounted=!0,t=n=r=null}}),(()=>hn(l)),e.scope),l=e.update=()=>c.run();l.id=e.uid,Uo(e,!0),l()},V=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,c=Mt(o),[l]=e.propsOptions;let u=!1;if(!(r||i>0)||16&i){let r;vo(e,t,o,s)&&(u=!0);for(const s in c)t&&(A(t,s)||(r=X(s))!==s&&A(t,r))||(l?!n||void 0===n[s]&&void 0===n[r]||(o[s]=yo(l,c,s,void 0,e,!0)):delete o[s]);if(s!==c)for(const e in s)t&&A(t,e)||(delete s[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r{const{vnode:r,slots:o}=e;let s=!0,i=C;if(32&r.shapeFlag){const e=t._;e?n&&1===e?s=!1:(O(o,t),n||1!==e||delete o._):(s=!t.$stable,To(t,o)),i=t}else t&&(No(e,t),i={default:1});if(s)for(const e in o)wo(e)||e in i||delete o[e]})(e,t.children,n),Ne(),vn(),Re()},L=(e,t,n,r,o,s,i,c,l=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void j(u,p,n,r,o,s,i,c,l);if(256&d)return void B(u,p,n,r,o,s,i,c,l)}8&h?(16&f&&K(u,o,s),p!==u&&a(n,p)):16&f?16&h?j(u,p,n,r,o,s,i,c,l):K(u,o,s,!0):(8&f&&a(n,""),16&h&&E(p,n,r,o,s,i,c,l))},B=(e,t,n,r,o,s,i,c,l)=>{t=t||w;const u=(e=e||w).length,a=t.length,f=Math.min(u,a);let p;for(p=0;pa?K(e,o,s,!0,!1,f):E(t,n,r,o,s,i,c,l,f)},j=(e,t,n,r,o,s,i,c,l)=>{let u=0;const a=t.length;let f=e.length-1,p=a-1;for(;u<=f&&u<=p;){const r=e[u],a=t[u]=l?ws(t[u]):Cs(t[u]);if(!as(r,a))break;m(r,a,n,null,o,s,i,c,l),u++}for(;u<=f&&u<=p;){const r=e[f],u=t[p]=l?ws(t[p]):Cs(t[p]);if(!as(r,u))break;m(r,u,n,null,o,s,i,c,l),f--,p--}if(u>f){if(u<=p){const e=p+1,f=ep)for(;u<=f;)D(e[u],o,s,!0),u++;else{const d=u,h=u,g=new Map;for(u=h;u<=p;u++){const e=t[u]=l?ws(t[u]):Cs(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const b=p-h+1;let _=!1,S=0;const x=new Array(b);for(u=0;u=b){D(r,o,s,!0);continue}let a;if(null!=r.key)a=g.get(r.key);else for(v=h;v<=p;v++)if(0===x[v-h]&&as(r,t[v])){a=v;break}void 0===a?D(r,o,s,!0):(x[a-h]=u+1,a>=S?S=a:_=!0,m(r,t[a],n,null,o,s,i,c,l),y++)}const C=_?function(e){const t=e.slice(),n=[0];let r,o,s,i,c;const l=e.length;for(r=0;r>1,e[n[c]]0&&(t[r]=n[s-1]),n[s]=r)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(x):w;for(v=C.length-1,u=b-1;u>=0;u--){const e=h+u,f=t[e],p=e+1{const{el:i,type:c,transition:l,children:u,shapeFlag:a}=e;if(6&a)return void U(e.component.subTree,t,n,o);if(128&a)return void e.suspense.move(t,n,o);if(64&a)return void c.move(e,t,n,Z);if(c===Jo){r(i,t,n);for(let e=0;e{let s;for(;e&&e!==t;)s=p(e),r(e,n,o),e=s;r(t,n,o)})(e,t,n);if(2!==o&&1&a&&l)if(0===o)l.beforeEnter(i),r(i,t,n),Vo((()=>l.enter(i)),s);else{const{leave:e,delayLeave:o,afterLeave:s}=l,c=()=>r(i,t,n),u=()=>{e(i,(()=>{c(),s&&s()}))};o?o(i,c,u):u()}else r(i,t,n)},D=(e,t,n,r=!1,o=!1)=>{const{type:s,props:i,ref:c,children:l,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=c&&Po(c,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p,h=!gr(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Ts(m,t,e),6&a)z(e.component,n,r);else{if(128&a)return void e.suspense.unmount(n,r);d&&Ur(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,o,Z,r):u&&(s!==Jo||f>0&&64&f)?K(u,t,n,!1,!0):(s===Jo&&384&f||!o&&16&a)&&K(l,t,n),r&&H(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&Vo((()=>{m&&Ts(m,t,e),d&&Ur(e,null,t,"unmounted")}),n)},H=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===Jo)return void W(n,r);if(t===Qo)return void b(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:r}=s,o=()=>t(n,i);r?r(e.el,i,o):o()}else i()},W=(e,t)=>{let n;for(;e!==t;)n=p(e),o(e),e=n;o(t)},z=(e,t,n)=>{const{bum:r,scope:o,update:s,subTree:i,um:c}=e;r&&re(r),o.stop(),s&&(s.active=!1,D(i,e,t,n)),c&&Vo(c,t),Vo((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},K=(e,t,n,r=!1,o=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?G(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),J=(e,t,n)=>{null==e?t._vnode&&D(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),vn(),yn(),t._vnode=e},Z={p:m,um:D,m:U,r:H,mt:I,mc:E,pc:L,pbc:N,n:G,o:e};let Q,ee;return t&&([Q,ee]=t(Z)),{render:J,hydrate:Q,createApp:Mo(J,Q)}}function Uo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Do(e,t,n=!1){const r=e.children,o=t.children;if(I(r)&&I(o))for(let e=0;ee&&(e.disabled||""===e.disabled),Wo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,zo=(e,t)=>{const n=e&&e.to;if(B(n)){if(t){const e=t(n);return e}return null}return n};function Ko(e,t,n,{o:{insert:r},m:o},s=2){0===s&&r(e.targetAnchor,t,n);const{el:i,anchor:c,shapeFlag:l,children:u,props:a}=e,f=2===s;if(f&&r(i,t,n),(!f||Ho(a))&&16&l)for(let e=0;e{16&y&&a(b,e,t,o,s,i,c,l)};v?g(n,u):f&&g(f,p)}else{t.el=e.el;const r=t.anchor=e.anchor,a=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Ho(e.props),g=m?n:a,y=m?r:d;if(i=i||Wo(a),_?(p(e.dynamicChildren,_,g,o,s,i,c),Do(e,t,!0)):l||f(e,t,g,y,o,s,i,c,!1),v)m||Ko(t,n,r,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=zo(t.props,h);e&&Ko(t,e,null,u,0)}else m&&Ko(t,a,d,u,1)}Go(t)},remove(e,t,n,r,{um:o,o:{remove:s}},i){const{shapeFlag:c,children:l,anchor:u,targetAnchor:a,target:f,props:p}=e;if(f&&s(a),(i||!Ho(p))&&(s(u),16&c))for(let e=0;e0?es||w:null,ns(),os>0&&es&&es.push(e),e}function cs(e,t,n,r,o,s){return is(ms(e,t,n,r,o,s,!0))}function ls(e,t,n,r,o){return is(gs(e,t,n,r,o,!0))}function us(e){return!!e&&!0===e.__v_isVNode}function as(e,t){return e.type===t.type&&e.key===t.key}function fs(e){rs=e}const ps="__vInternal",ds=({key:e})=>null!=e?e:null,hs=({ref:e,ref_key:t,ref_for:n})=>null!=e?B(e)||Vt(e)||L(e)?{i:Rn,r:e,k:t,f:!!n}:e:null;function ms(e,t=null,n=null,r=0,o=null,s=(e===Jo?0:1),i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ds(t),ref:t&&hs(t),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Rn};return c?(ks(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=B(n)?8:16),os>0&&!i&&es&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&es.push(l),l}const gs=vs;function vs(e,t=null,n=null,r=0,o=null,s=!1){if(e&&e!==Wr||(e=Yo),us(e)){const r=bs(e,t,!0);return n&&ks(r,n),os>0&&!s&&es&&(6&r.shapeFlag?es[es.indexOf(e)]=r:es.push(r)),r.patchFlag|=-2,r}if(qs(e)&&(e=e.__vccOpts),t){t=ys(t);let{class:e,style:n}=t;e&&!B(e)&&(t.class=f(e)),U(n)&&(Ot(n)&&!I(n)&&(n=O({},n)),t.style=i(n))}return ms(e,t,n,r,o,B(e)?1:Dn(e)?128:(e=>e.__isTeleport)(e)?64:U(e)?4:L(e)?2:0,s,!0)}function ys(e){return e?Ot(e)||ps in e?O({},e):e:null}function bs(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,c=t?Es(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ds(c),ref:t&&t.ref?n&&o?I(o)?o.concat(hs(t)):[o,hs(t)]:hs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Jo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bs(e.ssContent),ssFallback:e.ssFallback&&bs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx}}function _s(e=" ",t=0){return gs(Zo,null,e,t)}function Ss(e,t){const n=gs(Qo,null,e);return n.staticCount=t,n}function xs(e="",t=!1){return t?(ts(),ls(Yo,null,e)):gs(Yo,null,e)}function Cs(e){return null==e||"boolean"==typeof e?gs(Yo):I(e)?gs(Jo,null,e.slice()):"object"==typeof e?ws(e):gs(Zo,null,String(e))}function ws(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:bs(e)}function ks(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(I(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),ks(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||ps in t?3===r&&Rn&&(1===Rn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Rn}}else L(t)?(t={default:t,_ctx:Rn},n=32):(t=String(t),64&r?(n=16,t=[_s(t)]):n=8);e.children=t,e.shapeFlag|=n}function Es(...e){const t={};for(let n=0;nMs||Rn,As=e=>{Ms=e,e.scope.on()},Is=()=>{Ms&&Ms.scope.off(),Ms=null};function $s(e){return 4&e.vnode.shapeFlag}let Fs,Vs,Ls=!1;function Bs(e,t=!1){Ls=t;const{props:n,children:r}=e.vnode,o=$s(e);!function(e,t,n,r=!1){const o={},s={};oe(s,ps,1),e.propsDefaults=Object.create(null),vo(e,t,o,s);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:Ct(o):e.type.props?e.props=o:e.props=s,e.attrs=s}(e,n,o,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Mt(t),oe(t,"_",n)):To(t,e.slots={})}else e.slots={},t&&No(e,t);oe(e.slots,ps,1)})(e,r);const s=o?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=Pt(new Proxy(e.ctx,ro)),!1;const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?Ws(e):null;As(e),Ne();const o=en(r,e,0,[e.props,n]);if(Re(),Is(),D(o)){if(o.then(Is,Is),t)return o.then((n=>{js(e,n,t)})).catch((t=>{nn(t,e,0)}));e.asyncDep=o}else js(e,o,t)}else Hs(e,t)}(e,t):void 0;return Ls=!1,s}function js(e,t,n){L(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:U(t)&&(e.setupState=zt(t)),Hs(e,n)}function Us(e){Fs=e,Vs=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,oo))}}const Ds=()=>!Fs;function Hs(e,t,n){const r=e.type;if(!e.render){if(!t&&Fs&&!r.render){const t=r.template||uo(e).template;if(t){0;const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,c=O(O({isCustomElement:n,delimiters:s},o),i);r.render=Fs(t,c)}}e.render=r.render||k,Vs&&Vs(e)}As(e),Ne(),io(e),Re(),Is()}function Ws(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get(t,n){return Oe(e,0,"$attrs"),t[n]}})}(e))},slots:e.slots,emit:e.emit,expose:t}}function zs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(zt(Pt(e.exposed)),{get(t,n){return n in t?t[n]:n in to?to[n](e):void 0},has(e,t){return t in e||t in to}}))}function Ks(e,t=!0){return L(e)?e.displayName||e.name:e.name||t&&e.__name}function qs(e){return L(e)&&"__vccOpts"in e}const Gs=(e,t)=>function(e,t,n=!1){let r,o;const s=L(e);return s?(r=e,o=k):(r=e.get,o=e.set),new Qt(r,o,s||!o,n)}(e,0,Ls);function Js(){return null}function Zs(){return null}function Ys(e){0}function Qs(e,t){return null}function Xs(){return ti().slots}function ei(){return ti().attrs}function ti(){const e=Ps();return e.setupContext||(e.setupContext=Ws(e))}function ni(e,t){const n=I(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const e in t){const r=n[e];r?I(r)||L(r)?n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(n[e]={default:t[e]})}return n}function ri(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function oi(e){const t=Ps();let n=e();return Is(),D(n)&&(n=n.catch((e=>{throw As(t),e}))),[n,()=>As(t)]}function si(e,t,n){const r=arguments.length;return 2===r?U(t)&&!I(t)?us(t)?gs(e,null,[t]):gs(e,t):gs(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&us(n)&&(n=[n]),gs(e,t,n))}const ii=Symbol(""),ci=()=>{{const e=Zn(ii);return e}};function li(){return void 0}function ui(e,t,n,r){const o=n[r];if(o&&ai(o,e))return o;const s=t();return s.memo=e.slice(),n[r]=s}function ai(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&es&&es.push(e),!0}const fi="3.2.45",pi={createComponentInstance:Os,setupComponent:Bs,renderComponentRoot:Fn,setCurrentRenderingInstance:Mn,isVNode:us,normalizeVNode:Cs},di=null,hi=null,mi="undefined"!=typeof document?document:null,gi=mi&&mi.createElement("template"),vi={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?mi.createElementNS("http://www.w3.org/2000/svg",e):mi.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>mi.createTextNode(e),createComment:e=>mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==s&&(o=o.nextSibling););else{gi.innerHTML=r?`${e}`:e;const o=gi.content;if(r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const yi=/\s*!important$/;function bi(e,t,n){if(I(n))n.forEach((n=>bi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=Si[t];if(n)return n;let r=Y(t);if("filter"!==r&&r in e)return Si[t]=r;r=ee(r);for(let n=0;n<_i.length;n++){const o=_i[n]+r;if(o in e)return Si[t]=o}return t}(e,t);yi.test(n)?e.setProperty(X(r),n.replace(yi,""),"important"):e[r]=n}}const _i=["Webkit","Moz","ms"],Si={};const xi="http://www.w3.org/1999/xlink";function Ci(e,t,n,r){e.addEventListener(t,n,r)}function wi(e,t,n,r,o=null){const s=e._vei||(e._vei={}),i=s[t];if(r&&i)i.value=r;else{const[n,c]=function(e){let t;if(ki.test(e)){let n;for(t={};n=e.match(ki);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):X(e.slice(2));return[n,t]}(t);if(r){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tn(function(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Ei||(Ti.then((()=>Ei=0)),Ei=Date.now()))(),n}(r,o);Ci(e,n,i,c)}else i&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,i,c),s[t]=void 0)}}const ki=/(?:Once|Passive|Capture)$/;let Ei=0;const Ti=Promise.resolve();const Ni=/^on[a-z]/;function Ri(e,t){const n=mr(e);class r extends Pi{constructor(e){super(n,e,t)}}return r.def=n,r}const Oi=e=>Ri(e,Ic),Mi="undefined"!=typeof HTMLElement?HTMLElement:class{};class Pi extends Mi{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,dn((()=>{this._connected||(Ac(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:r}=e;let o;if(n&&!I(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=se(this._props[e])),(o||(o=Object.create(null)))[Y(e)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(r),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=I(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e],!0,!1);for(const e of n.map(Y))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t)}})}_setAttr(e){let t=this.getAttribute(e);const n=Y(e);this._numberProps&&this._numberProps[n]&&(t=se(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!0){t!==this._props[e]&&(this._props[e]=t,r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(X(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(X(e),t+""):t||this.removeAttribute(X(e))))}_update(){Ac(this._createVNode(),this.shadowRoot)}_createVNode(){const e=gs(this._def,O({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),X(e)!==e&&t(X(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Pi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ai(e="$style"){{const t=Ps();if(!t)return C;const n=t.type.__cssModules;if(!n)return C;const r=n[e];return r||C}}function Ii(e){const t=Ps();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Fi(e,n)))},r=()=>{const r=e(t.proxy);$i(t.subTree,r),n(r)};Qn(r),Mr((()=>{const e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),$r((()=>e.disconnect()))}))}function $i(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{$i(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Fi(e.el,t);else if(e.type===Jo)e.children.forEach((e=>$i(e,t)));else if(e.type===Qo){let{el:n,anchor:r}=e;for(;n&&(Fi(n,t),n!==r);)n=n.nextSibling}}function Fi(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Vi="transition",Li="animation",Bi=(e,{slots:t})=>si(lr,Wi(e),t);Bi.displayName="Transition";const ji={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ui=Bi.props=O({},lr.props,ji),Di=(e,t=[])=>{I(e)?e.forEach((e=>e(...t))):e&&e(...t)},Hi=e=>!!e&&(I(e)?e.some((e=>e.length>1)):e.length>1);function Wi(e){const t={};for(const n in e)n in ji||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:a=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(U(e))return[zi(e.enter),zi(e.leave)];{const t=zi(e);return[t,t]}}(o),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:_,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:C=y,onAppearCancelled:w=b}=t,k=(e,t,n)=>{qi(e,t?a:c),qi(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,qi(e,f),qi(e,d),qi(e,p),t&&t()},T=e=>(t,n)=>{const o=e?C:y,i=()=>k(t,e,n);Di(o,[t,i]),Gi((()=>{qi(t,e?l:s),Ki(t,e?a:c),Hi(o)||Zi(t,r,m,i)}))};return O(t,{onBeforeEnter(e){Di(v,[e]),Ki(e,s),Ki(e,i)},onBeforeAppear(e){Di(x,[e]),Ki(e,l),Ki(e,u)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Ki(e,f),ec(),Ki(e,p),Gi((()=>{e._isLeaving&&(qi(e,f),Ki(e,d),Hi(_)||Zi(e,r,g,n))})),Di(_,[e,n])},onEnterCancelled(e){k(e,!1),Di(b,[e])},onAppearCancelled(e){k(e,!0),Di(w,[e])},onLeaveCancelled(e){E(e),Di(S,[e])}})}function zi(e){return se(e)}function Ki(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function qi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Gi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ji=0;function Zi(e,t,n,r){const o=e._endId=++Ji,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:c,propCount:l}=Yi(e,t);if(!i)return r();const u=i+"end";let a=0;const f=()=>{e.removeEventListener(u,p),s()},p=t=>{t.target===e&&++a>=l&&f()};setTimeout((()=>{a(n[e]||"").split(", "),o=r(`${Vi}Delay`),s=r(`${Vi}Duration`),i=Qi(o,s),c=r(`${Li}Delay`),l=r(`${Li}Duration`),u=Qi(c,l);let a=null,f=0,p=0;t===Vi?i>0&&(a=Vi,f=i,p=s.length):t===Li?u>0&&(a=Li,f=u,p=l.length):(f=Math.max(i,u),a=f>0?i>u?Vi:Li:null,p=a?a===Vi?s.length:l.length:0);return{type:a,timeout:f,propCount:p,hasTransform:a===Vi&&/\b(transform|all)(,|$)/.test(r(`${Vi}Property`).toString())}}function Qi(e,t){for(;e.lengthXi(t)+Xi(e[n]))))}function Xi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function ec(){return document.body.offsetHeight}const tc=new WeakMap,nc=new WeakMap,rc={name:"TransitionGroup",props:O({},Ui,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ps(),r=ir();let o,s;return Ar((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&r.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&r.classList.add(e))),r.style.display="none";const o=1===t.nodeType?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=Yi(r);return o.removeChild(r),s}(o[0].el,n.vnode.el,t))return;o.forEach(oc),o.forEach(sc);const r=o.filter(ic);ec(),r.forEach((e=>{const n=e.el,r=n.style;Ki(n,t),r.transform=r.webkitTransform=r.transitionDuration="";const o=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n._moveCb=null,qi(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=Mt(e),c=Wi(i);let l=i.tag||Jo;o=s,s=t.default?hr(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return I(t)?e=>re(t,e):t};function lc(e){e.target.composing=!0}function uc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ac={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e._assign=cc(o);const s=r||o.props&&"number"===o.props.type;Ci(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),s&&(r=se(r)),e._assign(r)})),n&&Ci(e,"change",(()=>{e.value=e.value.trim()})),t||(Ci(e,"compositionstart",lc),Ci(e,"compositionend",uc),Ci(e,"change",uc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},s){if(e._assign=cc(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===t)return;if((o||"number"===e.type)&&se(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},fc={deep:!0,created(e,t,n){e._assign=cc(n),Ci(e,"change",(()=>{const t=e._modelValue,n=gc(e),r=e.checked,o=e._assign;if(I(t)){const e=_(t,n),s=-1!==e;if(r&&!s)o(t.concat(n));else if(!r&&s){const n=[...t];n.splice(e,1),o(n)}}else if(F(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(vc(e,r))}))},mounted:pc,beforeUpdate(e,t,n){e._assign=cc(n),pc(e,t,n)}};function pc(e,{value:t,oldValue:n},r){e._modelValue=t,I(t)?e.checked=_(t,r.props.value)>-1:F(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=b(t,vc(e,!0)))}const dc={created(e,{value:t},n){e.checked=b(t,n.props.value),e._assign=cc(n),Ci(e,"change",(()=>{e._assign(gc(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=cc(r),t!==n&&(e.checked=b(t,r.props.value))}},hc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=F(t);Ci(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?se(gc(e)):gc(e)));e._assign(e.multiple?o?new Set(t):t:t[0])})),e._assign=cc(r)},mounted(e,{value:t}){mc(e,t)},beforeUpdate(e,t,n){e._assign=cc(n)},updated(e,{value:t}){mc(e,t)}};function mc(e,t){const n=e.multiple;if(!n||I(t)||F(t)){for(let r=0,o=e.options.length;r-1:o.selected=t.has(s);else if(b(gc(o),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function gc(e){return"_value"in e?e._value:e.value}function vc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const yc={created(e,t,n){_c(e,t,n,null,"created")},mounted(e,t,n){_c(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){_c(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){_c(e,t,n,r,"updated")}};function bc(e,t){switch(e){case"SELECT":return hc;case"TEXTAREA":return ac;default:switch(t){case"checkbox":return fc;case"radio":return dc;default:return ac}}}function _c(e,t,n,r,o){const s=bc(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}const Sc=["ctrl","shift","alt","meta"],xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Sc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Cc=(e,t)=>(n,...r)=>{for(let e=0;en=>{if(!("key"in n))return;const r=X(n.key);return t.some((e=>e===r||wc[e]===r))?e(n):void 0},Ec={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Tc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Tc(e,!0),r.enter(e)):r.leave(e,(()=>{Tc(e,!1)})):Tc(e,t))},beforeUnmount(e,{value:t}){Tc(e,t)}};function Tc(e,t){e.style.display=t?e._vod:"none"}const Nc=O({patchProp:(e,t,n,r,o=!1,s,i,c,l)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,o):"style"===t?function(e,t,n){const r=e.style,o=B(n);if(n&&!o){for(const e in n)bi(r,e,n[e]);if(t&&!B(t))for(const e in t)null==n[e]&&bi(r,e,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}(e,n,r):N(t)?R(t)||wi(e,t,0,r,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&Ni.test(t)&&L(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Ni.test(t)&&B(n))return!1;return t in e}(e,t,r,o))?function(e,t,n,r,o,s,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,o,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=y(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(e){}c&&e.removeAttribute(t)}(e,t,r,s,i,c,l):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(xi,t.slice(6,t.length)):e.setAttributeNS(xi,t,n);else{const r=v(t);null==n||r&&!y(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,o))}},vi);let Rc,Oc=!1;function Mc(){return Rc||(Rc=Lo(Nc))}function Pc(){return Rc=Oc?Rc:Bo(Nc),Oc=!0,Rc}const Ac=(...e)=>{Mc().render(...e)},Ic=(...e)=>{Pc().hydrate(...e)},$c=(...e)=>{const t=Mc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Vc(e);if(!r)return;const o=t._component;L(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t},Fc=(...e)=>{const t=Pc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=Vc(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function Vc(e){if(B(e)){return document.querySelector(e)}return e}let Lc=!1;const Bc=()=>{Lc||(Lc=!0,ac.getSSRProps=({value:e})=>({value:e}),dc.getSSRProps=({value:e},t)=>{if(t.props&&b(t.props.value,e))return{checked:!0}},fc.getSSRProps=({value:e},t)=>{if(I(e)){if(t.props&&_(e,t.props.value)>-1)return{checked:!0}}else if(F(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},yc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=bc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Ec.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};function jc(e){throw e}function Uc(e){}function Dc(e,t,n,r){const o=new SyntaxError(String(e));return o.code=e,o.loc=t,o}const Hc=Symbol(""),Wc=Symbol(""),zc=Symbol(""),Kc=Symbol(""),qc=Symbol(""),Gc=Symbol(""),Jc=Symbol(""),Zc=Symbol(""),Yc=Symbol(""),Qc=Symbol(""),Xc=Symbol(""),el=Symbol(""),tl=Symbol(""),nl=Symbol(""),rl=Symbol(""),ol=Symbol(""),sl=Symbol(""),il=Symbol(""),cl=Symbol(""),ll=Symbol(""),ul=Symbol(""),al=Symbol(""),fl=Symbol(""),pl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),wl=Symbol(""),kl=Symbol(""),El=Symbol(""),Tl=Symbol(""),Nl={[Hc]:"Fragment",[Wc]:"Teleport",[zc]:"Suspense",[Kc]:"KeepAlive",[qc]:"BaseTransition",[Gc]:"openBlock",[Jc]:"createBlock",[Zc]:"createElementBlock",[Yc]:"createVNode",[Qc]:"createElementVNode",[Xc]:"createCommentVNode",[el]:"createTextVNode",[tl]:"createStaticVNode",[nl]:"resolveComponent",[rl]:"resolveDynamicComponent",[ol]:"resolveDirective",[sl]:"resolveFilter",[il]:"withDirectives",[cl]:"renderList",[ll]:"renderSlot",[ul]:"createSlots",[al]:"toDisplayString",[fl]:"mergeProps",[pl]:"normalizeClass",[dl]:"normalizeStyle",[hl]:"normalizeProps",[ml]:"guardReactiveProps",[gl]:"toHandlers",[vl]:"camelize",[yl]:"capitalize",[bl]:"toHandlerKey",[_l]:"setBlockTracking",[Sl]:"pushScopeId",[xl]:"popScopeId",[Cl]:"withCtx",[wl]:"unref",[kl]:"isRef",[El]:"withMemo",[Tl]:"isMemoSame"};const Rl={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Ol(e,t,n,r,o,s,i,c=!1,l=!1,u=!1,a=Rl){return e&&(c?(e.helper(Gc),e.helper(su(e.inSSR,u))):e.helper(ou(e.inSSR,u)),i&&e.helper(il)),{type:13,tag:t,props:n,children:r,patchFlag:o,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:u,loc:a}}function Ml(e,t=Rl){return{type:17,loc:t,elements:e}}function Pl(e,t=Rl){return{type:15,loc:t,properties:e}}function Al(e,t){return{type:16,loc:Rl,key:B(e)?Il(e,!0):e,value:t}}function Il(e,t=!1,n=Rl,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function $l(e,t=Rl){return{type:8,loc:t,children:e}}function Fl(e,t=[],n=Rl){return{type:14,loc:n,callee:e,arguments:t}}function Vl(e,t,n=!1,r=!1,o=Rl){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:o}}function Ll(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:Rl}}const Bl=e=>4===e.type&&e.isStatic,jl=(e,t)=>e===t||e===X(t);function Ul(e){return jl(e,"Teleport")?Wc:jl(e,"Suspense")?zc:jl(e,"KeepAlive")?Kc:jl(e,"BaseTransition")?qc:void 0}const Dl=/^\d|[^\$\w]/,Hl=e=>!Dl.test(e),Wl=/[A-Za-z_$\xA0-\uFFFF]/,zl=/[\.\?\w$\xA0-\uFFFF]/,Kl=/\s+[.[]\s*|\s*[.[]\s+/g,ql=e=>{e=e.trim().replace(Kl,(e=>e.trim()));let t=0,n=[],r=0,o=0,s=null;for(let i=0;i4===e.key.type&&e.key.content===r))}return n}function au(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function fu(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(ou(r,e.isComponent)),t(Gc),t(su(r,e.isComponent)))}function pu(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,r=n&&n[e];return"MODE"===e?r||3:r}function du(e,t){const n=pu("MODE",t),r=pu(e,t);return 3===n?!0===r:!1!==r}function hu(e,t,n,...r){return du(e,t)}const mu=/&(gt|lt|amp|apos|quot);/g,gu={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},vu={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:E,isPreTag:E,isCustomElement:E,decodeEntities:e=>e.replace(mu,((e,t)=>gu[t])),onError:jc,onWarn:Uc,comments:!1};function yu(e,t={}){const n=function(e,t){const n=O({},vu);let r;for(r in t)n[r]=void 0===t[r]?vu[r]:t[r];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),r=Pu(n);return function(e,t=Rl){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(bu(n,0,[]),Au(n,r))}function bu(e,t,n){const r=Iu(n),o=r?r.ns:0,s=[];for(;!ju(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&$u(i,e.options.delimiters[0]))c=Ru(e,t);else if(0===t&&"<"===i[0])if(1===i.length)Bu(e,5,1);else if("!"===i[1])$u(i,"\x3c!--")?c=xu(e):$u(i,""===i[2]){Bu(e,14,2),Fu(e,3);continue}if(/[a-z]/i.test(i[2])){Bu(e,23),Eu(e,1,r);continue}Bu(e,12,2),c=Cu(e)}else/[a-z]/i.test(i[1])?(c=wu(e,n),du("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&ku(e.name)))&&(c=c.children)):"?"===i[1]?(Bu(e,21,1),c=Cu(e)):Bu(e,12,1);if(c||(c=Ou(e,t)),I(c))for(let e=0;e/.exec(e.source);if(r){r.index<=3&&Bu(e,0),r[1]&&Bu(e,10),n=e.source.slice(4,r.index);const t=e.source.slice(0,r.index);let o=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",o));)Fu(e,s-o+1),s+4");return-1===o?(r=e.source.slice(n),Fu(e,e.source.length)):(r=e.source.slice(n,o),Fu(e,o+1)),{type:3,content:r,loc:Au(e,t)}}function wu(e,t){const n=e.inPre,r=e.inVPre,o=Iu(t),s=Eu(e,0,o),i=e.inPre&&!n,c=e.inVPre&&!r;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,o),u=bu(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&&hu("COMPILER_INLINE_TEMPLATE",e,t.loc)){const n=Au(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=u,Uu(e.source,s.tag))Eu(e,1,o);else if(Bu(e,24,0,s.loc.start),0===e.source.length&&"script"===s.tag.toLowerCase()){const t=u[0];t&&$u(t.loc.source,"\x3c!--")&&Bu(e,8)}return s.loc=Au(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const ku=o("if,else,else-if,for,slot");function Eu(e,t,n){const r=Pu(e),o=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=o[1],i=e.options.getNamespace(s,n);Fu(e,o[0].length),Vu(e);const c=Pu(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let u=Tu(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,O(e,c),e.source=l,u=Tu(e,t).filter((e=>"v-pre"!==e.name)));let a=!1;if(0===e.source.length?Bu(e,9):(a=$u(e.source,"/>"),1===t&&a&&Bu(e,4),Fu(e,a?2:1)),1===t)return;let f=0;return e.inVPre||("slot"===s?f=2:"template"===s?u.some((e=>7===e.type&&ku(e.name)))&&(f=3):function(e,t,n){const r=n.options;if(r.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Ul(e)||r.isBuiltInComponent&&r.isBuiltInComponent(e)||r.isNativeTag&&!r.isNativeTag(e))return!0;for(let e=0;e0&&!$u(e.source,">")&&!$u(e.source,"/>");){if($u(e.source,"/")){Bu(e,22),Fu(e,1),Vu(e);continue}1===t&&Bu(e,3);const o=Nu(e,r);6===o.type&&o.value&&"class"===o.name&&(o.value.content=o.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(o),/^[^\t\r\n\f />]/.test(e.source)&&Bu(e,15),Vu(e)}return n}function Nu(e,t){const n=Pu(e),r=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(r)&&Bu(e,2),t.add(r),"="===r[0]&&Bu(e,19);{const t=/["'<]/g;let n;for(;n=t.exec(r);)Bu(e,17,n.index)}let o;Fu(e,r.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Vu(e),Fu(e,1),Vu(e),o=function(e){const t=Pu(e);let n;const r=e.source[0],o='"'===r||"'"===r;if(o){Fu(e,1);const t=e.source.indexOf(r);-1===t?n=Mu(e,e.source.length,4):(n=Mu(e,t,4),Fu(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const r=/["'<=`]/g;let o;for(;o=r.exec(t[0]);)Bu(e,18,o.index);n=Mu(e,t[0].length,4)}return{content:n,isQuoted:o,loc:Au(e,t)}}(e),o||Bu(e,13));const s=Au(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(r)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(r);let i,c=$u(r,"."),l=t[1]||(c||$u(r,":")?"bind":$u(r,"@")?"on":"slot");if(t[2]){const o="slot"===l,s=r.lastIndexOf(t[2]),c=Au(e,Lu(e,n,s),Lu(e,n,s+t[2].length+(o&&t[3]||"").length));let u=t[2],a=!0;u.startsWith("[")?(a=!1,u.endsWith("]")?u=u.slice(1,u.length-1):(Bu(e,27),u=u.slice(1))):o&&(u+=t[3]||""),i={type:4,content:u,isStatic:a,constType:a?3:0,loc:c}}if(o&&o.isQuoted){const e=o.loc;e.start.offset++,e.start.column++,e.end=Jl(e.start,o.content),e.source=e.source.slice(1,-1)}const u=t[3]?t[3].slice(1).split("."):[];return c&&u.push("prop"),"bind"===l&&i&&u.includes("sync")&&hu("COMPILER_V_BIND_SYNC",e,0,i.loc.source)&&(l="model",u.splice(u.indexOf("sync"),1)),{type:7,name:l,exp:o&&{type:4,content:o.content,isStatic:!1,constType:0,loc:o.loc},arg:i,modifiers:u,loc:s}}return!e.inVPre&&$u(r,"v-")&&Bu(e,26),{type:6,name:r,value:o&&{type:2,content:o.content,loc:o.loc},loc:s}}function Ru(e,t){const[n,r]=e.options.delimiters,o=e.source.indexOf(r,n.length);if(-1===o)return void Bu(e,25);const s=Pu(e);Fu(e,n.length);const i=Pu(e),c=Pu(e),l=o-n.length,u=e.source.slice(0,l),a=Mu(e,l,t),f=a.trim(),p=a.indexOf(f);p>0&&Zl(i,u,p);return Zl(c,u,l-(a.length-f.length-p)),Fu(e,r.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:f,loc:Au(e,i,c)},loc:Au(e,s)}}function Ou(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let r=e.source.length;for(let t=0;to&&(r=o)}const o=Pu(e);return{type:2,content:Mu(e,r,t),loc:Au(e,o)}}function Mu(e,t,n){const r=e.source.slice(0,t);return Fu(e,t),2!==n&&3!==n&&r.includes("&")?e.options.decodeEntities(r,4===n):r}function Pu(e){const{column:t,line:n,offset:r}=e;return{column:t,line:n,offset:r}}function Au(e,t,n){return{start:t,end:n=n||Pu(e),source:e.originalSource.slice(t.offset,n.offset)}}function Iu(e){return e[e.length-1]}function $u(e,t){return e.startsWith(t)}function Fu(e,t){const{source:n}=e;Zl(e,n,t),e.source=n.slice(t)}function Vu(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Fu(e,t[0].length)}function Lu(e,t,n){return Jl(t,e.originalSource.slice(t.offset,n),n)}function Bu(e,t,n,r=Pu(e)){n&&(r.offset+=n,r.column+=n),e.options.onError(Dc(t,{start:r,end:r,source:""}))}function ju(e,t,n){const r=e.source;switch(t){case 0:if($u(r,"=0;--e)if(Uu(r,n[e].tag))return!0;break;case 1:case 2:{const e=Iu(n);if(e&&Uu(r,e.tag))return!0;break}case 3:if($u(r,"]]>"))return!0}return!r}function Uu(e,t){return $u(e,"]/.test(e[2+t.length]||">")}function Du(e,t){Wu(e,t,Hu(e,e.children[0]))}function Hu(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ru(t)}function Wu(e,t,n=!1){const{children:r}=e,o=r.length;let s=0;for(let e=0;e0){if(e>=2){o.codegenNode.patchFlag="-1",o.codegenNode=t.hoist(o.codegenNode),s++;continue}}else{const e=o.codegenNode;if(13===e.type){const n=Zu(e);if((!n||512===n||1===n)&&Gu(o,t)>=2){const n=Ju(o);n&&(e.props=t.hoist(n))}e.dynamicProps&&(e.dynamicProps=t.hoist(e.dynamicProps))}}}if(1===o.type){const e=1===o.tagType;e&&t.scopes.vSlot++,Wu(o,t),e&&t.scopes.vSlot--}else if(11===o.type)Wu(o,t,1===o.children.length);else if(9===o.type)for(let e=0;e1)for(let o=0;on&&(w.childIndex--,w.onNodeRemoved()):(w.currentNode=null,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){B(e)&&(e=Il(e)),w.hoists.push(e);const t=Il(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){return function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Rl}}(w.cached++,e,t)}};return w.filters=new Set,w}function Qu(e,t){const n=Yu(e,t);Xu(e,n),t.hoistStatic&&Du(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:r}=e;if(1===r.length){const n=r[0];if(Hu(e,n)&&n.codegenNode){const r=n.codegenNode;13===r.type&&fu(r,t),e.codegenNode=r}else e.codegenNode=n}else if(r.length>1){let r=64;0,e.codegenNode=Ol(t,n(Hc),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function Xu(e,t){t.currentNode=e;const{nodeTransforms:n}=t,r=[];for(let o=0;o{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(tu))return;const s=[];for(let i=0;i`${Nl[e]}: _${Nl[e]}`;function ra(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:o="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:a=!1,isTS:f=!1,inSSR:p=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:r,filename:o,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:u,ssr:a,isTS:f,inSSR:p,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${Nl[e]}`},push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:r,push:o,prefixIdentifiers:s,indent:i,deindent:c,newline:l,scopeId:u,ssr:a}=n,f=e.helpers.length>0,p=!s&&"module"!==r;!function(e,t){const{ssr:n,prefixIdentifiers:r,push:o,newline:s,runtimeModuleName:i,runtimeGlobalName:c,ssrRuntimeModuleName:l}=t,u=c;if(e.helpers.length>0&&(o(`const _Vue = ${u}\n`),e.hoists.length)){o(`const { ${[Yc,Qc,Xc,el,tl].filter((t=>e.helpers.includes(t))).map(na).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r,helper:o,scopeId:s,mode:i}=t;r();for(let o=0;o0)&&l()),e.directives.length&&(oa(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),oa(e.filters,"filter",n),l()),e.temps>0){o("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n"),l()),a||o("return "),e.codegenNode?ca(e.codegenNode,n):o("null"),p&&(c(),o("}")),c(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function oa(e,t,{helper:n,push:r,newline:o,isTS:s}){const i=n("filter"===t?sl:"component"===t?nl:ol);for(let n=0;n3||!1;t.push("["),n&&t.indent(),ia(e,t,n),n&&t.deindent(),t.push("]")}function ia(e,t,n=!1,r=!0){const{push:o,newline:s}=t;for(let i=0;ie||"null"))}([s,i,c,l,u]),t),n(")"),f&&n(")");a&&(n(", "),ca(a,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:r,pure:o}=t,s=B(e.callee)?e.callee:r(e.callee);o&&n(ta);n(s+"(",e),ia(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:r,deindent:o,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&r();for(let e=0;e "),(l||c)&&(n("{"),r());i?(l&&n("return "),I(i)?sa(i,t):ca(i,t)):c&&ca(c,t);(l||c)&&(o(),n("}"));u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:r,alternate:o,newline:s}=e,{push:i,indent:c,deindent:l,newline:u}=t;if(4===n.type){const e=!Hl(n.content);e&&i("("),la(n,t),e&&i(")")}else i("("),ca(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),ca(r,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const a=19===o.type;a||t.indentLevel++;ca(o,t),a||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:r,indent:o,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${r(_l)}(-1),`),i());n(`_cache[${e.index}] = `),ca(e.value,t),e.isVNode&&(n(","),i(),n(`${r(_l)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:ia(e.body,t,!0,!1)}}function la(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,e)}function ua(e,t){for(let n=0;nfunction(e,t,n,r){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(Dc(28,t.loc)),t.exp=Il("true",!1,r)}0;if("if"===t.name){const o=pa(e,t),s={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(s),r)return r(s,o,!0)}else{const o=n.parent.children;let s=o.indexOf(e);for(;s-- >=-1;){const i=o[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Dc(30,e.loc)),n.removeNode();const o=pa(e,t);0,i.branches.push(o);const s=r&&r(i,o,!1);Xu(o,n),s&&s(),n.currentNode=null}else n.onError(Dc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,r)=>{const o=n.parent.children;let s=o.indexOf(e),i=0;for(;s-- >=0;){const e=o[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(r)e.codegenNode=da(t,i,n);else{const r=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);r.alternate=da(t,i+e.branches.length-1,n)}}}))));function pa(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Yl(e,"for")?e.children:[e],userKey:Ql(e,"key"),isTemplateIf:n}}function da(e,t,n){return e.condition?Ll(e.condition,ha(e,t,n),Fl(n.helper(Xc),['""',"true"])):ha(e,t,n)}function ha(e,t,n){const{helper:r}=n,o=Al("key",Il(`${t}`,!1,Rl,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return lu(e,o,n),e}{let t=64;return Ol(n,r(Hc),Pl([o]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(c=e).type&&c.callee===El?c.arguments[1].returns:c;return 13===t.type&&fu(t,n),lu(t,o,n),e}var c}const ma=ea("for",((e,t,n)=>{const{helper:r,removeHelper:o}=n;return function(e,t,n,r){if(!t.exp)return void n.onError(Dc(31,t.loc));const o=ba(t.exp,n);if(!o)return void n.onError(Dc(32,t.loc));const{addIdentifiers:s,removeIdentifiers:i,scopes:c}=n,{source:l,value:u,key:a,index:f}=o,p={type:11,loc:t.loc,source:l,valueAlias:u,keyAlias:a,objectIndexAlias:f,parseResult:o,children:nu(e)?e.children:[e]};n.replaceNode(p),c.vFor++;const d=r&&r(p);return()=>{c.vFor--,d&&d()}}(e,t,n,(t=>{const s=Fl(r(cl),[t.source]),i=nu(e),c=Yl(e,"memo"),l=Ql(e,"key"),u=l&&(6===l.type?Il(l.value.content,!0):l.exp),a=l?Al("key",u):null,f=4===t.source.type&&t.source.constType>0,p=f?64:l?128:256;return t.codegenNode=Ol(n,r(Hc),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let l;const{children:p}=t;const d=1!==p.length||1!==p[0].type,h=ru(e)?e:i&&1===e.children.length&&ru(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&a&&lu(l,a,n)):d?l=Ol(n,r(Hc),a?Pl([a]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=p[0].codegenNode,i&&a&&lu(l,a,n),l.isBlock!==!f&&(l.isBlock?(o(Gc),o(su(n.inSSR,l.isComponent))):o(ou(n.inSSR,l.isComponent))),l.isBlock=!f,l.isBlock?(r(Gc),r(su(n.inSSR,l.isComponent))):r(ou(n.inSSR,l.isComponent))),c){const e=Vl(Sa(t.parseResult,[Il("_cached")]));e.body={type:21,body:[$l(["const _memo = (",c.exp,")"]),$l(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(Tl)}(_cached, _memo)) return _cached`]),$l(["const _item = ",l]),Il("_item.memo = _memo"),Il("return _item")],loc:Rl},s.arguments.push(e,Il("_cache"),Il(String(n.cached++)))}else s.arguments.push(Vl(Sa(t.parseResult),l,!0))}}))}));const ga=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,va=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ya=/^\(|\)$/g;function ba(e,t){const n=e.loc,r=e.content,o=r.match(ga);if(!o)return;const[,s,i]=o,c={source:_a(n,i.trim(),r.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(ya,"").trim();const u=s.indexOf(l),a=l.match(va);if(a){l=l.replace(va,"").trim();const e=a[1].trim();let t;if(e&&(t=r.indexOf(e,u+l.length),c.key=_a(n,e,t)),a[2]){const o=a[2].trim();o&&(c.index=_a(n,o,r.indexOf(o,c.key?t+e.length:u+l.length)))}}return l&&(c.value=_a(n,l,u)),c}function _a(e,t,n){return Il(t,!1,Gl(e,n,t.length))}function Sa({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Il("_".repeat(t+1),!1)))}([e,t,n,...r])}const xa=Il("undefined",!1),Ca=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Yl(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},wa=(e,t,n)=>Vl(e,t,!1,!0,t.length?t[0].loc:n);function ka(e,t,n=wa){t.helper(Cl);const{children:r,loc:o}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Yl(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Bl(e)&&(c=!0),s.push(Al(e||Il("default",!0),n(t,r,o)))}let u=!1,a=!1;const f=[],p=new Set;let d=0;for(let e=0;e{const s=n(e,r,o);return t.compatConfig&&(s.isNonScopedSlot=!0),Al("default",s)};u?f.length&&f.some((e=>Na(e)))&&(a?t.onError(Dc(39,f[0].loc)):s.push(e(void 0,f))):s.push(e(void 0,r))}const h=c?2:Ta(e.children)?3:1;let m=Pl(s.concat(Al("_",Il(h+"",!1))),o);return i.length&&(m=Fl(t.helper(ul),[m,Ml(i)])),{slots:m,hasDynamicSlots:c}}function Ea(e,t,n){const r=[Al("name",e),Al("fn",t)];return null!=n&&r.push(Al("key",Il(String(n),!0))),Pl(r)}function Ta(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:r}=e,o=1===e.tagType;let s=o?function(e,t,n=!1){let{tag:r}=e;const o=Ia(r),s=Ql(e,"is");if(s)if(o||du("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&Il(s.value.content,!0):s.exp;if(e)return Fl(t.helper(rl),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(r=s.value.content.slice(4));const i=!o&&Yl(e,"is");if(i&&i.exp)return Fl(t.helper(rl),[i.exp]);const c=Ul(r)||t.isBuiltInComponent(r);if(c)return n||t.helper(c),c;return t.helper(nl),t.components.add(r),au(r,"component")}(e,t):`"${n}"`;const i=U(s)&&s.callee===rl;let c,l,u,a,f,p,d=0,h=i||s===Wc||s===zc||!o&&("svg"===n||"foreignObject"===n);if(r.length>0){const n=Ma(e,t,void 0,o,i);c=n.props,d=n.patchFlag,f=n.dynamicPropNames;const r=n.directives;p=r&&r.length?Ml(r.map((e=>function(e,t){const n=[],r=Ra.get(e);r?n.push(t.helperString(r)):(t.helper(ol),t.directives.add(e.name),n.push(au(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Il("true",!1,o);n.push(Pl(e.modifiers.map((e=>Al(e,t))),o))}return Ml(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Kc&&(h=!0,d|=1024);if(o&&s!==Wc&&s!==Kc){const{slots:n,hasDynamicSlots:r}=ka(e,t);l=n,r&&(d|=1024)}else if(1===e.children.length&&s!==Wc){const n=e.children[0],r=n.type,o=5===r||8===r;o&&0===zu(n,t)&&(d|=1),l=o||2===r?n:e.children}else l=e.children}0!==d&&(u=String(d),f&&f.length&&(a=function(e){let t="[";for(let n=0,r=e.length;n0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,b=!1,_=!1;const S=[],x=e=>{u.length&&(a.push(Pl(Pa(u),c)),u=[]),e&&a.push(e)},C=({key:e,value:n})=>{if(Bl(e)){const s=e.content,i=N(s);if(!i||r&&!o||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||q(s)||(y=!0),i&&q(s)&&(_=!0),20===n.type||(4===n.type||8===n.type)&&zu(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||S.includes(s)||S.push(s),!r||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else b=!0};for(let o=0;o0&&u.push(Al(Il("ref_for",!0),Il("true")))),"is"===n&&(Ia(i)||r&&r.content.startsWith("vue:")||du("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Al(Il(n,!0,Gl(e,0,n.length)),Il(r?r.content:"",o,r?r.loc:e)))}else{const{name:n,arg:o,exp:h,loc:m}=l,g="bind"===n,v="on"===n;if("slot"===n){r||t.onError(Dc(40,m));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&Xl(o,"is")&&(Ia(i)||du("COMPILER_IS_ON_ELEMENT",t)))continue;if(v&&s)continue;if((g&&Xl(o,"key")||v&&p&&Xl(o,"vue:before-update"))&&(d=!0),g&&Xl(o,"ref")&&t.scopes.vFor>0&&u.push(Al(Il("ref_for",!0),Il("true"))),!o&&(g||v)){if(b=!0,h)if(g){if(x(),du("COMPILER_V_BIND_OBJECT_ORDER",t)){a.unshift(h);continue}a.push(h)}else x({type:14,loc:m,callee:t.helper(gl),arguments:r?[h]:[h,"true"]});else t.onError(Dc(g?34:35,m));continue}const y=t.directiveTransforms[n];if(y){const{props:n,needRuntime:r}=y(l,e,t);!s&&n.forEach(C),v&&o&&!Bl(o)?x(Pl(n,c)):u.push(...n),r&&(f.push(l),j(r)&&Ra.set(l,r))}else G(n)||(f.push(l),p&&(d=!0))}}let w;if(a.length?(x(),w=a.length>1?Fl(t.helper(fl),a,c):a[0]):u.length&&(w=Pl(Pa(u),c)),b?h|=16:(g&&!r&&(h|=2),v&&!r&&(h|=4),S.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||_||f.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;t{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})((e=>e.replace($a,((e,t)=>t?t.toUpperCase():"")))),Va=(e,t)=>{if(ru(e)){const{children:n,loc:r}=e,{slotName:o,slotProps:s}=function(e,t){let n,r='"default"';const o=[];for(let t=0;t0){const{props:r,directives:s}=Ma(e,t,o,!1,!1);n=r,s.length&&t.onError(Dc(36,s[0].loc))}return{slotName:r,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=Vl([],n,!1,!1,r),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=Fl(t.helper(ll),i,r)}};const La=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Ba=(e,t,n,r)=>{const{loc:o,modifiers:s,arg:i}=e;let c;if(e.exp||s.length||n.onError(Dc(35,o)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);c=Il(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?te(Y(e)):`on:${e}`,!0,i.loc)}else c=$l([`${n.helperString(bl)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(bl)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let u=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=ql(l.content),t=!(e||La.test(l.content)),n=l.content.includes(";");0,(t||u&&e)&&(l=$l([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let a={props:[Al(c,l||Il("() => {}",!1,o))]};return r&&(a=r(a)),u&&(a.props[0].value=n.cache(a.props[0].value)),a.props.forEach((e=>e.key.isHandlerKey=!0)),a},ja=(e,t,n)=>{const{exp:r,modifiers:o,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),o.includes("camel")&&(4===i.type?i.isStatic?i.content=Y(i.content):i.content=`${n.helperString(vl)}(${i.content})`:(i.children.unshift(`${n.helperString(vl)}(`),i.children.push(")"))),n.inSSR||(o.includes("prop")&&Ua(i,"."),o.includes("attr")&&Ua(i,"^")),!r||4===r.type&&!r.content.trim()?(n.onError(Dc(34,s)),{props:[Al(i,Il("",!0,s))]}):{props:[Al(i,r)]}},Ua=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Da=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let r,o=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&Yl(e,"once",!0)){if(Ha.has(e)||t.inVOnce)return;return Ha.add(e),t.inVOnce=!0,t.helper(_l),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},za=(e,t,n)=>{const{exp:r,arg:o}=e;if(!r)return n.onError(Dc(41,e.loc)),Ka();const s=r.loc.source,i=4===r.type?r.content:s,c=n.bindingMetadata[s];if("props"===c||"props-aliased"===c)return n.onError(Dc(44,r.loc)),Ka();if(!i.trim()||!ql(i))return n.onError(Dc(42,r.loc)),Ka();const l=o||Il("modelValue",!0),u=o?Bl(o)?`onUpdate:${o.content}`:$l(['"onUpdate:" + ',o]):"onUpdate:modelValue";let a;a=$l([`${n.isTS?"($event: any)":"$event"} => ((`,r,") = $event)"]);const f=[Al(l,e.exp),Al(u,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Hl(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?Bl(o)?`${o.content}Modifiers`:$l([o,' + "Modifiers"']):"modelModifiers";f.push(Al(n,Il(`{ ${t} }`,!1,e.loc,2)))}return Ka(f)};function Ka(e=[]){return{props:e}}const qa=/[\w).+\-_$\]]/,Ga=(e,t)=>{du("COMPILER_FILTER",t)&&(5===e.type&&Ja(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&Ja(e.exp,t)})))};function Ja(e,t){if(4===e.type)Za(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&qa.test(e)||(a=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=Yl(e,"memo");if(!n||Qa.has(e))return;return Qa.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&fu(r,t),e.codegenNode=Fl(t.helper(El),[n.exp,Vl(void 0,r),"_cache",String(t.cached++)]))}}};function ef(e,t={}){const n=t.onError||jc,r="module"===t.mode;!0===t.prefixIdentifiers?n(Dc(47)):r&&n(Dc(48));t.cacheHandlers&&n(Dc(49)),t.scopeId&&!r&&n(Dc(50));const o=B(e)?yu(e,t):e,[s,i]=[[Wa,fa,Xa,ma,Ga,Va,Oa,Ca,Da],{on:Ba,bind:ja,model:za}];return Qu(o,O({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:O({},i,t.directiveTransforms||{})})),ra(o,O({},t,{prefixIdentifiers:false}))}const tf=Symbol(""),nf=Symbol(""),rf=Symbol(""),of=Symbol(""),sf=Symbol(""),cf=Symbol(""),lf=Symbol(""),uf=Symbol(""),af=Symbol(""),ff=Symbol("");var pf;let df;pf={[tf]:"vModelRadio",[nf]:"vModelCheckbox",[rf]:"vModelText",[of]:"vModelSelect",[sf]:"vModelDynamic",[cf]:"withModifiers",[lf]:"withKeys",[uf]:"vShow",[af]:"Transition",[ff]:"TransitionGroup"},Object.getOwnPropertySymbols(pf).forEach((e=>{Nl[e]=pf[e]}));const hf=o("style,iframe,script,noscript",!0),mf={isVoidTag:m,isNativeTag:e=>d(e)||h(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return df||(df=document.createElement("div")),t?(df.innerHTML=`
    `,df.children[0].getAttribute("foo")):(df.innerHTML=e,df.textContent)},isBuiltInComponent:e=>jl(e,"Transition")?af:jl(e,"TransitionGroup")?ff:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(hf(e))return 2}return 0}},gf=(e,t)=>{const n=a(e);return Il(JSON.stringify(n),!1,t,3)};function vf(e,t){return Dc(e,t)}const yf=o("passive,once,capture"),bf=o("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),_f=o("left,right"),Sf=o("onkeyup,onkeydown,onkeypress",!0),xf=(e,t)=>Bl(e)&&"onclick"===e.content.toLowerCase()?Il(t,!0):4!==e.type?$l(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;const Cf=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||(t.onError(vf(61,e.loc)),t.removeNode())},wf=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Il("style",!0,t.loc),exp:gf(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],kf={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(vf(51,o)),t.children.length&&(n.onError(vf(52,o)),t.children.length=0),{props:[Al(Il("innerHTML",!0,o),r||Il("",!0))]}},text:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(vf(53,o)),t.children.length&&(n.onError(vf(54,o)),t.children.length=0),{props:[Al(Il("textContent",!0),r?zu(r,n)>0?r:Fl(n.helperString(al),[r],o):Il("",!0))]}},model:(e,t,n)=>{const r=za(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(vf(56,e.arg.loc));const{tag:o}=t,s=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||s){let i=rf,c=!1;if("input"===o||s){const r=Ql(t,"type");if(r){if(7===r.type)i=sf;else if(r.value)switch(r.value.content){case"radio":i=tf;break;case"checkbox":i=nf;break;case"file":c=!0,n.onError(vf(57,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=sf)}else"select"===o&&(i=of);c||(r.needRuntime=n.helper(i))}else n.onError(vf(55,e.loc));return r.props=r.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),r},on:(e,t,n)=>Ba(e,t,n,(t=>{const{modifiers:r}=e;if(!r.length)return t;let{key:o,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,r)=>{const o=[],s=[],i=[];for(let r=0;r{const{exp:r,loc:o}=e;return r||n.onError(vf(59,o)),{props:[],needRuntime:n.helper(uf)}}};const Ef=Object.create(null);function Tf(e,t){if(!B(e)){if(!e.nodeType)return k;e=e.innerHTML}const n=e,o=Ef[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);0,e=t?t.innerHTML:""}const s=O({hoistStatic:!0,onError:void 0,onWarn:k},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return ef(e,O({},mf,t,{nodeTransforms:[Cf,...wf,...t.nodeTransforms||[]],directiveTransforms:O({},kf,t.directiveTransforms||{}),transformHoist:null}))}(e,s);const c=new Function("Vue",i)(r);return c._rc=!0,Ef[n]=c}Us(Tf)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_backend_module=self.webpackChunk_wintercms_wn_backend_module||[]).push([[101],{609:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var s=0;s{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}},471:function(e,t,n){n.r(t),n.d(t,{BaseTransition:function(){return fo},Comment:function(){return es},EffectScope:function(){return ue},Fragment:function(){return Qr},KeepAlive:function(){return wo},ReactiveEffect:function(){return Ce},Static:function(){return ts},Suspense:function(){return Kn},Teleport:function(){return Zr},Text:function(){return Xr},Transition:function(){return Di},TransitionGroup:function(){return cc},VueElement:function(){return Fi},assertNumber:function(){return nn},callWithAsyncErrorHandling:function(){return rn},callWithErrorHandling:function(){return on},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return xs},compatUtils:function(){return vi},compile:function(){return Pf},computed:function(){return Ys},createApp:function(){return Bc},createBlock:function(){return fs},createCommentVNode:function(){return ks},createElementBlock:function(){return as},createElementVNode:function(){return ys},createHydrationRenderer:function(){return Dr},createPropsRestProxy:function(){return ii},createRenderer:function(){return Ur},createSSRApp:function(){return jc},createSlots:function(){return er},createStaticVNode:function(){return ws},createTextVNode:function(){return Cs},createVNode:function(){return bs},customRef:function(){return Jt},defineAsyncComponent:function(){return So},defineComponent:function(){return bo},defineCustomElement:function(){return Pi},defineEmits:function(){return Xs},defineExpose:function(){return ei},defineProps:function(){return Qs},defineSSRCustomElement:function(){return Ai},devtools:function(){return kn},effect:function(){return ke},effectScope:function(){return ae},getCurrentInstance:function(){return Fs},getCurrentScope:function(){return pe},getTransitionRawChildren:function(){return yo},guardReactiveProps:function(){return Ss},h:function(){return li},handleError:function(){return sn},hydrate:function(){return Lc},initCustomFormatter:function(){return fi},initDirectivesForSSR:function(){return Hc},inject:function(){return Xn},isMemoSame:function(){return di},isProxy:function(){return Pt},isReactive:function(){return Rt},isReadonly:function(){return Ot},isRef:function(){return Bt},isRuntimeOnly:function(){return zs},isShallow:function(){return Mt},isVNode:function(){return ps},markRaw:function(){return It},mergeDefaults:function(){return si},mergeProps:function(){return Rs},nextTick:function(){return gn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return Eo},onBeforeMount:function(){return Io},onBeforeUnmount:function(){return Lo},onBeforeUpdate:function(){return $o},onDeactivated:function(){return To},onErrorCaptured:function(){return Ho},onMounted:function(){return Fo},onRenderTracked:function(){return Do},onRenderTriggered:function(){return Uo},onScopeDispose:function(){return de},onServerPrefetch:function(){return jo},onUnmounted:function(){return Bo},onUpdated:function(){return Vo},openBlock:function(){return rs},popScopeId:function(){return $n},provide:function(){return Qn},proxyRefs:function(){return qt},pushScopeId:function(){return Fn},queuePostFlushCb:function(){return bn},reactive:function(){return wt},readonly:function(){return Et},ref:function(){return jt},registerRuntimeCompiler:function(){return Ws},render:function(){return Vc},renderList:function(){return Xo},renderSlot:function(){return tr},resolveComponent:function(){return qo},resolveDirective:function(){return Zo},resolveDynamicComponent:function(){return Jo},resolveFilter:function(){return gi},resolveTransitionHooks:function(){return ho},setBlockTracking:function(){return ls},setDevtoolsHook:function(){return Nn},setTransitionHooks:function(){return vo},shallowReactive:function(){return kt},shallowReadonly:function(){return Tt},shallowRef:function(){return Ut},ssrContextKey:function(){return ui},ssrUtils:function(){return mi},stop:function(){return Ee},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return or},toRaw:function(){return At},toRef:function(){return Qt},toRefs:function(){return Zt},transformVNodeArgs:function(){return hs},triggerRef:function(){return Wt},unref:function(){return zt},useAttrs:function(){return oi},useCssModule:function(){return $i},useCssVars:function(){return Vi},useSSRContext:function(){return ai},useSlots:function(){return ni},useTransitionState:function(){return uo},vModelCheckbox:function(){return mc},vModelDynamic:function(){return xc},vModelRadio:function(){return vc},vModelSelect:function(){return yc},vModelText:function(){return hc},vShow:function(){return Oc},version:function(){return hi},warn:function(){return tn},watch:function(){return ro},watchEffect:function(){return eo},watchPostEffect:function(){return to},watchSyncEffect:function(){return no},withAsyncContext:function(){return ci},withCtx:function(){return Ln},withDefaults:function(){return ti},withDirectives:function(){return Wo},withKeys:function(){return Rc},withMemo:function(){return pi},withModifiers:function(){return Tc},withScopeId:function(){return Vn}});var o={};function r(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}n.r(o),n.d(o,{BaseTransition:function(){return fo},Comment:function(){return es},EffectScope:function(){return ue},Fragment:function(){return Qr},KeepAlive:function(){return wo},ReactiveEffect:function(){return Ce},Static:function(){return ts},Suspense:function(){return Kn},Teleport:function(){return Zr},Text:function(){return Xr},Transition:function(){return Di},TransitionGroup:function(){return cc},VueElement:function(){return Fi},assertNumber:function(){return nn},callWithAsyncErrorHandling:function(){return rn},callWithErrorHandling:function(){return on},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return xs},compatUtils:function(){return vi},computed:function(){return Ys},createApp:function(){return Bc},createBlock:function(){return fs},createCommentVNode:function(){return ks},createElementBlock:function(){return as},createElementVNode:function(){return ys},createHydrationRenderer:function(){return Dr},createPropsRestProxy:function(){return ii},createRenderer:function(){return Ur},createSSRApp:function(){return jc},createSlots:function(){return er},createStaticVNode:function(){return ws},createTextVNode:function(){return Cs},createVNode:function(){return bs},customRef:function(){return Jt},defineAsyncComponent:function(){return So},defineComponent:function(){return bo},defineCustomElement:function(){return Pi},defineEmits:function(){return Xs},defineExpose:function(){return ei},defineProps:function(){return Qs},defineSSRCustomElement:function(){return Ai},devtools:function(){return kn},effect:function(){return ke},effectScope:function(){return ae},getCurrentInstance:function(){return Fs},getCurrentScope:function(){return pe},getTransitionRawChildren:function(){return yo},guardReactiveProps:function(){return Ss},h:function(){return li},handleError:function(){return sn},hydrate:function(){return Lc},initCustomFormatter:function(){return fi},initDirectivesForSSR:function(){return Hc},inject:function(){return Xn},isMemoSame:function(){return di},isProxy:function(){return Pt},isReactive:function(){return Rt},isReadonly:function(){return Ot},isRef:function(){return Bt},isRuntimeOnly:function(){return zs},isShallow:function(){return Mt},isVNode:function(){return ps},markRaw:function(){return It},mergeDefaults:function(){return si},mergeProps:function(){return Rs},nextTick:function(){return gn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return Eo},onBeforeMount:function(){return Io},onBeforeUnmount:function(){return Lo},onBeforeUpdate:function(){return $o},onDeactivated:function(){return To},onErrorCaptured:function(){return Ho},onMounted:function(){return Fo},onRenderTracked:function(){return Do},onRenderTriggered:function(){return Uo},onScopeDispose:function(){return de},onServerPrefetch:function(){return jo},onUnmounted:function(){return Bo},onUpdated:function(){return Vo},openBlock:function(){return rs},popScopeId:function(){return $n},provide:function(){return Qn},proxyRefs:function(){return qt},pushScopeId:function(){return Fn},queuePostFlushCb:function(){return bn},reactive:function(){return wt},readonly:function(){return Et},ref:function(){return jt},registerRuntimeCompiler:function(){return Ws},render:function(){return Vc},renderList:function(){return Xo},renderSlot:function(){return tr},resolveComponent:function(){return qo},resolveDirective:function(){return Zo},resolveDynamicComponent:function(){return Jo},resolveFilter:function(){return gi},resolveTransitionHooks:function(){return ho},setBlockTracking:function(){return ls},setDevtoolsHook:function(){return Nn},setTransitionHooks:function(){return vo},shallowReactive:function(){return kt},shallowReadonly:function(){return Tt},shallowRef:function(){return Ut},ssrContextKey:function(){return ui},ssrUtils:function(){return mi},stop:function(){return Ee},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return or},toRaw:function(){return At},toRef:function(){return Qt},toRefs:function(){return Zt},transformVNodeArgs:function(){return hs},triggerRef:function(){return Wt},unref:function(){return zt},useAttrs:function(){return oi},useCssModule:function(){return $i},useCssVars:function(){return Vi},useSSRContext:function(){return ai},useSlots:function(){return ni},useTransitionState:function(){return uo},vModelCheckbox:function(){return mc},vModelDynamic:function(){return xc},vModelRadio:function(){return vc},vModelSelect:function(){return yc},vModelText:function(){return hc},vShow:function(){return Oc},version:function(){return hi},warn:function(){return tn},watch:function(){return ro},watchEffect:function(){return eo},watchPostEffect:function(){return to},watchSyncEffect:function(){return no},withAsyncContext:function(){return ci},withCtx:function(){return Ln},withDefaults:function(){return ti},withDirectives:function(){return Wo},withKeys:function(){return Rc},withMemo:function(){return pi},withModifiers:function(){return Tc},withScopeId:function(){return Vn}});const s=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function i(e){if(I(e)){const t={};for(let n=0;n{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function f(e){let t="";if(B(e))t=e;else if(I(e))for(let n=0;nb(e,t)))}const S=e=>B(e)?e:null==e?"":I(e)||U(e)&&(e.toString===H||!L(e.toString))?JSON.stringify(e,x,2):String(e),x=(e,t)=>t&&t.__v_isRef?x(e,t.value):F(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:$(t)?{[`Set(${t.size})`]:[...t.values()]}:!U(t)||I(t)||z(t)?t:String(t),C={},w=[],k=()=>{},E=()=>!1,T=/^on[^a-z]/,N=e=>T.test(e),R=e=>e.startsWith("onUpdate:"),O=Object.assign,M=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},P=Object.prototype.hasOwnProperty,A=(e,t)=>P.call(e,t),I=Array.isArray,F=e=>"[object Map]"===W(e),$=e=>"[object Set]"===W(e),V=e=>"[object Date]"===W(e),L=e=>"function"==typeof e,B=e=>"string"==typeof e,j=e=>"symbol"==typeof e,U=e=>null!==e&&"object"==typeof e,D=e=>U(e)&&L(e.then)&&L(e.catch),H=Object.prototype.toString,W=e=>H.call(e),z=e=>"[object Object]"===W(e),K=e=>B(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,q=r(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G=r("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),J=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,Y=J((e=>e.replace(Z,((e,t)=>t?t.toUpperCase():"")))),Q=/\B([A-Z])/g,X=J((e=>e.replace(Q,"-$1").toLowerCase())),ee=J((e=>e.charAt(0).toUpperCase()+e.slice(1))),te=J((e=>e?`on${ee(e)}`:"")),ne=(e,t)=>!Object.is(e,t),oe=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},se=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ie=e=>{const t=B(e)?Number(e):NaN;return isNaN(t)?e:t};let ce;let le;class ue{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=le,!e&&le&&(this.index=(le.scopes||(le.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=le;try{return le=this,e()}finally{le=t}}else 0}on(){le=this}off(){le=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},me=e=>(e.w&be)>0,ge=e=>(e.n&be)>0,ve=new WeakMap;let ye=0,be=1;let _e;const Se=Symbol(""),xe=Symbol("");class Ce{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,fe(this,n)}run(){if(!this.active)return this.fn();let e=_e,t=Te;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=_e,_e=this,Te=!0,be=1<<++ye,ye<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o{("length"===n||n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(i.get(n)),t){case"add":I(e)?K(n)&&c.push(i.get("length")):(c.push(i.get(Se)),F(e)&&c.push(i.get(xe)));break;case"delete":I(e)||(c.push(i.get(Se)),F(e)&&c.push(i.get(xe)));break;case"set":F(e)&&c.push(i.get(Se))}if(1===c.length)c[0]&&Ie(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Ie(he(e))}}function Ie(e,t){const n=I(e)?e:[...e];for(const e of n)e.computed&&Fe(e,t);for(const e of n)e.computed||Fe(e,t)}function Fe(e,t){(e!==_e||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const $e=r("__proto__,__v_isRef,__isVue"),Ve=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(j)),Le=ze(),Be=ze(!1,!0),je=ze(!0),Ue=ze(!0,!0),De=He();function He(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=At(this);for(let e=0,t=this.length;e{e[t]=function(...e){Re();const n=At(this)[t].apply(this,e);return Oe(),n}})),e}function We(e){const t=At(this);return Me(t,0,e),t.hasOwnProperty(e)}function ze(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?xt:St:t?_t:bt).get(n))return n;const s=I(n);if(!e){if(s&&A(De,o))return Reflect.get(De,o,r);if("hasOwnProperty"===o)return We}const i=Reflect.get(n,o,r);return(j(o)?Ve.has(o):$e(o))?i:(e||Me(n,0,o),t?i:Bt(i)?s&&K(o)?i:i.value:U(i)?e?Et(i):wt(i):i)}}function Ke(e=!1){return function(t,n,o,r){let s=t[n];if(Ot(s)&&Bt(s)&&!Bt(o))return!1;if(!e&&(Mt(o)||Ot(o)||(s=At(s),o=At(o)),!I(t)&&Bt(s)&&!Bt(o)))return s.value=o,!0;const i=I(t)&&K(n)?Number(n)!0,deleteProperty:(e,t)=>!0},Je=O({},qe,{get:Be,set:Ke(!0)}),Ze=O({},Ge,{get:Ue}),Ye=e=>e,Qe=e=>Reflect.getPrototypeOf(e);function Xe(e,t,n=!1,o=!1){const r=At(e=e.__v_raw),s=At(t);n||(t!==s&&Me(r,0,t),Me(r,0,s));const{has:i}=Qe(r),c=o?Ye:n?$t:Ft;return i.call(r,t)?c(e.get(t)):i.call(r,s)?c(e.get(s)):void(e!==r&&e.get(t))}function et(e,t=!1){const n=this.__v_raw,o=At(n),r=At(e);return t||(e!==r&&Me(o,0,e),Me(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function tt(e,t=!1){return e=e.__v_raw,!t&&Me(At(e),0,Se),Reflect.get(e,"size",e)}function nt(e){e=At(e);const t=At(this);return Qe(t).has.call(t,e)||(t.add(e),Ae(t,"add",e,e)),this}function ot(e,t){t=At(t);const n=At(this),{has:o,get:r}=Qe(n);let s=o.call(n,e);s||(e=At(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?ne(t,i)&&Ae(n,"set",e,t):Ae(n,"add",e,t),this}function rt(e){const t=At(this),{has:n,get:o}=Qe(t);let r=n.call(t,e);r||(e=At(e),r=n.call(t,e));o&&o.call(t,e);const s=t.delete(e);return r&&Ae(t,"delete",e,void 0),s}function st(){const e=At(this),t=0!==e.size,n=e.clear();return t&&Ae(e,"clear",void 0,void 0),n}function it(e,t){return function(n,o){const r=this,s=r.__v_raw,i=At(s),c=t?Ye:e?$t:Ft;return!e&&Me(i,0,Se),s.forEach(((e,t)=>n.call(o,c(e),c(t),r)))}}function ct(e,t,n){return function(...o){const r=this.__v_raw,s=At(r),i=F(s),c="entries"===e||e===Symbol.iterator&&i,l="keys"===e&&i,u=r[e](...o),a=n?Ye:t?$t:Ft;return!t&&Me(s,0,l?xe:Se),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function lt(e){return function(...t){return"delete"!==e&&this}}function ut(){const e={get(e){return Xe(this,e)},get size(){return tt(this)},has:et,add:nt,set:ot,delete:rt,clear:st,forEach:it(!1,!1)},t={get(e){return Xe(this,e,!1,!0)},get size(){return tt(this)},has:et,add:nt,set:ot,delete:rt,clear:st,forEach:it(!1,!0)},n={get(e){return Xe(this,e,!0)},get size(){return tt(this,!0)},has(e){return et.call(this,e,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:it(!0,!1)},o={get(e){return Xe(this,e,!0,!0)},get size(){return tt(this,!0)},has(e){return et.call(this,e,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:it(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=ct(r,!1,!1),n[r]=ct(r,!0,!1),t[r]=ct(r,!1,!0),o[r]=ct(r,!0,!0)})),[e,n,t,o]}const[at,ft,pt,dt]=ut();function ht(e,t){const n=t?e?dt:pt:e?ft:at;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(A(n,o)&&o in t?n:t,o,r)}const mt={get:ht(!1,!1)},gt={get:ht(!1,!0)},vt={get:ht(!0,!1)},yt={get:ht(!0,!0)};const bt=new WeakMap,_t=new WeakMap,St=new WeakMap,xt=new WeakMap;function Ct(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>W(e).slice(8,-1))(e))}function wt(e){return Ot(e)?e:Nt(e,!1,qe,mt,bt)}function kt(e){return Nt(e,!1,Je,gt,_t)}function Et(e){return Nt(e,!0,Ge,vt,St)}function Tt(e){return Nt(e,!0,Ze,yt,xt)}function Nt(e,t,n,o,r){if(!U(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=Ct(e);if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Rt(e){return Ot(e)?Rt(e.__v_raw):!(!e||!e.__v_isReactive)}function Ot(e){return!(!e||!e.__v_isReadonly)}function Mt(e){return!(!e||!e.__v_isShallow)}function Pt(e){return Rt(e)||Ot(e)}function At(e){const t=e&&e.__v_raw;return t?At(t):e}function It(e){return re(e,"__v_skip",!0),e}const Ft=e=>U(e)?wt(e):e,$t=e=>U(e)?Et(e):e;function Vt(e){Te&&_e&&Pe((e=At(e)).dep||(e.dep=he()))}function Lt(e,t){const n=(e=At(e)).dep;n&&Ie(n)}function Bt(e){return!(!e||!0!==e.__v_isRef)}function jt(e){return Dt(e,!1)}function Ut(e){return Dt(e,!0)}function Dt(e,t){return Bt(e)?e:new Ht(e,t)}class Ht{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:At(e),this._value=t?e:Ft(e)}get value(){return Vt(this),this._value}set value(e){const t=this.__v_isShallow||Mt(e)||Ot(e);e=t?e:At(e),ne(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ft(e),Lt(this))}}function Wt(e){Lt(e)}function zt(e){return Bt(e)?e.value:e}const Kt={get:(e,t,n)=>zt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Bt(r)&&!Bt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function qt(e){return Rt(e)?e:new Proxy(e,Kt)}class Gt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Vt(this)),(()=>Lt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Jt(e){return new Gt(e)}function Zt(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=Qt(e,n);return t}class Yt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){var n;return null===(n=ve.get(e))||void 0===n?void 0:n.get(t)}(At(this._object),this._key)}}function Qt(e,t,n){const o=e[t];return Bt(o)?o:new Yt(e,t,n)}var Xt;class en{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[Xt]=!1,this._dirty=!0,this.effect=new Ce(e,(()=>{this._dirty||(this._dirty=!0,Lt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=At(this);return Vt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}Xt="__v_isReadonly";function tn(e,...t){}function nn(e,t){}function on(e,t,n,o){let r;try{r=o?e(...o):e()}catch(e){sn(e,t,n)}return r}function rn(e,t,n,o){if(L(e)){const r=on(e,t,n,o);return r&&D(r)&&r.catch((e=>{sn(e,t,n)})),r}const r=[];for(let s=0;s>>1;xn(un[o])xn(e)-xn(t))),dn=0;dnnull==e.id?1/0:e.id,Cn=(e,t)=>{const n=xn(e)-xn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function wn(e){ln=!1,cn=!0,un.sort(Cn);try{for(an=0;ankn.emit(e,...t))),En=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(o=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===o?void 0:o.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{Nn(e,t)})),setTimeout((()=>{kn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Tn=!0,En=[])}),3e3)}else Tn=!0,En=[]}function Rn(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||C;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||C;s&&(r=n.map((e=>B(e)?e.trim():e))),t&&(r=n.map(se))}let c;let l=o[c=te(t)]||o[c=te(Y(t))];!l&&s&&(l=o[c=te(X(t))]),l&&rn(l,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,rn(u,e,6,r)}}function On(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},c=!1;if(!L(e)){const o=e=>{const n=On(e,t,!0);n&&(c=!0,O(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||c?(I(s)?s.forEach((e=>i[e]=null)):O(i,s),U(e)&&o.set(e,i),i):(U(e)&&o.set(e,null),null)}function Mn(e,t){return!(!e||!N(t))&&(t=t.slice(2).replace(/Once$/,""),A(e,t[0].toLowerCase()+t.slice(1))||A(e,X(t))||A(e,t))}let Pn=null,An=null;function In(e){const t=Pn;return Pn=e,An=e&&e.type.__scopeId||null,t}function Fn(e){An=e}function $n(){An=null}const Vn=e=>Ln;function Ln(e,t=Pn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ls(-1);const r=In(t);let s;try{s=e(...n)}finally{In(r),o._d&&ls(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Bn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:c,attrs:l,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=In(e);try{if(4&n.shapeFlag){const e=r||o;g=Es(a.call(e,e,f,s,d,p,h)),v=l}else{const e=t;0,g=Es(e.length>1?e(s,{attrs:l,slots:c,emit:u}):e(s,null)),v=t.props?l:Un(l)}}catch(t){ns.length=0,sn(t,e,1),g=bs(es)}let b=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(R)&&(v=Dn(v,i)),b=xs(b,v))}return n.dirs&&(b=xs(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,In(y),g}function jn(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||N(n))&&((t||(t={}))[n]=e[n]);return t},Dn=(e,t)=>{const n={};for(const o in e)R(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Hn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense,Kn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,c,l,u){null==e?function(e,t,n,o,r,s,i,c,l){const{p:u,o:{createElement:a}}=l,f=a("div"),p=e.suspense=Gn(e,r,o,t,f,n,s,i,c,l);u(null,p.pendingBranch=e.ssContent,f,null,o,p,s,i),p.deps>0?(qn(e,"onPending"),qn(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,s,i),Yn(p,e.ssFallback)):p.resolve()}(t,n,o,r,s,i,c,l,u):function(e,t,n,o,r,s,i,c,{p:l,um:u,o:{createElement:a}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=f;if(m)f.pendingBranch=p,ds(p,m)?(l(m,p,f.hiddenContainer,null,r,f,s,i,c),f.deps<=0?f.resolve():g&&(l(h,d,n,o,r,null,s,i,c),Yn(f,d))):(f.pendingId++,v?(f.isHydrating=!1,f.activeBranch=m):u(m,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=a("div"),g?(l(null,p,f.hiddenContainer,null,r,f,s,i,c),f.deps<=0?f.resolve():(l(h,d,n,o,r,null,s,i,c),Yn(f,d))):h&&ds(p,h)?(l(h,p,n,o,r,f,s,i,c),f.resolve(!0)):(l(null,p,f.hiddenContainer,null,r,f,s,i,c),f.deps<=0&&f.resolve()));else if(h&&ds(p,h))l(h,p,n,o,r,f,s,i,c),Yn(f,p);else if(qn(t,"onPending"),f.pendingBranch=p,f.pendingId++,l(null,p,f.hiddenContainer,null,r,f,s,i,c),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,i,c,l,u)},hydrate:function(e,t,n,o,r,s,i,c,l){const u=t.suspense=Gn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,c,!0),a=l(e,u.pendingBranch=t.ssContent,n,u,s,i);0===u.deps&&u.resolve();return a},create:Gn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Jn(o?n.default:n),e.ssFallback=o?Jn(n.fallback):bs(es)}};function qn(e,t){const n=e.props&&e.props[t];L(n)&&n()}function Gn(e,t,n,o,r,s,i,c,l,u,a=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:g}}=u,v=e.props?ie(e.props.timeout):void 0;const y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:a,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:i,container:c}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===y.pendingId&&p(o,c,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||p(o,c,t,0)}Yn(y,o),y.pendingBranch=null,y.isInFallback=!1;let l=y.parent,u=!1;for(;l;){if(l.pendingBranch){l.effects.push(...s),u=!0;break}l=l.parent}u||bn(s),y.effects=[],qn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=y;qn(t,"onFallback");const i=h(n),u=()=>{y.isInFallback&&(f(null,e,r,i,o,null,s,c,l),Yn(y,e))},a=e.transition&&"out-in"===e.transition.mode;a&&(n.transition.afterLeave=u),y.isInFallback=!0,d(n,o,null,!0),a||u()},move(e,t,n){y.activeBranch&&p(y.activeBranch,e,t,n),y.container=e},next:()=>y.activeBranch&&h(y.activeBranch),registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{sn(t,e,0)})).then((r=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Hs(e,r,!1),o&&(s.el=o);const c=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),y,i,l),c&&g(c),Wn(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Jn(e){let t;if(L(e)){const n=cs&&e._c;n&&(e._d=!1,rs()),e=e(),n&&(e._d=!0,t=os,ss())}if(I(e)){const t=jn(e);0,e=t}return e=Es(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Zn(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):bn(e)}function Yn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,Wn(o,r))}function Qn(e,t){if(Is){let n=Is.provides;const o=Is.parent&&Is.parent.provides;o===n&&(n=Is.provides=Object.create(o)),n[e]=t}else 0}function Xn(e,t,n=!1){const o=Is||Pn;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&L(t)?t.call(o.proxy):t}else 0}function eo(e,t){return so(e,null,t)}function to(e,t){return so(e,null,{flush:"post"})}function no(e,t){return so(e,null,{flush:"sync"})}const oo={};function ro(e,t,n){return so(e,t,n)}function so(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:i}=C){const c=pe()===(null==Is?void 0:Is.scope)?Is:null;let l,u,a=!1,f=!1;if(Bt(e)?(l=()=>e.value,a=Mt(e)):Rt(e)?(l=()=>e,o=!0):I(e)?(f=!0,a=e.some((e=>Rt(e)||Mt(e))),l=()=>e.map((e=>Bt(e)?e.value:Rt(e)?lo(e):L(e)?on(e,c,2):void 0))):l=L(e)?t?()=>on(e,c,2):()=>{if(!c||!c.isUnmounted)return u&&u(),rn(e,c,3,[d])}:k,t&&o){const e=l;l=()=>lo(e())}let p,d=e=>{u=v.onStop=()=>{on(e,c,4)}};if(Us){if(d=k,t?n&&rn(t,c,3,[l(),f?[]:void 0,d]):l(),"sync"!==r)return k;{const e=ai();p=e.__watcherHandles||(e.__watcherHandles=[])}}let h=f?new Array(e.length).fill(oo):oo;const m=()=>{if(v.active)if(t){const e=v.run();(o||a||(f?e.some(((e,t)=>ne(e,h[t]))):ne(e,h)))&&(u&&u(),rn(t,c,3,[e,h===oo?void 0:f&&h[0]===oo?[]:h,d]),h=e)}else v.run()};let g;m.allowRecurse=!!t,"sync"===r?g=m:"post"===r?g=()=>jr(m,c&&c.suspense):(m.pre=!0,c&&(m.id=c.uid),g=()=>vn(m));const v=new Ce(l,g);t?n?m():h=v.run():"post"===r?jr(v.run.bind(v),c&&c.suspense):v.run();const y=()=>{v.stop(),c&&c.scope&&M(c.scope.effects,v)};return p&&p.push(y),y}function io(e,t,n){const o=this.proxy,r=B(e)?e.includes(".")?co(o,e):()=>o[e]:e.bind(o,o);let s;L(t)?s=t:(s=t.handler,n=t);const i=Is;$s(this);const c=so(r,s.bind(o),n);return i?$s(i):Vs(),c}function co(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{lo(e,t)}));else if(z(e))for(const n in e)lo(e[n],t);return e}function uo(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Fo((()=>{e.isMounted=!0})),Lo((()=>{e.isUnmounting=!0})),e}const ao=[Function,Array],fo={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ao,onEnter:ao,onAfterEnter:ao,onEnterCancelled:ao,onBeforeLeave:ao,onLeave:ao,onAfterLeave:ao,onLeaveCancelled:ao,onBeforeAppear:ao,onAppear:ao,onAfterAppear:ao,onAppearCancelled:ao},setup(e,{slots:t}){const n=Fs(),o=uo();let r;return()=>{const s=t.default&&yo(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==es){0,i=t,e=!0;break}}const c=At(e),{mode:l}=c;if(o.isLeaving)return mo(i);const u=go(i);if(!u)return mo(i);const a=ho(u,c,o,n);vo(u,a);const f=n.subTree,p=f&&go(f);let d=!1;const{getTransitionKey:h}=u.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==es&&(!ds(u,p)||d)){const e=ho(p,c,o,n);if(vo(p,e),"out-in"===l)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&n.update()},mo(i);"in-out"===l&&u.type!==es&&(e.delayLeave=(e,t,n)=>{po(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete a.delayedLeave},a.delayedLeave=n})}return i}}};function po(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ho(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=po(n,e),S=(e,t)=>{e&&rn(e,o,9,t)},x=(e,t)=>{const n=t[1];S(e,t),I(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let o=c;if(!n.isMounted){if(!r)return;o=m||c}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&ds(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(o,[t])},enter(e){let t=l,o=u,s=a;if(!n.isMounted){if(!r)return;t=g||l,o=v||u,s=y||a}let i=!1;const c=e._enterCb=t=>{i||(i=!0,S(t?s:o,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,c]):c()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();S(f,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),S(n?h:d,[t]),t._leaveCb=void 0,_[r]===e&&delete _[r])};_[r]=e,p?x(p,[t,i]):i()},clone:e=>ho(e,t,n,o)};return C}function mo(e){if(Co(e))return(e=xs(e)).children=null,e}function go(e){return Co(e)?e.children?e.children[0]:void 0:e}function vo(e,t){6&e.shapeFlag&&e.component?vo(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function yo(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let e=0;e!!e.type.__asyncLoader;function So(e){L(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:c}=e;let l,u=null,a=0;const f=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((a++,u=null,f()))),(()=>n(e)),a+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return bo({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return l},setup(){const e=Is;if(l)return()=>xo(l,e);const t=t=>{u=null,sn(t,e,13,!o)};if(i&&e.suspense||Us)return f().then((t=>()=>xo(t,e))).catch((e=>(t(e),()=>o?bs(o,{error:e}):null)));const c=jt(!1),a=jt(),p=jt(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!c.value&&!a.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),a.value=e}}),s),f().then((()=>{c.value=!0,e.parent&&Co(e.parent.vnode)&&vn(e.parent.update)})).catch((e=>{t(e),a.value=e})),()=>c.value&&l?xo(l,e):a.value&&o?bs(o,{error:a.value}):n&&!p.value?bs(n):void 0}})}function xo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=bs(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Co=e=>e.type.__isKeepAlive,wo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Fs(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let i=null;const c=n.suspense,{renderer:{p:l,m:u,um:a,o:{createElement:f}}}=o,p=f("div");function d(e){Oo(e),a(e,n,c,!0)}function h(e){r.forEach(((t,n)=>{const o=Js(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&ds(t,i)?i&&Oo(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;u(e,t,n,0,c),l(s.vnode,e,t,n,s,c,o,e.slotScopeIds,r),jr((()=>{s.isDeactivated=!1,s.a&&oe(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Os(t,s.parent,e)}),c)},o.deactivate=e=>{const t=e.component;u(e,p,null,1,c),jr((()=>{t.da&&oe(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Os(n,t.parent,e),t.isDeactivated=!0}),c)},ro((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>ko(e,t))),t&&h((e=>!ko(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,Mo(n.subTree))};return Fo(v),Vo(v),Lo((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=Mo(t);if(e.type!==r.type||e.key!==r.key)d(e);else{Oo(r);const e=r.component.da;e&&jr(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(ps(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let c=Mo(o);const l=c.type,u=Js(_o(c)?c.type.__asyncResolved||{}:l),{include:a,exclude:f,max:p}=e;if(a&&(!u||!ko(a,u))||f&&u&&ko(f,u))return i=c,o;const d=null==c.key?l:c.key,h=r.get(d);return c.el&&(c=xs(c),128&o.shapeFlag&&(o.ssContent=c)),g=d,h?(c.el=h.el,c.component=h.component,c.transition&&vo(c,c.transition),c.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),c.shapeFlag|=256,i=c,zn(o.type)?o:c}}};function ko(e,t){return I(e)?e.some((e=>ko(e,t))):B(e)?e.split(",").includes(t):"[object RegExp]"===W(e)&&e.test(t)}function Eo(e,t){No(e,"a",t)}function To(e,t){No(e,"da",t)}function No(e,t,n=Is){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Po(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Co(e.parent.vnode)&&Ro(o,t,n,e),e=e.parent}}function Ro(e,t,n,o){const r=Po(t,e,o,!0);Bo((()=>{M(o[t],r)}),n)}function Oo(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Mo(e){return 128&e.shapeFlag?e.ssContent:e}function Po(e,t,n=Is,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Re(),$s(n);const r=rn(t,n,e,o);return Vs(),Oe(),r});return o?r.unshift(s):r.push(s),s}}const Ao=e=>(t,n=Is)=>(!Us||"sp"===e)&&Po(e,((...e)=>t(...e)),n),Io=Ao("bm"),Fo=Ao("m"),$o=Ao("bu"),Vo=Ao("u"),Lo=Ao("bum"),Bo=Ao("um"),jo=Ao("sp"),Uo=Ao("rtg"),Do=Ao("rtc");function Ho(e,t=Is){Po("ec",e,t)}function Wo(e,t){const n=Pn;if(null===n)return e;const o=Gs(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let e=0;et(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function tr(e,t,n={},o,r){if(Pn.isCE||Pn.parent&&_o(Pn.parent)&&Pn.parent.isCE)return"default"!==t&&(n.name=t),bs("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),rs();const i=s&&nr(s(n)),c=fs(Qr,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function nr(e){return e.some((e=>!ps(e)||e.type!==es&&!(e.type===Qr&&!nr(e.children))))?e:null}function or(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:te(o)]=e[o];return n}const rr=e=>e?Ls(e)?Gs(e)||e.proxy:rr(e.parent):null,sr=O(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rr(e.parent),$root:e=>rr(e.root),$emit:e=>e.emit,$options:e=>dr(e),$forceUpdate:e=>e.f||(e.f=()=>vn(e.update)),$nextTick:e=>e.n||(e.n=gn.bind(e.proxy)),$watch:e=>io.bind(e)}),ir=(e,t)=>e!==C&&!e.__isScriptSetup&&A(e,t),cr={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:c,appContext:l}=e;let u;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(ir(o,t))return i[t]=1,o[t];if(r!==C&&A(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&A(u,t))return i[t]=3,s[t];if(n!==C&&A(n,t))return i[t]=4,n[t];ur&&(i[t]=0)}}const a=sr[t];let f,p;return a?("$attrs"===t&&Me(e,0,t),a(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==C&&A(n,t)?(i[t]=4,n[t]):(p=l.config.globalProperties,A(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return ir(r,t)?(r[t]=n,!0):o!==C&&A(o,t)?(o[t]=n,!0):!A(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let c;return!!n[i]||e!==C&&A(e,i)||ir(t,i)||(c=s[0])&&A(c,i)||A(o,i)||A(sr,i)||A(r.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:A(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const lr=O({},cr,{get(e,t){if(t!==Symbol.unscopables)return cr.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!s(t)});let ur=!0;function ar(e){const t=dr(e),n=e.proxy,o=e.ctx;ur=!1,t.beforeCreate&&fr(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:c,provide:l,inject:u,created:a,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:_,render:S,renderTracked:x,renderTriggered:C,errorCaptured:w,serverPrefetch:E,expose:T,inheritAttrs:N,components:R,directives:O,filters:M}=t;if(u&&function(e,t,n=k,o=!1){I(e)&&(e=vr(e));for(const n in e){const r=e[n];let s;s=U(r)?"default"in r?Xn(r.from||n,r.default,!0):Xn(r.from||n):Xn(r),Bt(s)&&o?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[n]=s}}(u,o,null,e.appContext.config.unwrapInjectedRef),i)for(const e in i){const t=i[e];L(t)&&(o[e]=t.bind(n))}if(r){0;const t=r.call(n,n);0,U(t)&&(e.data=wt(t))}if(ur=!0,s)for(const e in s){const t=s[e],r=L(t)?t.bind(n,n):L(t.get)?t.get.bind(n,n):k;0;const i=!L(t)&&L(t.set)?t.set.bind(n):k,c=Ys({get:r,set:i});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)pr(c[e],o,n,e);if(l){const e=L(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{Qn(t,e[t])}))}function P(e,t){I(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(a&&fr(a,e,"c"),P(Io,f),P(Fo,p),P($o,d),P(Vo,h),P(Eo,m),P(To,g),P(Ho,w),P(Do,x),P(Uo,C),P(Lo,y),P(Bo,_),P(jo,E),I(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===k&&(e.render=S),null!=N&&(e.inheritAttrs=N),R&&(e.components=R),O&&(e.directives=O)}function fr(e,t,n){rn(I(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function pr(e,t,n,o){const r=o.includes(".")?co(n,o):()=>n[o];if(B(e)){const n=t[e];L(n)&&ro(r,n)}else if(L(e))ro(r,e.bind(n));else if(U(e))if(I(e))e.forEach((e=>pr(e,t,n,o)));else{const o=L(e.handler)?e.handler.bind(n):t[e.handler];L(o)&&ro(r,o,e)}else 0}function dr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let l;return c?l=c:r.length||n||o?(l={},r.length&&r.forEach((e=>hr(l,e,i,!0))),hr(l,t,i)):l=t,U(t)&&s.set(t,l),l}function hr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&hr(e,s,n,!0),r&&r.forEach((t=>hr(e,t,n,!0)));for(const r in t)if(o&&"expose"===r);else{const o=mr[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const mr={data:gr,props:br,emits:br,methods:br,computed:br,beforeCreate:yr,created:yr,beforeMount:yr,mounted:yr,beforeUpdate:yr,updated:yr,beforeDestroy:yr,beforeUnmount:yr,destroyed:yr,unmounted:yr,activated:yr,deactivated:yr,errorCaptured:yr,serverPrefetch:yr,components:br,directives:br,watch:function(e,t){if(!e)return t;if(!t)return e;const n=O(Object.create(null),e);for(const o in t)n[o]=yr(e[o],t[o]);return n},provide:gr,inject:function(e,t){return br(vr(e),vr(t))}};function gr(e,t){return t?e?function(){return O(L(e)?e.call(this,this):e,L(t)?t.call(this,this):t)}:t:e}function vr(e){if(I(e)){const t={};for(let n=0;n{l=!0;const[n,o]=xr(e,t,!0);O(i,n),o&&c.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!l)return U(e)&&o.set(e,w),w;if(I(s))for(let e=0;e-1,o[1]=n<0||e-1||A(o,"default"))&&c.push(t)}}}}const u=[i,c];return U(e)&&o.set(e,u),u}function Cr(e){return"$"!==e[0]}function wr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function kr(e,t){return wr(e)===wr(t)}function Er(e,t){return I(t)?t.findIndex((t=>kr(t,e))):L(t)&&kr(t,e)?0:-1}const Tr=e=>"_"===e[0]||"$stable"===e,Nr=e=>I(e)?e.map(Es):[Es(e)],Rr=(e,t,n)=>{if(t._n)return t;const o=Ln(((...e)=>Nr(t(...e))),n);return o._c=!1,o},Or=(e,t,n)=>{const o=e._ctx;for(const n in e){if(Tr(n))continue;const r=e[n];if(L(r))t[n]=Rr(0,r,o);else if(null!=r){0;const e=Nr(r);t[n]=()=>e}}},Mr=(e,t)=>{const n=Nr(t);e.slots.default=()=>n};function Pr(){return{app:null,config:{isNativeTag:E,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ar=0;function Ir(e,t){return function(n,o=null){L(n)||(n=Object.assign({},n)),null==o||U(o)||(o=null);const r=Pr(),s=new Set;let i=!1;const c=r.app={_uid:Ar++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:hi,get config(){return r.config},set config(e){0},use:(e,...t)=>(s.has(e)||(e&&L(e.install)?(s.add(e),e.install(c,...t)):L(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,l,u){if(!i){0;const a=bs(n,o);return a.appContext=r,l&&t?t(a,s):e(a,s,u),i=!0,c._container=s,s.__vue_app__=c,Gs(a.component)||a.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c)};return c}}function Fr(e,t,n,o,r=!1){if(I(e))return void e.forEach(((e,s)=>Fr(e,t&&(I(t)?t[s]:t),n,o,r)));if(_o(o)&&!r)return;const s=4&o.shapeFlag?Gs(o.component)||o.component.proxy:o.el,i=r?null:s,{i:c,r:l}=e;const u=t&&t.r,a=c.refs===C?c.refs={}:c.refs,f=c.setupState;if(null!=u&&u!==l&&(B(u)?(a[u]=null,A(f,u)&&(f[u]=null)):Bt(u)&&(u.value=null)),L(l))on(l,c,12,[i,a]);else{const t=B(l),o=Bt(l);if(t||o){const c=()=>{if(e.f){const n=t?A(f,l)?f[l]:a[l]:l.value;r?I(n)&&M(n,s):I(n)?n.includes(s)||n.push(s):t?(a[l]=[s],A(f,l)&&(f[l]=a[l])):(l.value=[s],e.k&&(a[e.k]=l.value))}else t?(a[l]=i,A(f,l)&&(f[l]=i)):o&&(l.value=i,e.k&&(a[e.k]=i))};i?(c.id=-1,jr(c,n)):c()}else 0}}let $r=!1;const Vr=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Lr=e=>8===e.nodeType;function Br(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:c,insert:l,createComment:u}}=e,a=(n,o,c,u,g,v=!1)=>{const y=Lr(n)&&"["===n.data,b=()=>h(n,o,c,u,g,y),{type:_,ref:S,shapeFlag:x,patchFlag:C}=o;let w=n.nodeType;o.el=n,-2===C&&(v=!1,o.dynamicChildren=null);let k=null;switch(_){case Xr:3!==w?""===o.children?(l(o.el=r(""),i(n),n),k=n):k=b():(n.data!==o.children&&($r=!0,n.data=o.children),k=s(n));break;case es:k=8!==w||y?b():s(n);break;case ts:if(y&&(w=(n=s(n)).nodeType),1===w||3===w){k=n;const e=!o.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:l,props:u,patchFlag:a,shapeFlag:f,dirs:d}=t,h="input"===l&&d||"option"===l;if(h||-1!==a){if(d&&zo(t,null,n,"created"),u)if(h||!i||48&a)for(const t in u)(h&&t.endsWith("value")||N(t)&&!q(t))&&o(e,t,null,u[t],!1,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,!1,void 0,n);let l;if((l=u&&u.onVnodeBeforeMount)&&Os(l,n,t),d&&zo(t,null,n,"beforeMount"),((l=u&&u.onVnodeMounted)||d)&&Zn((()=>{l&&Os(l,n,t),d&&zo(t,null,n,"mounted")}),r),16&f&&(!u||!u.innerHTML&&!u.textContent)){let o=p(e.firstChild,t,e,n,r,s,i);for(;o;){$r=!0;const e=o;o=o.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&($r=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,i,c)=>{c=c||!!t.dynamicChildren;const l=t.children,u=l.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(r=r?r.concat(a):a);const f=i(e),d=p(s(e),t,f,n,o,r,c);return d&&Lr(d)&&"]"===d.data?s(t.anchor=d):($r=!0,l(t.anchor=u("]"),f,d),d)},h=(e,t,o,r,l,u)=>{if($r=!0,t.el=null,u){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const a=s(e),f=i(e);return c(e),n(null,t,f,a,o,r,Vr(f),l),a},m=e=>{let t=0;for(;e;)if((e=s(e))&&Lr(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),Sn(),void(t._vnode=e);$r=!1,a(t.firstChild,e,null,null,null),Sn(),t._vnode=e,$r&&console.error("Hydration completed but contains mismatches.")},a]}const jr=Zn;function Ur(e){return Hr(e)}function Dr(e){return Hr(e,Br)}function Hr(e,t){(ce||(ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{})).__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:c,createComment:l,setText:u,setElementText:a,parentNode:f,nextSibling:p,setScopeId:d=k,insertStaticContent:h}=e,m=(e,t,n,o=null,r=null,s=null,i=!1,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!ds(e,t)&&(o=G(e),D(e,r,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Xr:g(e,t,n,o);break;case es:v(e,t,n,o);break;case ts:null==e&&y(t,n,o,i);break;case Qr:M(e,t,n,o,r,s,i,c,l);break;default:1&f?_(e,t,n,o,r,s,i,c,l):6&f?P(e,t,n,o,r,s,i,c,l):(64&f||128&f)&&u.process(e,t,n,o,r,s,i,c,l,Z)}null!=a&&r&&Fr(a,e&&e.ref,s,t||e,!t)},g=(e,t,n,r)=>{if(null==e)o(t.el=c(t.children),n,r);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},v=(e,t,n,r)=>{null==e?o(t.el=l(t.children||""),n,r):t.el=e.el},y=(e,t,n,o)=>{[e.el,e.anchor]=h(e.children,t,n,o,e.el,e.anchor)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),r(e),e=n;r(t)},_=(e,t,n,o,r,s,i,c,l)=>{i=i||"svg"===t.type,null==e?S(t,n,o,r,s,i,c,l):T(e,t,r,s,i,c,l)},S=(e,t,n,r,c,l,u,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:v,dirs:y}=e;if(p=e.el=i(e.type,l,m&&m.is,m),8&g?a(p,e.children):16&g&&E(e.children,p,null,r,c,l&&"foreignObject"!==h,u,f),y&&zo(e,null,r,"created"),x(p,e,e.scopeId,u,r),m){for(const t in m)"value"===t||q(t)||s(p,t,null,m[t],l,e.children,r,c,K);"value"in m&&s(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&Os(d,r,e)}y&&zo(e,null,r,"beforeMount");const b=(!c||c&&!c.pendingBranch)&&v&&!v.persisted;b&&v.beforeEnter(p),o(p,t,n),((d=m&&m.onVnodeMounted)||b||y)&&jr((()=>{d&&Os(d,r,e),b&&v.enter(p),y&&zo(e,null,r,"mounted")}),c)},x=(e,t,n,o,r)=>{if(n&&d(e,n),o)for(let t=0;t{for(let u=l;u{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const d=e.props||C,h=t.props||C;let m;n&&Wr(n,!1),(m=h.onVnodeBeforeUpdate)&&Os(m,n,t,e),p&&zo(t,e,n,"beforeUpdate"),n&&Wr(n,!0);const g=r&&"foreignObject"!==t.type;if(f?N(e.dynamicChildren,f,l,n,o,g,i):c||L(e,t,l,null,n,o,g,i,!1),u>0){if(16&u)R(l,t,d,h,n,o,r);else if(2&u&&d.class!==h.class&&s(l,"class",null,h.class,r),4&u&&s(l,"style",d.style,h.style,r),8&u){const i=t.dynamicProps;for(let t=0;t{m&&Os(m,n,t,e),p&&zo(t,e,n,"updated")}),o)},N=(e,t,n,o,r,s,i)=>{for(let c=0;c{if(n!==o){if(n!==C)for(const l in n)q(l)||l in o||s(e,l,n[l],null,c,t.children,r,i,K);for(const l in o){if(q(l))continue;const u=o[l],a=n[l];u!==a&&"value"!==l&&s(e,l,a,u,c,t.children,r,i,K)}"value"in o&&s(e,"value",n.value,o.value)}},M=(e,t,n,r,s,i,l,u,a)=>{const f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(u=u?u.concat(m):m),null==e?(o(f,n,r),o(p,n,r),E(t.children,n,p,s,i,l,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,n,s,i,l,u),(null!=t.key||s&&t===s.subTree)&&zr(e,t,!0)):L(e,t,n,p,s,i,l,u,a)},P=(e,t,n,o,r,s,i,c,l)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,l):I(t,n,o,r,s,i,l):F(e,t,l)},I=(e,t,n,o,r,s,i)=>{const c=e.component=As(e,o,r);if(Co(e)&&(c.ctx.renderer=Z),Ds(c),c.asyncDep){if(r&&r.registerDep(c,$),!e.el){const e=c.subTree=bs(es);v(null,e,t,n)}}else $(c,e,t,n,r,s,i)},F=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:c,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!c||c&&c.$stable)||o!==i&&(o?!i||Hn(o,i,u):!!i);if(1024&l)return!0;if(16&l)return o?Hn(o,i,u):!!i;if(8&l){const e=t.dynamicProps;for(let t=0;tan&&un.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},$=(e,t,n,o,r,s,i)=>{const c=e.effect=new Ce((()=>{if(e.isMounted){let t,{next:n,bu:o,u:c,parent:l,vnode:u}=e,a=n;0,Wr(e,!1),n?(n.el=u.el,V(e,n,i)):n=u,o&&oe(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Os(t,l,n,u),Wr(e,!0);const p=Bn(e);0;const d=e.subTree;e.subTree=p,m(d,p,f(d.el),G(d),e,r,s),n.el=p.el,null===a&&Wn(e,p.el),c&&jr(c,r),(t=n.props&&n.props.onVnodeUpdated)&&jr((()=>Os(t,l,n,u)),r)}else{let i;const{el:c,props:l}=t,{bm:u,m:a,parent:f}=e,p=_o(t);if(Wr(e,!1),u&&oe(u),!p&&(i=l&&l.onVnodeBeforeMount)&&Os(i,f,t),Wr(e,!0),c&&ee){const n=()=>{e.subTree=Bn(e),ee(c,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{0;const i=e.subTree=Bn(e);0,m(null,i,n,o,e,r,s),t.el=i.el}if(a&&jr(a,r),!p&&(i=l&&l.onVnodeMounted)){const e=t;jr((()=>Os(i,f,e)),r)}(256&t.shapeFlag||f&&_o(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&jr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>vn(l)),e.scope),l=e.update=()=>c.run();l.id=e.uid,Wr(e,!0),l()},V=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,c=At(r),[l]=e.propsOptions;let u=!1;if(!(o||i>0)||16&i){let o;_r(e,t,r,s)&&(u=!0);for(const s in c)t&&(A(t,s)||(o=X(s))!==s&&A(t,o))||(l?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Sr(l,c,s,void 0,e,!0)):delete r[s]);if(s!==c)for(const e in s)t&&A(t,e)||(delete s[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:o,slots:r}=e;let s=!0,i=C;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(O(r,t),n||1!==e||delete r._):(s=!t.$stable,Or(t,r)),i=t}else t&&(Mr(e,t),i={default:1});if(s)for(const e in r)Tr(e)||e in i||delete r[e]})(e,t.children,n),Re(),_n(),Oe()},L=(e,t,n,o,r,s,i,c,l=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void j(u,p,n,o,r,s,i,c,l);if(256&d)return void B(u,p,n,o,r,s,i,c,l)}8&h?(16&f&&K(u,r,s),p!==u&&a(n,p)):16&f?16&h?j(u,p,n,o,r,s,i,c,l):K(u,r,s,!0):(8&f&&a(n,""),16&h&&E(p,n,o,r,s,i,c,l))},B=(e,t,n,o,r,s,i,c,l)=>{t=t||w;const u=(e=e||w).length,a=t.length,f=Math.min(u,a);let p;for(p=0;pa?K(e,r,s,!0,!1,f):E(t,n,o,r,s,i,c,l,f)},j=(e,t,n,o,r,s,i,c,l)=>{let u=0;const a=t.length;let f=e.length-1,p=a-1;for(;u<=f&&u<=p;){const o=e[u],a=t[u]=l?Ts(t[u]):Es(t[u]);if(!ds(o,a))break;m(o,a,n,null,r,s,i,c,l),u++}for(;u<=f&&u<=p;){const o=e[f],u=t[p]=l?Ts(t[p]):Es(t[p]);if(!ds(o,u))break;m(o,u,n,null,r,s,i,c,l),f--,p--}if(u>f){if(u<=p){const e=p+1,f=ep)for(;u<=f;)D(e[u],r,s,!0),u++;else{const d=u,h=u,g=new Map;for(u=h;u<=p;u++){const e=t[u]=l?Ts(t[u]):Es(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const b=p-h+1;let _=!1,S=0;const x=new Array(b);for(u=0;u=b){D(o,r,s,!0);continue}let a;if(null!=o.key)a=g.get(o.key);else for(v=h;v<=p;v++)if(0===x[v-h]&&ds(o,t[v])){a=v;break}void 0===a?D(o,r,s,!0):(x[a-h]=u+1,a>=S?S=a:_=!0,m(o,t[a],n,null,r,s,i,c,l),y++)}const C=_?function(e){const t=e.slice(),n=[0];let o,r,s,i,c;const l=e.length;for(o=0;o>1,e[n[c]]0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(x):w;for(v=C.length-1,u=b-1;u>=0;u--){const e=h+u,f=t[e],p=e+1{const{el:i,type:c,transition:l,children:u,shapeFlag:a}=e;if(6&a)return void U(e.component.subTree,t,n,r);if(128&a)return void e.suspense.move(t,n,r);if(64&a)return void c.move(e,t,n,Z);if(c===Qr){o(i,t,n);for(let e=0;e{let s;for(;e&&e!==t;)s=p(e),o(e,n,r),e=s;o(t,n,r)})(e,t,n);if(2!==r&&1&a&&l)if(0===r)l.beforeEnter(i),o(i,t,n),jr((()=>l.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=l,c=()=>o(i,t,n),u=()=>{e(i,(()=>{c(),s&&s()}))};r?r(i,c,u):u()}else o(i,t,n)},D=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:c,children:l,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=c&&Fr(c,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p,h=!_o(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Os(m,t,e),6&a)z(e.component,n,o);else{if(128&a)return void e.suspense.unmount(n,o);d&&zo(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,r,Z,o):u&&(s!==Qr||f>0&&64&f)?K(u,t,n,!1,!0):(s===Qr&&384&f||!r&&16&a)&&K(l,t,n),o&&H(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&jr((()=>{m&&Os(m,t,e),d&&zo(e,null,t,"unmounted")}),n)},H=e=>{const{type:t,el:n,anchor:o,transition:s}=e;if(t===Qr)return void W(n,o);if(t===ts)return void b(e);const i=()=>{r(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},W=(e,t)=>{let n;for(;e!==t;)n=p(e),r(e),e=n;r(t)},z=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:c}=e;o&&oe(o),r.stop(),s&&(s.active=!1,D(i,e,t,n)),c&&jr(c,t),jr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},K=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?G(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),J=(e,t,n)=>{null==e?t._vnode&&D(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),_n(),Sn(),t._vnode=e},Z={p:m,um:D,m:U,r:H,mt:I,mc:E,pc:L,pbc:N,n:G,o:e};let Q,ee;return t&&([Q,ee]=t(Z)),{render:J,hydrate:Q,createApp:Ir(J,Q)}}function Wr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function zr(e,t,n=!1){const o=e.children,r=t.children;if(I(o)&&I(r))for(let e=0;ee&&(e.disabled||""===e.disabled),qr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Gr=(e,t)=>{const n=e&&e.to;if(B(n)){if(t){const e=t(n);return e}return null}return n};function Jr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:c,shapeFlag:l,children:u,props:a}=e,f=2===s;if(f&&o(i,t,n),(!f||Kr(a))&&16&l)for(let e=0;e{16&y&&a(b,e,t,r,s,i,c,l)};v?g(n,u):f&&g(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,a=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Kr(e.props),g=m?n:a,y=m?o:d;if(i=i||qr(a),_?(p(e.dynamicChildren,_,g,r,s,i,c),zr(e,t,!0)):l||f(e,t,g,y,r,s,i,c,!1),v)m||Jr(t,n,o,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Gr(t.props,h);e&&Jr(t,e,null,u,0)}else m&&Jr(t,a,d,u,1)}Yr(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:c,children:l,anchor:u,targetAnchor:a,target:f,props:p}=e;if(f&&s(a),(i||!Kr(p))&&(s(u),16&c))for(let e=0;e0?os||w:null,ss(),cs>0&&os&&os.push(e),e}function as(e,t,n,o,r,s){return us(ys(e,t,n,o,r,s,!0))}function fs(e,t,n,o,r){return us(bs(e,t,n,o,r,!0))}function ps(e){return!!e&&!0===e.__v_isVNode}function ds(e,t){return e.type===t.type&&e.key===t.key}function hs(e){is=e}const ms="__vInternal",gs=({key:e})=>null!=e?e:null,vs=({ref:e,ref_key:t,ref_for:n})=>null!=e?B(e)||Bt(e)||L(e)?{i:Pn,r:e,k:t,f:!!n}:e:null;function ys(e,t=null,n=null,o=0,r=null,s=(e===Qr?0:1),i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gs(t),ref:t&&vs(t),scopeId:An,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Pn};return c?(Ns(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=B(n)?8:16),cs>0&&!i&&os&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&os.push(l),l}const bs=_s;function _s(e,t=null,n=null,o=0,r=null,s=!1){if(e&&e!==Go||(e=es),ps(e)){const o=xs(e,t,!0);return n&&Ns(o,n),cs>0&&!s&&os&&(6&o.shapeFlag?os[os.indexOf(e)]=o:os.push(o)),o.patchFlag|=-2,o}if(Zs(e)&&(e=e.__vccOpts),t){t=Ss(t);let{class:e,style:n}=t;e&&!B(e)&&(t.class=f(e)),U(n)&&(Pt(n)&&!I(n)&&(n=O({},n)),t.style=i(n))}return ys(e,t,n,o,r,B(e)?1:zn(e)?128:(e=>e.__isTeleport)(e)?64:U(e)?4:L(e)?2:0,s,!0)}function Ss(e){return e?Pt(e)||ms in e?O({},e):e:null}function xs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,c=t?Rs(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&gs(c),ref:t&&t.ref?n&&r?I(r)?r.concat(vs(t)):[r,vs(t)]:vs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Qr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xs(e.ssContent),ssFallback:e.ssFallback&&xs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Cs(e=" ",t=0){return bs(Xr,null,e,t)}function ws(e,t){const n=bs(ts,null,e);return n.staticCount=t,n}function ks(e="",t=!1){return t?(rs(),fs(es,null,e)):bs(es,null,e)}function Es(e){return null==e||"boolean"==typeof e?bs(es):I(e)?bs(Qr,null,e.slice()):"object"==typeof e?Ts(e):bs(Xr,null,String(e))}function Ts(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:xs(e)}function Ns(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(I(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ns(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ms in t?3===o&&Pn&&(1===Pn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Pn}}else L(t)?(t={default:t,_ctx:Pn},n=32):(t=String(t),64&o?(n=16,t=[Cs(t)]):n=8);e.children=t,e.shapeFlag|=n}function Rs(...e){const t={};for(let n=0;nIs||Pn,$s=e=>{Is=e,e.scope.on()},Vs=()=>{Is&&Is.scope.off(),Is=null};function Ls(e){return 4&e.vnode.shapeFlag}let Bs,js,Us=!1;function Ds(e,t=!1){Us=t;const{props:n,children:o}=e.vnode,r=Ls(e);!function(e,t,n,o=!1){const r={},s={};re(s,ms,1),e.propsDefaults=Object.create(null),_r(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:kt(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=At(t),re(t,"_",n)):Or(t,e.slots={})}else e.slots={},t&&Mr(e,t);re(e.slots,ms,1)})(e,o);const s=r?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=It(new Proxy(e.ctx,cr)),!1;const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?qs(e):null;$s(e),Re();const r=on(o,e,0,[e.props,n]);if(Oe(),Vs(),D(r)){if(r.then(Vs,Vs),t)return r.then((n=>{Hs(e,n,t)})).catch((t=>{sn(t,e,0)}));e.asyncDep=r}else Hs(e,r,t)}else Ks(e,t)}(e,t):void 0;return Us=!1,s}function Hs(e,t,n){L(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:U(t)&&(e.setupState=qt(t)),Ks(e,n)}function Ws(e){Bs=e,js=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lr))}}const zs=()=>!Bs;function Ks(e,t,n){const o=e.type;if(!e.render){if(!t&&Bs&&!o.render){const t=o.template||dr(e).template;if(t){0;const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,c=O(O({isCustomElement:n,delimiters:s},r),i);o.render=Bs(t,c)}}e.render=o.render||k,js&&js(e)}$s(e),Re(),ar(e),Oe(),Vs()}function qs(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(Me(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Gs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(qt(It(e.exposed)),{get:(t,n)=>n in t?t[n]:n in sr?sr[n](e):void 0,has:(e,t)=>t in e||t in sr}))}function Js(e,t=!0){return L(e)?e.displayName||e.name:e.name||t&&e.__name}function Zs(e){return L(e)&&"__vccOpts"in e}const Ys=(e,t)=>function(e,t,n=!1){let o,r;const s=L(e);return s?(o=e,r=k):(o=e.get,r=e.set),new en(o,r,s||!r,n)}(e,0,Us);function Qs(){return null}function Xs(){return null}function ei(e){0}function ti(e,t){return null}function ni(){return ri().slots}function oi(){return ri().attrs}function ri(){const e=Fs();return e.setupContext||(e.setupContext=qs(e))}function si(e,t){const n=I(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const e in t){const o=n[e];o?I(o)||L(o)?n[e]={type:o,default:t[e]}:o.default=t[e]:null===o&&(n[e]={default:t[e]})}return n}function ii(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function ci(e){const t=Fs();let n=e();return Vs(),D(n)&&(n=n.catch((e=>{throw $s(t),e}))),[n,()=>$s(t)]}function li(e,t,n){const o=arguments.length;return 2===o?U(t)&&!I(t)?ps(t)?bs(e,null,[t]):bs(e,t):bs(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ps(n)&&(n=[n]),bs(e,t,n))}const ui=Symbol(""),ai=()=>{{const e=Xn(ui);return e}};function fi(){return void 0}function pi(e,t,n,o){const r=n[o];if(r&&di(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function di(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&os&&os.push(e),!0}const hi="3.2.47",mi={createComponentInstance:As,setupComponent:Ds,renderComponentRoot:Bn,setCurrentRenderingInstance:In,isVNode:ps,normalizeVNode:Es},gi=null,vi=null,yi="undefined"!=typeof document?document:null,bi=yi&&yi.createElement("template"),_i={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?yi.createElementNS("http://www.w3.org/2000/svg",e):yi.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>yi.createTextNode(e),createComment:e=>yi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>yi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{bi.innerHTML=o?`${e}`:e;const r=bi.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const Si=/\s*!important$/;function xi(e,t,n){if(I(n))n.forEach((n=>xi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=wi[t];if(n)return n;let o=Y(t);if("filter"!==o&&o in e)return wi[t]=o;o=ee(o);for(let n=0;n{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();rn(function(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Ri||(Oi.then((()=>Ri=0)),Ri=Date.now()))(),n}(o,r);Ei(e,n,i,c)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,c),s[t]=void 0)}}const Ni=/(?:Once|Passive|Capture)$/;let Ri=0;const Oi=Promise.resolve();const Mi=/^on[a-z]/;function Pi(e,t){const n=bo(e);class o extends Fi{constructor(e){super(n,e,t)}}return o.def=n,o}const Ai=e=>Pi(e,Lc),Ii="undefined"!=typeof HTMLElement?HTMLElement:class{};class Fi extends Ii{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,gn((()=>{this._connected||(Vc(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!I(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=ie(this._props[e])),(r||(r=Object.create(null)))[Y(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=I(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e],!0,!1);for(const e of n.map(Y))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t)}})}_setAttr(e){let t=this.getAttribute(e);const n=Y(e);this._numberProps&&this._numberProps[n]&&(t=ie(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(X(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(X(e),t+""):t||this.removeAttribute(X(e))))}_update(){Vc(this._createVNode(),this.shadowRoot)}_createVNode(){const e=bs(this._def,O({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),X(e)!==e&&t(X(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Fi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function $i(e="$style"){{const t=Fs();if(!t)return C;const n=t.type.__cssModules;if(!n)return C;const o=n[e];return o||C}}function Vi(e){const t=Fs();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Bi(e,n)))},o=()=>{const o=e(t.proxy);Li(t.subTree,o),n(o)};to(o),Fo((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Bo((()=>e.disconnect()))}))}function Li(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Li(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Bi(e.el,t);else if(e.type===Qr)e.children.forEach((e=>Li(e,t)));else if(e.type===ts){let{el:n,anchor:o}=e;for(;n&&(Bi(n,t),n!==o);)n=n.nextSibling}}function Bi(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const ji="transition",Ui="animation",Di=(e,{slots:t})=>li(fo,qi(e),t);Di.displayName="Transition";const Hi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Wi=Di.props=O({},fo.props,Hi),zi=(e,t=[])=>{I(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ki=e=>!!e&&(I(e)?e.some((e=>e.length>1)):e.length>1);function qi(e){const t={};for(const n in e)n in Hi||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:a=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(U(e))return[Gi(e.enter),Gi(e.leave)];{const t=Gi(e);return[t,t]}}(r),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:_,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:C=y,onAppearCancelled:w=b}=t,k=(e,t,n)=>{Zi(e,t?a:c),Zi(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,Zi(e,f),Zi(e,d),Zi(e,p),t&&t()},T=e=>(t,n)=>{const r=e?C:y,i=()=>k(t,e,n);zi(r,[t,i]),Yi((()=>{Zi(t,e?l:s),Ji(t,e?a:c),Ki(r)||Xi(t,o,m,i)}))};return O(t,{onBeforeEnter(e){zi(v,[e]),Ji(e,s),Ji(e,i)},onBeforeAppear(e){zi(x,[e]),Ji(e,l),Ji(e,u)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Ji(e,f),oc(),Ji(e,p),Yi((()=>{e._isLeaving&&(Zi(e,f),Ji(e,d),Ki(_)||Xi(e,o,g,n))})),zi(_,[e,n])},onEnterCancelled(e){k(e,!1),zi(b,[e])},onAppearCancelled(e){k(e,!0),zi(w,[e])},onLeaveCancelled(e){E(e),zi(S,[e])}})}function Gi(e){return ie(e)}function Ji(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Zi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Yi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Qi=0;function Xi(e,t,n,o){const r=e._endId=++Qi,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:c,propCount:l}=ec(e,t);if(!i)return o();const u=i+"end";let a=0;const f=()=>{e.removeEventListener(u,p),s()},p=t=>{t.target===e&&++a>=l&&f()};setTimeout((()=>{a(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),i=tc(r,s),c=o("animationDelay"),l=o("animationDuration"),u=tc(c,l);let a=null,f=0,p=0;t===ji?i>0&&(a=ji,f=i,p=s.length):t===Ui?u>0&&(a=Ui,f=u,p=l.length):(f=Math.max(i,u),a=f>0?i>u?ji:Ui:null,p=a?a===ji?s.length:l.length:0);return{type:a,timeout:f,propCount:p,hasTransform:a===ji&&/\b(transform|all)(,|$)/.test(o("transitionProperty").toString())}}function tc(e,t){for(;e.lengthnc(t)+nc(e[n]))))}function nc(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function oc(){return document.body.offsetHeight}const rc=new WeakMap,sc=new WeakMap,ic={name:"TransitionGroup",props:O({},Wi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Fs(),o=uo();let r,s;return Vo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=ec(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(lc),r.forEach(uc);const o=r.filter(ac);oc(),o.forEach((e=>{const n=e.el,o=n.style;Ji(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Zi(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=At(e),c=qi(i);let l=i.tag||Qr;r=s,s=t.default?yo(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return I(t)?e=>oe(t,e):t};function pc(e){e.target.composing=!0}function dc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const hc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=fc(r);const s=o||r.props&&"number"===r.props.type;Ei(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=se(o)),e._assign(o)})),n&&Ei(e,"change",(()=>{e.value=e.value.trim()})),t||(Ei(e,"compositionstart",pc),Ei(e,"compositionend",dc),Ei(e,"change",dc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=fc(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&se(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},mc={deep:!0,created(e,t,n){e._assign=fc(n),Ei(e,"change",(()=>{const t=e._modelValue,n=_c(e),o=e.checked,r=e._assign;if(I(t)){const e=_(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if($(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Sc(e,o))}))},mounted:gc,beforeUpdate(e,t,n){e._assign=fc(n),gc(e,t,n)}};function gc(e,{value:t,oldValue:n},o){e._modelValue=t,I(t)?e.checked=_(t,o.props.value)>-1:$(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=b(t,Sc(e,!0)))}const vc={created(e,{value:t},n){e.checked=b(t,n.props.value),e._assign=fc(n),Ei(e,"change",(()=>{e._assign(_c(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=fc(o),t!==n&&(e.checked=b(t,o.props.value))}},yc={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=$(t);Ei(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?se(_c(e)):_c(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=fc(o)},mounted(e,{value:t}){bc(e,t)},beforeUpdate(e,t,n){e._assign=fc(n)},updated(e,{value:t}){bc(e,t)}};function bc(e,t){const n=e.multiple;if(!n||I(t)||$(t)){for(let o=0,r=e.options.length;o-1:r.selected=t.has(s);else if(b(_c(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function _c(e){return"_value"in e?e._value:e.value}function Sc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const xc={created(e,t,n){wc(e,t,n,null,"created")},mounted(e,t,n){wc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){wc(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){wc(e,t,n,o,"updated")}};function Cc(e,t){switch(e){case"SELECT":return yc;case"TEXTAREA":return hc;default:switch(t){case"checkbox":return mc;case"radio":return vc;default:return hc}}}function wc(e,t,n,o,r){const s=Cc(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const kc=["ctrl","shift","alt","meta"],Ec={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>kc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Tc=(e,t)=>(n,...o)=>{for(let e=0;en=>{if(!("key"in n))return;const o=X(n.key);return t.some((e=>e===o||Nc[e]===o))?e(n):void 0},Oc={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Mc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Mc(e,!0),o.enter(e)):o.leave(e,(()=>{Mc(e,!1)})):Mc(e,t))},beforeUnmount(e,{value:t}){Mc(e,t)}};function Mc(e,t){e.style.display=t?e._vod:"none"}const Pc=O({patchProp:(e,t,n,o,r=!1,s,i,c,l)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,r):"style"===t?function(e,t,n){const o=e.style,r=B(n);if(n&&!r){if(t&&!B(t))for(const e in t)null==n[e]&&xi(o,e,"");for(const e in n)xi(o,e,n[e])}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,n,o):N(t)?R(t)||Ti(e,t,0,o,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Mi.test(t)&&L(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Mi.test(t)&&B(n))return!1;return t in e}(e,t,o,r))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=y(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(e){}c&&e.removeAttribute(t)}(e,t,o,s,i,c,l):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(ki,t.slice(6,t.length)):e.setAttributeNS(ki,t,n);else{const o=v(t);null==n||o&&!y(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,r))}},_i);let Ac,Ic=!1;function Fc(){return Ac||(Ac=Ur(Pc))}function $c(){return Ac=Ic?Ac:Dr(Pc),Ic=!0,Ac}const Vc=(...e)=>{Fc().render(...e)},Lc=(...e)=>{$c().hydrate(...e)},Bc=(...e)=>{const t=Fc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const o=Uc(e);if(!o)return;const r=t._component;L(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},jc=(...e)=>{const t=$c().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=Uc(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function Uc(e){if(B(e)){return document.querySelector(e)}return e}let Dc=!1;const Hc=()=>{Dc||(Dc=!0,hc.getSSRProps=({value:e})=>({value:e}),vc.getSSRProps=({value:e},t)=>{if(t.props&&b(t.props.value,e))return{checked:!0}},mc.getSSRProps=({value:e},t)=>{if(I(e)){if(t.props&&_(e,t.props.value)>-1)return{checked:!0}}else if($(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},xc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Cc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Oc.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};function Wc(e){throw e}function zc(e){}function Kc(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const qc=Symbol(""),Gc=Symbol(""),Jc=Symbol(""),Zc=Symbol(""),Yc=Symbol(""),Qc=Symbol(""),Xc=Symbol(""),el=Symbol(""),tl=Symbol(""),nl=Symbol(""),ol=Symbol(""),rl=Symbol(""),sl=Symbol(""),il=Symbol(""),cl=Symbol(""),ll=Symbol(""),ul=Symbol(""),al=Symbol(""),fl=Symbol(""),pl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),wl=Symbol(""),kl=Symbol(""),El=Symbol(""),Tl=Symbol(""),Nl=Symbol(""),Rl=Symbol(""),Ol=Symbol(""),Ml=Symbol(""),Pl={[qc]:"Fragment",[Gc]:"Teleport",[Jc]:"Suspense",[Zc]:"KeepAlive",[Yc]:"BaseTransition",[Qc]:"openBlock",[Xc]:"createBlock",[el]:"createElementBlock",[tl]:"createVNode",[nl]:"createElementVNode",[ol]:"createCommentVNode",[rl]:"createTextVNode",[sl]:"createStaticVNode",[il]:"resolveComponent",[cl]:"resolveDynamicComponent",[ll]:"resolveDirective",[ul]:"resolveFilter",[al]:"withDirectives",[fl]:"renderList",[pl]:"renderSlot",[dl]:"createSlots",[hl]:"toDisplayString",[ml]:"mergeProps",[gl]:"normalizeClass",[vl]:"normalizeStyle",[yl]:"normalizeProps",[bl]:"guardReactiveProps",[_l]:"toHandlers",[Sl]:"camelize",[xl]:"capitalize",[Cl]:"toHandlerKey",[wl]:"setBlockTracking",[kl]:"pushScopeId",[El]:"popScopeId",[Tl]:"withCtx",[Nl]:"unref",[Rl]:"isRef",[Ol]:"withMemo",[Ml]:"isMemoSame"};const Al={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Il(e,t,n,o,r,s,i,c=!1,l=!1,u=!1,a=Al){return e&&(c?(e.helper(Qc),e.helper(uu(e.inSSR,u))):e.helper(lu(e.inSSR,u)),i&&e.helper(al)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:u,loc:a}}function Fl(e,t=Al){return{type:17,loc:t,elements:e}}function $l(e,t=Al){return{type:15,loc:t,properties:e}}function Vl(e,t){return{type:16,loc:Al,key:B(e)?Ll(e,!0):e,value:t}}function Ll(e,t=!1,n=Al,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Bl(e,t=Al){return{type:8,loc:t,children:e}}function jl(e,t=[],n=Al){return{type:14,loc:n,callee:e,arguments:t}}function Ul(e,t,n=!1,o=!1,r=Al){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Dl(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Al}}const Hl=e=>4===e.type&&e.isStatic,Wl=(e,t)=>e===t||e===X(t);function zl(e){return Wl(e,"Teleport")?Gc:Wl(e,"Suspense")?Jc:Wl(e,"KeepAlive")?Zc:Wl(e,"BaseTransition")?Yc:void 0}const Kl=/^\d|[^\$\w]/,ql=e=>!Kl.test(e),Gl=/[A-Za-z_$\xA0-\uFFFF]/,Jl=/[\.\?\w$\xA0-\uFFFF]/,Zl=/\s+[.[]\s*|\s*[.[]\s+/g,Yl=e=>{e=e.trim().replace(Zl,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i4===e.key.type&&e.key.content===o))}return n}function hu(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function mu(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(lu(o,e.isComponent)),t(Qc),t(uu(o,e.isComponent)))}function gu(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,o=n&&n[e];return"MODE"===e?o||3:o}function vu(e,t){const n=gu("MODE",t),o=gu(e,t);return 3===n?!0===o:!1!==o}function yu(e,t,n,...o){return vu(e,t)}const bu=/&(gt|lt|amp|apos|quot);/g,_u={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},Su={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:E,isPreTag:E,isCustomElement:E,decodeEntities:e=>e.replace(bu,((e,t)=>_u[t])),onError:Wc,onWarn:zc,comments:!1};function xu(e,t={}){const n=function(e,t){const n=O({},Su);let o;for(o in t)n[o]=void 0===t[o]?Su[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=$u(n);return function(e,t=Al){return{type:0,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(Cu(n,0,[]),Vu(n,o))}function Cu(e,t,n){const o=Lu(n),r=o?o.ns:0,s=[];for(;!Wu(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&Bu(i,e.options.delimiters[0]))c=Au(e,t);else if(0===t&&"<"===i[0])if(1===i.length)Hu(e,5,1);else if("!"===i[1])Bu(i,"\x3c!--")?c=Eu(e):Bu(i,""===i[2]){Hu(e,14,2),ju(e,3);continue}if(/[a-z]/i.test(i[2])){Hu(e,23),Ou(e,1,o);continue}Hu(e,12,2),c=Tu(e)}else/[a-z]/i.test(i[1])?(c=Nu(e,n),vu("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&Ru(e.name)))&&(c=c.children)):"?"===i[1]?(Hu(e,21,1),c=Tu(e)):Hu(e,12,1);if(c||(c=Iu(e,t)),I(c))for(let e=0;e/.exec(e.source);if(o){o.index<=3&&Hu(e,0),o[1]&&Hu(e,10),n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)ju(e,s-r+1),s+4");return-1===r?(o=e.source.slice(n),ju(e,e.source.length)):(o=e.source.slice(n,r),ju(e,r+1)),{type:3,content:o,loc:Vu(e,t)}}function Nu(e,t){const n=e.inPre,o=e.inVPre,r=Lu(t),s=Ou(e,0,r),i=e.inPre&&!n,c=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,r),u=Cu(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&&yu("COMPILER_INLINE_TEMPLATE",e,t.loc)){const n=Vu(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=u,zu(e.source,s.tag))Ou(e,1,r);else if(Hu(e,24,0,s.loc.start),0===e.source.length&&"script"===s.tag.toLowerCase()){const t=u[0];t&&Bu(t.loc.source,"\x3c!--")&&Hu(e,8)}return s.loc=Vu(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const Ru=r("if,else,else-if,for,slot");function Ou(e,t,n){const o=$u(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);ju(e,r[0].length),Uu(e);const c=$u(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let u=Mu(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,O(e,c),e.source=l,u=Mu(e,t).filter((e=>"v-pre"!==e.name)));let a=!1;if(0===e.source.length?Hu(e,9):(a=Bu(e.source,"/>"),1===t&&a&&Hu(e,4),ju(e,a?2:1)),1===t)return;let f=0;return e.inVPre||("slot"===s?f=2:"template"===s?u.some((e=>7===e.type&&Ru(e.name)))&&(f=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||zl(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let e=0;e0&&!Bu(e.source,">")&&!Bu(e.source,"/>");){if(Bu(e.source,"/")){Hu(e,22),ju(e,1),Uu(e);continue}1===t&&Hu(e,3);const r=Pu(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source)&&Hu(e,15),Uu(e)}return n}function Pu(e,t){const n=$u(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o)&&Hu(e,2),t.add(o),"="===o[0]&&Hu(e,19);{const t=/["'<]/g;let n;for(;n=t.exec(o);)Hu(e,17,n.index)}let r;ju(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Uu(e),ju(e,1),Uu(e),r=function(e){const t=$u(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){ju(e,1);const t=e.source.indexOf(o);-1===t?n=Fu(e,e.source.length,4):(n=Fu(e,t,4),ju(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]);)Hu(e,18,r.index);n=Fu(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Vu(e,t)}}(e),r||Hu(e,13));const s=Vu(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,c=Bu(o,"."),l=t[1]||(c||Bu(o,":")?"bind":Bu(o,"@")?"on":"slot");if(t[2]){const r="slot"===l,s=o.lastIndexOf(t[2]),c=Vu(e,Du(e,n,s),Du(e,n,s+t[2].length+(r&&t[3]||"").length));let u=t[2],a=!0;u.startsWith("[")?(a=!1,u.endsWith("]")?u=u.slice(1,u.length-1):(Hu(e,27),u=u.slice(1))):r&&(u+=t[3]||""),i={type:4,content:u,isStatic:a,constType:a?3:0,loc:c}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=Xl(e.start,r.content),e.source=e.source.slice(1,-1)}const u=t[3]?t[3].slice(1).split("."):[];return c&&u.push("prop"),"bind"===l&&i&&u.includes("sync")&&yu("COMPILER_V_BIND_SYNC",e,0,i.loc.source)&&(l="model",u.splice(u.indexOf("sync"),1)),{type:7,name:l,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:u,loc:s}}return!e.inVPre&&Bu(o,"v-")&&Hu(e,26),{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function Au(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return void Hu(e,25);const s=$u(e);ju(e,n.length);const i=$u(e),c=$u(e),l=r-n.length,u=e.source.slice(0,l),a=Fu(e,l,t),f=a.trim(),p=a.indexOf(f);p>0&&eu(i,u,p);return eu(c,u,l-(a.length-f.length-p)),ju(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:f,loc:Vu(e,i,c)},loc:Vu(e,s)}}function Iu(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let t=0;tr&&(o=r)}const r=$u(e);return{type:2,content:Fu(e,o,t),loc:Vu(e,r)}}function Fu(e,t,n){const o=e.source.slice(0,t);return ju(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function $u(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Vu(e,t,n){return{start:t,end:n=n||$u(e),source:e.originalSource.slice(t.offset,n.offset)}}function Lu(e){return e[e.length-1]}function Bu(e,t){return e.startsWith(t)}function ju(e,t){const{source:n}=e;eu(e,n,t),e.source=n.slice(t)}function Uu(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&ju(e,t[0].length)}function Du(e,t,n){return Xl(t,e.originalSource.slice(t.offset,n),n)}function Hu(e,t,n,o=$u(e)){n&&(o.offset+=n,o.column+=n),e.options.onError(Kc(t,{start:o,end:o,source:""}))}function Wu(e,t,n){const o=e.source;switch(t){case 0:if(Bu(o,"=0;--e)if(zu(o,n[e].tag))return!0;break;case 1:case 2:{const e=Lu(n);if(e&&zu(o,e.tag))return!0;break}case 3:if(Bu(o,"]]>"))return!0}return!o}function zu(e,t){return Bu(e,"]/.test(e[2+t.length]||">")}function Ku(e,t){Gu(e,t,qu(e,e.children[0]))}function qu(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!cu(t)}function Gu(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let e=0;e0){if(e>=2){r.codegenNode.patchFlag="-1",r.codegenNode=t.hoist(r.codegenNode),s++;continue}}else{const e=r.codegenNode;if(13===e.type){const n=ea(e);if((!n||512===n||1===n)&&Qu(r,t)>=2){const n=Xu(r);n&&(e.props=t.hoist(n))}e.dynamicProps&&(e.dynamicProps=t.hoist(e.dynamicProps))}}}if(1===r.type){const e=1===r.tagType;e&&t.scopes.vSlot++,Gu(r,t),e&&t.scopes.vSlot--}else if(11===r.type)Gu(r,t,1===r.children.length);else if(9===r.type)for(let e=0;e1)for(let r=0;r`_${Pl[w.helper(e)]}`,replaceNode(e){w.parent.children[w.childIndex]=w.currentNode=e},removeNode(e){const t=w.parent.children,n=e?t.indexOf(e):w.currentNode?w.childIndex:-1;e&&e!==w.currentNode?w.childIndex>n&&(w.childIndex--,w.onNodeRemoved()):(w.currentNode=null,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){B(e)&&(e=Ll(e)),w.hoists.push(e);const t=Ll(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Al}}(w.cached++,e,t)};return w.filters=new Set,w}function na(e,t){const n=ta(e,t);oa(e,n),t.hoistStatic&&Ku(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(qu(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&mu(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;0,e.codegenNode=Il(t,n(qc),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function oa(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(su))return;const s=[];for(let i=0;i`${Pl[e]}: _${Pl[e]}`;function ca(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:a=!1,isTS:f=!1,inSSR:p=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:u,ssr:a,isTS:f,inSSR:p,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Pl[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}function la(e,t={}){const n=ca(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:c,newline:l,scopeId:u,ssr:a}=n,f=Array.from(e.helpers),p=f.length>0,d=!s&&"module"!==o,h=n;!function(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:c,ssrRuntimeModuleName:l}=t,u=c,a=Array.from(e.helpers);if(a.length>0&&(r(`const _Vue = ${u}\n`),e.hoists.length)){r(`const { ${[tl,nl,ol,rl,sl].filter((e=>a.includes(e))).map(ia).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o,helper:r,scopeId:s,mode:i}=t;o();for(let r=0;r0)&&l()),e.directives.length&&(ua(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),ua(e.filters,"filter",n),l()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),l()),a||r("return "),e.codegenNode?pa(e.codegenNode,n):r("null"),d&&(c(),r("}")),c(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function ua(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?ul:"component"===t?il:ll);for(let n=0;n3||!1;t.push("["),n&&t.indent(),fa(e,t,n),n&&t.deindent(),t.push("]")}function fa(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,c,l,u]),t),n(")"),f&&n(")");a&&(n(", "),pa(a,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=B(e.callee)?e.callee:o(e.callee);r&&n(sa);n(s+"(",e),fa(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&o();for(let e=0;e "),(l||c)&&(n("{"),o());i?(l&&n("return "),I(i)?aa(i,t):pa(i,t)):c&&pa(c,t);(l||c)&&(r(),n("}"));u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:c,deindent:l,newline:u}=t;if(4===n.type){const e=!ql(n.content);e&&i("("),da(n,t),e&&i(")")}else i("("),pa(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),pa(o,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const a=19===r.type;a||t.indentLevel++;pa(r,t),a||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(wl)}(-1),`),i());n(`_cache[${e.index}] = `),pa(e.value,t),e.isVNode&&(n(","),i(),n(`${o(wl)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:fa(e.body,t,!0,!1)}}function da(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function ha(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(Kc(28,t.loc)),t.exp=Ll("true",!1,o)}0;if("if"===t.name){const r=va(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Kc(30,e.loc)),n.removeNode();const r=va(e,t);0,i.branches.push(r);const s=o&&o(i,r,!1);oa(r,n),s&&s(),n.currentNode=null}else n.onError(Kc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=ya(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=ya(t,i+e.branches.length-1,n)}}}))));function va(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!tu(e,"for")?e.children:[e],userKey:nu(e,"key"),isTemplateIf:n}}function ya(e,t,n){return e.condition?Dl(e.condition,ba(e,t,n),jl(n.helper(ol),['""',"true"])):ba(e,t,n)}function ba(e,t,n){const{helper:o}=n,r=Vl("key",Ll(`${t}`,!1,Al,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return pu(e,r,n),e}{let t=64;return Il(n,o(qc),$l([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(c=e).type&&c.callee===Ol?c.arguments[1].returns:c;return 13===t.type&&mu(t,n),pu(t,r,n),e}var c}const _a=ra("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(Kc(31,t.loc));const r=wa(t.exp,n);if(!r)return void n.onError(Kc(32,t.loc));const{addIdentifiers:s,removeIdentifiers:i,scopes:c}=n,{source:l,value:u,key:a,index:f}=r,p={type:11,loc:t.loc,source:l,valueAlias:u,keyAlias:a,objectIndexAlias:f,parseResult:r,children:iu(e)?e.children:[e]};n.replaceNode(p),c.vFor++;const d=o&&o(p);return()=>{c.vFor--,d&&d()}}(e,t,n,(t=>{const s=jl(o(fl),[t.source]),i=iu(e),c=tu(e,"memo"),l=nu(e,"key"),u=l&&(6===l.type?Ll(l.value.content,!0):l.exp),a=l?Vl("key",u):null,f=4===t.source.type&&t.source.constType>0,p=f?64:l?128:256;return t.codegenNode=Il(n,o(qc),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let l;const{children:p}=t;const d=1!==p.length||1!==p[0].type,h=cu(e)?e:i&&1===e.children.length&&cu(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&a&&pu(l,a,n)):d?l=Il(n,o(qc),a?$l([a]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=p[0].codegenNode,i&&a&&pu(l,a,n),l.isBlock!==!f&&(l.isBlock?(r(Qc),r(uu(n.inSSR,l.isComponent))):r(lu(n.inSSR,l.isComponent))),l.isBlock=!f,l.isBlock?(o(Qc),o(uu(n.inSSR,l.isComponent))):o(lu(n.inSSR,l.isComponent))),c){const e=Ul(Ea(t.parseResult,[Ll("_cached")]));e.body={type:21,body:[Bl(["const _memo = (",c.exp,")"]),Bl(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(Ml)}(_cached, _memo)) return _cached`]),Bl(["const _item = ",l]),Ll("_item.memo = _memo"),Ll("return _item")],loc:Al},s.arguments.push(e,Ll("_cache"),Ll(String(n.cached++)))}else s.arguments.push(Ul(Ea(t.parseResult),l,!0))}}))}));const Sa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,xa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ca=/^\(|\)$/g;function wa(e,t){const n=e.loc,o=e.content,r=o.match(Sa);if(!r)return;const[,s,i]=r,c={source:ka(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(Ca,"").trim();const u=s.indexOf(l),a=l.match(xa);if(a){l=l.replace(xa,"").trim();const e=a[1].trim();let t;if(e&&(t=o.indexOf(e,u+l.length),c.key=ka(n,e,t)),a[2]){const r=a[2].trim();r&&(c.index=ka(n,r,o.indexOf(r,c.key?t+e.length:u+l.length)))}}return l&&(c.value=ka(n,l,u)),c}function ka(e,t,n){return Ll(t,!1,Ql(e,n,t.length))}function Ea({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Ll("_".repeat(t+1),!1)))}([e,t,n,...o])}const Ta=Ll("undefined",!1),Na=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=tu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},Ra=(e,t,n)=>Ul(e,t,!1,!0,t.length?t[0].loc:n);function Oa(e,t,n=Ra){t.helper(Tl);const{children:o,loc:r}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=tu(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Hl(e)&&(c=!0),s.push(Vl(e||Ll("default",!0),n(t,o,r)))}let u=!1,a=!1;const f=[],p=new Set;let d=0;for(let e=0;e{const s=n(e,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),Vl("default",s)};u?f.length&&f.some((e=>Aa(e)))&&(a?t.onError(Kc(39,f[0].loc)):s.push(e(void 0,f))):s.push(e(void 0,o))}const h=c?2:Pa(e.children)?3:1;let m=$l(s.concat(Vl("_",Ll(h+"",!1))),r);return i.length&&(m=jl(t.helper(dl),[m,Fl(i)])),{slots:m,hasDynamicSlots:c}}function Ma(e,t,n){const o=[Vl("name",e),Vl("fn",t)];return null!=n&&o.push(Vl("key",Ll(String(n),!0))),$l(o)}function Pa(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=Ba(o),s=nu(e,"is");if(s)if(r||vu("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&Ll(s.value.content,!0):s.exp;if(e)return jl(t.helper(cl),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&tu(e,"is");if(i&&i.exp)return jl(t.helper(cl),[i.exp]);const c=zl(o)||t.isBuiltInComponent(o);if(c)return n||t.helper(c),c;return t.helper(il),t.components.add(o),hu(o,"component")}(e,t):`"${n}"`;const i=U(s)&&s.callee===cl;let c,l,u,a,f,p,d=0,h=i||s===Gc||s===Jc||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=$a(e,t,void 0,r,i);c=n.props,d=n.patchFlag,f=n.dynamicPropNames;const o=n.directives;p=o&&o.length?Fl(o.map((e=>function(e,t){const n=[],o=Ia.get(e);o?n.push(t.helperString(o)):(t.helper(ll),t.directives.add(e.name),n.push(hu(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Ll("true",!1,r);n.push($l(e.modifiers.map((e=>Vl(e,t))),r))}return Fl(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Zc&&(h=!0,d|=1024);if(r&&s!==Gc&&s!==Zc){const{slots:n,hasDynamicSlots:o}=Oa(e,t);l=n,o&&(d|=1024)}else if(1===e.children.length&&s!==Gc){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Ju(n,t)&&(d|=1),l=r||2===o?n:e.children}else l=e.children}0!==d&&(u=String(d),f&&f.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,b=!1,_=!1;const S=[],x=e=>{u.length&&(a.push($l(Va(u),c)),u=[]),e&&a.push(e)},C=({key:e,value:n})=>{if(Hl(e)){const s=e.content,i=N(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||q(s)||(y=!0),i&&q(s)&&(_=!0),20===n.type||(4===n.type||8===n.type)&&Ju(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||S.includes(s)||S.push(s),!o||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else b=!0};for(let r=0;r0&&u.push(Vl(Ll("ref_for",!0),Ll("true")))),"is"===n&&(Ba(i)||o&&o.content.startsWith("vue:")||vu("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Vl(Ll(n,!0,Ql(e,0,n.length)),Ll(o?o.content:"",r,o?o.loc:e)))}else{const{name:n,arg:r,exp:h,loc:m}=l,g="bind"===n,v="on"===n;if("slot"===n){o||t.onError(Kc(40,m));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&ou(r,"is")&&(Ba(i)||vu("COMPILER_IS_ON_ELEMENT",t)))continue;if(v&&s)continue;if((g&&ou(r,"key")||v&&p&&ou(r,"vue:before-update"))&&(d=!0),g&&ou(r,"ref")&&t.scopes.vFor>0&&u.push(Vl(Ll("ref_for",!0),Ll("true"))),!r&&(g||v)){if(b=!0,h)if(g){if(x(),vu("COMPILER_V_BIND_OBJECT_ORDER",t)){a.unshift(h);continue}a.push(h)}else x({type:14,loc:m,callee:t.helper(_l),arguments:o?[h]:[h,"true"]});else t.onError(Kc(g?34:35,m));continue}const y=t.directiveTransforms[n];if(y){const{props:n,needRuntime:o}=y(l,e,t);!s&&n.forEach(C),v&&r&&!Hl(r)?x($l(n,c)):u.push(...n),o&&(f.push(l),j(o)&&Ia.set(l,o))}else G(n)||(f.push(l),p&&(d=!0))}}let w;if(a.length?(x(),w=a.length>1?jl(t.helper(ml),a,c):a[0]):u.length&&(w=$l(Va(u),c)),b?h|=16:(g&&!o&&(h|=2),v&&!o&&(h|=4),S.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||_||f.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})((e=>e.replace(ja,((e,t)=>t?t.toUpperCase():"")))),Da=(e,t)=>{if(cu(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let t=0;t0){const{props:o,directives:s}=$a(e,t,r,!1,!1);n=o,s.length&&t.onError(Kc(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=Ul([],n,!1,!1,o),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=jl(t.helper(pl),i,o)}};const Ha=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Wa=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let c;if(e.exp||s.length||n.onError(Kc(35,r)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);c=Ll(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?te(Y(e)):`on:${e}`,!0,i.loc)}else c=Bl([`${n.helperString(Cl)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(Cl)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let u=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=Yl(l.content),t=!(e||Ha.test(l.content)),n=l.content.includes(";");0,(t||u&&e)&&(l=Bl([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let a={props:[Vl(c,l||Ll("() => {}",!1,r))]};return o&&(a=o(a)),u&&(a.props[0].value=n.cache(a.props[0].value)),a.props.forEach((e=>e.key.isHandlerKey=!0)),a},za=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.isStatic?i.content=Y(i.content):i.content=`${n.helperString(Sl)}(${i.content})`:(i.children.unshift(`${n.helperString(Sl)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&Ka(i,"."),r.includes("attr")&&Ka(i,"^")),!o||4===o.type&&!o.content.trim()?(n.onError(Kc(34,s)),{props:[Vl(i,Ll("",!0,s))]}):{props:[Vl(i,o)]}},Ka=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},qa=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&tu(e,"once",!0)){if(Ga.has(e)||t.inVOnce)return;return Ga.add(e),t.inVOnce=!0,t.helper(wl),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Za=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(Kc(41,e.loc)),Ya();const s=o.loc.source,i=4===o.type?o.content:s,c=n.bindingMetadata[s];if("props"===c||"props-aliased"===c)return n.onError(Kc(44,o.loc)),Ya();if(!i.trim()||!Yl(i))return n.onError(Kc(42,o.loc)),Ya();const l=r||Ll("modelValue",!0),u=r?Hl(r)?`onUpdate:${Y(r.content)}`:Bl(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=Bl([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const f=[Vl(l,e.exp),Vl(u,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(ql(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Hl(r)?`${r.content}Modifiers`:Bl([r,' + "Modifiers"']):"modelModifiers";f.push(Vl(n,Ll(`{ ${t} }`,!1,e.loc,2)))}return Ya(f)};function Ya(e=[]){return{props:e}}const Qa=/[\w).+\-_$\]]/,Xa=(e,t)=>{vu("COMPILER_FILTER",t)&&(5===e.type&&ef(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&ef(e.exp,t)})))};function ef(e,t){if(4===e.type)tf(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&Qa.test(e)||(a=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=tu(e,"memo");if(!n||of.has(e))return;return of.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&mu(o,t),e.codegenNode=jl(t.helper(Ol),[n.exp,Ul(void 0,o),"_cache",String(t.cached++)]))}}};function sf(e,t={}){const n=t.onError||Wc,o="module"===t.mode;!0===t.prefixIdentifiers?n(Kc(47)):o&&n(Kc(48));t.cacheHandlers&&n(Kc(49)),t.scopeId&&!o&&n(Kc(50));const r=B(e)?xu(e,t):e,[s,i]=[[Ja,ga,rf,_a,Xa,Da,Fa,Na,qa],{on:Wa,bind:za,model:Za}];return na(r,O({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:O({},i,t.directiveTransforms||{})})),la(r,O({},t,{prefixIdentifiers:false}))}const cf=Symbol(""),lf=Symbol(""),uf=Symbol(""),af=Symbol(""),ff=Symbol(""),pf=Symbol(""),df=Symbol(""),hf=Symbol(""),mf=Symbol(""),gf=Symbol("");var vf;let yf;vf={[cf]:"vModelRadio",[lf]:"vModelCheckbox",[uf]:"vModelText",[af]:"vModelSelect",[ff]:"vModelDynamic",[pf]:"withModifiers",[df]:"withKeys",[hf]:"vShow",[mf]:"Transition",[gf]:"TransitionGroup"},Object.getOwnPropertySymbols(vf).forEach((e=>{Pl[e]=vf[e]}));const bf=r("style,iframe,script,noscript",!0),_f={isVoidTag:m,isNativeTag:e=>d(e)||h(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return yf||(yf=document.createElement("div")),t?(yf.innerHTML=`
    `,yf.children[0].getAttribute("foo")):(yf.innerHTML=e,yf.textContent)},isBuiltInComponent:e=>Wl(e,"Transition")?mf:Wl(e,"TransitionGroup")?gf:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(bf(e))return 2}return 0}},Sf=(e,t)=>{const n=a(e);return Ll(JSON.stringify(n),!1,t,3)};function xf(e,t){return Kc(e,t)}const Cf=r("passive,once,capture"),wf=r("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),kf=r("left,right"),Ef=r("onkeyup,onkeydown,onkeypress",!0),Tf=(e,t)=>Hl(e)&&"onclick"===e.content.toLowerCase()?Ll(t,!0):4!==e.type?Bl(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;const Nf=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||(t.onError(xf(61,e.loc)),t.removeNode())},Rf=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ll("style",!0,t.loc),exp:Sf(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Of={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(xf(51,r)),t.children.length&&(n.onError(xf(52,r)),t.children.length=0),{props:[Vl(Ll("innerHTML",!0,r),o||Ll("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(xf(53,r)),t.children.length&&(n.onError(xf(54,r)),t.children.length=0),{props:[Vl(Ll("textContent",!0),o?Ju(o,n)>0?o:jl(n.helperString(hl),[o],r):Ll("",!0))]}},model:(e,t,n)=>{const o=Za(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(xf(56,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=uf,c=!1;if("input"===r||s){const o=nu(t,"type");if(o){if(7===o.type)i=ff;else if(o.value)switch(o.value.content){case"radio":i=cf;break;case"checkbox":i=lf;break;case"file":c=!0,n.onError(xf(57,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=ff)}else"select"===r&&(i=af);c||(o.needRuntime=n.helper(i))}else n.onError(xf(55,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>Wa(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let o=0;o{const{exp:o,loc:r}=e;return o||n.onError(xf(59,r)),{props:[],needRuntime:n.helper(hf)}}};const Mf=Object.create(null);function Pf(e,t){if(!B(e)){if(!e.nodeType)return k;e=e.innerHTML}const n=e,r=Mf[n];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);0,e=t?t.innerHTML:""}const s=O({hoistStatic:!0,onError:void 0,onWarn:k},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return sf(e,O({},_f,t,{nodeTransforms:[Nf,...Rf,...t.nodeTransforms||[]],directiveTransforms:O({},Of,t.directiveTransforms||{}),transformHoist:null}))}(e,s);const c=new Function("Vue",i)(o);return c._rc=!0,Mf[n]=c}Ws(Pf)}}]); \ No newline at end of file diff --git a/modules/backend/formwidgets/colorpicker/assets/js/dist/colorpicker.js b/modules/backend/formwidgets/colorpicker/assets/js/dist/colorpicker.js index 5fd8bf6d6c..9fdef4419d 100644 --- a/modules/backend/formwidgets/colorpicker/assets/js/dist/colorpicker.js +++ b/modules/backend/formwidgets/colorpicker/assets/js/dist/colorpicker.js @@ -1,3 +1,3 @@ (self.webpackChunk_wintercms_wn_backend_module=self.webpackChunk_wintercms_wn_backend_module||[]).push([[728],{562:function(t){ /*! Pickr 1.8.2 MIT | https://github.com/Simonwep/pickr */ -self,t.exports=(()=>{"use strict";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>E});var o={};function r(t,e,o,r,i={}){e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(o)||(o=[o]);for(const n of e)for(const e of o)n[t](e,r,{capture:!1,...i});return Array.prototype.slice.call(arguments,1)}t.r(o),t.d(o,{adjustableInputNumbers:()=>p,createElementFromString:()=>s,createFromTemplate:()=>a,eventPath:()=>c,off:()=>n,on:()=>i,resolveElement:()=>l});const i=r.bind(null,"addEventListener"),n=r.bind(null,"removeEventListener");function s(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function a(t){const e=(t,e)=>{const o=t.getAttribute(e);return t.removeAttribute(e),o},o=(t,r={})=>{const i=e(t,":obj"),n=e(t,":ref"),s=i?r[i]={}:r;n&&(r[n]=t);for(const r of Array.from(t.children)){const t=e(r,":arr"),i=o(r,t?{}:s);t&&(s[t]||(s[t]=[])).push(Object.keys(i).length?i:r)}return r};return o(s(t))}function c(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let o=t.target.parentElement;for(e=[t.target,o];o=o.parentElement;)e.push(o);return e.push(document,window),e}function l(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce(((t,e,o,r)=>(t=t.querySelector(e),ot)){function o(o){const r=[.001,.01,.1][Number(o.shiftKey||2*o.ctrlKey)]*(o.deltaY<0?1:-1);let i=0,n=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,((t,o)=>o<=n&&o+t.length>=n?(n=o,e(Number(t),r,i)):(i++,t))),t.focus(),t.setSelectionRange(n,n),o.preventDefault(),t.dispatchEvent(new Event("input"))}i(t,"focus",(()=>i(window,"wheel",o,{passive:!1}))),i(t,"blur",(()=>n(window,"wheel",o)))}const{min:h,max:u,floor:d,round:g}=Math;function f(t,e,o){e/=100,o/=100;const r=d(t=t/360*6),i=t-r,n=o*(1-e),s=o*(1-i*e),a=o*(1-(1-i)*e),c=r%6;return[255*[o,s,n,n,a,o][c],255*[a,o,o,s,n,n][c],255*[n,n,a,o,o,s][c]]}function m(t,e,o){const r=(2-(e/=100))*(o/=100)/2;return 0!==r&&(e=1===r?0:r<.5?e*o/(2*r):e*o/(2-2*r)),[t,100*e,100*r]}function v(t,e,o){const r=h(t/=255,e/=255,o/=255),i=u(t,e,o),n=i-r;let s,a;if(0===n)s=a=0;else{a=n/i;const r=((i-t)/6+n/2)/n,c=((i-e)/6+n/2)/n,l=((i-o)/6+n/2)/n;t===i?s=l-c:e===i?s=1/3+r-l:o===i&&(s=2/3+c-r),s<0?s+=1:s>1&&(s-=1)}return[360*s,100*a,100*i]}function b(t,e,o,r){return e/=100,o/=100,[...v(255*(1-h(1,(t/=100)*(1-(r/=100))+r)),255*(1-h(1,e*(1-r)+r)),255*(1-h(1,o*(1-r)+r)))]}function k(t,e,o){e/=100;const r=2*(e*=(o/=100)<.5?o:1-o)/(o+e)*100,i=100*(o+e);return[t,isNaN(r)?0:r,i]}function w(t){return v(...t.match(/.{2}/g).map((t=>parseInt(t,16))))}function y(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;const e={cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));let r;t:for(const i in e){if(!(r=e[i].exec(t)))continue;const n=t=>!!r[2]==("number"==typeof t);switch(i){case"cmyk":{const[,t,e,n,s]=o(r);if(t>100||e>100||n>100||s>100)break t;return{values:b(t,e,n,s),type:i}}case"rgba":{const[,,,t,e,s,a]=o(r);if(t>255||e>255||s>255||a<0||a>1||!n(a))break t;return{values:[...v(t,e,s),a],a:a,type:i}}case"hexa":{let[,t]=r;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let o=t.substring(6);return o=o?parseInt(o,16)/255:void 0,{values:[...w(e),o],a:o,type:i}}case"hsla":{const[,,,t,e,s,a]=o(r);if(t>360||e>100||s>100||a<0||a>1||!n(a))break t;return{values:[...k(t,e,s),a],a:a,type:i}}case"hsva":{const[,,,t,e,s,a]=o(r);if(t>360||e>100||s>100||a<0||a>1||!n(a))break t;return{values:[t,e,s,a],a:a,type:i}}}}return{values:null,type:null}}function _(t=0,e=0,o=0,r=1){const i=(t,e)=>(o=-1)=>e(~o?t.map((t=>Number(t.toFixed(o)))):t),n={h:t,s:e,v:o,a:r,toHSVA(){const t=[n.h,n.s,n.v,n.a];return t.toString=i(t,(t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${n.a})`)),t},toHSLA(){const t=[...m(n.h,n.s,n.v),n.a];return t.toString=i(t,(t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${n.a})`)),t},toRGBA(){const t=[...f(n.h,n.s,n.v),n.a];return t.toString=i(t,(t=>`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${n.a})`)),t},toCMYK(){const t=function(t,e,o){const r=f(t,e,o),i=r[0]/255,n=r[1]/255,s=r[2]/255,a=h(1-i,1-n,1-s);return[100*(1===a?0:(1-i-a)/(1-a)),100*(1===a?0:(1-n-a)/(1-a)),100*(1===a?0:(1-s-a)/(1-a)),100*a]}(n.h,n.s,n.v);return t.toString=i(t,(t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`)),t},toHEXA(){const t=function(t,e,o){return f(t,e,o).map((t=>g(t).toString(16).padStart(2,"0")))}(n.h,n.s,n.v),e=n.a>=1?"":Number((255*n.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return e&&t.push(e),t.toString=()=>`#${t.join("").toUpperCase()}`,t},clone:()=>_(n.h,n.s,n.v,n.a)};return n}const C=t=>Math.max(Math.min(t,1),0);function x(t){const e={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},t),_keyboard(t){const{options:o}=e,{type:r,key:i}=t;if(document.activeElement===o.wrapper){const{lock:o}=e.options,n="ArrowUp"===i,s="ArrowRight"===i,a="ArrowDown"===i,c="ArrowLeft"===i;if("keydown"===r&&(n||s||a||c)){let r=0,i=0;"v"===o?r=n||s?1:-1:"h"===o?r=n||s?-1:1:(i=n?-1:a?1:0,r=c?-1:s?1:0),e.update(C(e.cache.x+.01*r),C(e.cache.y+.01*i)),t.preventDefault()}else i.startsWith("Arrow")&&(e.options.onstop(),t.preventDefault())}},_tapstart(t){i(document,["mouseup","touchend","touchcancel"],e._tapstop),i(document,["mousemove","touchmove"],e._tapmove),t.cancelable&&t.preventDefault(),e._tapmove(t)},_tapmove(t){const{options:o,cache:r}=e,{lock:i,element:n,wrapper:s}=o,a=s.getBoundingClientRect();let c=0,l=0;if(t){const e=t&&t.touches&&t.touches[0];c=t?(e||t).clientX:0,l=t?(e||t).clientY:0,ca.left+a.width&&(c=a.left+a.width),la.top+a.height&&(l=a.top+a.height),c-=a.left,l-=a.top}else r&&(c=r.x*a.width,l=r.y*a.height);"h"!==i&&(n.style.left=`calc(${c/a.width*100}% - ${n.offsetWidth/2}px)`),"v"!==i&&(n.style.top=`calc(${l/a.height*100}% - ${n.offsetHeight/2}px)`),e.cache={x:c/a.width,y:l/a.height};const p=C(c/a.width),h=C(l/a.height);switch(i){case"v":return o.onchange(p);case"h":return o.onchange(h);default:return o.onchange(p,h)}},_tapstop(){e.options.onstop(),n(document,["mouseup","touchend","touchcancel"],e._tapstop),n(document,["mousemove","touchmove"],e._tapmove)},trigger(){e._tapmove()},update(t=0,o=0){const{left:r,top:i,width:n,height:s}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(o=t),e._tapmove({clientX:r+n*t,clientY:i+s*o})},destroy(){const{options:t,_tapstart:o,_keyboard:r}=e;n(document,["keydown","keyup"],r),n([t.wrapper,t.element],"mousedown",o),n([t.wrapper,t.element],"touchstart",o,{passive:!1})}},{options:o,_tapstart:r,_keyboard:s}=e;return i([o.wrapper,o.element],"mousedown",r),i([o.wrapper,o.element],"touchstart",r,{passive:!1}),i(document,["keydown","keyup"],s),e}function A(t={}){t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const e=i(t.elements,"click",(e=>{t.elements.forEach((o=>o.classList[e.target===o?"add":"remove"](t.className))),t.onchange(e),e.stopPropagation()}));return{destroy:()=>n(...e)}}const S={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8},H=(t,e,o)=>{const{container:r,margin:i,position:n,variantFlipOrder:s,positionFlipOrder:a}={container:document.documentElement.getBoundingClientRect(),...S,...o},{left:c,top:l}=e.style;e.style.left="0",e.style.top="0";const p=t.getBoundingClientRect(),h=e.getBoundingClientRect(),u={t:p.top-h.height-i,b:p.bottom+i,r:p.right+i,l:p.left-h.width-i},d={vs:p.left,vm:p.left+p.width/2+-h.width/2,ve:p.left+p.width-h.width,hs:p.top,hm:p.bottom-p.height/2-h.height/2,he:p.bottom-h.height},[g,f="middle"]=n.split("-"),m=a[g],v=s[f],{top:b,left:k,bottom:w,right:y}=r;for(const t of m){const o="t"===t||"b"===t,r=u[t],[i,n]=o?["top","left"]:["left","top"],[s,a]=o?[h.height,h.width]:[h.width,h.height],[c,l]=o?[w,y]:[y,w],[p,g]=o?[b,k]:[k,b];if(!(rc))for(const s of v){const c=d[(o?"v":"h")+s];if(!(cl))return e.style[n]=c-h[n]+"px",e.style[i]=r-h[i]+"px",t+s}}return e.style.left=c,e.style.top=l,null};function V(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class E{constructor(t){V(this,"_initializingActive",!0),V(this,"_recalc",!0),V(this,"_nanopop",null),V(this,"_root",null),V(this,"_color",_()),V(this,"_lastColor",_()),V(this,"_swatchColors",[]),V(this,"_setupAnimationFrame",null),V(this,"_eventListener",{init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]}),this.options=t=Object.assign({...E.DEFAULT_OPTIONS},t);const{swatches:e,components:o,theme:r,sliders:i,lockOpacity:n,padding:s}=t;["nano","monolith"].includes(r)&&!i&&(t.sliders="h"),o.interaction||(o.interaction={});const{preview:a,opacity:c,hue:l,palette:p}=o;o.opacity=!n&&c,o.palette=p||a||c||l,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach((t=>this.addSwatch(t)));const{button:h,app:u}=this._root;this._nanopop=((t,e,o)=>{const r="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...o}:t;return{update(t=r){const{reference:e,popper:o}=Object.assign(r,t);if(!o||!e)throw new Error("Popper- or reference-element missing.");return H(e,o,r)}}})(h,u,{margin:s}),h.setAttribute("role","button"),h.setAttribute("aria-label",this._t("btn:toggle"));const d=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!u.offsetWidth)return requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init")}))}_preBuild(){const{options:t}=this;for(const e of["el","container"])t[e]=l(t[e]);this._root=(t=>{const{components:e,useAsButton:o,inline:r,appClass:i,theme:n,lockOpacity:s}=t.options,c=t=>t?"":'style="display:none" hidden',l=e=>t._t(e),p=a(`\n
    \n\n ${o?"":''}\n\n
    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n \n\n \n \n \n \n \n\n \n \n \n
    \n
    \n
    \n `),h=p.interaction;return h.options.find((t=>!t.hidden&&!t.classList.add("active"))),h.type=()=>h.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[r,i]=o.match(/^[vh]+$/g)?o:[],n=()=>this._color||(this._color=this._lastColor.clone()),s={palette:x({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,r){if(!e.palette)return;const i=n(),{_root:s,options:a}=t,{lastColor:c,currentColor:l}=s.preview;t._recalc&&(i.s=100*o,i.v=100-100*r,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||c.style.setProperty("--pcr-color",p):(s.button.style.setProperty("--pcr-color",p),s.button.classList.remove("clear"));const h=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[h===o.toHEXA().toString()?"add":"remove"]("pcr-active");l.style.setProperty("--pcr-color",p)}}),hue:x({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const r=n();t._recalc&&(r.h=360*o),this.element.style.backgroundColor=`hsl(${r.h}, 100%, 50%)`,s.palette.trigger()}}),opacity:x({lock:"v"===r?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const r=n();t._recalc&&(r.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${r.a})`,s.palette.trigger()}}),selectable:A({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=s}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const r=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===r||t.code===r)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!c(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,r)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[r],n=t+(e>=100?1e3*o:o);return n<=0?0:Number((n{r.isOpen()&&(e.closeOnScroll&&r.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){r._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:r}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(r.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:r}=y(t),{lockOpacity:i}=this.options,n=void 0!==r&&1!==r;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&n?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],r=o.indexOf(e);return~r&&o.splice(r,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,r=_(...e),n=s(`'}\n\n
    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n \n\n \n \n \n \n \n\n \n \n \n
    \n
    \n
    \n `),h=p.interaction;return h.options.find((t=>!t.hidden&&!t.classList.add("active"))),h.type=()=>h.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[r,i]=o.match(/^[vh]+$/g)?o:[],n=()=>this._color||(this._color=this._lastColor.clone()),s={palette:x({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,r){if(!e.palette)return;const i=n(),{_root:s,options:a}=t,{lastColor:c,currentColor:l}=s.preview;t._recalc&&(i.s=100*o,i.v=100-100*r,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||c.style.setProperty("--pcr-color",p):(s.button.style.setProperty("--pcr-color",p),s.button.classList.remove("clear"));const h=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[h===o.toHEXA().toString()?"add":"remove"]("pcr-active");l.style.setProperty("--pcr-color",p)}}),hue:x({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const r=n();t._recalc&&(r.h=360*o),this.element.style.backgroundColor=`hsl(${r.h}, 100%, 50%)`,s.palette.trigger()}}),opacity:x({lock:"v"===r?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const r=n();t._recalc&&(r.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${r.a})`,s.palette.trigger()}}),selectable:A({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=s}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const r=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===r||t.code===r)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!c(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,r)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[r],n=t+(e>=100?1e3*o:o);return n<=0?0:Number((n{r.isOpen()&&(e.closeOnScroll&&r.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){r._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:r}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(r.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:r}=y(t),{lockOpacity:i}=this.options,n=void 0!==r&&1!==r;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&n?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],r=o.indexOf(e);return~r&&o.splice(r,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,r=_(...e),n=s(`'}\n\n
    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n \n\n \n \n \n \n \n\n \n \n \n
    \n
    \n
    \n `),h=p.interaction;return h.options.find((t=>!t.hidden&&!t.classList.add("active"))),h.type=()=>h.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[r,i]=o.match(/^[vh]+$/g)?o:[],n=()=>this._color||(this._color=this._lastColor.clone()),s={palette:x({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,r){if(!e.palette)return;const i=n(),{_root:s,options:a}=t,{lastColor:c,currentColor:l}=s.preview;t._recalc&&(i.s=100*o,i.v=100-100*r,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||c.style.setProperty("--pcr-color",p):(s.button.style.setProperty("--pcr-color",p),s.button.classList.remove("clear"));const h=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[h===o.toHEXA().toString()?"add":"remove"]("pcr-active");l.style.setProperty("--pcr-color",p)}}),hue:x({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const r=n();t._recalc&&(r.h=360*o),this.element.style.backgroundColor=`hsl(${r.h}, 100%, 50%)`,s.palette.trigger()}}),opacity:x({lock:"v"===r?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const r=n();t._recalc&&(r.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${r.a})`,s.palette.trigger()}}),selectable:A({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=s}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const r=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===r||t.code===r)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!c(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,r)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[r],n=t+(e>=100?1e3*o:o);return n<=0?0:Number((n{r.isOpen()&&(e.closeOnScroll&&r.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){r._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:r}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(r.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:r}=y(t),{lockOpacity:i}=this.options,n=void 0!==r&&1!==r;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&n?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],r=o.indexOf(e);return~r&&o.splice(r,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,r=_(...e),n=s(`'}\n\n
    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n \n\n \n \n \n \n \n\n \n \n \n
    \n
    \n
    \n `),h=p.interaction;return h.options.find((t=>!t.hidden&&!t.classList.add("active"))),h.type=()=>h.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[r,i]=o.match(/^[vh]+$/g)?o:[],n=()=>this._color||(this._color=this._lastColor.clone()),s={palette:x({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,r){if(!e.palette)return;const i=n(),{_root:s,options:a}=t,{lastColor:c,currentColor:l}=s.preview;t._recalc&&(i.s=100*o,i.v=100-100*r,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||c.style.setProperty("--pcr-color",p):(s.button.style.setProperty("--pcr-color",p),s.button.classList.remove("clear"));const h=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[h===o.toHEXA().toString()?"add":"remove"]("pcr-active");l.style.setProperty("--pcr-color",p)}}),hue:x({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const r=n();t._recalc&&(r.h=360*o),this.element.style.backgroundColor=`hsl(${r.h}, 100%, 50%)`,s.palette.trigger()}}),opacity:x({lock:"v"===r?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const r=n();t._recalc&&(r.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${r.a})`,s.palette.trigger()}}),selectable:A({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=s}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const r=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===r||t.code===r)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!c(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,r)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[r],n=t+(e>=100?1e3*o:o);return n<=0?0:Number((n{r.isOpen()&&(e.closeOnScroll&&r.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){r._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:r}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(r.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:r}=y(t),{lockOpacity:i}=this.options,n=void 0!==r&&1!==r;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&n?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],r=o.indexOf(e);return~r&&o.splice(r,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,r=_(...e),n=s(`