├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── composer.json ├── config └── nova-logs-tool.php ├── dist ├── css │ └── tool.css └── js │ └── tool.js ├── mix.js ├── package.json ├── resources └── js │ ├── api.js │ ├── components │ ├── LogsTool.vue │ └── icons │ │ ├── IconAlert.vue │ │ ├── IconCritical.vue │ │ ├── IconDebug.vue │ │ ├── IconEmergency.vue │ │ ├── IconError.vue │ │ ├── IconInfo.vue │ │ ├── IconNotice.vue │ │ └── IconWarning.vue │ └── tool.js ├── routes ├── api.php └── inertia.php ├── src ├── Http │ ├── Controllers │ │ ├── ApiController.php │ │ └── LogsController.php │ └── Middleware │ │ └── Authorize.php ├── LogsTool.php └── LogsToolServiceProvider.php ├── webpack.mix.js └── yarn.lock /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to `nova-logs-tool` will be documented in this file 4 | 5 | ## 1.0.0 - 2018-XX-XX 6 | 7 | - initial release 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Georges KABBOUCHI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nova tool to for logs 2 | 3 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/kabbouchi/nova-logs-tool.svg?style=flat-square)](https://packagist.org/packages/kabbouchi/nova-logs-tool) 4 | [![Total Downloads](https://img.shields.io/packagist/dt/kabbouchi/nova-logs-tool.svg?style=flat-square)](https://packagist.org/packages/kabbouchi/nova-logs-tool) 5 | 6 | A Laravel Nova tool to manage and keep track of each one of your logs files. 7 | 8 | ![screenshot of the backup tool](https://raw.githubusercontent.com/KABBOUCHI/nova-logs-tool/master/docs/screenshot.png?20180828) 9 | 10 | Behind the scenes [kabbouchi/laravel-ward](https://github.com/KABBOUCHI/laravel-ward) is used. 11 | > You can disable `laravel-ward` routes by adding `LOG_VIEWER_ENABLE_ROUTES=false` to `.env` file 12 | 13 | ## Installation 14 | 15 | You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer: 16 | 17 | ```bash 18 | composer require kabbouchi/nova-logs-tool 19 | 20 | php artisan vendor:publish --tag=ward-assets --force 21 | ``` 22 | 23 | Next up, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider`. 24 | 25 | ```php 26 | // in app/Providers/NovaServiceProvder.php 27 | 28 | // ... 29 | 30 | public function tools() 31 | { 32 | return [ 33 | // ... 34 | new \KABBOUCHI\LogsTool\LogsTool(), 35 | ]; 36 | } 37 | ``` 38 | 39 | Publish the package configuration file. 40 | 41 | ```bash 42 | php artisan vendor:publish --provider="KABBOUCHI\LogsTool\LogsToolServiceProvider" 43 | ``` 44 | 45 | ## Authorization 46 | ```php 47 | // in app/Providers/NovaServiceProvder.php 48 | 49 | // ... 50 | 51 | public function tools() 52 | { 53 | return [ 54 | // ... 55 | // don't return plain `true` value or anyone can see/download/delete the logs, make sure to check if user has permission. 56 | (new \KABBOUCHI\LogsTool\LogsTool()) 57 | ->canSee(function ($request) { 58 | return auth()->user()->canSee(); 59 | }) 60 | ->canDownload(function ($request) { 61 | return auth()->user()->canDownload(); 62 | }) 63 | ->canDelete(function ($request) { 64 | return false; 65 | }), 66 | ]; 67 | } 68 | ``` 69 | 70 | ## Usage 71 | 72 | Click on the "nova-logs-tool" menu item in your Nova app to see the tool provided by this package. 73 | 74 | Possible environment variables: 75 | 76 | ``` env 77 | NOVA_LOGS_PER_PAGE=6 78 | NOVA_LOGS_REGEX_FOR_FILES="/^laravel/" 79 | ``` 80 | 81 | ### Testing 82 | 83 | ``` bash 84 | composer test 85 | ``` 86 | 87 | ### Changelog 88 | 89 | Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. 90 | 91 | ## Contributing 92 | 93 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 94 | 95 | ## Credits 96 | 97 | - [Georges KABBOUCHI](https://github.com/kabbouchi) 98 | 99 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 100 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kabbouchi/nova-logs-tool", 3 | "description": "A Laravel Nova tool to manage and keep track of each one of your logs files.", 4 | "keywords": [ 5 | "laravel", 6 | "nova" 7 | ], 8 | "homepage": "https://github.com/KABBOUCHI/nova-logs-tool", 9 | "license": "MIT", 10 | "authors": [ 11 | { 12 | "name": "Georges KABBOUCHI", 13 | "email": "georges.kabbouchi@gmail.com", 14 | "role": "Developer" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=8", 19 | "kabbouchi/laravel-ward": "^0.6.0", 20 | "laravel/nova": "^4" 21 | }, 22 | "require-dev": { 23 | "orchestra/testbench": "^3.6", 24 | "phpunit/phpunit": "7.1" 25 | }, 26 | "autoload": { 27 | "psr-4": { 28 | "KABBOUCHI\\LogsTool\\": "src/" 29 | } 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "KABBOUCHI\\LogsTool\\Tests\\": "tests" 34 | } 35 | }, 36 | "extra": { 37 | "laravel": { 38 | "providers": [ 39 | "KABBOUCHI\\LogsTool\\LogsToolServiceProvider" 40 | ] 41 | } 42 | }, 43 | "config": { 44 | "sort-packages": true 45 | }, 46 | "minimum-stability": "dev", 47 | "prefer-stable": true 48 | } 49 | -------------------------------------------------------------------------------- /config/nova-logs-tool.php: -------------------------------------------------------------------------------- 1 | env('NOVA_LOGS_PER_PAGE', 6), 5 | 'regexForFiles' => env('NOVA_LOGS_REGEX_FOR_FILES', '/^laravel/'), 6 | ]; 7 | -------------------------------------------------------------------------------- /dist/css/tool.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /dist/js/tool.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see tool.js.LICENSE.txt */ 2 | (()=>{var e={757:(e,t,n)=>{e.exports=n(666)},184:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(645),a=n.n(o)()((function(e){return e[1]}));a.push([e.id,"code[class*=language-],pre[class*=language-]{word-wrap:normal;background:none;color:#000;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#b3d4fc;text-shadow:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#b3d4fc;text-shadow:none}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{margin:.5em 0;overflow:auto;padding:1em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{border-radius:.3em;padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{background:hsla(0,0%,100%,.5);color:#9a6e3a}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}",""]);const l=a},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(o)for(var l=0;l{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=n.variable[1].inside,l=0;l{var o=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,n=0,o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=c.reach);E+=S.value.length,S=S.next){var k=S.value;if(t.length>e.length)return;if(!(k instanceof a)){var C=1;if(b&&S!=t.tail.prev){if(w.lastIndex=E,!(P=w.exec(e)))break;var O=P.index+(g&&P[1]?P[1].length:0),T=P.index+P[0].length,I=E;for(I+=S.value.length;O>=I;)I+=(S=S.next).value.length;if(E=I-=S.value.length,S.value instanceof a)continue;for(var D=S;D!==t.tail&&(Ic.reach&&(c.reach=N);var B=S.prev;R&&(B=i(t,B,R),E+=R.length),u(t,B,C),S=i(t,B,new a(d,m?o.tokenize(L,m):L,y,L)),A&&i(t,S,A),C>1&&l(e,t,n,S.prev,E,{cause:d+","+v,reach:N})}}}}}}function r(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function i(e,t,n){var o=t.next,a={value:n,prev:t,next:o};return t.next=a,o.prev=a,e.length++,a}function u(e,t,n){for(var o=t.next,a=0;a"+l.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,l=n.code,r=n.immediateClose;e.postMessage(o.highlight(l,o.languages[a],a)),r&&e.close()}),!1),o):o;var s=o.util.currentScript();function c(){o.manual||o.highlightAll()}if(s&&(o.filename=s.src,s.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var d=document.readyState;"loading"===d||"interactive"===d&&s&&s.defer?document.addEventListener("DOMContentLoaded",c):window.requestAnimationFrame?window.requestAnimationFrame(c):window.setTimeout(c,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=o),void 0!==n.g&&(n.g.Prism=o)},666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",i=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,o){var a=t&&t.prototype instanceof g?t:g,l=Object.create(a.prototype),r=new I(o||[]);return l._invoke=function(e,t,n){var o=d;return function(a,l){if(o===v)throw new Error("Generator is already running");if(o===f){if("throw"===a)throw l;return P()}for(n.method=a,n.arg=l;;){var r=n.delegate;if(r){var i=C(r,n);if(i){if(i===m)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=c(e,t,n);if("normal"===u.type){if(o=n.done?f:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=f,n.method="throw",n.arg=u.arg)}}}(e,n,r),l}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d="suspendedStart",p="suspendedYield",v="executing",f="completed",m={};function g(){}function b(){}function h(){}var y={};u(y,l,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(D([])));w&&w!==n&&o.call(w,l)&&(y=w);var S=h.prototype=g.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(a,l,r,i){var u=c(e[a],e,l);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==typeof d&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,r,i)}),(function(e){n("throw",e,r,i)})):t.resolve(d).then((function(e){s.value=e,r(s)}),(function(e){return n("throw",e,r,i)}))}i(u.arg)}var a;this._invoke=function(e,o){function l(){return new t((function(t,a){n(e,o,t,a)}))}return a=a?a.then(l,l):l()}}function C(e,n){var o=e.iterator[n.method];if(o===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=c(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var l=a.arg;return l?l.done?(n[e.resultName]=l.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):l:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function D(e){if(e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function n(){for(;++a=0;--l){var r=this.tryEntries[l],i=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var u=o.call(r,"catchLoc"),s=o.call(r,"finallyLoc");if(u&&s){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var a=o.arg;T(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:D(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},379:(e,t,n)=>{"use strict";var o,a=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},l=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),r=[];function i(e){for(var t=-1,n=0;n{"use strict";t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var l=t[o]={id:o,exports:{}};return e[o](l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=Vue;var t={class:"text-xs"},o={class:"flex items-center justify-between mb-6"},a={class:"relative h-9 w-full md:w-1/3 md:flex-shrink-0"},l={key:0,class:"flex items-center"},r=["title"],i=["title"],u={class:"leading-normal"},s=["textContent"],c={key:0},d={class:"overflow-hidden overflow-x-auto relative"},p={class:"w-full table-default"},v={class:"bg-gray-50 dark:bg-gray-800"},f={class:"uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2",style:{width:"100px"}},m={class:"uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2",style:{width:"140px"}},g={class:"uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"},b=(0,e.createElementVNode)("th",null,null,-1),h=["onClick"],y={class:"px-6 py-2 border-t border-gray-100 dark:border-gray-700 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900 cursor-pointer"},x={class:"flex flex-col items-center"},w={class:"mt-2"},S={class:"px-6 py-2 border-t border-gray-100 dark:border-gray-700 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900 cursor-pointer"},E={class:"px-6 py-2 border-t border-gray-100 dark:border-gray-700 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900 cursor-pointer"},k={class:"px-6 py-2 border-t border-gray-100 dark:border-gray-700 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900 cursor-pointer"},C=["onClick"],O={class:"border-t dark:border-gray-700"},T={key:0,class:"flex"},I=["disabled"],D=["disabled"],P={key:1,class:"w-full flex flex-col items-center justify-center min-h-40"},L=(0,e.createElementVNode)("span",null,"No Logs",-1),R={class:"bg-white rounded-md dark:bg-gray-800"},A={class:"flex"},N={class:"flex flex-col items-center"},B={class:"mt-2 uppercase"},_={class:"mt-2"},M={class:"text-left dark:bg-gray-700"},j=["textContent"],V={class:"text-left dark:bg-gray-700"},F=["textContent"];var $=n(757),G=n.n($);const H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Nova.request().get(n?"/nova-vendor/KABBOUCHI/logs-tool/logs?file=".concat(e,"&page=").concat(t,"&search=").concat(n):"/nova-vendor/KABBOUCHI/logs-tool/logs?file=".concat(e,"&page=").concat(t)).then((function(e){return e.data}))},U=function(){return Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/daily-log-files").then((function(e){return e.data}))},z=function(e){return Nova.request().delete("/nova-vendor/KABBOUCHI/logs-tool/logs?file=".concat(e)).then((function(e){return e.data}))},K=function(e){return Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/logs/permissions").then((function(e){return e.data}))};var q={style:{color:"#FF5722"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"exclamation-circle",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},W=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];var Y=n(744);const X={},Z=(0,Y.Z)(X,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",q,W)}]]);var J={style:{color:"#1976D2"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"info-circle",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Q=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];const ee={},te=(0,Y.Z)(ee,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",J,Q)}]]);var ne={style:{color:"#FF9100"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"exclamation-triangle",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},oe=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];const ae={},le=(0,Y.Z)(ae,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",ne,oe)}]]);var re={style:{color:"#B71C1C"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"bug",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ie=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"},null,-1)];const ue={},se=(0,Y.Z)(ue,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",re,ie)}]]);var ce={style:{color:"#D32F2F"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"bullhorn",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},de=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M576 224c0-20.896-13.36-38.666-32-45.258V64c0-35.346-28.654-64-64-64-64.985 56-142.031 128-272 128H48c-26.51 0-48 21.49-48 48v96c0 26.51 21.49 48 48 48h43.263c-18.742 64.65 2.479 116.379 18.814 167.44 1.702 5.32 5.203 9.893 9.922 12.88 20.78 13.155 68.355 15.657 93.773 5.151 16.046-6.633 19.96-27.423 7.522-39.537-18.508-18.026-30.136-36.91-19.795-60.858a12.278 12.278 0 0 0-1.045-11.673c-16.309-24.679-3.581-62.107 28.517-72.752C346.403 327.887 418.591 395.081 480 448c35.346 0 64-28.654 64-64V269.258c18.64-6.592 32-24.362 32-45.258zm-96 139.855c-54.609-44.979-125.033-92.94-224-104.982v-69.747c98.967-12.042 169.391-60.002 224-104.982v279.711z"},null,-1)];const pe={},ve=(0,Y.Z)(pe,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",ce,de)}]]);var fe={style:{color:"#F44336"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"heartbeat",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},me=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M320.2 243.8l-49.7 99.4c-6 12.1-23.4 11.7-28.9-.6l-56.9-126.3-30 71.7H60.6l182.5 186.5c7.1 7.3 18.6 7.3 25.7 0L451.4 288H342.3l-22.1-44.2zM473.7 73.9l-2.4-2.5c-51.5-52.6-135.8-52.6-187.4 0L256 100l-27.9-28.5c-51.5-52.7-135.9-52.7-187.4 0l-2.4 2.4C-10.4 123.7-12.5 203 31 256h102.4l35.9-86.2c5.4-12.9 23.6-13.2 29.4-.4l58.2 129.3 49-97.9c5.9-11.8 22.7-11.8 28.6 0l27.6 55.2H481c43.5-53 41.4-132.3-7.3-182.1z"},null,-1)];const ge={},be=(0,Y.Z)(ge,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",fe,me)}]]);var he={style:{color:"#4CAF50"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"exclamation-circle",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ye=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];const xe={},we=(0,Y.Z)(xe,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",he,ye)}]]);var Se={style:{color:"#90CAF9"},width:"24px","aria-hidden":"true","data-prefix":"fas","data-icon":"life-ring",class:"svg-inline--fa fa-life-ring fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ee=[(0,e.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm173.696 119.559l-63.399 63.399c-10.987-18.559-26.67-34.252-45.255-45.255l63.399-63.399a218.396 218.396 0 0 1 45.255 45.255zM256 352c-53.019 0-96-42.981-96-96s42.981-96 96-96 96 42.981 96 96-42.981 96-96 96zM127.559 82.304l63.399 63.399c-18.559 10.987-34.252 26.67-45.255 45.255l-63.399-63.399a218.372 218.372 0 0 1 45.255-45.255zM82.304 384.441l63.399-63.399c10.987 18.559 26.67 34.252 45.255 45.255l-63.399 63.399a218.396 218.396 0 0 1-45.255-45.255zm302.137 45.255l-63.399-63.399c18.559-10.987 34.252-26.67 45.255-45.255l63.399 63.399a218.403 218.403 0 0 1-45.255 45.255z"},null,-1)];const ke={},Ce=(0,Y.Z)(ke,[["render",function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",Se,Ee)}]]);var Oe=n(325),Te=n.n(Oe);n(874);function Ie(e,t,...n){if(e in t){let o=t[e];return"function"==typeof o?o(...n):o}let o=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Ie),o}function De({visible:e=!0,features:t=0,...n}){var o;if(e||2&t&&n.props.static)return Pe(n);if(1&t){return Ie(null==(o=n.props.unmount)||o?0:1,{0:()=>null,1:()=>Pe({...n,props:{...n.props,hidden:!0,style:{display:"none"}}})})}return Pe(n)}function Pe({props:t,attrs:n,slots:o,slot:a,name:l}){var r;let{as:i,...u}=Le(t,["unmount","static"]),s=null==(r=o.default)?void 0:r.call(o,a);if("template"===i){if(Object.keys(u).length>0||Object.keys(n).length>0){let[t,...o]=null!=s?s:[];if(!function(e){return null!=e&&("string"==typeof e.type||"object"==typeof e.type||"function"==typeof e.type)}(t)||o.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${l} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(u).concat(Object.keys(n)).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));return(0,e.cloneVNode)(t,u)}return Array.isArray(s)&&1===s.length?s[0]:s}return(0,e.h)(i,u,s)}function Le(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var Re=0;function Ae(){return++Re}function Ne(e,t){let n=t.resolveItems();if(n.length<=0)return null;let o=t.resolveActiveIndex(),a=null!=o?o:-1,l=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,o)=>!(-1!==a&&o.length-n-1>=a)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=a)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===l?o:l}function Be(e){return null==e||null==e.value?null:"$el"in e.value?e.value.$el:e.value}function _e(t,n,o){"undefined"!=typeof window&&(0,e.watchEffect)((e=>{window.addEventListener(t,n,o),e((()=>{window.removeEventListener(t,n,o)}))}))}var Me=Symbol("Context");function je(){return(0,e.inject)(Me,null)}function Ve(t){(0,e.provide)(Me,t)}function Fe(e,t){if(e)return e;let n=null!=t?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function $e(t,n){let o=(0,e.ref)(Fe(t.value.type,t.value.as));return(0,e.onMounted)((()=>{o.value=Fe(t.value.type,t.value.as)})),(0,e.watchEffect)((()=>{var e;o.value||!Be(n)||Be(n)instanceof HTMLButtonElement&&!(null==(e=Be(n))?void 0:e.hasAttribute("type"))&&(o.value="button")})),o}function Ge({container:t,accept:n,walk:o,enabled:a}){(0,e.watchEffect)((()=>{let e=t.value;if(!e||void 0!==a&&!a.value)return;let l=Object.assign((e=>n(e)),{acceptNode:n}),r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,l,!1);for(;r.nextNode();)o(r.currentNode)}))}var He=Symbol("ComboboxContext");function Ue(t){let n=(0,e.inject)(He,null);if(null===n){let e=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ue),e}return n}(0,e.defineComponent)({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},setup(t,{slots:n,attrs:o,emit:a}){let l=(0,e.ref)(1),r=(0,e.ref)(null),i=(0,e.ref)(null),u=(0,e.ref)(null),s=(0,e.ref)(null),c=(0,e.ref)({static:!1,hold:!1}),d=(0,e.ref)([]),p=(0,e.ref)(null),v=(0,e.computed)((()=>t.modelValue)),f={comboboxState:l,value:v,inputRef:i,labelRef:r,buttonRef:u,optionsRef:s,disabled:(0,e.computed)((()=>t.disabled)),options:d,activeOptionIndex:p,inputPropsRef:(0,e.ref)({displayValue:void 0}),optionsPropsRef:c,closeCombobox(){t.disabled||1!==l.value&&(l.value=1,p.value=null)},openCombobox(){t.disabled||0!==l.value&&(l.value=0)},goToOption(e,n){if(t.disabled||s.value&&!c.value.static&&1===l.value)return;let o=Ne(4===e?{focus:4,id:n}:{focus:e},{resolveItems:()=>d.value,resolveActiveIndex:()=>p.value,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled});p.value!==o&&(p.value=o)},syncInputValue(){let e=f.value.value;if(!Be(f.inputRef)||void 0===e)return;let t=f.inputPropsRef.value.displayValue;"function"==typeof t?f.inputRef.value.value=t(e):"string"==typeof e&&(f.inputRef.value.value=e)},selectOption(e){let t=d.value.find((t=>t.id===e));if(!t)return;let{dataRef:n}=t;a("update:modelValue",n.value),f.syncInputValue()},selectActiveOption(){if(null===p.value)return;let{dataRef:e}=d.value[p.value];a("update:modelValue",e.value),f.syncInputValue()},registerOption(e,t){var n,o;let a=null!==p.value?d.value[p.value]:null,l=Array.from(null!=(o=null==(n=s.value)?void 0:n.querySelectorAll('[id^="headlessui-combobox-option-"]'))?o:[]).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{});d.value=[...d.value,{id:e,dataRef:t}].sort(((e,t)=>l[e.id]-l[t.id])),p.value=null===a?null:d.value.indexOf(a)},unregisterOption(e){let t=d.value.slice(),n=null!==p.value?t[p.value]:null,o=t.findIndex((t=>t.id===e));-1!==o&&t.splice(o,1),d.value=t,p.value=o===p.value||null===n?null:t.indexOf(n)}};_e("mousedown",(e=>{var t,n,o;let a=e.target;0===l.value&&((null==(t=Be(i))?void 0:t.contains(a))||(null==(n=Be(u))?void 0:n.contains(a))||(null==(o=Be(s))?void 0:o.contains(a))||f.closeCombobox())})),(0,e.watch)([f.value,f.inputRef],(()=>f.syncInputValue()),{immediate:!0}),(0,e.provide)(He,f),Ve((0,e.computed)((()=>Ie(l.value,{0:0,1:1}))));let m=(0,e.computed)((()=>null===p.value?null:d.value[p.value].dataRef.value));return()=>{let e={open:0===l.value,disabled:t.disabled,activeIndex:p.value,activeOption:m.value};return De({props:Le(t,["modelValue","onUpdate:modelValue","disabled"]),slot:e,slots:n,attrs:o,name:"Combobox"})}}}),(0,e.defineComponent)({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"}},setup(e,{attrs:t,slots:n}){let o=Ue("ComboboxLabel"),a=`headlessui-combobox-label-${Ae()}`;function l(){var e;null==(e=Be(o.inputRef))||e.focus({preventScroll:!0})}return()=>{let r={open:0===o.comboboxState.value,disabled:o.disabled.value},i={id:a,ref:o.labelRef,onClick:l};return De({props:{...e,...i},slot:r,attrs:t,slots:n,name:"ComboboxLabel"})}}}),(0,e.defineComponent)({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"}},setup(t,{attrs:n,slots:o}){let a=Ue("ComboboxButton"),l=`headlessui-combobox-button-${Ae()}`;function r(t){a.disabled.value||(0===a.comboboxState.value?a.closeCombobox():(t.preventDefault(),a.openCombobox()),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.inputRef))?void 0:e.focus({preventScroll:!0})})))}function i(t){switch(t.key){case"ArrowDown":return t.preventDefault(),t.stopPropagation(),1===a.comboboxState.value&&(a.openCombobox(),(0,e.nextTick)((()=>{a.value.value||a.goToOption(0)}))),void(0,e.nextTick)((()=>{var e;return null==(e=a.inputRef.value)?void 0:e.focus({preventScroll:!0})}));case"ArrowUp":return t.preventDefault(),t.stopPropagation(),1===a.comboboxState.value&&(a.openCombobox(),(0,e.nextTick)((()=>{a.value.value||a.goToOption(3)}))),void(0,e.nextTick)((()=>{var e;return null==(e=a.inputRef.value)?void 0:e.focus({preventScroll:!0})}));case"Escape":return t.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&t.stopPropagation(),a.closeCombobox(),void(0,e.nextTick)((()=>{var e;return null==(e=a.inputRef.value)?void 0:e.focus({preventScroll:!0})}))}}let u=$e((0,e.computed)((()=>({as:t.as,type:n.type}))),a.buttonRef);return()=>{var e,s;let c={open:0===a.comboboxState.value,disabled:a.disabled.value},d={ref:a.buttonRef,id:l,type:u.value,tabindex:"-1","aria-haspopup":!0,"aria-controls":null==(e=Be(a.optionsRef))?void 0:e.id,"aria-expanded":a.disabled.value?void 0:0===a.comboboxState.value,"aria-labelledby":a.labelRef.value?[null==(s=Be(a.labelRef))?void 0:s.id,l].join(" "):void 0,disabled:!0===a.disabled.value||void 0,onKeydown:i,onClick:r};return De({props:{...t,...d},slot:c,attrs:n,slots:o,name:"ComboboxButton"})}}}),(0,e.defineComponent)({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function}},emits:{change:e=>!0},setup(t,{emit:n,attrs:o,slots:a}){let l=Ue("ComboboxInput"),r=`headlessui-combobox-input-${Ae()}`;function i(t){switch(t.key){case"Enter":t.preventDefault(),t.stopPropagation(),l.selectActiveOption(),l.closeCombobox();break;case"ArrowDown":return t.preventDefault(),t.stopPropagation(),Ie(l.comboboxState.value,{0:()=>l.goToOption(2),1:()=>{l.openCombobox(),(0,e.nextTick)((()=>{l.value.value||l.goToOption(0)}))}});case"ArrowUp":return t.preventDefault(),t.stopPropagation(),Ie(l.comboboxState.value,{0:()=>l.goToOption(1),1:()=>{l.openCombobox(),(0,e.nextTick)((()=>{l.value.value||l.goToOption(3)}))}});case"Home":case"PageUp":return t.preventDefault(),t.stopPropagation(),l.goToOption(0);case"End":case"PageDown":return t.preventDefault(),t.stopPropagation(),l.goToOption(3);case"Escape":t.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&t.stopPropagation(),l.closeCombobox();break;case"Tab":l.selectActiveOption(),l.closeCombobox()}}function u(e){l.openCombobox(),n("change",e)}return l.inputPropsRef=(0,e.computed)((()=>t)),()=>{var e,n,s,c,d;let p={open:0===l.comboboxState.value},v={"aria-controls":null==(e=l.optionsRef.value)?void 0:e.id,"aria-expanded":l.disabled?void 0:0===l.comboboxState.value,"aria-activedescendant":null===l.activeOptionIndex.value||null==(n=l.options.value[l.activeOptionIndex.value])?void 0:n.id,"aria-labelledby":null!=(d=null==(s=Be(l.labelRef))?void 0:s.id)?d:null==(c=Be(l.buttonRef))?void 0:c.id,id:r,onKeydown:i,onChange:u,onInput:u,role:"combobox",type:"text",tabIndex:0,ref:l.inputRef};return De({props:{...Le(t,["displayValue"]),...v},slot:p,attrs:o,slots:a,features:3,name:"ComboboxInput"})}}}),(0,e.defineComponent)({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(t,{attrs:n,slots:o}){let a=Ue("ComboboxOptions"),l=`headlessui-combobox-options-${Ae()}`;(0,e.watchEffect)((()=>{a.optionsPropsRef.value.static=t.static})),(0,e.watchEffect)((()=>{a.optionsPropsRef.value.hold=t.hold}));let r=je(),i=(0,e.computed)((()=>null!==r?0===r.value:0===a.comboboxState.value));return Ge({container:(0,e.computed)((()=>Be(a.optionsRef))),enabled:(0,e.computed)((()=>0===a.comboboxState.value)),accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}}),()=>{var e,r,u,s;let c={open:0===a.comboboxState.value},d={"aria-activedescendant":null===a.activeOptionIndex.value||null==(e=a.options.value[a.activeOptionIndex.value])?void 0:e.id,"aria-labelledby":null!=(s=null==(r=Be(a.labelRef))?void 0:r.id)?s:null==(u=Be(a.buttonRef))?void 0:u.id,id:l,ref:a.optionsRef,role:"listbox"};return De({props:{...Le(t,["hold"]),...d},slot:c,attrs:n,slots:o,features:3,visible:i.value,name:"ComboboxOptions"})}}}),(0,e.defineComponent)({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1}},setup(t,{slots:n,attrs:o}){let a=Ue("ComboboxOption"),l=`headlessui-combobox-option-${Ae()}`,r=(0,e.computed)((()=>null!==a.activeOptionIndex.value&&a.options.value[a.activeOptionIndex.value].id===l)),i=(0,e.computed)((()=>(0,e.toRaw)(a.value.value)===(0,e.toRaw)(t.value))),u=(0,e.computed)((()=>({disabled:t.disabled,value:t.value})));function s(n){if(t.disabled)return n.preventDefault();a.selectOption(l),a.closeCombobox(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.inputRef))?void 0:e.focus({preventScroll:!0})}))}function c(){if(t.disabled)return a.goToOption(5);a.goToOption(4,l)}function d(){t.disabled||r.value||a.goToOption(4,l)}function p(){t.disabled||!r.value||a.optionsPropsRef.value.hold||a.goToOption(5)}return(0,e.onMounted)((()=>a.registerOption(l,u))),(0,e.onUnmounted)((()=>a.unregisterOption(l))),(0,e.onMounted)((()=>{(0,e.watch)([a.comboboxState,i],(()=>{0===a.comboboxState.value&&(!i.value||a.goToOption(4,l))}),{immediate:!0})})),(0,e.watchEffect)((()=>{0===a.comboboxState.value&&(!r.value||(0,e.nextTick)((()=>{var e,t;return null==(t=null==(e=document.getElementById(l))?void 0:e.scrollIntoView)?void 0:t.call(e,{block:"nearest"})})))})),()=>{let{disabled:e}=t,a={active:r.value,selected:i.value,disabled:e},u={id:l,role:"option",tabIndex:!0===e?void 0:-1,"aria-disabled":!0===e||void 0,"aria-selected":!0===i.value?i.value:void 0,disabled:void 0,onClick:s,onFocus:c,onPointermove:d,onMousemove:d,onPointerleave:p,onMouseleave:p};return De({props:{...t,...u},slot:a,attrs:o,slots:n,name:"ComboboxOption"})}}});var ze=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");function Ke(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(ze))}function qe(e){null==e||e.focus({preventScroll:!0})}function We(e,t){let n,o=Array.isArray(e)?e.slice().sort(((e,t)=>{let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})):Ke(e),a=document.activeElement,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),r=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(a))-1;if(4&t)return Math.max(0,o.indexOf(a))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=32&t?{preventScroll:!0}:{},u=0,s=o.length;do{if(u>=s||u+s<=0)return 0;let e=r+u;if(16&t)e=(e+s)%s;else{if(e<0)return 3;if(e>=s)return 1}n=o[e],null==n||n.focus(i),u+=l}while(n!==document.activeElement);return n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),2}function Ye(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Xe(t,n=(0,e.ref)(!0),o=(0,e.ref)({})){let a=(0,e.ref)("undefined"!=typeof window?document.activeElement:null),l=(0,e.ref)(null);function r(){if(!n.value||1!==t.value.size)return;let{initialFocus:e}=o.value,r=document.activeElement;if(e){if(e===r)return}else if(Ye(t.value,r))return;if(a.value=r,e)qe(e);else{let e=!1;for(let n of t.value)if(2===We(n,1)){e=!0;break}e||console.warn("There are no focusable elements inside the ")}l.value=document.activeElement}function i(){qe(a.value),a.value=null,l.value=null}(0,e.watchEffect)(r),(0,e.onUpdated)((()=>{n.value?r():i()})),(0,e.onUnmounted)(i),_e("keydown",(e=>{if(n.value&&"Tab"===e.key&&document.activeElement&&1===t.value.size){e.preventDefault();for(let n of t.value)if(2===We(n,16|(e.shiftKey?2:4))){l.value=document.activeElement;break}}})),_e("focus",(e=>{if(!n.value||1!==t.value.size)return;let o=l.value;if(!o)return;let a=e.target;a&&a instanceof HTMLElement?Ye(t.value,a)?(l.value=a,qe(a)):(e.preventDefault(),e.stopPropagation(),qe(o)):qe(l.value)}),!0)}var Ze="body > *",Je=new Set,Qe=new Map;function et(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function tt(e){let t=Qe.get(e);!t||(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var nt=Symbol("StackContext");function ot(){return(0,e.inject)(nt,(()=>{}))}function at(t){let n=ot();(0,e.provide)(nt,(function(...e){null==t||t(...e),n(...e)}))}var lt=Symbol("ForcePortalRootContext");var rt=(0,e.defineComponent)({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup:(t,{slots:n,attrs:o})=>((0,e.provide)(lt,t.force),()=>{let{force:e,...a}=t;return De({props:a,slot:{},slots:n,attrs:o,name:"ForcePortalRoot"})})});var it=(0,e.defineComponent)({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(t,{slots:n,attrs:o}){let a=(0,e.inject)(lt,!1),l=(0,e.inject)(ut,null),r=(0,e.ref)(!0===a||null===l?function(){let e=document.getElementById("headlessui-portal-root");if(e)return e;let t=document.createElement("div");return t.setAttribute("id","headlessui-portal-root"),document.body.appendChild(t)}():l.resolveTarget());(0,e.watchEffect)((()=>{a||null!==l&&(r.value=l.resolveTarget())}));let i=(0,e.ref)(null);return function(t){let n=ot();(0,e.watchEffect)((e=>{let o=null==t?void 0:t.value;!o||(n(0,o),e((()=>n(1,o))))}))}(i),(0,e.onUnmounted)((()=>{var e;let t=document.getElementById("headlessui-portal-root");!t||r.value===t&&r.value.children.length<=0&&(null==(e=r.value.parentElement)||e.removeChild(r.value))})),at(),()=>{if(null===r.value)return null;let a={ref:i};return(0,e.h)(e.Teleport,{to:r.value},De({props:{...t,...a},slot:{},attrs:o,slots:n,name:"Portal"}))}}}),ut=Symbol("PortalGroupContext"),st=(0,e.defineComponent)({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(t,{attrs:n,slots:o}){let a=(0,e.reactive)({resolveTarget:()=>t.target});return(0,e.provide)(ut,a),()=>{let{target:e,...a}=t;return De({props:a,slot:{},attrs:n,slots:o,name:"PortalGroup"})}}}),ct=Symbol("DescriptionContext");function dt({slot:t=(0,e.ref)({}),name:n="Description",props:o={}}={}){let a=(0,e.ref)([]);return(0,e.provide)(ct,{register:function(e){return a.value.push(e),()=>{let t=a.value.indexOf(e);-1!==t&&a.value.splice(t,1)}},slot:t,name:n,props:o}),(0,e.computed)((()=>a.value.length>0?a.value.join(" "):void 0))}(0,e.defineComponent)({name:"Description",props:{as:{type:[Object,String],default:"p"}},setup(t,{attrs:n,slots:o}){let a=function(){let t=(0,e.inject)(ct,null);if(null===t)throw new Error("Missing parent");return t}(),l=`headlessui-description-${Ae()}`;return(0,e.onMounted)((()=>(0,e.onUnmounted)(a.register(l)))),()=>{let{name:r="Description",slot:i=(0,e.ref)({}),props:u={}}=a;return De({props:{...t,...{...Object.entries(u).reduce(((t,[n,o])=>Object.assign(t,{[n]:(0,e.unref)(o)})),{}),id:l}},slot:i.value,attrs:n,slots:o,name:r})}}});var pt=Symbol("DialogContext");function vt(t){let n=(0,e.inject)(pt,null);if(null===n){let e=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,vt),e}return n}var ft="DC8F892D-2EBD-447C-A4C8-A03058436FF4",mt=((0,e.defineComponent)({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:ft},initialFocus:{type:Object,default:null}},emits:{close:e=>!0},setup(t,{emit:n,attrs:o,slots:a}){let l=(0,e.ref)(new Set),r=je(),i=(0,e.computed)((()=>t.open===ft&&null!==r?Ie(r.value,{0:!0,1:!1}):t.open));if(t.open===ft&&null===r)throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if("boolean"!=typeof i.value)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i.value===ft?void 0:t.open}`);let u=(0,e.computed)((()=>t.open?0:1)),s=(0,e.computed)((()=>null!==r?0===r.value:0===u.value)),c=(0,e.ref)(null),d=(0,e.ref)(0===u.value);(0,e.onUpdated)((()=>{d.value=0===u.value}));let p=`headlessui-dialog-${Ae()}`,v=(0,e.computed)((()=>({initialFocus:t.initialFocus})));Xe(l,d,v),function(t,n=(0,e.ref)(!0)){(0,e.watchEffect)((e=>{if(!n.value||!t.value)return;let o=t.value;Je.add(o);for(let e of Qe.keys())e.contains(o)&&(tt(e),Qe.delete(e));document.querySelectorAll(Ze).forEach((e=>{if(e instanceof HTMLElement){for(let t of Je)if(e.contains(t))return;1===Je.size&&(Qe.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),et(e))}})),e((()=>{if(Je.delete(o),Je.size>0)document.querySelectorAll(Ze).forEach((e=>{if(e instanceof HTMLElement&&!Qe.has(e)){for(let t of Je)if(e.contains(t))return;Qe.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),et(e)}}));else for(let e of Qe.keys())tt(e),Qe.delete(e)}))}))}(c,d),at(((e,t)=>Ie(e,{0(){l.value.add(t)},1(){l.value.delete(t)}})));let f=dt({name:"DialogDescription",slot:(0,e.computed)((()=>({open:i.value})))}),m=(0,e.ref)(null),g={titleId:m,dialogState:u,setTitleId(e){m.value!==e&&(m.value=e)},close(){n("close",!1)}};function b(e){e.stopPropagation()}return(0,e.provide)(pt,g),_e("mousedown",(t=>{let n=t.target;0===u.value&&1===l.value.size&&(Ye(l.value,n)||(g.close(),(0,e.nextTick)((()=>null==n?void 0:n.focus()))))})),_e("keydown",(e=>{"Escape"===e.key&&0===u.value&&(l.value.size>1||(e.preventDefault(),e.stopPropagation(),g.close()))})),(0,e.watchEffect)((e=>{if(0!==u.value)return;let t=document.documentElement.style.overflow,n=document.documentElement.style.paddingRight,o=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${o}px`,e((()=>{document.documentElement.style.overflow=t,document.documentElement.style.paddingRight=n}))})),(0,e.watchEffect)((e=>{if(0!==u.value)return;let t=Be(c);if(!t)return;let n=new IntersectionObserver((e=>{for(let t of e)0===t.boundingClientRect.x&&0===t.boundingClientRect.y&&0===t.boundingClientRect.width&&0===t.boundingClientRect.height&&g.close()}));n.observe(t),e((()=>n.disconnect()))})),()=>{let n={...o,ref:c,id:p,role:"dialog","aria-modal":0===u.value||void 0,"aria-labelledby":m.value,"aria-describedby":f.value,onClick:b},{open:l,initialFocus:r,...i}=t,d={open:0===u.value};return(0,e.h)(rt,{force:!0},(()=>(0,e.h)(it,(()=>(0,e.h)(st,{target:c.value},(()=>(0,e.h)(rt,{force:!1},(()=>De({props:{...i,...n},slot:d,attrs:o,slots:a,visible:s.value,features:3,name:"Dialog"})))))))))}}}),(0,e.defineComponent)({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){let o=vt("DialogOverlay"),a=`headlessui-dialog-overlay-${Ae()}`;function l(e){e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),o.close())}return()=>De({props:{...e,id:a,"aria-hidden":!0,onClick:l},slot:{open:0===o.dialogState.value},attrs:t,slots:n,name:"DialogOverlay"})}}),(0,e.defineComponent)({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},setup(t,{attrs:n,slots:o}){let a=vt("DialogTitle"),l=`headlessui-dialog-title-${Ae()}`;return(0,e.onMounted)((()=>{a.setTitleId(l),(0,e.onUnmounted)((()=>a.setTitleId(null)))})),()=>De({props:{...t,id:l},slot:{open:0===a.dialogState.value},attrs:n,slots:o,name:"DialogTitle"})}}),Symbol("DisclosureContext"));function gt(t){let n=(0,e.inject)(mt,null);if(null===n){let e=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,gt),e}return n}var bt=Symbol("DisclosurePanelContext");(0,e.defineComponent)({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(t,{slots:n,attrs:o}){let a=`headlessui-disclosure-button-${Ae()}`,l=`headlessui-disclosure-panel-${Ae()}`,r=(0,e.ref)(t.defaultOpen?0:1),i=(0,e.ref)(null),u=(0,e.ref)(null),s={buttonId:a,panelId:l,disclosureState:r,panel:i,button:u,toggleDisclosure(){r.value=Ie(r.value,{0:1,1:0})},closeDisclosure(){1!==r.value&&(r.value=1)},close(e){s.closeDisclosure();let t=e?e instanceof HTMLElement?e:e.value instanceof HTMLElement?Be(e):Be(s.button):Be(s.button);null==t||t.focus()}};return(0,e.provide)(mt,s),Ve((0,e.computed)((()=>Ie(r.value,{0:0,1:1})))),()=>{let{defaultOpen:e,...a}=t;return De({props:a,slot:{open:0===r.value,close:s.close},slots:n,attrs:o,name:"Disclosure"})}}}),(0,e.defineComponent)({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},setup(t,{attrs:n,slots:o}){let a=gt("DisclosureButton"),l=(0,e.inject)(bt,null),r=null!==l&&l===a.panelId,i=(0,e.ref)(null);r||(0,e.watchEffect)((()=>{a.button.value=i.value}));let u=$e((0,e.computed)((()=>({as:t.as,type:n.type}))),i);function s(){var e;t.disabled||(r?(a.toggleDisclosure(),null==(e=Be(a.button))||e.focus()):a.toggleDisclosure())}function c(e){var n;if(!t.disabled)if(r)switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a.toggleDisclosure(),null==(n=Be(a.button))||n.focus()}else switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a.toggleDisclosure()}}function d(e){if(" "===e.key)e.preventDefault()}return()=>{let e={open:0===a.disclosureState.value},l=r?{ref:i,type:u.value,onClick:s,onKeydown:c}:{id:a.buttonId,ref:i,type:u.value,"aria-expanded":t.disabled?void 0:0===a.disclosureState.value,"aria-controls":Be(a.panel)?a.panelId:void 0,disabled:!!t.disabled||void 0,onClick:s,onKeydown:c,onKeyup:d};return De({props:{...t,...l},slot:e,attrs:n,slots:o,name:"DisclosureButton"})}}}),(0,e.defineComponent)({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(t,{attrs:n,slots:o}){let a=gt("DisclosurePanel");(0,e.provide)(bt,a.panelId);let l=je(),r=(0,e.computed)((()=>null!==l?0===l.value:0===a.disclosureState.value));return()=>{let e={open:0===a.disclosureState.value,close:a.close},l={id:a.panelId,ref:a.panel};return De({props:{...t,...l},slot:e,attrs:n,slots:o,features:3,visible:r.value,name:"DisclosurePanel"})}}}),(0,e.defineComponent)({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null}},setup(t,{attrs:n,slots:o}){let a=(0,e.ref)(new Set),l=(0,e.ref)(null),r=(0,e.ref)(!0),i=(0,e.computed)((()=>({initialFocus:t.initialFocus})));return(0,e.onMounted)((()=>{!l.value||(a.value.add(l.value),Xe(a,r,i))})),(0,e.onUnmounted)((()=>{r.value=!1})),()=>{let e={ref:l},{initialFocus:a,...r}=t;return De({props:{...r,...e},slot:{},attrs:n,slots:o,name:"FocusTrap"})}}});var ht=Symbol("ListboxContext");function yt(t){let n=(0,e.inject)(ht,null);if(null===n){let e=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,yt),e}return n}(0,e.defineComponent)({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},setup(t,{slots:n,attrs:o,emit:a}){let l=(0,e.ref)(1),r=(0,e.ref)(null),i=(0,e.ref)(null),u=(0,e.ref)(null),s=(0,e.ref)([]),c=(0,e.ref)(""),d=(0,e.ref)(null),p=(0,e.computed)((()=>t.modelValue)),v={listboxState:l,value:p,orientation:(0,e.computed)((()=>t.horizontal?"horizontal":"vertical")),labelRef:r,buttonRef:i,optionsRef:u,disabled:(0,e.computed)((()=>t.disabled)),options:s,searchQuery:c,activeOptionIndex:d,closeListbox(){t.disabled||1!==l.value&&(l.value=1,d.value=null)},openListbox(){t.disabled||0!==l.value&&(l.value=0)},goToOption(e,n){if(t.disabled||1===l.value)return;let o=Ne(4===e?{focus:4,id:n}:{focus:e},{resolveItems:()=>s.value,resolveActiveIndex:()=>d.value,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled});""===c.value&&d.value===o||(c.value="",d.value=o)},search(e){if(t.disabled||1===l.value)return;let n=""!==c.value?0:1;c.value+=e.toLowerCase();let o=(null!==d.value?s.value.slice(d.value+n).concat(s.value.slice(0,d.value+n)):s.value).find((e=>e.dataRef.textValue.startsWith(c.value)&&!e.dataRef.disabled)),a=o?s.value.indexOf(o):-1;-1===a||a===d.value||(d.value=a)},clearSearch(){t.disabled||1!==l.value&&""!==c.value&&(c.value="")},registerOption(e,t){var n,o;let a=Array.from(null!=(o=null==(n=u.value)?void 0:n.querySelectorAll('[id^="headlessui-listbox-option-"]'))?o:[]).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{});s.value=[...s.value,{id:e,dataRef:t}].sort(((e,t)=>a[e.id]-a[t.id]))},unregisterOption(e){let t=s.value.slice(),n=null!==d.value?t[d.value]:null,o=t.findIndex((t=>t.id===e));-1!==o&&t.splice(o,1),s.value=t,d.value=o===d.value||null===n?null:t.indexOf(n)},select(e){t.disabled||a("update:modelValue",e)}};return _e("mousedown",(e=>{var t,n,o;let a=e.target,r=document.activeElement;0===l.value&&((null==(t=Be(i))?void 0:t.contains(a))||((null==(n=Be(u))?void 0:n.contains(a))||v.closeListbox(),(r===document.body||!(null==r?void 0:r.contains(a)))&&(e.defaultPrevented||null==(o=Be(i))||o.focus({preventScroll:!0}))))})),(0,e.provide)(ht,v),Ve((0,e.computed)((()=>Ie(l.value,{0:0,1:1})))),()=>{let e={open:0===l.value,disabled:t.disabled};return De({props:Le(t,["modelValue","onUpdate:modelValue","disabled","horizontal"]),slot:e,slots:n,attrs:o,name:"Listbox"})}}}),(0,e.defineComponent)({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},setup(e,{attrs:t,slots:n}){let o=yt("ListboxLabel"),a=`headlessui-listbox-label-${Ae()}`;function l(){var e;null==(e=Be(o.buttonRef))||e.focus({preventScroll:!0})}return()=>{let r={open:0===o.listboxState.value,disabled:o.disabled.value},i={id:a,ref:o.labelRef,onClick:l};return De({props:{...e,...i},slot:r,attrs:t,slots:n,name:"ListboxLabel"})}}}),(0,e.defineComponent)({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},setup(t,{attrs:n,slots:o}){let a=yt("ListboxButton"),l=`headlessui-listbox-button-${Ae()}`;function r(t){switch(t.key){case" ":case"Enter":case"ArrowDown":t.preventDefault(),a.openListbox(),(0,e.nextTick)((()=>{var e;null==(e=Be(a.optionsRef))||e.focus({preventScroll:!0}),a.value.value||a.goToOption(0)}));break;case"ArrowUp":t.preventDefault(),a.openListbox(),(0,e.nextTick)((()=>{var e;null==(e=Be(a.optionsRef))||e.focus({preventScroll:!0}),a.value.value||a.goToOption(3)}))}}function i(e){if(" "===e.key)e.preventDefault()}function u(t){a.disabled.value||(0===a.listboxState.value?(a.closeListbox(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),a.openListbox(),function(e){requestAnimationFrame((()=>requestAnimationFrame(e)))}((()=>{var e;return null==(e=Be(a.optionsRef))?void 0:e.focus({preventScroll:!0})}))))}let s=$e((0,e.computed)((()=>({as:t.as,type:n.type}))),a.buttonRef);return()=>{var e,c;let d={open:0===a.listboxState.value,disabled:a.disabled.value},p={ref:a.buttonRef,id:l,type:s.value,"aria-haspopup":!0,"aria-controls":null==(e=Be(a.optionsRef))?void 0:e.id,"aria-expanded":a.disabled.value?void 0:0===a.listboxState.value,"aria-labelledby":a.labelRef.value?[null==(c=Be(a.labelRef))?void 0:c.id,l].join(" "):void 0,disabled:!0===a.disabled.value||void 0,onKeydown:r,onKeyup:i,onClick:u};return De({props:{...t,...p},slot:d,attrs:n,slots:o,name:"ListboxButton"})}}}),(0,e.defineComponent)({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(t,{attrs:n,slots:o}){let a=yt("ListboxOptions"),l=`headlessui-listbox-options-${Ae()}`,r=(0,e.ref)(null);function i(t){switch(r.value&&clearTimeout(r.value),t.key){case" ":if(""!==a.searchQuery.value)return t.preventDefault(),t.stopPropagation(),a.search(t.key);case"Enter":if(t.preventDefault(),t.stopPropagation(),null!==a.activeOptionIndex.value){let{dataRef:e}=a.options.value[a.activeOptionIndex.value];a.select(e.value)}a.closeListbox(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}));break;case Ie(a.orientation.value,{vertical:"ArrowDown",horizontal:"ArrowRight"}):return t.preventDefault(),t.stopPropagation(),a.goToOption(2);case Ie(a.orientation.value,{vertical:"ArrowUp",horizontal:"ArrowLeft"}):return t.preventDefault(),t.stopPropagation(),a.goToOption(1);case"Home":case"PageUp":return t.preventDefault(),t.stopPropagation(),a.goToOption(0);case"End":case"PageDown":return t.preventDefault(),t.stopPropagation(),a.goToOption(3);case"Escape":t.preventDefault(),t.stopPropagation(),a.closeListbox(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}));break;case"Tab":t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(a.search(t.key),r.value=setTimeout((()=>a.clearSearch()),350))}}let u=je(),s=(0,e.computed)((()=>null!==u?0===u.value:0===a.listboxState.value));return()=>{var e,r,u,c;let d={open:0===a.listboxState.value},p={"aria-activedescendant":null===a.activeOptionIndex.value||null==(e=a.options.value[a.activeOptionIndex.value])?void 0:e.id,"aria-labelledby":null!=(c=null==(r=Be(a.labelRef))?void 0:r.id)?c:null==(u=Be(a.buttonRef))?void 0:u.id,"aria-orientation":a.orientation.value,id:l,onKeydown:i,role:"listbox",tabIndex:0,ref:a.optionsRef};return De({props:{...t,...p},slot:d,attrs:n,slots:o,features:3,visible:s.value,name:"ListboxOptions"})}}}),(0,e.defineComponent)({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1}},setup(t,{slots:n,attrs:o}){let a=yt("ListboxOption"),l=`headlessui-listbox-option-${Ae()}`,r=(0,e.computed)((()=>null!==a.activeOptionIndex.value&&a.options.value[a.activeOptionIndex.value].id===l)),i=(0,e.computed)((()=>(0,e.toRaw)(a.value.value)===(0,e.toRaw)(t.value))),u=(0,e.ref)({disabled:t.disabled,value:t.value,textValue:""});function s(n){if(t.disabled)return n.preventDefault();a.select(t.value),a.closeListbox(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function c(){if(t.disabled)return a.goToOption(5);a.goToOption(4,l)}function d(){t.disabled||r.value||a.goToOption(4,l)}function p(){t.disabled||!r.value||a.goToOption(5)}return(0,e.onMounted)((()=>{var e,t;let n=null==(t=null==(e=document.getElementById(l))?void 0:e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(u.value.textValue=n)})),(0,e.onMounted)((()=>a.registerOption(l,u))),(0,e.onUnmounted)((()=>a.unregisterOption(l))),(0,e.onMounted)((()=>{(0,e.watch)([a.listboxState,i],(()=>{var e,t;0===a.listboxState.value&&(!i.value||(a.goToOption(4,l),null==(t=null==(e=document.getElementById(l))?void 0:e.focus)||t.call(e)))}),{immediate:!0})})),(0,e.watchEffect)((()=>{0===a.listboxState.value&&(!r.value||(0,e.nextTick)((()=>{var e,t;return null==(t=null==(e=document.getElementById(l))?void 0:e.scrollIntoView)?void 0:t.call(e,{block:"nearest"})})))})),()=>{let{disabled:e}=t,a={active:r.value,selected:i.value,disabled:e},u={id:l,role:"option",tabIndex:!0===e?void 0:-1,"aria-disabled":!0===e||void 0,"aria-selected":!0===i.value?i.value:void 0,disabled:void 0,onClick:s,onFocus:c,onPointermove:d,onMousemove:d,onPointerleave:p,onMouseleave:p};return De({props:{...t,...u},slot:a,attrs:o,slots:n,name:"ListboxOption"})}}});var xt=Symbol("MenuContext");function wt(t){let n=(0,e.inject)(xt,null);if(null===n){let e=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,wt),e}return n}(0,e.defineComponent)({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(t,{slots:n,attrs:o}){let a=(0,e.ref)(1),l=(0,e.ref)(null),r=(0,e.ref)(null),i=(0,e.ref)([]),u=(0,e.ref)(""),s=(0,e.ref)(null),c={menuState:a,buttonRef:l,itemsRef:r,items:i,searchQuery:u,activeItemIndex:s,closeMenu:()=>{a.value=1,s.value=null},openMenu:()=>a.value=0,goToItem(e,t){let n=Ne(4===e?{focus:4,id:t}:{focus:e},{resolveItems:()=>i.value,resolveActiveIndex:()=>s.value,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled});""===u.value&&s.value===n||(u.value="",s.value=n)},search(e){let t=""!==u.value?0:1;u.value+=e.toLowerCase();let n=(null!==s.value?i.value.slice(s.value+t).concat(i.value.slice(0,s.value+t)):i.value).find((e=>e.dataRef.textValue.startsWith(u.value)&&!e.dataRef.disabled)),o=n?i.value.indexOf(n):-1;-1===o||o===s.value||(s.value=o)},clearSearch(){u.value=""},registerItem(e,t){var n,o;let a=Array.from(null!=(o=null==(n=r.value)?void 0:n.querySelectorAll('[id^="headlessui-menu-item-"]'))?o:[]).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{});i.value=[...i.value,{id:e,dataRef:t}].sort(((e,t)=>a[e.id]-a[t.id]))},unregisterItem(e){let t=i.value.slice(),n=null!==s.value?t[s.value]:null,o=t.findIndex((t=>t.id===e));-1!==o&&t.splice(o,1),i.value=t,s.value=o===s.value||null===n?null:t.indexOf(n)}};return _e("mousedown",(e=>{var t,n,o;let i=e.target,u=document.activeElement;0===a.value&&((null==(t=Be(l))?void 0:t.contains(i))||((null==(n=Be(r))?void 0:n.contains(i))||c.closeMenu(),(u===document.body||!(null==u?void 0:u.contains(i)))&&(e.defaultPrevented||null==(o=Be(l))||o.focus({preventScroll:!0}))))})),(0,e.provide)(xt,c),Ve((0,e.computed)((()=>Ie(a.value,{0:0,1:1})))),()=>{let e={open:0===a.value};return De({props:t,slot:e,slots:n,attrs:o,name:"Menu"})}}}),(0,e.defineComponent)({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"}},setup(t,{attrs:n,slots:o}){let a=wt("MenuButton"),l=`headlessui-menu-button-${Ae()}`;function r(t){switch(t.key){case" ":case"Enter":case"ArrowDown":t.preventDefault(),t.stopPropagation(),a.openMenu(),(0,e.nextTick)((()=>{var e;null==(e=Be(a.itemsRef))||e.focus({preventScroll:!0}),a.goToItem(0)}));break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a.openMenu(),(0,e.nextTick)((()=>{var e;null==(e=Be(a.itemsRef))||e.focus({preventScroll:!0}),a.goToItem(3)}))}}function i(e){if(" "===e.key)e.preventDefault()}function u(n){t.disabled||(0===a.menuState.value?(a.closeMenu(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(n.preventDefault(),n.stopPropagation(),a.openMenu(),function(e){requestAnimationFrame((()=>requestAnimationFrame(e)))}((()=>{var e;return null==(e=Be(a.itemsRef))?void 0:e.focus({preventScroll:!0})}))))}let s=$e((0,e.computed)((()=>({as:t.as,type:n.type}))),a.buttonRef);return()=>{var e;let c={open:0===a.menuState.value},d={ref:a.buttonRef,id:l,type:s.value,"aria-haspopup":!0,"aria-controls":null==(e=Be(a.itemsRef))?void 0:e.id,"aria-expanded":t.disabled?void 0:0===a.menuState.value,onKeydown:r,onKeyup:i,onClick:u};return De({props:{...t,...d},slot:c,attrs:n,slots:o,name:"MenuButton"})}}}),(0,e.defineComponent)({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(t,{attrs:n,slots:o}){let a=wt("MenuItems"),l=`headlessui-menu-items-${Ae()}`,r=(0,e.ref)(null);function i(t){var n;switch(r.value&&clearTimeout(r.value),t.key){case" ":if(""!==a.searchQuery.value)return t.preventDefault(),t.stopPropagation(),a.search(t.key);case"Enter":if(t.preventDefault(),t.stopPropagation(),null!==a.activeItemIndex.value){let{id:e}=a.items.value[a.activeItemIndex.value];null==(n=document.getElementById(e))||n.click()}a.closeMenu(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}));break;case"ArrowDown":return t.preventDefault(),t.stopPropagation(),a.goToItem(2);case"ArrowUp":return t.preventDefault(),t.stopPropagation(),a.goToItem(1);case"Home":case"PageUp":return t.preventDefault(),t.stopPropagation(),a.goToItem(0);case"End":case"PageDown":return t.preventDefault(),t.stopPropagation(),a.goToItem(3);case"Escape":t.preventDefault(),t.stopPropagation(),a.closeMenu(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}));break;case"Tab":t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(a.search(t.key),r.value=setTimeout((()=>a.clearSearch()),350))}}function u(e){if(" "===e.key)e.preventDefault()}Ge({container:(0,e.computed)((()=>Be(a.itemsRef))),enabled:(0,e.computed)((()=>0===a.menuState.value)),accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let s=je(),c=(0,e.computed)((()=>null!==s?0===s.value:0===a.menuState.value));return()=>{var e,r;let s={open:0===a.menuState.value},d={"aria-activedescendant":null===a.activeItemIndex.value||null==(e=a.items.value[a.activeItemIndex.value])?void 0:e.id,"aria-labelledby":null==(r=Be(a.buttonRef))?void 0:r.id,id:l,onKeydown:i,onKeyup:u,role:"menu",tabIndex:0,ref:a.itemsRef};return De({props:{...t,...d},slot:s,attrs:n,slots:o,features:3,visible:c.value,name:"MenuItems"})}}}),(0,e.defineComponent)({name:"MenuItem",props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1}},setup(t,{slots:n,attrs:o}){let a=wt("MenuItem"),l=`headlessui-menu-item-${Ae()}`,r=(0,e.computed)((()=>null!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===l)),i=(0,e.ref)({disabled:t.disabled,textValue:""});function u(n){if(t.disabled)return n.preventDefault();a.closeMenu(),(0,e.nextTick)((()=>{var e;return null==(e=Be(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function s(){if(t.disabled)return a.goToItem(5);a.goToItem(4,l)}function c(){t.disabled||r.value||a.goToItem(4,l)}function d(){t.disabled||!r.value||a.goToItem(5)}return(0,e.onMounted)((()=>{var e,t;let n=null==(t=null==(e=document.getElementById(l))?void 0:e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(i.value.textValue=n)})),(0,e.onMounted)((()=>a.registerItem(l,i))),(0,e.onUnmounted)((()=>a.unregisterItem(l))),(0,e.watchEffect)((()=>{0===a.menuState.value&&(!r.value||(0,e.nextTick)((()=>{var e,t;return null==(t=null==(e=document.getElementById(l))?void 0:e.scrollIntoView)?void 0:t.call(e,{block:"nearest"})})))})),()=>{let{disabled:e}=t,a={active:r.value,disabled:e};return De({props:{...t,id:l,role:"menuitem",tabIndex:!0===e?void 0:-1,"aria-disabled":!0===e||void 0,onClick:u,onFocus:s,onPointermove:c,onMousemove:c,onPointerleave:d,onMouseleave:d},slot:a,attrs:o,slots:n,name:"MenuItem"})}}});var St=Symbol("PopoverContext");function Et(t){let n=(0,e.inject)(St,null);if(null===n){let e=new Error(`<${t} /> is missing a parent <${Tt.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Et),e}return n}var kt=Symbol("PopoverGroupContext");function Ct(){return(0,e.inject)(kt,null)}var Ot=Symbol("PopoverPanelContext");var Tt=(0,e.defineComponent)({name:"Popover",props:{as:{type:[Object,String],default:"div"}},setup(t,{slots:n,attrs:o}){let a=`headlessui-popover-button-${Ae()}`,l=`headlessui-popover-panel-${Ae()}`,r=(0,e.ref)(1),i=(0,e.ref)(null),u=(0,e.ref)(null),s={popoverState:r,buttonId:a,panelId:l,panel:u,button:i,togglePopover(){r.value=Ie(r.value,{0:1,1:0})},closePopover(){1!==r.value&&(r.value=1)},close(e){s.closePopover();let t=e?e instanceof HTMLElement?e:e.value instanceof HTMLElement?Be(e):Be(s.button):Be(s.button);null==t||t.focus()}};(0,e.provide)(St,s),Ve((0,e.computed)((()=>Ie(r.value,{0:0,1:1}))));let c={buttonId:a,panelId:l,close(){s.closePopover()}},d=Ct(),p=null==d?void 0:d.registerPopover;return(0,e.watchEffect)((()=>null==p?void 0:p(c))),_e("focus",(()=>{var e,t,n;0===r.value&&((null!=(n=null==d?void 0:d.isFocusWithinPopoverGroup())?n:(null==(e=Be(i))?void 0:e.contains(document.activeElement))||(null==(t=Be(u))?void 0:t.contains(document.activeElement)))||!i||!u||s.closePopover())}),!0),_e("mousedown",(e=>{var t,n,o;let a=e.target;0===r.value&&((null==(t=Be(i))?void 0:t.contains(a))||(null==(n=Be(u))?void 0:n.contains(a))||(s.closePopover(),function(e,t=0){return e!==document.body&&Ie(t,{0:()=>e.matches(ze),1(){let t=e;for(;null!==t;){if(t.matches(ze))return!0;t=t.parentElement}return!1}})}(a,1)||(e.preventDefault(),null==(o=Be(i))||o.focus())))})),()=>{let e={open:0===r.value,close:s.close};return De({props:t,slot:e,slots:n,attrs:o,name:"Popover"})}}}),It=((0,e.defineComponent)({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},setup(t,{attrs:n,slots:o}){let a=Et("PopoverButton"),l=Ct(),r=null==l?void 0:l.closeOthers,i=(0,e.inject)(Ot,null),u=null!==i&&i===a.panelId,s=(0,e.ref)(null),c=(0,e.ref)("undefined"==typeof window?null:document.activeElement);_e("focus",(()=>{c.value=s.value,s.value=document.activeElement}),!0);let d=(0,e.ref)(null);u||(0,e.watchEffect)((()=>{a.button.value=d.value}));let p=$e((0,e.computed)((()=>({as:t.as,type:n.type}))),d);function v(e){var t,n,o,l;if(u){if(1===a.popoverState.value)return;switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a.closePopover(),null==(t=Be(a.button))||t.focus()}}else switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),1===a.popoverState.value&&(null==r||r(a.buttonId)),a.togglePopover();break;case"Escape":if(0!==a.popoverState.value)return null==r?void 0:r(a.buttonId);if(!Be(a.button)||!(null==(n=Be(a.button))?void 0:n.contains(document.activeElement)))return;e.preventDefault(),e.stopPropagation(),a.closePopover();break;case"Tab":if(0!==a.popoverState.value||!a.panel||!a.button)return;if(e.shiftKey){if(!c.value||(null==(o=Be(a.button))?void 0:o.contains(c.value))||(null==(l=Be(a.panel))?void 0:l.contains(c.value)))return;let t=Ke(),n=t.indexOf(c.value);if(t.indexOf(Be(a.button))>n)return;e.preventDefault(),e.stopPropagation(),We(Be(a.panel),8)}else e.preventDefault(),e.stopPropagation(),We(Be(a.panel),1)}}function f(e){var t,n;if(!u&&(" "===e.key&&e.preventDefault(),0===a.popoverState.value&&a.panel&&a.button)&&"Tab"===e.key){if(!c.value||(null==(t=Be(a.button))?void 0:t.contains(c.value))||(null==(n=Be(a.panel))?void 0:n.contains(c.value)))return;let o=Ke(),l=o.indexOf(c.value);if(o.indexOf(Be(a.button))>l)return;e.preventDefault(),e.stopPropagation(),We(Be(a.panel),8)}}function m(){var e,n;t.disabled||(u?(a.closePopover(),null==(e=Be(a.button))||e.focus()):(1===a.popoverState.value&&(null==r||r(a.buttonId)),null==(n=Be(a.button))||n.focus(),a.togglePopover()))}return()=>{let e={open:0===a.popoverState.value},l=u?{ref:d,type:p.value,onKeydown:v,onClick:m}:{ref:d,id:a.buttonId,type:p.value,"aria-expanded":t.disabled?void 0:0===a.popoverState.value,"aria-controls":Be(a.panel)?a.panelId:void 0,disabled:!!t.disabled||void 0,onKeydown:v,onKeyup:f,onClick:m};return De({props:{...t,...l},slot:e,attrs:n,slots:o,name:"PopoverButton"})}}}),(0,e.defineComponent)({name:"PopoverOverlay",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(t,{attrs:n,slots:o}){let a=Et("PopoverOverlay"),l=`headlessui-popover-overlay-${Ae()}`,r=je(),i=(0,e.computed)((()=>null!==r?0===r.value:0===a.popoverState.value));function u(){a.closePopover()}return()=>{let e={open:0===a.popoverState.value};return De({props:{...t,id:l,"aria-hidden":!0,onClick:u},slot:e,attrs:n,slots:o,features:3,visible:i.value,name:"PopoverOverlay"})}}}),(0,e.defineComponent)({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){let{focus:a}=t,l=Et("PopoverPanel");(0,e.provide)(Ot,l.panelId),(0,e.onUnmounted)((()=>{l.panel.value=null})),(0,e.watchEffect)((()=>{var e;if(!a||0!==l.popoverState.value||!l.panel)return;let t=document.activeElement;(null==(e=Be(l.panel))?void 0:e.contains(t))||We(Be(l.panel),1)})),_e("keydown",(e=>{var t,n;if(0!==l.popoverState.value||!Be(l.panel)||"Tab"!==e.key||!document.activeElement||!(null==(t=Be(l.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault();let o=We(Be(l.panel),e.shiftKey?2:4);if(3===o)return null==(n=Be(l.button))?void 0:n.focus();if(1===o){if(!Be(l.button))return;let e=Ke(),t=e.indexOf(Be(l.button));0===We(e.splice(t+1).filter((e=>{var t;return!(null==(t=Be(l.panel))?void 0:t.contains(e))})),1)&&We(document.body,1)}})),_e("focus",(()=>{var e;!a||0===l.popoverState.value&&(!Be(l.panel)||(null==(e=Be(l.panel))?void 0:e.contains(document.activeElement))||l.closePopover())}),!0);let r=je(),i=(0,e.computed)((()=>null!==r?0===r.value:0===l.popoverState.value));function u(e){var t,n;if("Escape"===e.key){if(0!==l.popoverState.value||!Be(l.panel)||!(null==(t=Be(l.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault(),e.stopPropagation(),l.closePopover(),null==(n=Be(l.button))||n.focus()}}return()=>{let e={open:0===l.popoverState.value,close:l.close},a={ref:l.panel,id:l.panelId,onKeydown:u};return De({props:{...t,...a},slot:e,attrs:n,slots:o,features:3,visible:i.value,name:"PopoverPanel"})}}}),(0,e.defineComponent)({name:"PopoverGroup",props:{as:{type:[Object,String],default:"div"}},setup(t,{attrs:n,slots:o}){let a=(0,e.ref)(null),l=(0,e.ref)([]);function r(e){let t=l.value.indexOf(e);-1!==t&&l.value.splice(t,1)}return(0,e.provide)(kt,{registerPopover:function(e){return l.value.push(e),()=>{r(e)}},unregisterPopover:r,isFocusWithinPopoverGroup:function(){var e;let t=document.activeElement;return!!(null==(e=Be(a))?void 0:e.contains(t))||l.value.some((e=>{var n,o;return(null==(n=document.getElementById(e.buttonId))?void 0:n.contains(t))||(null==(o=document.getElementById(e.panelId))?void 0:o.contains(t))}))},closeOthers:function(e){for(let t of l.value)t.buttonId!==e&&t.close()}}),()=>De({props:{...t,ref:a},slot:{},attrs:n,slots:o,name:"PopoverGroup"})}}),Symbol("LabelContext"));function Dt(){let t=(0,e.inject)(It,null);if(null===t){let e=new Error("You used a