├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── art └── screenshot.png ├── composer.json ├── composer.lock ├── config └── artisan-gui.php ├── mix-manifest.json ├── package-lock.json ├── package.json ├── resources ├── css │ └── gui.css ├── js │ ├── App.vue │ ├── components │ │ ├── CommandCard.vue │ │ ├── CommandCard │ │ │ └── Badge.vue │ │ ├── CommandOutput.vue │ │ ├── CommandSidebar.vue │ │ ├── Group.vue │ │ ├── Sidebar │ │ │ ├── ArgumentInput.vue │ │ │ └── OptionInput.vue │ │ └── TopBar.vue │ └── gui.js └── views │ ├── index.blade.php │ └── partials │ ├── scripts.blade.php │ └── styles.blade.php ├── routes └── web.php ├── src ├── FilamentCommandsProvider.php ├── Http │ └── Controllers │ │ └── GuiController.php └── Pages │ └── Artisan.php ├── stubs ├── css │ └── gui.css └── js │ ├── gui.js │ └── gui.js.LICENSE.txt ├── tailwind.config.js └── webpack.mix.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [3x1io] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /vendor 3 | /node_modules -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2022 info@3x1.io 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | 3 | # Filament Artisan Commands GUI 4 | 5 | Simple but yet powerful library for running some [artisan](https://laravel.com/docs/8.x/artisan) commands. 6 | this packages is a frok of [artisan-gui](https://github.com/infureal/artisan-gui) with some custome for filament UI 7 | 8 | **NOTE** for V3 users please use this [repo](https://www.github.com/tomatophp/filament-artisan) 9 | 10 | ## Installation 11 | 12 | You can install the package via composer: 13 | 14 | ```bash 15 | composer require 3x1io/filament-commands 16 | ``` 17 | 18 | By default package has predefined config and inline styles and scripts. 19 | Since version `1.4` you can publish vendors like css and js files in `vendor/artisan-gui`: 20 | ```bash 21 | php artisan vendor:publish --provider="io3x1\FilamentCommands\FilamentCommandsProvider" 22 | ``` 23 | Publish only config: 24 | ```bash 25 | php artisan vendor:publish --tag="artisan-gui-config" 26 | ``` 27 | 28 | Publish only styles and scripts: 29 | ```bash 30 | php artisan vendor:publish --tag="artisan-gui-css-js" 31 | ``` 32 | 33 | ## Running command 34 | By default, you can access this page only in local environment. If you wish 35 | you can change `local` key in config. 36 | 37 | Simply go to `http://you-domain.com/admin/artisan` and here we go! 38 | Select needed command from list, fill arguments and options/flags and hit `run` button. 39 | 40 | ## Configuration 41 | Default config is: 42 | ```php 43 | [ 57 | 'web', 58 | // 'auth' 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Route prefix 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Prefix for gui routes. By default url is [/~artisan-gui]. 67 | | For your wish you can set it for example 'my-'. So url will be [/my-artisan-gui]. 68 | | 69 | | Why tilda? It's selected for prevent route names correlation. 70 | | 71 | */ 72 | 'prefix' => '~', 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Home url 77 | |-------------------------------------------------------------------------- 78 | | 79 | | Where to go when [home] button is pressed 80 | | 81 | */ 82 | 'home' => '/', 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Only on local 87 | |-------------------------------------------------------------------------- 88 | | 89 | | Flag that preventing showing commands if environment is on production 90 | | 91 | */ 92 | 'local' => true, 93 | 94 | /* 95 | |-------------------------------------------------------------------------- 96 | | List of commands 97 | |-------------------------------------------------------------------------- 98 | | 99 | | List of all default commands that has end of execution. Commands like 100 | | [serve] not supported in case of server side behavior of php. 101 | | Keys means group. You can shuffle commands as you wish and add your own. 102 | | 103 | */ 104 | 'commands' => [ 105 | // ... 106 | ] 107 | 108 | ]; 109 | 110 | ``` 111 | 112 | 113 | and now clear cache 114 | 115 | ```bash 116 | php artisan optimize:clear 117 | ``` 118 | 119 | ## Changelog 120 | 121 | Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. 122 | 123 | ## Credits 124 | 125 | - [infureal](https://github.com/infureal) 126 | - [3x1](https://github.com/3x1io) 127 | 128 | ## License 129 | 130 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 131 | -------------------------------------------------------------------------------- /art/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3x1io/filament-commands/d3a839f99ffb6cdf9012dd05913bce99b0d59dce/art/screenshot.png -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "3x1io/filament-commands", 3 | "type": "library", 4 | "description": "Beautiful package for [laravel:artisan] gui for cool kids.", 5 | "license": "MIT", 6 | "minimum-stability": "beta", 7 | "require": { 8 | "php": "^7.3|^8.0" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "io3x1\\FilamentCommands\\": "./src" 13 | } 14 | }, 15 | "extra": { 16 | "laravel": { 17 | "providers": [ 18 | "io3x1\\FilamentCommands\\FilamentCommandsProvider" 19 | ] 20 | } 21 | }, 22 | "archive": { 23 | "exclude": [ 24 | "./resources/js", 25 | "./resources/css", 26 | "./tailwind.config.js", 27 | "./webpack.mix.js", 28 | "./mix-manifest.json", 29 | "./package.json", 30 | "./package-lock.json" 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/artisan-gui.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'web', 16 | // 'auth' 17 | ], 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Route prefix 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Prefix for gui routes. By default url is [/~artisan-gui]. 25 | | For your wish you can set it for example 'my-'. So url will be [/my-artisan-gui]. 26 | | 27 | | Why tilda? It's selected for prevent route names correlation. 28 | | 29 | */ 30 | 'prefix' => 'admin/', 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Home url 35 | |-------------------------------------------------------------------------- 36 | | 37 | | Where to go when [home] button is pressed 38 | | 39 | */ 40 | 'home' => '/', 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Only on local 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Flag that preventing showing commands if environment is on production 48 | | 49 | */ 50 | 'local' => true, 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | List of command permissions 55 | |-------------------------------------------------------------------------- 56 | | 57 | | Specify permissions to every single command. Can be a string or array 58 | | of permissions 59 | | 60 | | Example: 61 | | 'make:controller' => 'create-controller', 62 | | 'make:event' => ['generate-files', 'create-event'], 63 | | 64 | */ 65 | 'permissions' => [], 66 | 67 | /* 68 | |-------------------------------------------------------------------------- 69 | | List of commands 70 | |-------------------------------------------------------------------------- 71 | | 72 | | List of all default commands that has end of execution. Commands like 73 | | [serve] not supported in case of server side behavior of php. 74 | | Keys means group. You can shuffle commands as you wish and add your own. 75 | | 76 | */ 77 | 'commands' => [ 78 | 'laravel' => [ 79 | 'clear-compiled', 80 | 'down', 81 | 'up', 82 | 'env', 83 | 'help', 84 | 'inspire', 85 | 'list', 86 | 'notifications:table', 87 | 'package:discover', 88 | 'schedule:run', 89 | 'schema:dump', 90 | 'session:table', 91 | 'storage:link', 92 | 'stub:publish', 93 | 'auth:clear-resets', 94 | ], 95 | 'optimize' => [ 96 | 'optimize', 97 | 'optimize:clear', 98 | ], 99 | 'cache' => [ 100 | 'cache:clear', 101 | 'cache:forget', 102 | 'cache:table', 103 | 'config:clear', 104 | 'config:cache', 105 | ], 106 | 'database' => [ 107 | 'db:seed', 108 | 'db:wipe', 109 | ], 110 | 'events' => [ 111 | 'event:cache', 112 | 'event:clear', 113 | 'event:generate', 114 | 'event:list', 115 | ], 116 | 'make' => [ 117 | 'make:cast', 118 | 'make:channel', 119 | 'make:command', 120 | 'make:component', 121 | 'make:controller', 122 | 'make:event', 123 | 'make:exception', 124 | 'make:factory', 125 | 'make:job', 126 | 'make:listener', 127 | 'make:mail', 128 | 'make:middleware', 129 | 'make:migration', 130 | 'make:model', 131 | 'make:notification', 132 | 'make:observer', 133 | 'make:policy', 134 | 'make:provider', 135 | 'make:request', 136 | 'make:resource', 137 | 'make:rule', 138 | 'make:seeder', 139 | 'make:test', 140 | ], 141 | 'migrate' => [ 142 | 'migrate', 143 | 'migrate:fresh', 144 | 'migrate:install', 145 | 'migrate:refresh', 146 | 'migrate:reset', 147 | 'migrate:rollback', 148 | 'migrate:status', 149 | ], 150 | 'queue' => [ 151 | 'queue:batches-table', 152 | 'queue:clear', 153 | 'queue:failed', 154 | 'queue:failed-table', 155 | 'queue:flush', 156 | 'queue:forget', 157 | 'queue:restart', 158 | 'queue:retry', 159 | 'queue:retry-batch', 160 | 'queue:table', 161 | ], 162 | 'route' => [ 163 | 'route:cache', 164 | 'route:clear', 165 | 'route:list', 166 | ], 167 | 'view' => [ 168 | 'view:cache', 169 | 'view:clear' 170 | ] 171 | ], 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | Navigation 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Specify settings for the navigation. 179 | | 180 | | show-only-commands-showing: 181 | | if set true, hide in the navigation if the commands are not shown. 182 | | group: 183 | | set the group name for the navigation (will be translate). 184 | */ 185 | // 'navigation' => [ 186 | // 'show-only-commands-showing' => true, 187 | // 'group' => 'System Settings' 188 | // ] 189 | 190 | ]; 191 | -------------------------------------------------------------------------------- /mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/stubs/js/gui.js": "/stubs/js/gui.js", 3 | "/stubs/css/gui.css": "/stubs/css/gui.css" 4 | } 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "artisan-gui", 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "license": "MIT", 13 | "devDependencies": { 14 | "axios": "^0.21.1", 15 | "browser-sync": "^2.26.13", 16 | "browser-sync-webpack-plugin": "^2.2.2", 17 | "cross-env": "^7.0.2", 18 | "laravel-mix": "^6.0.41", 19 | "postcss": "^8.1.14", 20 | "qs": "^6.9.6", 21 | "tailwindcss": "^2.0", 22 | "vue": "^2.6.12", 23 | "vue-loader": "^15.9.5", 24 | "vue-template-compiler": "^2.6.12" 25 | }, 26 | "dependencies": { 27 | "webpack": "^5.68.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /resources/css/gui.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /resources/js/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | 29 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 192 | -------------------------------------------------------------------------------- /resources/js/components/CommandCard.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ command.name }} 7 | 8 | 9 | 10 | {{ command.description }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {{ command.name }} 40 | 41 | 42 | 43 | {{ command.error }} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 73 | 74 | -------------------------------------------------------------------------------- /resources/js/components/CommandCard/Badge.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ name }} 6 | 7 | 8 | 9 | {{ count }} 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /resources/js/components/CommandOutput.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ command }} 7 | 8 | 9 | 10 | 11 | Status: {{ status }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /resources/js/components/CommandSidebar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ command.name }} 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {{ command.description }} 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Run 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /resources/js/components/Group.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ name }} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /resources/js/components/Sidebar/ArgumentInput.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ argument.title }} 5 | 6 | {{ argument.required ? 'Required' : 'Optional' }} 7 | 8 | 9 | 17 | 18 | 19 | {{ argument.description }} 20 | 21 | 22 | 23 | {{ errorMessage }} 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/js/components/Sidebar/OptionInput.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ option.title }} 8 | * 9 | array 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{ item }} 20 | 21 | 22 | 34 | 35 | 36 | 37 | 38 | 39 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | {{ option.title }} 65 | * 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | {{ option.description }} 75 | 76 | 77 | 78 | {{ errorMessage }} 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /resources/js/components/TopBar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 32 | 33 | 36 | -------------------------------------------------------------------------------- /resources/js/gui.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from "./App"; 3 | import axios from "axios"; 4 | 5 | Vue.component('app', App); 6 | 7 | Vue.use(function (vue, options) { 8 | vue.prototype.$axios = axios; 9 | }); 10 | 11 | new Vue({ 12 | el: '#app', 13 | }) -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @include('gui::partials.styles') 3 | 4 | 5 | 6 | 7 | 8 | @push('scripts') 9 | @include('gui::partials.scripts') 10 | @endpush 11 | -------------------------------------------------------------------------------- /resources/views/partials/scripts.blade.php: -------------------------------------------------------------------------------- 1 | @if(file_exists(public_path($styleFile = 'vendor/artisan-gui/gui.js'))) 2 | 3 | @else 4 | 7 | @endif -------------------------------------------------------------------------------- /resources/views/partials/styles.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if(file_exists(public_path($styleFile = 'vendor/artisan-gui/gui.css'))) 4 | 5 | @else 6 | 9 | @endif -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('gui.index'); 8 | 9 | Route::post('/json/{command}', [GuiController::class, 'run']) 10 | ->name('gui.run'); 11 | -------------------------------------------------------------------------------- /src/FilamentCommandsProvider.php: -------------------------------------------------------------------------------- 1 | root = realpath(__DIR__ . '/../'); 23 | } 24 | 25 | public function configurePackage(Package $package): void 26 | { 27 | $package->name('filament-commands'); 28 | } 29 | 30 | protected function registerRoutes() 31 | { 32 | 33 | $middleware = config('artisan-gui.middlewares', []); 34 | 35 | \Route::middleware($middleware) 36 | ->prefix(config('artisan-gui.prefix', '~') . 'artisan') 37 | ->group(function () { 38 | $this->loadRoutesFrom("{$this->root}/routes/web.php"); 39 | }); 40 | } 41 | 42 | public function register() 43 | { 44 | parent::register(); 45 | 46 | $this->mergeConfigFrom( 47 | "{$this->root}/config/artisan-gui.php", 48 | 'artisan-gui' 49 | ); 50 | 51 | $local = $this->app->environment('local'); 52 | $only = config('artisan-gui.local', true); 53 | 54 | if ($local || !$only) 55 | $this->registerRoutes(); 56 | 57 | // $this->loadComponents(); 58 | $this->loadViewsFrom("{$this->root}/resources/views", 'gui'); 59 | } 60 | 61 | public function boot() 62 | { 63 | parent::boot(); 64 | 65 | $this->publishVendors(); 66 | \View::share('guiRoot', $this->root); 67 | } 68 | 69 | protected function publishVendors() 70 | { 71 | $this->publishes([ 72 | "{$this->root}/config/artisan-gui.php" => config_path('artisan-gui.php') 73 | ], 'artisan-gui-config'); 74 | 75 | $this->publishes([ 76 | "{$this->root}/stubs/css/gui.css" => public_path('vendor/artisan-gui/gui.css'), 77 | "{$this->root}/stubs/js/gui.js" => public_path('vendor/artisan-gui/gui.js'), 78 | ], 'artisan-gui-css-js'); 79 | } 80 | 81 | protected function discoverComponents($dir = null) 82 | { 83 | 84 | $dir = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $dir); 85 | $dir = trim(trim($dir), DIRECTORY_SEPARATOR); 86 | 87 | $prefix = 'gui'; 88 | 89 | if ($dir) 90 | $prefix .= '-' . \Str::of($dir)->replace(['\\', '/'], ' ')->slug(); 91 | 92 | $namespace = ''; 93 | 94 | if ($dir) 95 | $namespace = str_replace(DIRECTORY_SEPARATOR, '\\', $dir) . '\\'; 96 | 97 | $path = "{$this->root}/src/View/Components/" . $dir; 98 | $fs = new Filesystem(); 99 | 100 | $components = []; 101 | 102 | foreach ($fs->files($path) as $file) { 103 | $class = "io3x1\\FilamentCommands\\View\\Components\\$namespace" . $file->getFilenameWithoutExtension(); 104 | $components[$prefix][] = $class; 105 | } 106 | 107 | foreach ($fs->directories($path) as $directory) { 108 | $components += $this->discoverComponents($dir .= '/' . basename($directory)); 109 | } 110 | 111 | return $components; 112 | } 113 | 114 | protected function loadComponents() 115 | { 116 | $components = $this->discoverComponents(); 117 | 118 | foreach ($components as $key => $group) { 119 | foreach ($group as $component) { 120 | $name = strtolower(last(explode('\\', $component))); 121 | \Blade::component($component, $name, $key); 122 | } 123 | } 124 | } 125 | 126 | protected function getPages(): array 127 | { 128 | return [ 129 | Artisan::class, 130 | ]; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/Http/Controllers/GuiController.php: -------------------------------------------------------------------------------- 1 | wantsJson()) { 25 | return $this->prepareToJson(config('artisan-gui.commands', [])); 26 | } 27 | 28 | return view('gui::index'); 29 | } 30 | 31 | function indexJSON() 32 | { 33 | if (request()->wantsJson()) { 34 | return $this->prepareToJson(config('artisan-gui.commands', [])); 35 | } 36 | } 37 | 38 | function run($command) 39 | { 40 | $command = $this->findCommandOrFail($command); 41 | 42 | $permissions = config('artisan-gui.permissions', []); 43 | 44 | if (in_array($command->getName(), array_keys($permissions)) && !\Gate::check($permissions[$command->getName()])) 45 | abort(403); 46 | 47 | $rules = $this->buildRules($command); 48 | $data = request()->validate($rules); 49 | 50 | $data = array_filter($data); 51 | $options = array_keys($command->getDefinition()->getOptions()); 52 | 53 | $params = []; 54 | 55 | foreach ($data as $key => $value) { 56 | 57 | if (in_array($key, $options)) 58 | $key = "--{$key}"; 59 | 60 | $params[$key] = $value; 61 | } 62 | 63 | $output = new BufferedOutput(); 64 | try { 65 | $status = Artisan::call($command->getName(), $params, $output); 66 | $output = $output->fetch(); 67 | } catch (\Exception $exception) { 68 | $status = $exception->getCode() ?? 500; 69 | $output = $exception->getMessage(); 70 | } 71 | 72 | $res = [ 73 | 'status' => $status, 74 | 'output' => $output, 75 | 'command' => $command->getName() 76 | ]; 77 | 78 | if (request()->wantsJson()) 79 | return $res; 80 | 81 | return back() 82 | ->with($res); 83 | } 84 | 85 | public function prepareToJson(array $commands): array 86 | { 87 | $commands = $this->renameKeys($commands); 88 | $defined = Artisan::all(); 89 | 90 | $permissions = config('artisan-gui.permissions', []); 91 | 92 | foreach ($commands as $gKey => $group) { 93 | foreach ($group as $cKey => $command) { 94 | 95 | if (($permission = $permissions[$command] ?? null) && !\Gate::check($permission)) { 96 | unset($commands[$gKey][$cKey]); 97 | continue; 98 | } 99 | 100 | $commands[$gKey][$cKey] = $this->commandToArray($defined[$command] ?? $command); 101 | } 102 | $commands[$gKey] = array_values($commands[$gKey]); 103 | 104 | if (!$commands[$gKey]) { 105 | unset($commands[$gKey]); 106 | } 107 | } 108 | 109 | return $commands; 110 | } 111 | 112 | protected function commandToArray($command): ?array 113 | { 114 | 115 | if ($command === null) 116 | return null; 117 | 118 | if (!$command instanceof Command) 119 | return [ 120 | 'name' => $command, 121 | 'error' => 'Not found' 122 | ]; 123 | 124 | return [ 125 | 'name' => $command->getName(), 126 | 'description' => $command->getDescription(), 127 | 'synopsis' => $command->getSynopsis(), 128 | 'arguments' => $this->argumentsToArray($command), 129 | 'options' => $this->optionsToArray($command), 130 | ]; 131 | } 132 | 133 | protected function optionsToArray(Command $command): ?array 134 | { 135 | $definition = $command->getDefinition(); 136 | 137 | $options = array_map(function (InputOption $option) { 138 | return [ 139 | 'title' => \Str::of($option->getName())->replace('_', ' ')->title()->__toString(), 140 | 'name' => $option->getName(), 141 | 'description' => $option->getDescription(), 142 | 'shortcut' => $option->getShortcut(), 143 | 'required' => $option->isValueRequired(), 144 | 'array' => $option->isArray(), 145 | 'accept_value' => $option->acceptValue(), 146 | 'default' => empty($default = $option->getDefault()) ? null : $default, 147 | ]; 148 | }, $definition->getOptions()); 149 | 150 | return empty($options) ? null : $options; 151 | } 152 | 153 | protected function argumentsToArray(Command $command): ?array 154 | { 155 | $definition = $command->getDefinition(); 156 | $arguments = array_map(function (InputArgument $argument) { 157 | return [ 158 | 'title' => \Str::of($argument->getName())->replace('_', ' ')->title()->__toString(), 159 | 'name' => $argument->getName(), 160 | 'description' => $argument->getDescription(), 161 | 'default' => empty($default = $argument->getDefault()) ? null : $default, 162 | 'required' => $argument->isRequired(), 163 | 'array' => $argument->isArray(), 164 | ]; 165 | }, $definition->getArguments()); 166 | 167 | return empty($arguments) ? null : $arguments; 168 | } 169 | 170 | protected function renameKeys(array $array): array 171 | { 172 | $keys = array_map(function ($key) { 173 | return \Str::title($key); 174 | }, array_keys($array)); 175 | 176 | return array_combine($keys, array_values($array)); 177 | } 178 | 179 | protected function findCommandOrFail(string $name): Command 180 | { 181 | $commands = Artisan::all(); 182 | 183 | if (!in_array($name, array_keys($commands))) 184 | abort(404); 185 | 186 | return $commands[$name]; 187 | } 188 | 189 | protected function buildRules(Command $command) 190 | { 191 | $rules = []; 192 | 193 | foreach ($command->getDefinition()->getArguments() as $argument) { 194 | $rules[$argument->getName()] = [ 195 | $argument->isRequired() ? 'required' : 'nullable', 196 | ]; 197 | } 198 | 199 | foreach ($command->getDefinition()->getOptions() as $option) { 200 | $rules[$option->getName()] = [ 201 | $option->isValueRequired() ? 'required' : 'nullable', 202 | $option->acceptValue() ? ($option->isArray() ? 'array' : 'string') : 'bool', 203 | ]; 204 | } 205 | 206 | return $rules; 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /src/Pages/Artisan.php: -------------------------------------------------------------------------------- 1 | prepareTojson(config('artisan-gui.commands', []))); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /stubs/css/gui.css: -------------------------------------------------------------------------------- 1 | /*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{-webkit-text-size-adjust:100%;line-height:1.15}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bg-transparent{background-color:transparent}.bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(249,250,251,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgba(254,242,242,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgba(239,68,68,var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity:1;background-color:rgba(209,250,229,var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.border{border-width:1px}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-10{height:2.5rem}.h-80{height:20rem}.h-full{height:100%}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-my-6{margin-bottom:-1.5rem;margin-top:-1.5rem}.mt-1{margin-top:.25rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.mt-6{margin-top:1.5rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-10{margin-bottom:2.5rem}.mt-auto{margin-top:auto}.max-w-lg{max-width:32rem}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-100{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.p-6{padding:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-7{padding-bottom:1.75rem;padding-top:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.py-px{padding-bottom:1px;padding-top:1px}.pb-4{padding-bottom:1rem}.pr-12{padding-right:3rem}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.-top-20{top:-5rem}.-left-20{left:-5rem}*{--tw-shadow:0 0 #0000}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25)}.hover\:shadow-xl:hover,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}*{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-widest{letter-spacing:.1em}.w-2{width:.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-80{width:20rem}.w-full{width:100%}.gap-8{gap:2rem}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-full{--tw-translate-y:100%}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@media (min-width:768px){.md\:px-0{padding-left:0;padding-right:0}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}} 2 | -------------------------------------------------------------------------------- /stubs/js/gui.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see gui.js.LICENSE.txt */ 2 | (()=>{var e,t={669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),i=n(372),a=n(327),s=n(97),c=n(109),u=n(985),l=n(61);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(v+":"+h)}var m=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};o(t,n,i),p=null}},p.onabort=function(){p&&(n(l("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||u(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),i=n(321),a=n(185);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=s(n(655));c.Axios=i,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=n(263),c.CancelToken=n(972),c.isCancel=n(502),c.all=function(e){return Promise.all(e)},c.spread=n(713),c.isAxiosError=n(268),e.exports=c,e.exports.default=c},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),i=n(782),a=n(572),s=n(185);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=c},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),i=n(502),a=n(655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(i,u),r.forEach(a,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var l=o.concat(i).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,u),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(155),o=n(867),i=n(16),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(a)})),e.exports=u},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n{"use strict";var r=Object.freeze({});function o(e){return null==e}function i(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var u=Object.prototype.toString;function l(e){return"[object Object]"===u.call(e)}function f(e){return"[object RegExp]"===u.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function v(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function h(e){var t=parseFloat(e);return isNaN(t)?e:t}function m(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function x(e,t){return b.call(e,t)}function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var C=/-(\w)/g,$=w((function(e){return e.replace(C,(function(e,t){return t?t.toUpperCase():""}))})),k=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),A=/\B([A-Z])/g,O=w((function(e){return e.replace(A,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function T(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function E(e,t){for(var n in t)e[n]=t[n];return e}function j(e){for(var t={},n=0;n0,ee=Z&&Z.indexOf("edge/")>0,te=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===X),ne=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),re={}.watch,oe=!1;if(G)try{var ie={};Object.defineProperty(ie,"passive",{get:function(){oe=!0}}),window.addEventListener("test-passive",null,ie)}catch(e){}var ae=function(){return void 0===K&&(K=!G&&!W&&void 0!==n.g&&(n.g.process&&"server"===n.g.process.env.VUE_ENV)),K},se=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ce(e){return"function"==typeof e&&/native code/.test(e.toString())}var ue,le="undefined"!=typeof Symbol&&ce(Symbol)&&"undefined"!=typeof Reflect&&ce(Reflect.ownKeys);ue="undefined"!=typeof Set&&ce(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var fe=N,de=0,pe=function(){this.id=de++,this.subs=[]};pe.prototype.addSub=function(e){this.subs.push(e)},pe.prototype.removeSub=function(e){_(this.subs,e)},pe.prototype.depend=function(){pe.target&&pe.target.addDep(this)},pe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===O(e)){var c=ze(String,o.type);(c<0||s0&&(vt((r=ht(r,(t||"")+"_"+n))[0])&&vt(u)&&(l[c]=be(u.text+r[0].text),r.shift()),l.push.apply(l,r)):s(r)?vt(u)?l[c]=be(u.text+r):""!==r&&l.push(be(r)):vt(r)&&vt(u)?l[c]=be(u.text+r.text):(a(e._isVList)&&i(r.tag)&&o(r.key)&&i(t)&&(r.key="__vlist"+t+"_"+n+"__"),l.push(r)));return l}function mt(e,t){if(e){for(var n=Object.create(null),r=le?Reflect.ownKeys(e):Object.keys(e),o=0;o0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==r&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in o={},e)e[c]&&"$"!==c[0]&&(o[c]=bt(t,c,e[c]))}else o={};for(var u in t)u in o||(o[u]=xt(t,u));return e&&Object.isExtensible(e)&&(e._normalized=o),z(o,"$stable",a),z(o,"$key",s),z(o,"$hasNormal",i),o}function bt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:pt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function xt(e,t){return function(){return e[t]}}function wt(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,o=e.length;rdocument.createEvent("Event").timeStamp&&(hn=function(){return mn.now()})}function yn(){var e,t;for(vn=hn(),dn=!0,cn.sort((function(e,t){return e.id-t.id})),pn=0;pnpn&&cn[n].id>e.id;)n--;cn.splice(n+1,0,e)}else cn.push(e);fn||(fn=!0,ot(yn))}}(this)},_n.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ve(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},_n.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},_n.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},_n.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var bn={enumerable:!0,configurable:!0,get:N,set:N};function xn(e,t,n){bn.get=function(){return this[t][n]},bn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,bn)}function wn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[];e.$parent&&Ae(!1);var i=function(i){o.push(i);var a=Ue(i,t,n,e);Te(r,i,a),i in e||xn(e,"_props",i)};for(var a in t)i(a);Ae(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?N:S(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return Ve(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&x(r,i)||H(i)||xn(e,"_data",i)}Se(t,!0)}(e):Se(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ae();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new _n(e,a||N,N,Cn)),o in e||$n(e,o,i)}}(e,t.computed),t.watch&&t.watch!==re&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Mn(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=Nn(a.componentOptions);s&&!t(s)&&In(n,i,r,o)}}}function In(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,_(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=Sn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Fe(Tn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&en(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,o=n&&n.context;e.$slots=yt(t._renderChildren,o),e.$scopedSlots=r,e._c=function(t,n,r,o){return zt(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return zt(e,t,n,r,o,!0)};var i=n&&n.data;Te(e,"$attrs",i&&i.attrs||r,null,!0),Te(e,"$listeners",t._parentListeners||r,null,!0)}(t),sn(t,"beforeCreate"),function(e){var t=mt(e.$options.inject,e);t&&(Ae(!1),Object.keys(t).forEach((function(n){Te(e,n,t[n])})),Ae(!0))}(t),wn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),sn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(En),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Ee,e.prototype.$delete=je,e.prototype.$watch=function(e,t,n){var r=this;if(l(t))return On(r,e,t,n);(n=n||{}).user=!0;var o=new _n(r,e,t,n);if(n.immediate)try{t.call(r,o.value)}catch(e){Ve(e,r,'callback for immediate watcher "'+o.expression+'"')}return function(){o.teardown()}}}(En),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var o=0,i=e.length;o1?T(n):n;for(var r=T(arguments,1),o='event handler for "'+e+'"',i=0,a=n.length;iparseInt(this.max)&&In(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:fe,extend:E,mergeOptions:Fe,defineReactive:Te},e.set=Ee,e.delete=je,e.nextTick=ot,e.observable=function(e){return Se(e),e},e.options=Object.create(null),F.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,E(e.options.components,Pn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=T(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Fe(this.options,e),this}}(e),jn(e),function(e){F.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(En),Object.defineProperty(En.prototype,"$isServer",{get:ae}),Object.defineProperty(En.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(En,"FunctionalRenderContext",{value:Pt}),En.version="2.6.12";var Rn=m("style,class"),Fn=m("input,textarea,option,select,progress"),Bn=function(e,t,n){return"value"===n&&Fn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Un=m("contenteditable,draggable,spellcheck"),qn=m("events,caret,typing,plaintext-only"),Hn=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),zn="http://www.w3.org/1999/xlink",Vn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Kn=function(e){return Vn(e)?e.slice(6,e.length):""},Jn=function(e){return null==e||!1===e};function Gn(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Wn(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=Wn(t,n.data));return function(e,t){if(i(e)||i(t))return Xn(e,Zn(t));return""}(t.staticClass,t.class)}function Wn(e,t){return{staticClass:Xn(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function Xn(e,t){return e?t?e+" "+t:e:t||""}function Zn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r-1?wr(e,t,n):Hn(t)?Jn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Un(t)?e.setAttribute(t,function(e,t){return Jn(t)||"false"===t?"false":"contenteditable"===e&&qn(t)?t:"true"}(t,n)):Vn(t)?Jn(n)?e.removeAttributeNS(zn,Kn(t)):e.setAttributeNS(zn,t,n):wr(e,t,n)}function wr(e,t,n){if(Jn(n))e.removeAttribute(t);else{if(Y&&!Q&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Cr={create:br,update:br};function $r(e,t){var n=t.elm,r=t.data,a=e.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var s=Gn(t),c=n._transitionClasses;i(c)&&(s=Xn(s,Zn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var kr,Ar,Or,Sr,Tr,Er,jr={create:$r,update:$r},Nr=/[\w).+\-_$\]]/;function Lr(e){var t,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&Nr.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=e.slice(0,r).trim()):m();function m(){(i||(i=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===o?o=e.slice(0,r).trim():0!==p&&m(),i)for(r=0;r-1?{exp:e.slice(0,Sr),key:'"'+e.slice(Sr+1)+'"'}:{exp:e,key:null};Ar=e,Sr=Tr=Er=0;for(;!Xr();)Zr(Or=Wr())?Qr(Or):91===Or&&Yr(Or);return{exp:e.slice(0,Tr),key:e.slice(Tr+1,Er)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Wr(){return Ar.charCodeAt(++Sr)}function Xr(){return Sr>=kr}function Zr(e){return 34===e||39===e}function Yr(e){var t=1;for(Tr=Sr;!Xr();)if(Zr(e=Wr()))Qr(e);else if(91===e&&t++,93===e&&t--,0===t){Er=Sr;break}}function Qr(e){for(var t=e;!Xr()&&(e=Wr())!==t;);}var eo,to="__r";function no(e,t,n){var r=eo;return function o(){var i=t.apply(null,arguments);null!==i&&io(e,o,n,r)}}var ro=Xe&&!(ne&&Number(ne[1])<=53);function oo(e,t,n,r){if(ro){var o=vn,i=t;t=i._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}}eo.addEventListener(e,t,oe?{capture:n,passive:r}:n)}function io(e,t,n,r){(r||eo).removeEventListener(e,t._wrapper||t,n)}function ao(e,t){if(!o(e.data.on)||!o(t.data.on)){var n=t.data.on||{},r=e.data.on||{};eo=t.elm,function(e){if(i(e.__r)){var t=Y?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}i(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),lt(n,r,oo,io,no,t.context),eo=void 0}}var so,co={create:ao,update:ao};function uo(e,t){if(!o(e.data.domProps)||!o(t.data.domProps)){var n,r,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in i(c.__ob__)&&(c=t.data.domProps=E({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=o(r)?"":String(r);lo(a,u)&&(a.value=u)}else if("innerHTML"===n&&er(a.tagName)&&o(a.innerHTML)){(so=so||document.createElement("div")).innerHTML=""+r+"";for(var l=so.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}function lo(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return h(n)!==h(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var fo={create:uo,update:uo},po=w((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function vo(e){var t=ho(e.style);return e.staticStyle?E(e.staticStyle,t):t}function ho(e){return Array.isArray(e)?j(e):"string"==typeof e?po(e):e}var mo,yo=/^--/,go=/\s*!important$/,_o=function(e,t,n){if(yo.test(t))e.style.setProperty(t,n);else if(go.test(n))e.style.setProperty(O(t),n.replace(go,""),"important");else{var r=xo(t);if(Array.isArray(n))for(var o=0,i=n.length;o-1?t.split($o).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Ao(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split($o).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Oo(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&E(t,So(e.name||"v")),E(t,e),t}return"string"==typeof e?So(e):void 0}}var So=w((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),To=G&&!Q,Eo="transition",jo="animation",No="transition",Lo="transitionend",Mo="animation",Io="animationend";To&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(No="WebkitTransition",Lo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Mo="WebkitAnimation",Io="webkitAnimationEnd"));var Do=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Po(e){Do((function(){Do(e)}))}function Ro(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),ko(e,t))}function Fo(e,t){e._transitionClasses&&_(e._transitionClasses,t),Ao(e,t)}function Bo(e,t,n){var r=qo(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Eo?Lo:Io,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout((function(){c0&&(n=Eo,l=a,f=i.length):t===jo?u>0&&(n=jo,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Eo:jo:null)?n===Eo?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Eo&&Uo.test(r[No+"Property"])}}function Ho(e,t){for(;e.length1}function Wo(e,t){!0!==t.data.show&&Vo(t)}var Xo=function(e){var t,n,r={},c=e.modules,u=e.nodeOps;for(t=0;tv?_(e,o(n[y+1])?null:n[y+1].elm,n,p,y,r):p>y&&x(t,d,v)}(d,m,y,n,l):i(y)?(i(e.text)&&u.setTextContent(d,""),_(d,null,y,0,y.length-1,n)):i(m)?x(m,0,m.length-1):i(e.text)&&u.setTextContent(d,""):e.text!==t.text&&u.setTextContent(d,t.text),i(v)&&i(p=v.hook)&&i(p=p.postpatch)&&p(e,t)}}}function k(e,t,n){if(a(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(I(ti(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}}function ei(e,t){return t.every((function(t){return!I(t,e)}))}function ti(e){return"_value"in e?e._value:e.value}function ni(e){e.target.composing=!0}function ri(e){e.target.composing&&(e.target.composing=!1,oi(e.target,"input"))}function oi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ii(e){return!e.componentInstance||e.data&&e.data.transition?e:ii(e.componentInstance._vnode)}var ai={bind:function(e,t,n){var r=t.value,o=(n=ii(n)).data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,Vo(n,(function(){e.style.display=i}))):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=ii(n)).data&&n.data.transition?(n.data.show=!0,r?Vo(n,(function(){e.style.display=e.__vOriginalDisplay})):Ko(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}},si={model:Zo,show:ai},ci={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ui(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ui(Xt(t.children)):e}function li(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[$(i)]=o[i];return t}function fi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var di=function(e){return e.tag||Wt(e)},pi=function(e){return"show"===e.name},vi={name:"transition",props:ci,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(di)).length){0;var r=this.mode;0;var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var i=ui(o);if(!i)return o;if(this._leaving)return fi(e,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=li(this),u=this._vnode,l=ui(u);if(i.data.directives&&i.data.directives.some(pi)&&(i.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(i,l)&&!Wt(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=E({},c);if("out-in"===r)return this._leaving=!0,ft(f,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),fi(e,o);if("in-out"===r){if(Wt(i))return u;var d,p=function(){d()};ft(c,"afterEnter",p),ft(c,"enterCancelled",p),ft(f,"delayLeave",(function(e){d=e}))}}return o}}},hi=E({tag:String,moveClass:String},ci);function mi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function yi(e){e.data.newPos=e.elm.getBoundingClientRect()}function gi(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete hi.mode;var _i={Transition:vi,TransitionGroup:{props:hi,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var o=nn(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=li(this),s=0;s-1?rr[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:rr[e]=/HTMLUnknownElement/.test(t.toString())},E(En.options.directives,si),E(En.options.components,_i),En.prototype.__patch__=G?Xo:N,En.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=_e),sn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new _n(e,r,N,{before:function(){e._isMounted&&!e._isDestroyed&&sn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,sn(e,"mounted")),e}(this,e=e&&G?ir(e):void 0,t)},G&&setTimeout((function(){U.devtools&&se&&se.emit("init",En)}),0);var bi=/\{\{((?:.|\r?\n)+?)\}\}/g,xi=/[-.*+?^${}()|[\]\/\\]/g,wi=w((function(e){var t=e[0].replace(xi,"\\$&"),n=e[1].replace(xi,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var Ci={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=zr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Hr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var $i,ki={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=zr(e,"style");n&&(e.staticStyle=JSON.stringify(po(n)));var r=Hr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},Ai=function(e){return($i=$i||document.createElement("div")).innerHTML=e,$i.textContent},Oi=m("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Si=m("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ti=m("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Ei=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ji=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ni="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+q.source+"]*",Li="((?:"+Ni+"\\:)?"+Ni+")",Mi=new RegExp("^<"+Li),Ii=/^\s*(\/?)>/,Di=new RegExp("^<\\/"+Li+"[^>]*>"),Pi=/^]+>/i,Ri=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Hi=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Vi=m("pre,textarea",!0),Ki=function(e,t){return e&&Vi(e)&&"\n"===t[0]};function Ji(e,t){var n=t?zi:Hi;return e.replace(n,(function(e){return qi[e]}))}var Gi,Wi,Xi,Zi,Yi,Qi,ea,ta,na=/^@|^v-on:/,ra=/^v-|^@|^:|^#/,oa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ia=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,aa=/^\(|\)$/g,sa=/^\[.*\]$/,ca=/:(.*)$/,ua=/^:|^\.|^v-bind:/,la=/\.[^.\]]+(?=[^\]]*$)/g,fa=/^v-slot(:|$)|^#/,da=/[\r\n]/,pa=/\s+/g,va=w(Ai),ha="_empty_";function ma(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Ca(t),rawAttrsMap:{},parent:n,children:[]}}function ya(e,t){Gi=t.warn||Ir,Qi=t.isPreTag||L,ea=t.mustUseProp||L,ta=t.getTagNamespace||L;var n=t.isReservedTag||L;(function(e){return!!e.component||!n(e.tag)}),Xi=Dr(t.modules,"transformNode"),Zi=Dr(t.modules,"preTransformNode"),Yi=Dr(t.modules,"postTransformNode"),Wi=t.delimiters;var r,o,i=[],a=!1!==t.preserveWhitespace,s=t.whitespace,c=!1,u=!1;function l(e){if(f(e),c||e.processed||(e=ga(e,t)),i.length||e===r||r.if&&(e.elseif||e.else)&&ba(r,{exp:e.elseif,block:e}),o&&!e.forbidden)if(e.elseif||e.else)a=e,s=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(o.children),s&&s.if&&ba(s,{exp:a.elseif,block:a});else{if(e.slotScope){var n=e.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[n]=e}o.children.push(e),e.parent=o}var a,s;e.children=e.children.filter((function(e){return!e.slotScope})),f(e),e.pre&&(c=!1),Qi(e.tag)&&(u=!1);for(var l=0;l]*>)","i")),d=e.replace(f,(function(e,n,r){return u=r.length,Bi(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ki(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));c+=e.length-d.length,e=d,A(l,c-u,c)}else{var p=e.indexOf("<");if(0===p){if(Ri.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(Fi.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Pi);if(m){C(m[0].length);continue}var y=e.match(Di);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=$();if(_){k(_),Ki(_.tagName,e)&&C(1);continue}}var b=void 0,x=void 0,w=void 0;if(p>=0){for(x=e.slice(p);!(Di.test(x)||Mi.test(x)||Ri.test(x)||Fi.test(x)||(w=x.indexOf("<",1))<0);)p+=w,x=e.slice(p);b=e.substring(0,p)}p<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function $(){var t=e.match(Mi);if(t){var n,r,o={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(Ii))&&(r=e.match(ji)||e.match(Ei));)r.start=c,C(r[0].length),r.end=c,o.attrs.push(r);if(n)return o.unarySlash=n[1],C(n[0].length),o.end=c,o}}function k(e){var n=e.tagName,c=e.unarySlash;i&&("p"===r&&Ti(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),d=0;d=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)t.end&&t.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,i):"p"===s&&(t.start&&t.start(e,[],!1,n,i),t.end&&t.end(e,n,i))}A()}(e,{warn:Gi,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,a,s,f){var d=o&&o.ns||ta(e);Y&&"svg"===d&&(n=function(e){for(var t=[],n=0;nc&&(s.push(i=e.slice(c,o)),a.push(JSON.stringify(i)));var u=Lr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c-1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),qr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Gr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Gr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Gr(t,"$$c")+"}",null,!0)}(e,r,o);else if("input"===i&&"radio"===a)!function(e,t,n){var r=n&&n.number,o=Hr(e,"value")||"null";Pr(e,"checked","_q("+t+","+(o=r?"_n("+o+")":o)+")"),qr(e,"change",Gr(t,o),null,!0)}(e,r,o);else if("input"===i||"textarea"===i)!function(e,t,n){var r=e.attrsMap.type;0;var o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?to:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n("+l+")");var f=Gr(t,l);c&&(f="if($event.target.composing)return;"+f);Pr(e,"value","("+t+")"),qr(e,u,f,null,!0),(s||a)&&qr(e,"blur","$forceUpdate()")}(e,r,o);else{if(!U.isReservedTag(i))return Jr(e,r,o),!1}return!0},text:function(e,t){t.value&&Pr(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Pr(e,"innerHTML","_s("+t.value+")",t)}},ja={expectHTML:!0,modules:Oa,directives:Ea,isPreTag:function(e){return"pre"===e},isUnaryTag:Oi,mustUseProp:Bn,canBeLeftOpenTag:Si,isReservedTag:tr,getTagNamespace:nr,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(Oa)},Na=w((function(e){return m("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function La(e,t){e&&(Sa=Na(t.staticKeys||""),Ta=t.isReservedTag||L,Ma(e),Ia(e,!1))}function Ma(e){if(e.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||y(e.tag)||!Ta(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Sa)))}(e),1===e.type){if(!Ta(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t|^function(?:\s+[\w$]+)?\s*\(/,Pa=/\([^)]*?\);*$/,Ra=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Fa={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ba={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ua=function(e){return"if("+e+")return null;"},qa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ua("$event.target !== $event.currentTarget"),ctrl:Ua("!$event.ctrlKey"),shift:Ua("!$event.shiftKey"),alt:Ua("!$event.altKey"),meta:Ua("!$event.metaKey"),left:Ua("'button' in $event && $event.button !== 0"),middle:Ua("'button' in $event && $event.button !== 1"),right:Ua("'button' in $event && $event.button !== 2")};function Ha(e,t){var n=t?"nativeOn:":"on:",r="",o="";for(var i in e){var a=za(e[i]);e[i]&&e[i].dynamic?o+=i+","+a+",":r+='"'+i+'":'+a+","}return r="{"+r.slice(0,-1)+"}",o?n+"_d("+r+",["+o.slice(0,-1)+"])":n+r}function za(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return za(e)})).join(",")+"]";var t=Ra.test(e.value),n=Da.test(e.value),r=Ra.test(e.value.replace(Pa,""));if(e.modifiers){var o="",i="",a=[];for(var s in e.modifiers)if(qa[s])i+=qa[s],Fa[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;i+=Ua(["ctrl","shift","alt","meta"].filter((function(e){return!c[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else a.push(s);return a.length&&(o+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Va).join("&&")+")return null;"}(a)),i&&(o+=i),"function($event){"+o+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Va(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Fa[e],r=Ba[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ka={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:N},Ja=function(e){this.options=e,this.warn=e.warn||Ir,this.transforms=Dr(e.modules,"transformCode"),this.dataGenFns=Dr(e.modules,"genData"),this.directives=E(E({},Ka),e.directives);var t=e.isReservedTag||L;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Ga(e,t){var n=new Ja(t);return{render:"with(this){return "+(e?Wa(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Wa(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Xa(e,t);if(e.once&&!e.onceProcessed)return Za(e,t);if(e.for&&!e.forProcessed)return es(e,t);if(e.if&&!e.ifProcessed)return Ya(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=os(e,t),o="_t("+n+(r?","+r:""),i=e.attrs||e.dynamicAttrs?ss((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:$(e.name),value:e.value,dynamic:e.dynamic}}))):null,a=e.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=","+i);a&&(o+=(i?"":",null")+","+a);return o+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:os(t,n,!0);return"_c("+e+","+ts(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=ts(e,t));var o=e.inlineTemplate?null:os(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=function(e,t){var n=e.children[0];0;if(n&&1===n.type){var r=Ga(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+ss(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function ns(e){return 1===e.type&&("slot"===e.tag||e.children.some(ns))}function rs(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ya(e,t,rs,"null");if(e.for&&!e.forProcessed)return es(e,t,rs);var r=e.slotScope===ha?"":String(e.slotScope),o="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(os(e,t)||"undefined")+":undefined":os(e,t)||"undefined":Wa(e,t))+"}",i=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+o+i+"}"}function os(e,t,n,r,o){var i=e.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Wa)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'',ds.innerHTML.indexOf(" ")>0}var ys=!!G&&ms(!1),gs=!!G&&ms(!0),_s=w((function(e){var t=ir(e);return t&&t.innerHTML})),bs=En.prototype.$mount;En.prototype.$mount=function(e,t){if((e=e&&ir(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=_s(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){0;var o=hs(r,{outputSourceRange:!1,shouldDecodeNewlines:ys,shouldDecodeNewlinesForHref:gs,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return bs.call(this,e,t)},En.compile=hs;const xs=En;function ws(e,t,n,r,o,i,a,s){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}const Cs=ws({props:["home"],data:function(){return{search:""}},methods:{clear:function(){this.search="",this.$emit("search","")}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex items-center py-6"},[n("div",{staticClass:"w-full relative"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"focus:outline-none ring-primary-500 focus:ring-2 focus:ring-opacity-50 focus:bg-white w-full bg-gray-200 px-5 pr-12 py-3 rounded-lg transition ease-in-out duration-200",attrs:{type:"text",placeholder:"Search..."},domProps:{value:e.search},on:{input:[function(t){t.target.composing||(e.search=t.target.value)},function(t){return e.$emit("search",e.search)}]}}),e._v(" "),""!==e.search?n("button",{staticClass:"absolute top-0 right-0 flex items-center justify-center h-full px-4 cursor-pointer",on:{click:e.clear}},[n("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})])]):e._e()])])}),[],!1,null,"4ac3edb4",null).exports;var $s=ws({props:["name","count","active"]},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"text-xs flex items-center"},[n("div",{staticClass:"rounded-l-md px-2 py-1 transition ease-in-out duration-200",class:{"bg-gray-100 text-gray-500":!e.active,"bg-red-50 text-red-500":e.active}},[e._v("\n "+e._s(e.name)+"\n ")]),e._v(" "),n("div",{staticClass:"rounded-r-md px-2 py-1 transition ease-in-out duration-200",class:{"bg-gray-200 text-gray-600":!e.active,"bg-red-100 text-red-600":e.active}},[e._v("\n "+e._s(e.count)+"\n ")])])}),[],!1,null,"d4982112",null);var ks=ws({components:{Badge:$s.exports},props:["command"],data:function(){return{hover:!1}},computed:{active:function(){return this.hover}},methods:{onClick:function(){this.$emit("select")}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"h-full"},[e.command.error?n("div",{staticClass:"h-full bg-gray-200 px-8 py-7 rounded-xl relative overflow-hidden"},[n("div",{staticClass:"text-gray-300 w-80 h-80 mb-6 absolute -top-20 -left-20 opacity-50"},[n("svg",{staticClass:"h-full w-full",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}})])]),e._v(" "),n("div",{staticClass:"text-xl mb-4 relative"},[n("div",{staticClass:"flex items-center mb-4"},[n("div",{staticClass:"w-2 h-2 rounded-full bg-red-500 mr-3 mt-1"}),e._v(" "),n("div",[e._v("\n "+e._s(e.command.name)+"\n ")])]),e._v(" "),n("div",{staticClass:"text-gray-500"},[e._v(e._s(e.command.error))])])]):n("div",{staticClass:"flex h-full flex-col px-8 py-7 rounded-xl bg-white cursor-pointer transition ease-in-out duration-200",class:{"shadow-2xl":e.hover},on:{click:e.onClick,mouseenter:function(t){e.hover=!0},mouseleave:function(t){e.hover=!1}}},[n("div",{staticClass:"text-xl mb-4 transition ease-in-out duration-200",class:{"text-gray-700":!e.active,"text-red-500":e.active}},[e._v("\n "+e._s(e.command.name)+"\n ")]),e._v(" "),n("div",{staticClass:"text-gray-500",class:{"mb-7":null!=e.command.arguments||null!=e.command.options}},[e._v("\n "+e._s(e.command.description)+"\n ")]),e._v(" "),n("div",{staticClass:"flex items-center mt-auto justify-end"},[null!=e.command.arguments?n("badge",{attrs:{name:"Arguments",count:Object.keys(e.command.arguments).length,active:e.active}}):e._e(),e._v(" "),null!=e.command.options?n("div",{staticClass:"ml-2"},[n("badge",{attrs:{name:"Options",count:Object.keys(e.command.options).length,active:e.active}})],1):e._e()],1)])])}),[],!1,null,"4740a55e",null);const As=ws({components:{CommandCard:ks.exports},props:["name","commands"]},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"mt-6 mb-10"},[n("div",{staticClass:"text-3xl text-gray-400 mb-6"},[e._v("\n "+e._s(e.name)+"\n ")]),e._v(" "),n("div",{staticClass:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},e._l(e.commands,(function(t){return n("command-card",{key:t.name,attrs:{command:t},on:{select:function(n){return e.$emit("select",t)}}})})),1)])}),[],!1,null,null,null).exports;const Os=ws({props:["argument","command","error","old"],mounted:function(){this.old&&(this.value=this.old),this.error&&(this.errorMessage=this.error)},data:function(){return{value:"",errorMessage:""}},computed:{id:function(){return this.argument.name+this.command.name}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("label",{staticClass:"flex items-center text-gray-500 mb-1",attrs:{for:e.id}},[e._v("\n "+e._s(e.argument.title)+"\n "),n("div",{staticClass:"px-1 py-px rounded text-xs ml-2",class:e.argument.required?"bg-red-100 text-red-500":"text-green-500 bg-green-100"},[e._v("\n "+e._s(e.argument.required?"Required":"Optional")+"\n ")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],staticClass:"px-5 py-3 w-full border rounded-lg focus:border-primary-500 transition ease-in-out duration-200 focus:outline-none",attrs:{type:"text",id:e.id,name:e.argument.name,placeholder:"Enter "+e.argument.title.toLowerCase()+"..."},domProps:{value:e.value},on:{focus:function(t){e.errorMessage=""},input:function(t){t.target.composing||(e.value=t.target.value)}}}),e._v(" "),n("div",{staticClass:"text-xs mt-1"},[null==e.argument.description||e.errorMessage?e.errorMessage?n("div",{staticClass:"text-red-800 opacity-80"},[e._v("\n "+e._s(e.errorMessage)+"\n ")]):e._e():n("div",{staticClass:"text-gray-400"},[e._v("\n "+e._s(e.argument.description)+"\n ")])])])}),[],!1,null,null,null).exports;const Ss={props:["command","option","error","old"],mounted:function(){this.error&&(this.errorMessage=this.error),this.old&&(this.option.accept_value?this.option.array?this.items=this.old:this.input=this.old:this.checked=!0)},data:function(){return{checked:!1,items:[],arrayInput:"",errorMessage:"",input:""}},computed:{id:function(){return this.command.name+this.option.name}},methods:{addItem:function(){""!==this.arrayInput&&(this.items.includes(this.arrayInput)||this.items.push(this.arrayInput),this.arrayInput="")},deleteItem:function(e){var t=this.items.indexOf(e);t>-1&&this.items.splice(t,1)},removeChar:function(e){if(""===this.arrayInput&&this.items.length>0){e.preventDefault();var t=this.items[this.items.length-1];console.log(t),this.deleteItem(t),this.arrayInput=t}}}};var Ts=ws(Ss,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.option.accept_value?n("div",[n("label",{staticClass:"block text-gray-500 mb-1 text-sm",attrs:{for:e.id}},[e._v("\n "+e._s(e.option.title)+"\n "),e.option.required?n("span",{staticClass:"text-red-500"},[e._v("*")]):e._e(),e._v(" "),e.option.array?n("span",{staticClass:"px-1 py-px rounded text-xs bg-gray-200"},[e._v("array")]):e._e()]),e._v(" "),e.option.array?n("div",[n("div",{staticClass:"flex flex-wrap items-center cursor-text px-2 py-px border bg-white rounded-lg focus-within:border-primary-500 transition ease-in-out duration-200",on:{click:function(t){return e.$refs.arrayInput.focus()}}},[e._l(e.items,(function(t){return n("input",{attrs:{type:"hidden",name:e.option.name+"[]"},domProps:{value:t}})})),e._v(" "),e._l(e.items,(function(t){return n("div",{staticClass:"cursor-pointer px-2 py-1 bg-gray-100 text-gray-800 hover:bg-gray-200 mr-1 rounded my-1 transition ease-in-out duration-200",on:{click:function(n){return e.deleteItem(t)}}},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.arrayInput,expression:"arrayInput"}],ref:"arrayInput",staticClass:"focus:outline-none bg-transparent flex-1 px-2 py-1 my-1",attrs:{type:"text",id:e.id,placeholder:"Add item...",required:e.option.required&&0===e.items.length},domProps:{value:e.arrayInput},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:(t.preventDefault(),e.addItem(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.addItem(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"backspace",void 0,t.key,void 0)?null:e.removeChar(t)}],focus:function(t){e.errorMessage=""},input:function(t){t.target.composing||(e.arrayInput=t.target.value)}}})],2)]):n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"px-4 py-2 rounded-lg border w-full focus:outline-none focus:border-primary-500 transition ease-in-out duration-200",attrs:{name:e.option.name,id:e.id,type:"text",placeholder:"Enter "+e.option.title.toLowerCase()+"...",required:e.option.required&&!1},domProps:{value:e.input},on:{focus:function(t){e.errorMessage=""},input:function(t){t.target.composing||(e.input=t.target.value)}}})])]):n("div",[n("input",{attrs:{id:e.id,name:e.option.name,type:"checkbox",value:"1",hidden:"",required:e.option.required},domProps:{checked:e.checked}}),e._v(" "),n("div",{staticClass:"flex items-center cursor-pointer",on:{change:function(t){e.errorMessage=""},click:function(t){e.checked=!e.checked}}},[n("div",{staticClass:"h-5 w-5 border bg-white rounded mr-2 flex items-center justify-center",class:{"border-primary-300":e.checked}},[e.checked?n("svg",{staticClass:"text-primary-500 w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"}})]):e._e()]),e._v(" "),n("div",{staticClass:"block text-gray-700"},[e._v("\n "+e._s(e.option.title)+"\n "),e.option.required?n("span",{staticClass:"text-red-500"},[e._v("*")]):e._e()])])]),e._v(" "),n("div",{staticClass:"text-xs mt-1"},[null==e.option.description||e.errorMessage?e.errorMessage?n("div",{staticClass:"text-red-800 opacity-80"},[e._v("\n "+e._s(e.errorMessage)+"\n ")]):e._e():n("div",{staticClass:"text-gray-400"},[e._v("\n "+e._s(e.option.description)+"\n ")])])])}),[],!1,null,null,null);const Es=ws({components:{OptionInput:Ts.exports,ArgumentInput:Os},props:["command","errors","old"],data:function(){return{}},mounted:function(){},methods:{onSubmit:function(){var e=new FormData(this.$refs.form);this.$emit("run",this.command,e),this.$emit("close")}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("form",{ref:"form",staticClass:"flex flex-col h-full relative",on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("div",{staticClass:"sticky top-0 bg-white px-6 py-4"},[n("div",{staticClass:"flex items-center justify-between mb-2"},[n("div",{staticClass:"text-2xl"},[e._v("\n "+e._s(e.command.name)+"\n ")]),e._v(" "),n("button",{staticClass:"focus:outline-none flex items-center justify-center h-10 w-10 rounded-full bg-white hover:shadow-xl text-gray-500 hover:text-gray-800 hover:bg-gray-100 transition ease-in-out duration-200",on:{click:function(t){return e.$emit("close")}}},[n("svg",{staticClass:"h-4 w-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})])])]),e._v(" "),n("div",{staticClass:"text-xs text-gray-400",class:{"mb-6":null!=e.command.arguments}},[e._v("\n "+e._s(e.command.description)+"\n ")]),e._v(" "),null!=e.command.arguments?n("div",e._l(e.command.arguments,(function(t){return n("div",{key:t.name,staticClass:"mt-4"},[n("argument-input",{attrs:{old:e.old&&e.old[t.name]?e.old[t.name]:null,error:e.errors&&e.errors[t.name]?e.errors[t.name][0]:null,argument:t,command:e.command}})],1)})),0):e._e()]),e._v(" "),n("div",{staticClass:"flex-1 bg-gray-50 px-6 py-5"},[null!=e.command.options?n("div",{staticClass:"-my-6"},e._l(e.command.options,(function(t){return n("div",{key:t.name,staticClass:"my-6"},[n("option-input",{attrs:{old:e.old&&e.old[t.name]?e.old[t.name]:null,error:e.errors&&e.errors[t.name]?e.errors[t.name][0]:null,command:e.command,option:t}})],1)})),0):e._e()]),e._v(" "),n("button",{staticClass:"flex items-center justify-end sticky bottom-0 px-8 py-6 text-xl bg-primary-500 text-white tracking-widest hover:bg-primary-600 focus:outline-none transition ease-in-out duration-200"},[n("span",{staticClass:"block mr-3"},[e._v("\n Run\n ")]),e._v(" "),n("svg",{staticClass:"w-4 h-4 mt-1",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 8l4 4m0 0l-4 4m4-4H3"}})])])])}),[],!1,null,null,null).exports;var js=ws({props:["command","status","output"]},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rounded-2xl shadow-2xl bg-gray-800 text-gray-300 p-6 overflow-y-auto",staticStyle:{"max-height":"50vh"}},[n("div",{staticClass:"mb-4 flex"},[n("div",{staticClass:"bg-primary-500 text-white px-3 py-1 rounded-lg"},[e._v("\n "+e._s(e.command)+"\n ")])]),e._v(" "),n("div",{staticClass:"mb-4 text-gray-500"},[e._v("\n Status: "+e._s(e.status)+"\n ")]),e._v(" "),n("div",{domProps:{innerHTML:e._s(e.output)}})])}),[],!1,null,null,null);function Ns(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ls(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ls(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ls(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(e[o]=s)}}return e}},methods:{fetchGroups:function(){var e=this;this.loading=!0,this.$axios.get("/").then((function(t){e.groups=t.data})).catch((function(e){return console.log(e)})).finally((function(){return e.loading=!1}))},onSelect:function(e){this.errors=[],this.old=null,this.output=null,null==e.arguments&&null==e.options?this.runCommand(e):this.selectedCommand=e},runCommand:function(e,t){var n=this;this.loading=!0,this.$axios.post(e.name,t).then((function(e){n.output=e.data})).catch((function(r){n.selectedCommand=e;var o=r.response.data;o.errors&&(n.errors=o.errors),n.old={},t.forEach((function(e,t){return n.old[t]=e}))})).finally((function(){n.loading=!1}))},onSearch:function(e){this.search=e}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"w-full antialiased",class:{"overflow-y-auto":null==e.selectedCommand,"overflow-hidden":null!=e.selectedCommand}},[n("div",{staticClass:"px-6 pb-4"},[n("div",{staticClass:"container mx-auto"},[n("top-bar",{attrs:{home:e.home},on:{search:e.onSearch}}),e._v(" "),e._l(e.filteredGroups,(function(t,r){return n("div",{key:t.name},[n("group",{attrs:{name:r,commands:t},on:{select:e.onSelect}})],1)}))],2)]),e._v(" "),n("transition",{attrs:{"enter-active-class":"transition-all ease-out-quad duration-300","leave-active-class":"transition-all ease-in-quad duration-50","enter-class":"opacity-0","enter-to-class":"opacity-100","leave-class":"opacity-100","leave-to-class":"opacity-0"}},[null!=e.selectedCommand||e.loading?n("div",{staticClass:"fixed w-full h-full top-0 left-0",class:{"cursor-pointer":null!=e.selectedCommand},on:{click:function(t){e.selectedCommand=null}}},[n("div",{staticClass:"bg-black opacity-20 w-full h-full"})]):e._e()]),e._v(" "),n("transition",{attrs:{"enter-active-class":"transition-all ease-out-quad duration-300","leave-active-class":"transition-all ease-in-quad duration-50","enter-class":"transform translate-x-full","enter-to-class":"transform translate-x-0","leave-class":"transform translate-x-0","leave-to-class":"transform translate-x-full"}},[null!=e.selectedCommand?n("div",{staticClass:"fixed max-w-lg w-full h-full overflow-x-hidden bg-white overflow-y-auto top-0 right-0"},[n("command-sidebar",{attrs:{old:e.old,errors:e.errors,command:e.selectedCommand},on:{run:e.runCommand,close:function(t){e.selectedCommand=null}}})],1):e._e()]),e._v(" "),n("transition",{attrs:{"enter-active-class":"transition-all ease-out-quad duration-300","leave-active-class":"transition-all ease-in-quad duration-50","enter-class":"opacity-0","enter-to-class":"opacity-100","leave-class":"opacity-100","leave-to-class":"opacity-0"}},[e.loading?n("div",{staticClass:"fixed w-full h-full top-0 left-0 flex items-center justify-center text-primary-500"},[n("div",{staticClass:"w-8 h-8 text-primary-500 animate-spin"},[n("svg",{staticClass:"w-full h-full",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[n("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}})])])]):e._e()]),e._v(" "),n("transition",{attrs:{"enter-active-class":"transition-all ease-out-quad duration-300","leave-active-class":"transition-all ease-in-quad duration-50","enter-class":"transform translate-y-full","enter-to-class":"transform translate-y-0","leave-class":"transform translate-y-0","leave-to-class":"transform translate-y-full"}},[null!=e.output?n("div",{staticClass:"w-full fixed bottom-0 left-0 mb-6"},[n("div",{staticClass:"container mx-auto cursor-pointer rounded-2xl overflow-hidden px-4 md:px-0",on:{click:function(t){e.output=null}}},[n("command-output",{attrs:{command:e.output.command,status:e.output.status,output:e.output.output.replaceAll("\n","")}})],1)]):e._e()])],1)}),[],!1,null,null,null).exports;var Is=n(669),Ds=n.n(Is);xs.component("app",Ms),xs.use((function(e,t){e.prototype.$axios=Ds()})),new xs({el:"#app"})},276:()=>{},155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,c=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=a(f);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var n=1;n{if(!n){var a=1/0;for(l=0;l=i)&&Object.keys(r.O).every((e=>r.O[e](n[c])))?n.splice(c--,1):(s=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={64:0,668:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,s,c]=n,u=0;if(a.some((t=>0!==e[t]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(c)var l=c(r)}for(t&&t(n);ur(970)));var o=r.O(void 0,[668],(()=>r(276)));o=r.O(o)})(); -------------------------------------------------------------------------------- /stubs/js/gui.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Vue.js v2.6.12 3 | * (c) 2014-2020 Evan You 4 | * Released under the MIT License. 5 | */ 6 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors') 2 | 3 | module.exports = { 4 | future: { 5 | removeDeprecatedGapUtilities: true, 6 | purgeLayersByDefault: true, 7 | }, 8 | purge: [ 9 | './resources/views/**/*.blade.php', 10 | './resources/js/**/*.vue', 11 | ], 12 | variants: {}, 13 | plugins: [], 14 | } 15 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | let tailwind = require('tailwindcss'); 3 | 4 | mix.disableNotifications(); 5 | mix.options({ 6 | autoprefixer: {remove: false} 7 | }); 8 | 9 | mix.js('resources/js/gui.js', 'stubs/js') 10 | .vue(); 11 | 12 | mix.postCss('resources/css/gui.css', 'stubs/css', [ 13 | tailwind('./tailwind.config.js') 14 | ]) 15 | --------------------------------------------------------------------------------