From c31bbd307945609a82be24ea41fcbe95748bd470 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Apr 2024 17:19:04 +0100 Subject: [PATCH 01/91] Adds initial work --- pint.json | 5 + .../Foundation/Exceptions/Handler.php | 25 +- .../Exceptions/Renderer/Exception.php | 130 +++++++ .../Foundation/Exceptions/Renderer/Frame.php | 126 +++++++ .../Renderer/Mappers/BladeMapper.php | 356 ++++++++++++++++++ .../Exceptions/Renderer/Renderer.php | 79 ++++ .../Whoops/WhoopsExceptionRenderer.php | 2 - .../Providers/FoundationServiceProvider.php | 31 ++ .../renderer/components/card.blade.php | 6 + .../renderer/components/editor.blade.php | 19 + .../renderer/components/header.blade.php | 19 + .../icons/computer-desktop.blade.php | 3 + .../renderer/components/icons/moon.blade.php | 3 + .../renderer/components/icons/sun.blade.php | 3 + .../renderer/components/layout.blade.php | 15 + .../renderer/components/navigation.blade.php | 15 + .../renderer/components/scripts.blade.php | 29 ++ .../renderer/components/styles.blade.php | 70 ++++ .../components/theme-swicher.blade.php | 77 ++++ .../components/trace-and-editor.blade.php | 13 + .../renderer/components/trace.blade.php | 92 +++++ .../exceptions/renderer/show.blade.php | 13 + src/Illuminate/View/Compilers/Compiler.php | 10 + 23 files changed, 1133 insertions(+), 8 deletions(-) create mode 100644 pint.json create mode 100644 src/Illuminate/Foundation/Exceptions/Renderer/Exception.php create mode 100644 src/Illuminate/Foundation/Exceptions/Renderer/Frame.php create mode 100644 src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php create mode 100644 src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/card.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/computer-desktop.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/moon.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php diff --git a/pint.json b/pint.json new file mode 100644 index 000000000000..fc058ad4b4a3 --- /dev/null +++ b/pint.json @@ -0,0 +1,5 @@ +{ + "rules": { + "no_superfluous_phpdoc_tags": false + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 7d049553737e..8ba96edbe0ff 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -18,6 +18,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\MultipleRecordsFoundException; use Illuminate\Database\RecordsNotFoundException; +use Illuminate\Foundation\Exceptions\Renderer\Renderer; use Illuminate\Http\Exceptions\HttpResponseException; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; @@ -833,9 +834,11 @@ protected function renderExceptionContent(Throwable $e) try { return config('app.debug') && app()->has(ExceptionRenderer::class) ? $this->renderExceptionWithCustomRenderer($e) - : $this->renderExceptionWithSymfony($e, config('app.debug')); + : $this->renderException($e); } catch (Throwable $e) { - return $this->renderExceptionWithSymfony($e, config('app.debug')); + return rescue(fn () => $this->renderException($e), function () use ($e) { + return $this->renderExceptionWithSymfony($e); + }); } } @@ -851,19 +854,29 @@ protected function renderExceptionWithCustomRenderer(Throwable $e) } /** - * Render an exception to a string using Symfony. + * Render an exception to a string using Symfony's HTML error renderer. * * @param \Throwable $e - * @param bool $debug * @return string */ - protected function renderExceptionWithSymfony(Throwable $e, $debug) + protected function renderExceptionWithSymfony(Throwable $e) { - $renderer = new HtmlErrorRenderer($debug); + $renderer = new HtmlErrorRenderer(config('app.debug')); return $renderer->render($e)->getAsString(); } + /** + * Render an exception to a string. + * + * @param \Throwable $e + * @return string + */ + protected function renderException(Throwable $e) + { + return $this->container->make(Renderer::class)->render(request(), $e); + } + /** * Render the given HttpException. * diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php new file mode 100644 index 000000000000..eb117868c3c7 --- /dev/null +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php @@ -0,0 +1,130 @@ + + */ + protected $mappers = [ + BladeMapper::class, + ]; + + /** + * Creates a new exception renderer instance. + * + * @param \Symfony\Component\ErrorHandler\Exception\FlattenException $exception + * @param string $basePath + * @return void + */ + public function __construct(FlattenException $exception, Request $request, string $basePath) + { + $this->exception = $exception; + $this->request = $request; + $this->basePath = $basePath; + } + + /** + * Get the request method. + * + * @return string + */ + public function requestMethod() + { + return $this->request->method(); + } + + /** + * Get the request URI. + * + * @return string + */ + public function requestUri() + { + return $this->request->path(); + } + + /** + * Get the exception title. + * + * @return int + */ + public function title() + { + return $this->exception->getStatusText(); + } + + /** + * Get the exception message. + * + * @return string + */ + public function message() + { + return $this->exception->getMessage(); + } + + /** + * Get the exception class name. + * + * @return string + */ + public function class() + { + return $this->exception->getClass(); + } + + /** + * Get the first "non-vendor" frame index. + * + * @return int + */ + public function defaultFrame() + { + $key = array_search(false, array_map(function (Frame $frame) { + return $frame->isFromVendor(); + }, $this->frames()->all())); + + return $key === false ? 0 : $key; + } + + /** + * Get the exception message trace. + * + * @return \Illuminate\Support\Collection + */ + public function frames() + { + return collect(array_map(function (array $trace) { + return new Frame($this->exception, $trace, $this->basePath); + }, $this->exception->getTrace())); + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php new file mode 100644 index 000000000000..99ad14af4220 --- /dev/null +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php @@ -0,0 +1,126 @@ +exception = $exception; + $this->frame = $frame; + $this->basePath = $basePath; + } + + /** + * Get the frame's source. + * + * @return string + */ + public function source() + { + return match (true) { + ! empty($this->frame['class']) => value(function () { + $reflector = new ReflectionClass($this->frame['class']); + + if ($reflector->getFileName() === realpath($this->frame['file'])) { + return $this->frame['class']; + } + + return str_replace($this->basePath.'/', '', $this->frame['file']); + }), + default => str_replace($this->basePath.'/', '', $this->frame['file']), + }; + } + + /** + * Get the frame file. + * + * @return string + */ + public function file() + { + return $this->frame['file']; + } + + /** + * Get the frame line. + * + * @return int + */ + public function line() + { + return $this->frame['line']; + } + + /** + * Get the frame function. + * + * @return string + */ + public function callable() + { + return match (true) { + ! empty($this->frame['function']) => $this->frame['function'], + default => 'throw', + }; + } + + /** + * Get the frame snippet. + * + * @return string + */ + public function snippet() + { + $contents = file($this->frame['file']) ?: []; + + $start = max($this->frame['line'] - 12, 0); + + $length = 12 * 2 + 1; + + return implode('', array_slice($contents, $start, $length)); + } + + /** + * Determine if the frame is from a vendor package. + * + * @return bool + */ + public function isFromVendor() + { + return ! str_starts_with($this->frame['file'], $this->basePath) + || str_starts_with($this->frame['file'], $this->basePath.'/vendor'); + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php new file mode 100644 index 000000000000..6cbd900feba0 --- /dev/null +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php @@ -0,0 +1,356 @@ + + * + * For the full copyright and license information, please review its LICENSE: + * + * The MIT License (MIT) + * + * Copyright (c) Spatie + * + * 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: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 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. + */ + +class BladeMapper +{ + /** + * The view factory instance. + * + * @var \Illuminate\View\Factory + */ + protected $factory; + + /** + * The blade compiler instance. + * + * @var \Illuminate\View\Compilers\BladeCompiler + */ + protected $bladeCompiler; + + /** + * Create a new blade mapper instance. + * + * @param \Illuminate\Contracts\View\Factory $factory + * @param \Illuminate\View\Compilers\BladeCompiler $bladeCompiler + * @return void + */ + public function __construct(Factory $factory, BladeCompiler $bladeCompiler) + { + $this->factory = $factory; + $this->bladeCompiler = $bladeCompiler; + } + + /** + * Maps view cached paths to their original paths. + * + * @param \Symfony\Component\ErrorHandler\Exception\FlattenException $exception + * @return \Symfony\Component\ErrorHandler\Exception\FlattenException + */ + public function map(FlattenException $exception) + { + if ($exception->getClass() === ViewException::class) { + $exception = $exception->getPrevious() ?? $exception; + } + + $trace = Collection::make($exception->getTrace()) + ->map(function ($frame) { + if ($originalPath = $this->findCompiledView(Arr::get($frame, 'file', ''))) { + $frame['file'] = $originalPath; + $frame['line'] = $this->detectLineNumber($frame['file'], $frame['line']); + } + + return $frame; + })->toArray(); + + $exception->setLine($trace[0]['line'] = $this->detectLineNumber($exception->getFile(), $exception->getLine())); + $exception->setFile($trace[0]['file']); + + return tap($exception, fn () => (fn () => $this->trace = $trace)->call($exception)); + } + + /** + * Finds the compiled view file for the given compiled path. + * + * @param string $compiledPath + * @return string|null + */ + protected function findCompiledView(string $compiledPath) + { + return once(fn () => $this->getKnownPaths())[$compiledPath] ?? null; + } + + /** + * Get the list of known paths from the compiler engine. + * + * @return array + */ + protected function getKnownPaths() + { + $compilerEngineReflection = new ReflectionClass( + $bladeCompilerEngine = $this->factory->getEngineResolver()->resolve('blade'), + ); + + if (! $compilerEngineReflection->hasProperty('lastCompiled') && $compilerEngineReflection->hasProperty('engine')) { + $compilerEngine = $compilerEngineReflection->getProperty('engine'); + $compilerEngine->setAccessible(true); + $compilerEngine = $compilerEngine->getValue($bladeCompilerEngine); + $lastCompiled = new ReflectionProperty($compilerEngine, 'lastCompiled'); + $lastCompiled->setAccessible(true); + $lastCompiled = $lastCompiled->getValue($compilerEngine); + } else { + $lastCompiled = $compilerEngineReflection->getProperty('lastCompiled'); + $lastCompiled->setAccessible(true); + $lastCompiled = $lastCompiled->getValue($bladeCompilerEngine); + } + + $knownPaths = []; + foreach ($lastCompiled as $lastCompiledPath) { + $compiledPath = $bladeCompilerEngine->getCompiler()->getCompiledPath($lastCompiledPath); + + $knownPaths[realpath($compiledPath ?? $lastCompiledPath)] = realpath($lastCompiledPath); + } + + return $knownPaths; + } + + /** + * Get the view data from the exception. + * + * @param \Throwable $exception + * @return array + */ + protected function getViewData(Throwable $exception) + { + foreach ($exception->getTrace() as $frame) { + if (Arr::get($frame, 'class') === PhpEngine::class) { + $data = Arr::get($frame, 'args.1', []); + + return $this->filterViewData($data); + } + } + + return []; + } + + /** + * Filters out the view data that should not be shown in the exception report. + * + * @param array $data + * @return array + */ + protected function filterViewData(array $data) + { + return array_filter($data, function ($value, $key) { + if ($key === 'app') { + return ! $value instanceof Application; + } + + return $key !== '__env'; + }, ARRAY_FILTER_USE_BOTH); + } + + /** + * Detects the line number in the original blade file. + * + * @param string $filename + * @param int $compiledLineNumber + * @return int + */ + protected function detectLineNumber(string $filename, int $compiledLineNumber) + { + $map = $this->compileSourcemap((string) file_get_contents($filename)); + + return $this->findClosestLineNumberMapping($map, $compiledLineNumber); + } + + /** + * Compiles the source map for the given blade file. + * + * @param string $value + * @return string + */ + protected function compileSourcemap(string $value) + { + try { + $value = $this->addEchoLineNumbers($value); + + $value = $this->addStatementLineNumbers($value); + + $value = $this->addBladeComponentLineNumbers($value); + + $value = $this->bladeCompiler->compileString($value); + + return $this->trimEmptyLines($value); + } catch (Throwable $e) { + report($e); + + return $value; + } + } + + /** + * Adds line numbers to echo statements. + * + * @param string $value + * @return string + */ + protected function addEchoLineNumbers(string $value) + { + $echoPairs = [['{{', '}}'], ['{{{', '}}}'], ['{!!', '!!}']]; + + foreach ($echoPairs as $pair) { + // Matches {{ $value }}, {!! $value !!} and {{{ $value }}} depending on $pair + $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $pair[0], $pair[1]); + + if (preg_match_all($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { + foreach (array_reverse($matches[0]) as $match) { + $position = mb_strlen(substr($value, 0, $match[1])); + + $value = $this->insertLineNumberAtPosition($position, $value); + } + } + } + + return $value; + } + + /** + * Adds line numbers to blade statements. + * + * @param string $value + * @return string + */ + protected function addStatementLineNumbers(string $value) + { + + $shouldInsertLineNumbers = preg_match_all( + '/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', + $value, + $matches, + PREG_OFFSET_CAPTURE + ); + + if ($shouldInsertLineNumbers) { + foreach (array_reverse($matches[0]) as $match) { + $position = mb_strlen(substr($value, 0, $match[1])); + + $value = $this->insertLineNumberAtPosition($position, $value); + } + } + + return $value; + } + + /** + * Adds line numbers to blade components. + * + * @param string $value + * @return string + */ + protected function addBladeComponentLineNumbers(string $value) + { + $shouldInsertLineNumbers = preg_match_all( + '/<\s*x[-:]([\w\-:.]*)/mx', + $value, + $matches, + PREG_OFFSET_CAPTURE + ); + + if ($shouldInsertLineNumbers) { + foreach (array_reverse($matches[0]) as $match) { + $position = mb_strlen(substr($value, 0, $match[1])); + + $value = $this->insertLineNumberAtPosition($position, $value); + } + } + + return $value; + } + + /** + * Inserts a line number at the given position. + * + * @param int $position + * @param string $value + * @return string + */ + protected function insertLineNumberAtPosition(int $position, string $value) + { + $before = mb_substr($value, 0, $position); + $lineNumber = count(explode("\n", $before)); + + return mb_substr($value, 0, $position)."|---LINE:{$lineNumber}---|".mb_substr($value, $position); + } + + /** + * Trims empty lines from the given value. + * + * @param string $value + * @return string + */ + protected function trimEmptyLines(string $value) + { + $value = preg_replace('/^\|---LINE:([0-9]+)---\|$/m', '', $value); + + return ltrim((string) $value, PHP_EOL); + } + + /** + * Finds the closest line number mapping in the source map. + * + * @param string $map + * @param int $compiledLineNumber + * @return int + */ + protected function findClosestLineNumberMapping(string $map, int $compiledLineNumber) + { + $map = explode("\n", $map); + + $maxDistance = 20; + + $pattern = '/\|---LINE:(?P[0-9]+)---\|/m'; + $lineNumberToCheck = $compiledLineNumber - 1; + + while (true) { + if ($lineNumberToCheck < $compiledLineNumber - $maxDistance) { + return min($compiledLineNumber, count($map)); + } + + if (preg_match($pattern, $map[$lineNumberToCheck] ?? '', $matches)) { + return (int) $matches['line']; + } + + $lineNumberToCheck--; + } + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php b/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php new file mode 100644 index 000000000000..5a97f5050098 --- /dev/null +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php @@ -0,0 +1,79 @@ +viewFactory = $viewFactory; + $this->htmlErrorRenderer = $htmlErrorRenderer; + $this->bladeMapper = $bladeMapper; + $this->basePath = $basePath; + } + + /** + * Renders the given exception as HTML. + * + * @param \Illuminate\Http\Request $request + * @param \Throwable $throwable + * @return string + */ + public function render(Request $request, Throwable $throwable) + { + $flattenException = $this->bladeMapper->map( + $this->htmlErrorRenderer->render($throwable), + ); + + return $this->viewFactory->make('laravel-exceptions-renderer::show', [ + 'exception' => new Exception($flattenException, $request, $this->basePath), + ])->render(); + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php b/src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php index 82f707e0a628..04b66da37706 100644 --- a/src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php +++ b/src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php @@ -5,8 +5,6 @@ use Illuminate\Contracts\Foundation\ExceptionRenderer; use Whoops\Run as Whoops; -use function tap; - class WhoopsExceptionRenderer implements ExceptionRenderer { /** diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index 341ae00cf0c4..0688615a1027 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -6,11 +6,14 @@ use Illuminate\Contracts\Console\Kernel as ConsoleKernel; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Events\Dispatcher; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Foundation\MaintenanceMode as MaintenanceModeContract; use Illuminate\Contracts\View\Factory; use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Grammar; use Illuminate\Foundation\Console\CliDumper; +use Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper; +use Illuminate\Foundation\Exceptions\Renderer\Renderer; use Illuminate\Foundation\Http\HtmlDumper; use Illuminate\Foundation\MaintenanceModeManager; use Illuminate\Foundation\Precognition; @@ -23,6 +26,8 @@ use Illuminate\Testing\LoggedExceptionCollection; use Illuminate\Testing\ParallelTestingServiceProvider; use Illuminate\Validation\ValidationException; +use Illuminate\View\Compilers\BladeCompiler; +use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Symfony\Component\VarDumper\Caster\StubCaster; use Symfony\Component\VarDumper\Cloner\AbstractCloner; @@ -76,6 +81,7 @@ public function register() $this->registerRequestValidation(); $this->registerRequestSignatureValidation(); $this->registerExceptionTracking(); + $this->registerExceptionsRenderer(); $this->registerMaintenanceModeManager(); } @@ -198,6 +204,31 @@ protected function registerExceptionTracking() }); } + /** + * Register the exceptions renderer service. + * + * @return void + */ + protected function registerExceptionsRenderer() + { + $this->loadViewsFrom(__DIR__.'/../resources/exceptions/renderer', 'laravel-exceptions-renderer'); + + $this->callAfterResolving(BladeCompiler::class, function (BladeCompiler $blade) { + $blade->anonymousComponentPath(__DIR__ . '/../resources/exceptions/components', 'laravel-exceptions-renderer'); + }); + + $this->app->singleton(Renderer::class, function (Application $app) { + $debug = $app['config']->get('app.debug'); + + return new Renderer( + $app->make(Factory::class), + new HtmlErrorRenderer($debug), + $app->make(BladeMapper::class), + $app->basePath(), + ); + }); + } + /** * Register the maintenance mode manager service. * diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/card.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/card.blade.php new file mode 100644 index 000000000000..738773af5ee1 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/card.blade.php @@ -0,0 +1,6 @@ +@props(['cols' => 6, 'rows' => 1]) +
merge(['class' => "@container flex flex-col p-3 sm:p-6 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 rounded-xl shadow-sm ring-1 ring-gray-900/5 default:col-span-full default:lg:col-span-{$cols} default:row-span-{$rows}"]) }}" +> + {{ $slot }} +
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php new file mode 100644 index 000000000000..a050e9ad054f --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php @@ -0,0 +1,19 @@ +@foreach ($exception->frames() as $frame) +
+
+
+
+ {{ $frame->source() }} + :{{ $frame->line() }} +
+
+
+
+
{{ $frame->snippet() }}
+
+
+@endforeach diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php new file mode 100644 index 000000000000..55a7877354b9 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php @@ -0,0 +1,19 @@ + +
+ + {{ $exception->class() }} + +
+
+ + {{ $exception->requestMethod() }} {{ $exception->requestUri() }} + +
+
+ PHP {{ PHP_VERSION }} - Laravel {{ app()->version() }} +
+
+
+ +

{{ $exception->message() }}

+
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/computer-desktop.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/computer-desktop.blade.php new file mode 100644 index 000000000000..9664bf6ae555 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/computer-desktop.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/moon.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/moon.blade.php new file mode 100644 index 000000000000..bfa825165ecd --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/moon.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php new file mode 100644 index 000000000000..c03ddbb8b07c --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php new file mode 100644 index 000000000000..b59de3904201 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php @@ -0,0 +1,15 @@ + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + {{ $slot }} + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php new file mode 100644 index 000000000000..16ae0d76a5d0 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php @@ -0,0 +1,15 @@ +
+
+
+
+ + {{ $exception->title() }} + +
+ +
+ +
+
+
+
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php new file mode 100644 index 000000000000..25f04f910d9e --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php @@ -0,0 +1,29 @@ + + + + + + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php new file mode 100644 index 000000000000..c0fa3c738d30 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php @@ -0,0 +1,70 @@ + + + + + + + +@foreach ($exception->frames() as $frame) + @php + /** @var \Illuminate\Foundation\Exceptions\Renderer\Frame $frame */ + @endphp + + +@endforeach diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php new file mode 100644 index 000000000000..288847da6447 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php @@ -0,0 +1,77 @@ + + +
+ + + +
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php new file mode 100644 index 000000000000..e50f584b5167 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php @@ -0,0 +1,13 @@ + +
+ + +
+
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php new file mode 100644 index 000000000000..e3b82886cad4 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php @@ -0,0 +1,92 @@ +
+
+
+ +
+ +
+ @foreach ($exception->frames() as $frame) + @php + /** @var \Illuminate\Foundation\Exceptions\Renderer\Frame $frame */ + @endphp + + @if (! $frame->isFromVendor()) + @php + $vendorFramesCollapsed = $exception->frames()->take($loop->index)->reverse()->takeUntil(fn ($frame) => ! $frame->isFromVendor()); + @endphp + +
+ @if ($vendorFramesCollapsed->isNotEmpty()) +
+ {{ $vendorFramesCollapsed->count() }} vendor frame{{ $vendorFramesCollapsed->count() > 1 ? 's' : '' }} collapsed +
+ @endif +
+ @endif + + + + @if (! $frame->isFromVendor() && $exception->frames()->slice($loop->index + 1)->filter(fn ($frame) => ! $frame->isFromVendor())->isEmpty()) +
+
+ {{ $exception->frames()->slice($loop->index + 1)->count() }} vendor + frame{{ $exception->frames()->slice($loop->index + 1)->count() > 1 ? 's' : '' }} collapsed +
+
+ @endif + @endforeach +
+
+
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php new file mode 100644 index 000000000000..528fe122ddeb --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php @@ -0,0 +1,13 @@ + +
+ + +
+
+ + + +
+
+
+
diff --git a/src/Illuminate/View/Compilers/Compiler.php b/src/Illuminate/View/Compilers/Compiler.php index 7ec15ac96f74..7f8fbe8fc376 100755 --- a/src/Illuminate/View/Compilers/Compiler.php +++ b/src/Illuminate/View/Compilers/Compiler.php @@ -74,6 +74,16 @@ public function __construct( $this->compiledExtension = $compiledExtension; } + /** + * Get the cache path for the compiled views. + * + * @return string + */ + public function getCachePath() + { + return $this->cachePath; + } + /** * Get the path to the compiled version of a view. * From 7263d33d7dbe1676f5065759db883832bd4c9f26 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 4 Apr 2024 16:19:27 +0000 Subject: [PATCH 02/91] Apply fixes from StyleCI --- .../Foundation/Exceptions/Renderer/Mappers/BladeMapper.php | 1 - .../Foundation/Providers/FoundationServiceProvider.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php index 6cbd900feba0..33e66a7377e6 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php @@ -252,7 +252,6 @@ protected function addEchoLineNumbers(string $value) */ protected function addStatementLineNumbers(string $value) { - $shouldInsertLineNumbers = preg_match_all( '/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', $value, diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index 0688615a1027..5d40ed5cf17d 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -214,7 +214,7 @@ protected function registerExceptionsRenderer() $this->loadViewsFrom(__DIR__.'/../resources/exceptions/renderer', 'laravel-exceptions-renderer'); $this->callAfterResolving(BladeCompiler::class, function (BladeCompiler $blade) { - $blade->anonymousComponentPath(__DIR__ . '/../resources/exceptions/components', 'laravel-exceptions-renderer'); + $blade->anonymousComponentPath(__DIR__.'/../resources/exceptions/components', 'laravel-exceptions-renderer'); }); $this->app->singleton(Renderer::class, function (Application $app) { From a397624711fa616850d9ac15b40574d2c1d13f1c Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Apr 2024 17:43:00 +0100 Subject: [PATCH 03/91] No need for register anonymous components path --- .../Foundation/Providers/FoundationServiceProvider.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index 5d40ed5cf17d..c2ec702c94d4 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -213,10 +213,6 @@ protected function registerExceptionsRenderer() { $this->loadViewsFrom(__DIR__.'/../resources/exceptions/renderer', 'laravel-exceptions-renderer'); - $this->callAfterResolving(BladeCompiler::class, function (BladeCompiler $blade) { - $blade->anonymousComponentPath(__DIR__.'/../resources/exceptions/components', 'laravel-exceptions-renderer'); - }); - $this->app->singleton(Renderer::class, function (Application $app) { $debug = $app['config']->get('app.debug'); From ccd77d266d8a561363b31b2304c2347b110431a8 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Apr 2024 17:43:08 +0100 Subject: [PATCH 04/91] Dont map line and file --- .../Foundation/Exceptions/Renderer/Mappers/BladeMapper.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php index 33e66a7377e6..95087aecfc54 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php @@ -92,9 +92,6 @@ public function map(FlattenException $exception) return $frame; })->toArray(); - $exception->setLine($trace[0]['line'] = $this->detectLineNumber($exception->getFile(), $exception->getLine())); - $exception->setFile($trace[0]['file']); - return tap($exception, fn () => (fn () => $this->trace = $trace)->call($exception)); } From b5caa3ee8e7e3bc5e0a57b4180d13d6863605601 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Apr 2024 18:00:59 +0100 Subject: [PATCH 05/91] Fixes access to blade exception --- .../Exceptions/Renderer/Mappers/BladeMapper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php index 95087aecfc54..b275a041388a 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php @@ -78,8 +78,12 @@ public function __construct(Factory $factory, BladeCompiler $bladeCompiler) */ public function map(FlattenException $exception) { - if ($exception->getClass() === ViewException::class) { - $exception = $exception->getPrevious() ?? $exception; + while ($exception->getClass() === ViewException::class) { + if (($previous = $exception->getPrevious()) === null) { + break; + } + + $exception = $previous; } $trace = Collection::make($exception->getTrace()) From 092de509a9c5e2098caa40041164f404bf5467fa Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 4 Apr 2024 16:43:21 +0000 Subject: [PATCH 06/91] Apply fixes from StyleCI --- .../Foundation/Providers/FoundationServiceProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index c2ec702c94d4..fedb331a72fb 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -26,7 +26,6 @@ use Illuminate\Testing\LoggedExceptionCollection; use Illuminate\Testing\ParallelTestingServiceProvider; use Illuminate\Validation\ValidationException; -use Illuminate\View\Compilers\BladeCompiler; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Symfony\Component\VarDumper\Caster\StubCaster; use Symfony\Component\VarDumper\Cloner\AbstractCloner; From 0e52b0b8e77ea14684d3c4e3ef44e8436001a4b5 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Apr 2024 20:39:15 +0100 Subject: [PATCH 07/91] Adds context --- .../Exceptions/Renderer/Exception.php | 51 +++++++------------ .../Foundation/Exceptions/Renderer/Frame.php | 31 ++++++----- .../Renderer/Mappers/BladeMapper.php | 26 ++-------- .../renderer/components/context.blade.php | 27 ++++++++++ .../renderer/components/editor.blade.php | 2 +- .../renderer/components/header.blade.php | 2 +- .../components/trace-and-editor.blade.php | 2 +- .../exceptions/renderer/show.blade.php | 2 + 8 files changed, 71 insertions(+), 72 deletions(-) create mode 100644 src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php index eb117868c3c7..2d40fa8a8276 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php @@ -2,7 +2,7 @@ namespace Illuminate\Foundation\Exceptions\Renderer; -use Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper; +use Composer\Autoload\ClassLoader; use Illuminate\Http\Request; use Symfony\Component\ErrorHandler\Exception\FlattenException; @@ -29,15 +29,6 @@ class Exception */ protected $request; - /** - * The mappers to apply to the exception. - * - * @var array - */ - protected $mappers = [ - BladeMapper::class, - ]; - /** * Creates a new exception renderer instance. * @@ -52,30 +43,10 @@ public function __construct(FlattenException $exception, Request $request, strin $this->basePath = $basePath; } - /** - * Get the request method. - * - * @return string - */ - public function requestMethod() - { - return $this->request->method(); - } - - /** - * Get the request URI. - * - * @return string - */ - public function requestUri() - { - return $this->request->path(); - } - /** * Get the exception title. * - * @return int + * @return string */ public function title() { @@ -123,8 +94,20 @@ public function defaultFrame() */ public function frames() { - return collect(array_map(function (array $trace) { - return new Frame($this->exception, $trace, $this->basePath); - }, $this->exception->getTrace())); + $classMap = once(fn () => array_map(function ($path) { + return (string) realpath($path); + }, array_values(ClassLoader::getRegisteredLoaders())[0]->getClassMap())); + + return collect(array_map( + fn (array $trace) => new Frame($this->exception, $classMap, $trace, $this->basePath), $this->exception->getTrace(), + )); + } + + /** + * Get the request. + */ + public function request() + { + return $this->request; } } diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php index 99ad14af4220..810f5d8871b7 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php @@ -2,7 +2,6 @@ namespace Illuminate\Foundation\Exceptions\Renderer; -use ReflectionClass; use Symfony\Component\ErrorHandler\Exception\FlattenException; class Frame @@ -32,13 +31,15 @@ class Frame * Create a new trace frame instance. * * @param \Symfony\Component\ErrorHandler\Exception\FlattenException $exception - * @param array{file: string, line: int, class?: string, type?: string, function?: string} + * @param array $classMap + * @param array{file: string, line: int, class?: string, type?: string, function?: string} $frame * @param string $basePath * @return void */ - public function __construct(FlattenException $exception, array $frame, string $basePath) + public function __construct(FlattenException $exception, array $classMap, array $frame, string $basePath) { $this->exception = $exception; + $this->classMap = $classMap; $this->frame = $frame; $this->basePath = $basePath; } @@ -51,17 +52,21 @@ public function __construct(FlattenException $exception, array $frame, string $b public function source() { return match (true) { - ! empty($this->frame['class']) => value(function () { - $reflector = new ReflectionClass($this->frame['class']); + is_string($this->class()) => $this->class(), + default => $this->file(), + }; + } - if ($reflector->getFileName() === realpath($this->frame['file'])) { - return $this->frame['class']; - } + /** + * Get the frame class. + * + * @return string|null + */ + public function class() + { + $class = array_search((string) realpath($this->frame['file']), $this->classMap, true); - return str_replace($this->basePath.'/', '', $this->frame['file']); - }), - default => str_replace($this->basePath.'/', '', $this->frame['file']), - }; + return $class === false ? null : $class; } /** @@ -71,7 +76,7 @@ public function source() */ public function file() { - return $this->frame['file']; + return str_replace($this->basePath.'/', '', $this->frame['file']); } /** diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php index b275a041388a..e9c47120dcb9 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php @@ -6,10 +6,11 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\View\Compilers\BladeCompiler; -use Illuminate\View\Engines\PhpEngine; use Illuminate\View\ViewException; use ReflectionClass; +use ReflectionProperty; use Symfony\Component\ErrorHandler\Exception\FlattenException; +use Throwable; /* * This file contains parts of https://github.com/spatie/laravel-ignition. @@ -46,7 +47,7 @@ class BladeMapper /** * The view factory instance. * - * @var \Illuminate\View\Factory + * @var \Illuminate\Contracts\View\Factory */ protected $factory; @@ -88,7 +89,7 @@ public function map(FlattenException $exception) $trace = Collection::make($exception->getTrace()) ->map(function ($frame) { - if ($originalPath = $this->findCompiledView(Arr::get($frame, 'file', ''))) { + if ($originalPath = $this->findCompiledView((string) Arr::get($frame, 'file', ''))) { $frame['file'] = $originalPath; $frame['line'] = $this->detectLineNumber($frame['file'], $frame['line']); } @@ -144,25 +145,6 @@ protected function getKnownPaths() return $knownPaths; } - /** - * Get the view data from the exception. - * - * @param \Throwable $exception - * @return array - */ - protected function getViewData(Throwable $exception) - { - foreach ($exception->getTrace() as $frame) { - if (Arr::get($frame, 'class') === PhpEngine::class) { - $data = Arr::get($frame, 'args.1', []); - - return $this->filterViewData($data); - } - } - - return []; - } - /** * Filters out the view data that should not be shown in the exception report. * diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php new file mode 100644 index 000000000000..46305f87ce07 --- /dev/null +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php @@ -0,0 +1,27 @@ + + +
+ Request +
+ +
+ {{ $exception->request()->method() }} + {{ $exception->request()->url() . $exception->request()->path() }} +
+ +
+ Headers +
+ +
+ + + @foreach ($exception->request()->headers->all() as $key => $value) + + + + + @endforeach + +
{{ $key }}{{ implode(', ', $value) }}
+ diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php index a050e9ad054f..68aa4dd56c53 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php @@ -3,7 +3,7 @@
- {{ $frame->source() }} + {{ $frame->file() }} :{{ $frame->line() }}
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php index 55a7877354b9..1b325ee2d2f3 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php @@ -6,7 +6,7 @@
- {{ $exception->requestMethod() }} {{ $exception->requestUri() }} + {{ $exception->request()->method() }} {{ $exception->request()->url() . $exception->request()->path() }}
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php index e50f584b5167..a4cd6113ccd2 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php @@ -1,7 +1,7 @@
{{ $exception->request()->method() }} - {{ $exception->request()->url() . $exception->request()->path() }} + {{ $exception->request()->url() }}
@@ -16,12 +16,38 @@
- @foreach ($exception->request()->headers->all() as $key => $value) + @forelse ($exception->request()->headers->all() as $key => $value) - + - @endforeach + @empty + + + + @endforelse + +
{{ $key }}{{ implode(', ', $value) }}{{ implode(', ', $value) }}
No headers data
+
+ +
+ Body +
+ +
+ + + @forelse ($exception->request()->all() as $key => $value) + + + + + @empty + + + + @endforelse
{{ $key }}{{ $value }}
No body data
+
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php index 1b325ee2d2f3..f26271bd8b00 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php @@ -6,7 +6,7 @@
- {{ $exception->request()->method() }} {{ $exception->request()->url() . $exception->request()->path() }} + {{ $exception->request()->method() }} {{ $exception->request()->url() }}
From 390ede3ffd52e0812a4e38a816b815b7373883e5 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Apr 2024 16:38:17 +0100 Subject: [PATCH 09/91] Adds database queries --- .../Exceptions/Renderer/Exception.php | 36 ++++++++--- .../Exceptions/Renderer/Listener.php | 56 +++++++++++++++++ .../Exceptions/Renderer/Renderer.php | 12 +++- .../Exceptions/views/minimal.blade.php | 62 ++++++++++++------- .../Providers/FoundationServiceProvider.php | 12 +++- .../renderer/components/context.blade.php | 34 ++++++++++ 6 files changed, 177 insertions(+), 35 deletions(-) create mode 100644 src/Illuminate/Foundation/Exceptions/Renderer/Listener.php diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php index 2d40fa8a8276..8a08df5711ee 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php @@ -16,18 +16,25 @@ class Exception protected $exception; /** - * The application's base path. + * The current request instance. * - * @var string + * @var \Illuminate\Http\Request */ - protected $basePath; + protected $request; /** - * The current request instance. + * The exception listener instance. * - * @var \Illuminate\Http\Request + * @var \Illuminate\Foundation\Exceptions\Renderer\Listener */ - protected $request; + protected $listener; + + /** + * The application's base path. + * + * @var string + */ + protected $basePath; /** * Creates a new exception renderer instance. @@ -36,10 +43,11 @@ class Exception * @param string $basePath * @return void */ - public function __construct(FlattenException $exception, Request $request, string $basePath) + public function __construct(FlattenException $exception, Request $request, Listener $listener, string $basePath) { $this->exception = $exception; $this->request = $request; + $this->listener = $listener; $this->basePath = $basePath; } @@ -104,10 +112,22 @@ public function frames() } /** - * Get the request. + * Get the exception's request instance. + * + * @return \Illuminate\Http\Request */ public function request() { return $this->request; } + + /** + * Get the exception listener instance. + * + * @return \Illuminate\Foundation\Exceptions\Renderer\Listener + */ + public function listener() + { + return $this->listener; + } } diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php new file mode 100644 index 000000000000..bf57e74da25d --- /dev/null +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php @@ -0,0 +1,56 @@ + + */ + protected $queries = []; + + /** + * Registers the exception renderer listener so that it can listen for events. + * + * @param \Illuminate\Contracts\Events\Dispatcher + * @return void + */ + public function register(Dispatcher $events) + { + $events->listen(QueryExecuted::class, [$this, 'onQueryExecuted']); + } + + /** + * Returns the queries that have been executed. + * + * @return arrayqueries; + } + + /** + * Listens for the query executed event. + * + * @param \Illuminate\Database\Events\QueryExecuted $event + * @return void + */ + public function onQueryExecuted(QueryExecuted $event) + { + $this->queries[] = [ + 'connectionName' => $event->connectionName, + 'time' => $event->time, + 'sql' => $event->sql, + ]; + + if (count($this->queries) >= 101) { + array_shift($this->queries); + } + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php b/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php index 5a97f5050098..b843ba51aa3a 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php @@ -17,6 +17,13 @@ class Renderer */ protected $viewFactory; + /** + * The exception listener instance. + * + * @var \Illuminate\Foundation\Exceptions\Renderer\Listener + */ + protected $listener; + /** * The HTML error renderer instance. * @@ -42,6 +49,7 @@ class Renderer * Creates a new exception renderer instance. * * @param \Illuminate\Contracts\View\Factory $viewFactory + * @param \Illuminate\Foundation\Exceptions\Renderer\Listener $listener * @param \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer $htmlErrorRenderer * @param \Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper $bladeMapper * @param string $basePath @@ -49,11 +57,13 @@ class Renderer */ public function __construct( Factory $viewFactory, + Listener $listener, HtmlErrorRenderer $htmlErrorRenderer, BladeMapper $bladeMapper, string $basePath ) { $this->viewFactory = $viewFactory; + $this->listener = $listener; $this->htmlErrorRenderer = $htmlErrorRenderer; $this->bladeMapper = $bladeMapper; $this->basePath = $basePath; @@ -73,7 +83,7 @@ public function render(Request $request, Throwable $throwable) ); return $this->viewFactory->make('laravel-exceptions-renderer::show', [ - 'exception' => new Exception($flattenException, $request, $this->basePath), + 'exception' => new Exception($flattenException, $request, $this->listener, $this->basePath), ])->render(); } } diff --git a/src/Illuminate/Foundation/Exceptions/views/minimal.blade.php b/src/Illuminate/Foundation/Exceptions/views/minimal.blade.php index db69f254f308..f2f3ed5b2a0a 100644 --- a/src/Illuminate/Foundation/Exceptions/views/minimal.blade.php +++ b/src/Illuminate/Foundation/Exceptions/views/minimal.blade.php @@ -1,34 +1,48 @@ - - - + + + - @yield('title') + @yield('title') - + - - - -
-
-
-
- @yield('code') -
+ + + +
+
+
+
+ @yield('code') +
-
- @yield('message') -
+
+ @yield('message')
- +
+ diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index fedb331a72fb..210aac108dbd 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -12,6 +12,7 @@ use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Grammar; use Illuminate\Foundation\Console\CliDumper; +use Illuminate\Foundation\Exceptions\Renderer\Listener; use Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper; use Illuminate\Foundation\Exceptions\Renderer\Renderer; use Illuminate\Foundation\Http\HtmlDumper; @@ -64,6 +65,8 @@ public function boot() __DIR__.'/../Exceptions/views' => $this->app->resourcePath('views/errors/'), ], 'laravel-errors'); } + + $this->app->make(Listener::class)->register($this->app->make(Dispatcher::class)); } /** @@ -213,15 +216,20 @@ protected function registerExceptionsRenderer() $this->loadViewsFrom(__DIR__.'/../resources/exceptions/renderer', 'laravel-exceptions-renderer'); $this->app->singleton(Renderer::class, function (Application $app) { - $debug = $app['config']->get('app.debug'); + $errorRenderer = new HtmlErrorRenderer( + $app['config']->get('app.debug'), + ); return new Renderer( $app->make(Factory::class), - new HtmlErrorRenderer($debug), + $app->make(Listener::class), + $errorRenderer, $app->make(BladeMapper::class), $app->basePath(), ); }); + + $this->app->singleton(Listener::class); } /** diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php index f33ba99debd7..811dbf051a42 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php @@ -36,6 +36,13 @@
+ + + + + + + @forelse ($exception->request()->all() as $key => $value) @@ -50,4 +57,31 @@
KeyValue
+ +
+ Queries +
+ +
+ + + @if (count($exception->listener()->queries()) === 1) + + + + @endif + + @forelse ($exception->listener()->queries() as ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time]) + + + + + + @empty + + + + @endforelse + +
Only the first 100 queries are displayed
{{ $connectionName }}{{ $sql }}{{ $time }}ms
No query data
From 2807ed0e151938e4e7d0009b8a57b876335c7f63 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Apr 2024 19:49:44 +0100 Subject: [PATCH 10/91] Fixes displaying Laravel Error Exceptions trace --- .../Foundation/Exceptions/Renderer/Exception.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php index 8a08df5711ee..1c57a926264c 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Exceptions\Renderer; use Composer\Autoload\ClassLoader; +use Illuminate\Foundation\Bootstrap\HandleExceptions; use Illuminate\Http\Request; use Symfony\Component\ErrorHandler\Exception\FlattenException; @@ -106,8 +107,15 @@ public function frames() return (string) realpath($path); }, array_values(ClassLoader::getRegisteredLoaders())[0]->getClassMap())); + $trace = $this->exception->getTrace(); + + if (($trace[1]['class'] ?? '') === HandleExceptions::class) { + array_shift($trace); + array_shift($trace); + } + return collect(array_map( - fn (array $trace) => new Frame($this->exception, $classMap, $trace, $this->basePath), $this->exception->getTrace(), + fn (array $trace) => new Frame($this->exception, $classMap, $trace, $this->basePath), $trace, )); } From 0de6f64b383e6b33275956b12964b88f89e653bd Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Apr 2024 19:49:55 +0100 Subject: [PATCH 11/91] Improves queries over 100 --- .../Foundation/Exceptions/Renderer/Listener.php | 8 ++++---- .../exceptions/renderer/components/context.blade.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php index bf57e74da25d..27661ff64351 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php @@ -43,14 +43,14 @@ public function queries() */ public function onQueryExecuted(QueryExecuted $event) { + if (count($this->queries) === 100) { + return; + } + $this->queries[] = [ 'connectionName' => $event->connectionName, 'time' => $event->time, 'sql' => $event->sql, ]; - - if (count($this->queries) >= 101) { - array_shift($this->queries); - } } } diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php index 811dbf051a42..f17fe2e2ab10 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php @@ -65,7 +65,7 @@
- @if (count($exception->listener()->queries()) === 1) + @if (count($exception->listener()->queries()) === 100) From 5d8a84387ada5c4459a519dfb2fa0a63116c7259 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Apr 2024 19:50:05 +0100 Subject: [PATCH 12/91] Refactors style and scripts --- .../exceptions/renderer/components/scripts.blade.php | 12 ++++++------ .../exceptions/renderer/components/styles.blade.php | 11 +---------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php index 25f04f910d9e..0bd0175b7efb 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php @@ -1,15 +1,15 @@ - - - - - + + + + + + + - - - - + @foreach ($exception->frames() as $frame) - '; + })->implode(''); + } + + /** + * Get the renderer's JavaScript content. + * + * @return string + */ + public static function js() + { + return ''; + } } diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php index c3dc163d725a..104a3e6d1b54 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php @@ -16,7 +16,7 @@
@forelse ($exception->requestHeaders() as $key => $value)
- {{ $key }} + {{ $key }}

         
-
@endforeach diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php index b74f2c64f3b3..a015e5001428 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php @@ -6,13 +6,27 @@ {{ config('app.name', 'Laravel') }} - + - + {!! Illuminate\Foundation\Exceptions\Renderer\Renderer::css() !!} + + {{ $slot }} - + {!! Illuminate\Foundation\Exceptions\Renderer\Renderer::js() !!} + + diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php deleted file mode 100644 index 33dbcc0d9ab2..000000000000 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/scripts.blade.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php deleted file mode 100644 index 600b8af79daa..000000000000 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/styles.blade.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - -@foreach ($exception->frames() as $frame) - -@endforeach diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php index c99b654a353b..075fba755c47 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php @@ -1,21 +1,26 @@ '; + .file_get_contents(static::DIST.'scripts.js') + .''; } } diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/dark-mode.css b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/dark-mode.css index 23609b4db292..7c887fc35a72 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/dark-mode.css +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/dark-mode.css @@ -1 +1,71 @@ -pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; +} +code.hljs { + padding: 3px 5px; +} +.hljs { + color: #abb2bf; + background: #282c34; +} +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic; +} +.hljs-doctag, +.hljs-formula, +.hljs-keyword { + color: #c678dd; +} +.hljs-deletion, +.hljs-name, +.hljs-section, +.hljs-selector-tag, +.hljs-subst { + color: #e06c75; +} +.hljs-literal { + color: #56b6c2; +} +.hljs-addition, +.hljs-attribute, +.hljs-meta .hljs-string, +.hljs-regexp, +.hljs-string { + color: #98c379; +} +.hljs-attr, +.hljs-number, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-selector-pseudo, +.hljs-template-variable, +.hljs-type, +.hljs-variable { + color: #d19a66; +} +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-symbol, +.hljs-title { + color: #61aeee; +} +.hljs-built_in, +.hljs-class .hljs-title, +.hljs-title.class_ { + color: #e6c07b; +} +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: 700; +} +.hljs-link { + text-decoration: underline; +} diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/light-mode.css b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/light-mode.css index 96af2848f7be..24355b53a980 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/light-mode.css +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/light-mode.css @@ -1,4 +1,11 @@ -pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; +} +code.hljs { + padding: 3px 5px; +} /*! Theme: GitHub Description: Light theme as seen on github.com Author: github.com @@ -7,4 +14,81 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p Outdated base version: https://github.com/primer/github-syntax-light Current colors taken from GitHub's CSS -*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0} +*/ +.hljs { + color: #24292e; + background: #fff; +} +.hljs-doctag, +.hljs-keyword, +.hljs-meta .hljs-keyword, +.hljs-template-tag, +.hljs-template-variable, +.hljs-type, +.hljs-variable.language_ { + color: #d73a49; +} +.hljs-title, +.hljs-title.class_, +.hljs-title.class_.inherited__, +.hljs-title.function_ { + color: #6f42c1; +} +.hljs-attr, +.hljs-attribute, +.hljs-literal, +.hljs-meta, +.hljs-number, +.hljs-operator, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-selector-id, +.hljs-variable { + color: #005cc5; +} +.hljs-meta .hljs-string, +.hljs-regexp, +.hljs-string { + color: #032f62; +} +.hljs-built_in, +.hljs-symbol { + color: #e36209; +} +.hljs-code, +.hljs-comment, +.hljs-formula { + color: #6a737d; +} +.hljs-name, +.hljs-quote, +.hljs-selector-pseudo, +.hljs-selector-tag { + color: #22863a; +} +.hljs-subst { + color: #24292e; +} +.hljs-section { + color: #005cc5; + font-weight: 700; +} +.hljs-bullet { + color: #735c0f; +} +.hljs-emphasis { + color: #24292e; + font-style: italic; +} +.hljs-strong { + color: #24292e; + font-weight: 700; +} +.hljs-addition { + color: #22863a; + background-color: #f0fff4; +} +.hljs-deletion { + color: #b31d28; + background-color: #ffeef0; +} diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js index 3388b6914c85..163bcc351dcb 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js @@ -1,7 +1,5890 @@ -var ce="top",be="bottom",ye="right",ue="left",nr="auto",Bt=[ce,be,ye,ue],dt="start",Dt="end",ua="clippingParents",mi="viewport",Et="popper",la="reference",Pr=Bt.reduce(function(e,t){return e.concat([t+"-"+dt,t+"-"+Dt])},[]),xi=[].concat(Bt,[nr]).reduce(function(e,t){return e.concat([t,t+"-"+dt,t+"-"+Dt])},[]),fa="beforeRead",da="read",pa="afterRead",ha="beforeMain",ga="main",va="afterMain",_a="beforeWrite",ba="write",ya="afterWrite",ma=[fa,da,pa,ha,ga,va,_a,ba,ya];function Me(e){return e?(e.nodeName||"").toLowerCase():null}function fe(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function it(e){var t=fe(e).Element;return e instanceof t||e instanceof Element}function _e(e){var t=fe(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function rr(e){if(typeof ShadowRoot>"u")return!1;var t=fe(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xa(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!_e(o)||!Me(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Ea(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(c,f){return c[f]="",c},{});!_e(i)||!Me(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ei={name:"applyStyles",enabled:!0,phase:"write",fn:xa,effect:Ea,requires:["computeStyles"]};function Te(e){return e.split("-")[0]}var Ze=Math.max,rn=Math.min,pt=Math.round;function Pn(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wi(){return!/^((?!chrome|android).)*safari/i.test(Pn())}function ht(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&_e(e)&&(i=e.offsetWidth>0&&pt(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&pt(r.height)/e.offsetHeight||1);var a=it(e)?fe(e):window,s=a.visualViewport,c=!wi()&&n,f=(r.left+(c&&s?s.offsetLeft:0))/i,l=(r.top+(c&&s?s.offsetTop:0))/o,v=r.width/i,b=r.height/o;return{width:v,height:b,top:l,right:f+v,bottom:l+b,left:f,x:f,y:l}}function ir(e){var t=ht(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Oi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&rr(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function De(e){return fe(e).getComputedStyle(e)}function wa(e){return["table","td","th"].indexOf(Me(e))>=0}function We(e){return((it(e)?e.ownerDocument:e.document)||window.document).documentElement}function fn(e){return Me(e)==="html"?e:e.assignedSlot||e.parentNode||(rr(e)?e.host:null)||We(e)}function kr(e){return!_e(e)||De(e).position==="fixed"?null:e.offsetParent}function Oa(e){var t=/firefox/i.test(Pn()),n=/Trident/i.test(Pn());if(n&&_e(e)){var r=De(e);if(r.position==="fixed")return null}var i=fn(e);for(rr(i)&&(i=i.host);_e(i)&&["html","body"].indexOf(Me(i))<0;){var o=De(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function $t(e){for(var t=fe(e),n=kr(e);n&&wa(n)&&De(n).position==="static";)n=kr(n);return n&&(Me(n)==="html"||Me(n)==="body"&&De(n).position==="static")?t:n||Oa(e)||t}function or(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Tt(e,t,n){return Ze(e,rn(t,n))}function Aa(e,t,n){var r=Tt(e,t,n);return r>n?n:r}function Ai(){return{top:0,right:0,bottom:0,left:0}}function Si(e){return Object.assign({},Ai(),e)}function Ti(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Sa=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Si(typeof t!="number"?t:Ti(t,Bt))};function Ta(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Te(n.placement),c=or(s),f=[ue,ye].indexOf(s)>=0,l=f?"height":"width";if(!(!o||!a)){var v=Sa(i.padding,n),b=ir(o),_=c==="y"?ce:ue,A=c==="y"?be:ye,S=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],h=a[c]-n.rects.reference[c],E=$t(o),O=E?c==="y"?E.clientHeight||0:E.clientWidth||0:0,M=S/2-h/2,u=v[_],I=O-b[l]-v[A],m=O/2-b[l]/2+M,L=Tt(u,m,I),K=c;n.modifiersData[r]=(t={},t[K]=L,t.centerOffset=L-m,t)}}function Ma(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Oi(t.elements.popper,i)&&(t.elements.arrow=i))}const Ca={name:"arrow",enabled:!0,phase:"main",fn:Ta,effect:Ma,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gt(e){return e.split("-")[1]}var Ra={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ia(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:pt(n*i)/i||0,y:pt(r*i)/i||0}}function Br(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,b=a.x,_=b===void 0?0:b,A=a.y,S=A===void 0?0:A,h=typeof l=="function"?l({x:_,y:S}):{x:_,y:S};_=h.x,S=h.y;var E=a.hasOwnProperty("x"),O=a.hasOwnProperty("y"),M=ue,u=ce,I=window;if(f){var m=$t(n),L="clientHeight",K="clientWidth";if(m===fe(n)&&(m=We(n),De(m).position!=="static"&&s==="absolute"&&(L="scrollHeight",K="scrollWidth")),m=m,i===ce||(i===ue||i===ye)&&o===Dt){u=be;var P=v&&m===I&&I.visualViewport?I.visualViewport.height:m[L];S-=P-r.height,S*=c?1:-1}if(i===ue||(i===ce||i===be)&&o===Dt){M=ye;var H=v&&m===I&&I.visualViewport?I.visualViewport.width:m[K];_-=H-r.width,_*=c?1:-1}}var q=Object.assign({position:s},f&&Ra),z=l===!0?Ia({x:_,y:S},fe(n)):{x:_,y:S};if(_=z.x,S=z.y,c){var k;return Object.assign({},q,(k={},k[u]=O?"0":"",k[M]=E?"0":"",k.transform=(I.devicePixelRatio||1)<=1?"translate("+_+"px, "+S+"px)":"translate3d("+_+"px, "+S+"px, 0)",k))}return Object.assign({},q,(t={},t[u]=O?S+"px":"",t[M]=E?_+"px":"",t.transform="",t))}function Da(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,c=s===void 0?!0:s,f={placement:Te(t.placement),variation:gt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Br(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Br(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Na={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Da,data:{}};var Vt={passive:!0};function La(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,c=fe(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&f.forEach(function(l){l.addEventListener("scroll",n.update,Vt)}),s&&c.addEventListener("resize",n.update,Vt),function(){o&&f.forEach(function(l){l.removeEventListener("scroll",n.update,Vt)}),s&&c.removeEventListener("resize",n.update,Vt)}}const Pa={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:La,data:{}};var ka={left:"right",right:"left",bottom:"top",top:"bottom"};function en(e){return e.replace(/left|right|bottom|top/g,function(t){return ka[t]})}var Ba={start:"end",end:"start"};function $r(e){return e.replace(/start|end/g,function(t){return Ba[t]})}function ar(e){var t=fe(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function sr(e){return ht(We(e)).left+ar(e).scrollLeft}function $a(e,t){var n=fe(e),r=We(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var f=wi();(f||!f&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+sr(e),y:c}}function ja(e){var t,n=We(e),r=ar(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ze(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ze(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+sr(e),c=-r.scrollTop;return De(i||n).direction==="rtl"&&(s+=Ze(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function cr(e){var t=De(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Mi(e){return["html","body","#document"].indexOf(Me(e))>=0?e.ownerDocument.body:_e(e)&&cr(e)?e:Mi(fn(e))}function Mt(e,t){var n;t===void 0&&(t=[]);var r=Mi(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=fe(r),a=i?[o].concat(o.visualViewport||[],cr(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Mt(fn(a)))}function kn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ha(e,t){var n=ht(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jr(e,t,n){return t===mi?kn($a(e,n)):it(t)?Ha(t,n):kn(ja(We(e)))}function Fa(e){var t=Mt(fn(e)),n=["absolute","fixed"].indexOf(De(e).position)>=0,r=n&&_e(e)?$t(e):e;return it(r)?t.filter(function(i){return it(i)&&Oi(i,r)&&Me(i)!=="body"}):[]}function Ua(e,t,n,r){var i=t==="clippingParents"?Fa(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(c,f){var l=jr(e,f,r);return c.top=Ze(l.top,c.top),c.right=rn(l.right,c.right),c.bottom=rn(l.bottom,c.bottom),c.left=Ze(l.left,c.left),c},jr(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ci(e){var t=e.reference,n=e.element,r=e.placement,i=r?Te(r):null,o=r?gt(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case ce:c={x:a,y:t.y-n.height};break;case be:c={x:a,y:t.y+t.height};break;case ye:c={x:t.x+t.width,y:s};break;case ue:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var f=i?or(i):null;if(f!=null){var l=f==="y"?"height":"width";switch(o){case dt:c[f]=c[f]-(t[l]/2-n[l]/2);break;case Dt:c[f]=c[f]+(t[l]/2-n[l]/2);break}}return c}function Nt(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,c=s===void 0?ua:s,f=n.rootBoundary,l=f===void 0?mi:f,v=n.elementContext,b=v===void 0?Et:v,_=n.altBoundary,A=_===void 0?!1:_,S=n.padding,h=S===void 0?0:S,E=Si(typeof h!="number"?h:Ti(h,Bt)),O=b===Et?la:Et,M=e.rects.popper,u=e.elements[A?O:b],I=Ua(it(u)?u:u.contextElement||We(e.elements.popper),c,l,a),m=ht(e.elements.reference),L=Ci({reference:m,element:M,strategy:"absolute",placement:i}),K=kn(Object.assign({},M,L)),P=b===Et?K:m,H={top:I.top-P.top+E.top,bottom:P.bottom-I.bottom+E.bottom,left:I.left-P.left+E.left,right:P.right-I.right+E.right},q=e.modifiersData.offset;if(b===Et&&q){var z=q[i];Object.keys(H).forEach(function(k){var U=[ye,be].indexOf(k)>=0?1:-1,Y=[ce,be].indexOf(k)>=0?"y":"x";H[k]+=z[Y]*U})}return H}function Wa(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,f=c===void 0?xi:c,l=gt(r),v=l?s?Pr:Pr.filter(function(A){return gt(A)===l}):Bt,b=v.filter(function(A){return f.indexOf(A)>=0});b.length===0&&(b=v);var _=b.reduce(function(A,S){return A[S]=Nt(e,{placement:S,boundary:i,rootBoundary:o,padding:a})[Te(S)],A},{});return Object.keys(_).sort(function(A,S){return _[A]-_[S]})}function Ka(e){if(Te(e)===nr)return[];var t=en(e);return[$r(e),t,$r(t)]}function za(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,c=n.fallbackPlacements,f=n.padding,l=n.boundary,v=n.rootBoundary,b=n.altBoundary,_=n.flipVariations,A=_===void 0?!0:_,S=n.allowedAutoPlacements,h=t.options.placement,E=Te(h),O=E===h,M=c||(O||!A?[en(h)]:Ka(h)),u=[h].concat(M).reduce(function(se,G){return se.concat(Te(G)===nr?Wa(t,{placement:G,boundary:l,rootBoundary:v,padding:f,flipVariations:A,allowedAutoPlacements:S}):G)},[]),I=t.rects.reference,m=t.rects.popper,L=new Map,K=!0,P=u[0],H=0;H=0,Y=U?"width":"height",te=Nt(t,{placement:q,boundary:l,rootBoundary:v,altBoundary:b,padding:f}),p=U?k?ye:ue:k?be:ce;I[Y]>m[Y]&&(p=en(p));var y=en(p),C=[];if(o&&C.push(te[z]<=0),s&&C.push(te[p]<=0,te[y]<=0),C.every(function(se){return se})){P=q,K=!1;break}L.set(q,C)}if(K)for(var N=A?3:1,W=function(G){var Z=u.find(function(Ce){var de=L.get(Ce);if(de)return de.slice(0,G).every(function(Re){return Re})});if(Z)return P=Z,"break"},J=N;J>0;J--){var re=W(J);if(re==="break")break}t.placement!==P&&(t.modifiersData[r]._skip=!0,t.placement=P,t.reset=!0)}}const Va={name:"flip",enabled:!0,phase:"main",fn:za,requiresIfExists:["offset"],data:{_skip:!1}};function Hr(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Fr(e){return[ce,ye,be,ue].some(function(t){return e[t]>=0})}function qa(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Nt(t,{elementContext:"reference"}),s=Nt(t,{altBoundary:!0}),c=Hr(a,r),f=Hr(s,i,o),l=Fr(c),v=Fr(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Ga={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qa};function Xa(e,t,n){var r=Te(e),i=[ue,ce].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[ue,ye].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Ya(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=xi.reduce(function(l,v){return l[v]=Xa(v,t.rects,o),l},{}),s=a[t.placement],c=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=a}const Ja={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ya};function Za(e){var t=e.state,n=e.name;t.modifiersData[n]=Ci({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Qa={name:"popperOffsets",enabled:!0,phase:"read",fn:Za,data:{}};function es(e){return e==="x"?"y":"x"}function ts(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,c=n.boundary,f=n.rootBoundary,l=n.altBoundary,v=n.padding,b=n.tether,_=b===void 0?!0:b,A=n.tetherOffset,S=A===void 0?0:A,h=Nt(t,{boundary:c,rootBoundary:f,padding:v,altBoundary:l}),E=Te(t.placement),O=gt(t.placement),M=!O,u=or(E),I=es(u),m=t.modifiersData.popperOffsets,L=t.rects.reference,K=t.rects.popper,P=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,H=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(m){if(o){var k,U=u==="y"?ce:ue,Y=u==="y"?be:ye,te=u==="y"?"height":"width",p=m[u],y=p+h[U],C=p-h[Y],N=_?-K[te]/2:0,W=O===dt?L[te]:K[te],J=O===dt?-K[te]:-L[te],re=t.elements.arrow,se=_&&re?ir(re):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ai(),Z=G[U],Ce=G[Y],de=Tt(0,L[te],se[te]),Re=M?L[te]/2-N-de-Z-H.mainAxis:W-de-Z-H.mainAxis,Oe=M?-L[te]/2+N+de+Ce+H.mainAxis:J+de+Ce+H.mainAxis,Le=t.elements.arrow&&$t(t.elements.arrow),st=Le?u==="y"?Le.clientTop||0:Le.clientLeft||0:0,ze=(k=q==null?void 0:q[u])!=null?k:0,Ie=p+Re-ze-st,Ve=p+Oe-ze,ie=Tt(_?rn(y,Ie):y,p,_?Ze(C,Ve):C);m[u]=ie,z[u]=ie-p}if(s){var qe,Pe=u==="x"?ce:ue,T=u==="x"?be:ye,pe=m[I],V=I==="y"?"height":"width",$=pe+h[Pe],he=pe-h[T],le=[ce,ue].indexOf(E)!==-1,ke=(qe=q==null?void 0:q[I])!=null?qe:0,Be=le?$:pe-L[V]-K[V]-ke+H.altAxis,g=le?pe+L[V]+K[V]-ke-H.altAxis:he,x=_&&le?Aa(Be,pe,g):Tt(_?Be:$,pe,_?g:he);m[I]=x,z[I]=x-pe}t.modifiersData[r]=z}}const ns={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function rs(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function is(e){return e===fe(e)||!_e(e)?ar(e):rs(e)}function os(e){var t=e.getBoundingClientRect(),n=pt(t.width)/e.offsetWidth||1,r=pt(t.height)/e.offsetHeight||1;return n!==1||r!==1}function as(e,t,n){n===void 0&&(n=!1);var r=_e(t),i=_e(t)&&os(t),o=We(t),a=ht(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Me(t)!=="body"||cr(o))&&(s=is(t)),_e(t)?(c=ht(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=sr(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function ss(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function cs(e){var t=ss(e);return ma.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function us(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ls(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ur={placement:"bottom",modifiers:[],strategy:"absolute"};function Wr(){for(var e=arguments.length,t=new Array(e),n=0;n-1}function Li(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Kr(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function vs(e){return e.split(/\s+/).filter(Boolean)}function ft(e){return[].concat(e)}function zr(e,t){e.indexOf(t)===-1&&e.push(t)}function _s(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function bs(e){return e.split("-")[0]}function on(e){return[].slice.call(e)}function Vr(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ct(){return document.createElement("div")}function dn(e){return["Element","Fragment"].some(function(t){return ur(e,t)})}function ys(e){return ur(e,"NodeList")}function ms(e){return ur(e,"MouseEvent")}function xs(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Es(e){return dn(e)?[e]:ys(e)?on(e):Array.isArray(e)?e:on(document.querySelectorAll(e))}function Sn(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function qr(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ws(e){var t,n=ft(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Os(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,c=s.interactiveBorder,f=bs(a.placement),l=a.modifiersData.offset;if(!l)return!0;var v=f==="bottom"?l.top.y:0,b=f==="top"?l.bottom.y:0,_=f==="right"?l.left.x:0,A=f==="left"?l.right.x:0,S=o.top-r+v>c,h=r-o.bottom-b>c,E=o.left-n+_>c,O=n-o.right-A>c;return S||h||E||O})}function Tn(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function Gr(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Se={isTouch:!1},Xr=0;function As(){Se.isTouch||(Se.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pi))}function Pi(){var e=performance.now();e-Xr<20&&(Se.isTouch=!1,document.removeEventListener("mousemove",Pi)),Xr=e}function Ss(){var e=document.activeElement;if(xs(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Ts(){document.addEventListener("touchstart",As,Xe),window.addEventListener("blur",Ss)}var Ms=typeof window<"u"&&typeof document<"u",Cs=Ms?!!window.msCrypto:!1,Rs={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Is={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},xe=Object.assign({appendTo:Ni,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Rs,Is),Ds=Object.keys(xe),Ns=function(t){var n=Object.keys(t);n.forEach(function(r){xe[r]=t[r]})};function ki(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=xe[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function Ls(e,t){var n=t?Object.keys(ki(Object.assign({},xe,{plugins:t}))):Ds,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function Yr(e,t){var n=Object.assign({},t,{content:Li(t.content,[e])},t.ignoreAttributes?{}:Ls(e,t.plugins));return n.aria=Object.assign({},xe.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var Ps=function(){return"innerHTML"};function Bn(e,t){e[Ps()]=t}function Jr(e){var t=Ct();return e===!0?t.className=Ii:(t.className=Di,dn(e)?t.appendChild(e):Bn(t,e)),t}function Zr(e,t){dn(t.content)?(Bn(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Bn(e,t.content):e.textContent=t.content)}function $n(e){var t=e.firstElementChild,n=on(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Ri)}),arrow:n.find(function(r){return r.classList.contains(Ii)||r.classList.contains(Di)}),backdrop:n.find(function(r){return r.classList.contains(gs)})}}function Bi(e){var t=Ct(),n=Ct();n.className=hs,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ct();r.className=Ri,r.setAttribute("data-state","hidden"),Zr(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=$n(t),c=s.box,f=s.content,l=s.arrow;a.theme?c.setAttribute("data-theme",a.theme):c.removeAttribute("data-theme"),typeof a.animation=="string"?c.setAttribute("data-animation",a.animation):c.removeAttribute("data-animation"),a.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?c.setAttribute("role",a.role):c.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&Zr(f,e.props),a.arrow?l?o.arrow!==a.arrow&&(c.removeChild(l),c.appendChild(Jr(a.arrow))):c.appendChild(Jr(a.arrow)):l&&c.removeChild(l)}return{popper:t,onUpdate:i}}Bi.$$tippy=!0;var ks=1,qt=[],Mn=[];function Bs(e,t){var n=Yr(e,Object.assign({},xe,ki(Vr(t)))),r,i,o,a=!1,s=!1,c=!1,f=!1,l,v,b,_=[],A=Kr(Ie,n.interactiveDebounce),S,h=ks++,E=null,O=_s(n.plugins),M={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},u={id:h,reference:e,popper:Ct(),popperInstance:E,props:n,state:M,plugins:O,clearDelayTimeouts:Be,setProps:g,setContent:x,show:D,hide:j,hideWithInteractivity:ne,enable:le,disable:ke,unmount:me,destroy:En};if(!n.render)return u;var I=n.render(u),m=I.popper,L=I.onUpdate;m.setAttribute("data-tippy-root",""),m.id="tippy-"+u.id,u.popper=m,e._tippy=u,m._tippy=u;var K=O.map(function(d){return d.fn(u)}),P=e.hasAttribute("aria-expanded");return Le(),N(),p(),y("onCreate",[u]),n.showOnCreate&&$(),m.addEventListener("mouseenter",function(){u.props.interactive&&u.state.isVisible&&u.clearDelayTimeouts()}),m.addEventListener("mouseleave",function(){u.props.interactive&&u.props.trigger.indexOf("mouseenter")>=0&&U().addEventListener("mousemove",A)}),u;function H(){var d=u.props.touch;return Array.isArray(d)?d:[d,0]}function q(){return H()[0]==="hold"}function z(){var d;return!!((d=u.props.render)!=null&&d.$$tippy)}function k(){return S||e}function U(){var d=k().parentNode;return d?ws(d):document}function Y(){return $n(m)}function te(d){return u.state.isMounted&&!u.state.isVisible||Se.isTouch||l&&l.type==="focus"?0:An(u.props.delay,d?0:1,xe.delay)}function p(d){d===void 0&&(d=!1),m.style.pointerEvents=u.props.interactive&&!d?"":"none",m.style.zIndex=""+u.props.zIndex}function y(d,w,R){if(R===void 0&&(R=!0),K.forEach(function(B){B[d]&&B[d].apply(B,w)}),R){var F;(F=u.props)[d].apply(F,w)}}function C(){var d=u.props.aria;if(d.content){var w="aria-"+d.content,R=m.id,F=ft(u.props.triggerTarget||e);F.forEach(function(B){var oe=B.getAttribute(w);if(u.state.isVisible)B.setAttribute(w,oe?oe+" "+R:R);else{var ge=oe&&oe.replace(R,"").trim();ge?B.setAttribute(w,ge):B.removeAttribute(w)}})}}function N(){if(!(P||!u.props.aria.expanded)){var d=ft(u.props.triggerTarget||e);d.forEach(function(w){u.props.interactive?w.setAttribute("aria-expanded",u.state.isVisible&&w===k()?"true":"false"):w.removeAttribute("aria-expanded")})}}function W(){U().removeEventListener("mousemove",A),qt=qt.filter(function(d){return d!==A})}function J(d){if(!(Se.isTouch&&(c||d.type==="mousedown"))){var w=d.composedPath&&d.composedPath()[0]||d.target;if(!(u.props.interactive&&Gr(m,w))){if(ft(u.props.triggerTarget||e).some(function(R){return Gr(R,w)})){if(Se.isTouch||u.state.isVisible&&u.props.trigger.indexOf("click")>=0)return}else y("onClickOutside",[u,d]);u.props.hideOnClick===!0&&(u.clearDelayTimeouts(),u.hide(),s=!0,setTimeout(function(){s=!1}),u.state.isMounted||Z())}}}function re(){c=!0}function se(){c=!1}function G(){var d=U();d.addEventListener("mousedown",J,!0),d.addEventListener("touchend",J,Xe),d.addEventListener("touchstart",se,Xe),d.addEventListener("touchmove",re,Xe)}function Z(){var d=U();d.removeEventListener("mousedown",J,!0),d.removeEventListener("touchend",J,Xe),d.removeEventListener("touchstart",se,Xe),d.removeEventListener("touchmove",re,Xe)}function Ce(d,w){Re(d,function(){!u.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&w()})}function de(d,w){Re(d,w)}function Re(d,w){var R=Y().box;function F(B){B.target===R&&(Tn(R,"remove",F),w())}if(d===0)return w();Tn(R,"remove",v),Tn(R,"add",F),v=F}function Oe(d,w,R){R===void 0&&(R=!1);var F=ft(u.props.triggerTarget||e);F.forEach(function(B){B.addEventListener(d,w,R),_.push({node:B,eventType:d,handler:w,options:R})})}function Le(){q()&&(Oe("touchstart",ze,{passive:!0}),Oe("touchend",Ve,{passive:!0})),vs(u.props.trigger).forEach(function(d){if(d!=="manual")switch(Oe(d,ze),d){case"mouseenter":Oe("mouseleave",Ve);break;case"focus":Oe(Cs?"focusout":"blur",ie);break;case"focusin":Oe("focusout",ie);break}})}function st(){_.forEach(function(d){var w=d.node,R=d.eventType,F=d.handler,B=d.options;w.removeEventListener(R,F,B)}),_=[]}function ze(d){var w,R=!1;if(!(!u.state.isEnabled||qe(d)||s)){var F=((w=l)==null?void 0:w.type)==="focus";l=d,S=d.currentTarget,N(),!u.state.isVisible&&ms(d)&&qt.forEach(function(B){return B(d)}),d.type==="click"&&(u.props.trigger.indexOf("mouseenter")<0||a)&&u.props.hideOnClick!==!1&&u.state.isVisible?R=!0:$(d),d.type==="click"&&(a=!R),R&&!F&&he(d)}}function Ie(d){var w=d.target,R=k().contains(w)||m.contains(w);if(!(d.type==="mousemove"&&R)){var F=V().concat(m).map(function(B){var oe,ge=B._tippy,ct=(oe=ge.popperInstance)==null?void 0:oe.state;return ct?{popperRect:B.getBoundingClientRect(),popperState:ct,props:n}:null}).filter(Boolean);Os(F,d)&&(W(),he(d))}}function Ve(d){var w=qe(d)||u.props.trigger.indexOf("click")>=0&&a;if(!w){if(u.props.interactive){u.hideWithInteractivity(d);return}he(d)}}function ie(d){u.props.trigger.indexOf("focusin")<0&&d.target!==k()||u.props.interactive&&d.relatedTarget&&m.contains(d.relatedTarget)||he(d)}function qe(d){return Se.isTouch?q()!==d.type.indexOf("touch")>=0:!1}function Pe(){T();var d=u.props,w=d.popperOptions,R=d.placement,F=d.offset,B=d.getReferenceClientRect,oe=d.moveTransition,ge=z()?$n(m).arrow:null,ct=B?{getBoundingClientRect:B,contextElement:B.contextElement||k()}:e,Lr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Kt){var ut=Kt.state;if(z()){var ca=Y(),On=ca.box;["placement","reference-hidden","escaped"].forEach(function(zt){zt==="placement"?On.setAttribute("data-placement",ut.placement):ut.attributes.popper["data-popper-"+zt]?On.setAttribute("data-"+zt,""):On.removeAttribute("data-"+zt)}),ut.attributes.popper={}}}},Ge=[{name:"offset",options:{offset:F}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!oe}},Lr];z()&&ge&&Ge.push({name:"arrow",options:{element:ge,padding:3}}),Ge.push.apply(Ge,(w==null?void 0:w.modifiers)||[]),u.popperInstance=ps(ct,m,Object.assign({},w,{placement:R,onFirstUpdate:b,modifiers:Ge}))}function T(){u.popperInstance&&(u.popperInstance.destroy(),u.popperInstance=null)}function pe(){var d=u.props.appendTo,w,R=k();u.props.interactive&&d===Ni||d==="parent"?w=R.parentNode:w=Li(d,[R]),w.contains(m)||w.appendChild(m),u.state.isMounted=!0,Pe()}function V(){return on(m.querySelectorAll("[data-tippy-root]"))}function $(d){u.clearDelayTimeouts(),d&&y("onTrigger",[u,d]),G();var w=te(!0),R=H(),F=R[0],B=R[1];Se.isTouch&&F==="hold"&&B&&(w=B),w?r=setTimeout(function(){u.show()},w):u.show()}function he(d){if(u.clearDelayTimeouts(),y("onUntrigger",[u,d]),!u.state.isVisible){Z();return}if(!(u.props.trigger.indexOf("mouseenter")>=0&&u.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(d.type)>=0&&a)){var w=te(!1);w?i=setTimeout(function(){u.state.isVisible&&u.hide()},w):o=requestAnimationFrame(function(){u.hide()})}}function le(){u.state.isEnabled=!0}function ke(){u.hide(),u.state.isEnabled=!1}function Be(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function g(d){if(!u.state.isDestroyed){y("onBeforeUpdate",[u,d]),st();var w=u.props,R=Yr(e,Object.assign({},w,Vr(d),{ignoreAttributes:!0}));u.props=R,Le(),w.interactiveDebounce!==R.interactiveDebounce&&(W(),A=Kr(Ie,R.interactiveDebounce)),w.triggerTarget&&!R.triggerTarget?ft(w.triggerTarget).forEach(function(F){F.removeAttribute("aria-expanded")}):R.triggerTarget&&e.removeAttribute("aria-expanded"),N(),p(),L&&L(w,R),u.popperInstance&&(Pe(),V().forEach(function(F){requestAnimationFrame(F._tippy.popperInstance.forceUpdate)})),y("onAfterUpdate",[u,d])}}function x(d){u.setProps({content:d})}function D(){var d=u.state.isVisible,w=u.state.isDestroyed,R=!u.state.isEnabled,F=Se.isTouch&&!u.props.touch,B=An(u.props.duration,0,xe.duration);if(!(d||w||R||F)&&!k().hasAttribute("disabled")&&(y("onShow",[u],!1),u.props.onShow(u)!==!1)){if(u.state.isVisible=!0,z()&&(m.style.visibility="visible"),p(),G(),u.state.isMounted||(m.style.transition="none"),z()){var oe=Y(),ge=oe.box,ct=oe.content;Sn([ge,ct],0)}b=function(){var Ge;if(!(!u.state.isVisible||f)){if(f=!0,m.offsetHeight,m.style.transition=u.props.moveTransition,z()&&u.props.animation){var wn=Y(),Kt=wn.box,ut=wn.content;Sn([Kt,ut],B),qr([Kt,ut],"visible")}C(),N(),zr(Mn,u),(Ge=u.popperInstance)==null||Ge.forceUpdate(),y("onMount",[u]),u.props.animation&&z()&&de(B,function(){u.state.isShown=!0,y("onShown",[u])})}},pe()}}function j(){var d=!u.state.isVisible,w=u.state.isDestroyed,R=!u.state.isEnabled,F=An(u.props.duration,1,xe.duration);if(!(d||w||R)&&(y("onHide",[u],!1),u.props.onHide(u)!==!1)){if(u.state.isVisible=!1,u.state.isShown=!1,f=!1,a=!1,z()&&(m.style.visibility="hidden"),W(),Z(),p(!0),z()){var B=Y(),oe=B.box,ge=B.content;u.props.animation&&(Sn([oe,ge],F),qr([oe,ge],"hidden"))}C(),N(),u.props.animation?z()&&Ce(F,u.unmount):u.unmount()}}function ne(d){U().addEventListener("mousemove",A),zr(qt,A),A(d)}function me(){u.state.isVisible&&u.hide(),u.state.isMounted&&(T(),V().forEach(function(d){d._tippy.unmount()}),m.parentNode&&m.parentNode.removeChild(m),Mn=Mn.filter(function(d){return d!==u}),u.state.isMounted=!1,y("onHidden",[u]))}function En(){u.state.isDestroyed||(u.clearDelayTimeouts(),u.unmount(),st(),delete e._tippy,u.state.isDestroyed=!0,y("onDestroy",[u]))}}function jt(e,t){t===void 0&&(t={});var n=xe.plugins.concat(t.plugins||[]);Ts();var r=Object.assign({},t,{plugins:n}),i=Es(e),o=i.reduce(function(a,s){var c=s&&Bs(s,r);return c&&a.push(c),a},[]);return dn(e)?o[0]:o}jt.defaultProps=xe;jt.setDefaultProps=Ns;jt.currentInput=Se;Object.assign({},Ei,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});jt.setDefaultProps({render:Bi});var jn=!1,Hn=!1,Qe=[],Fn=-1;function $s(e){js(e)}function js(e){Qe.includes(e)||Qe.push(e),Hs()}function $i(e){let t=Qe.indexOf(e);t!==-1&&t>Fn&&Qe.splice(t,1)}function Hs(){!Hn&&!jn&&(jn=!0,queueMicrotask(Fs))}function Fs(){jn=!1,Hn=!0;for(let e=0;ee.effect(t,{scheduler:n=>{Un?$s(n):n()}}),ji=e.raw}function Qr(e){ot=e}function Ks(e){let t=()=>{};return[r=>{let i=ot(r);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),mt(i))},i},()=>{t()}]}function Hi(e,t){let n=!0,r,i=ot(()=>{let o=e();JSON.stringify(o),n?r=o:queueMicrotask(()=>{t(o,r),r=o}),n=!1});return()=>mt(i)}var Fi=[],Ui=[],Wi=[];function zs(e){Wi.push(e)}function lr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Ui.push(t))}function Ki(e){Fi.push(e)}function zi(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Vi(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,r])=>{(t===void 0||t.includes(n))&&(r.forEach(i=>i()),delete e._x_attributeCleanups[n])})}function Vs(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}var fr=new MutationObserver(gr),dr=!1;function pr(){fr.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),dr=!0}function qi(){qs(),fr.disconnect(),dr=!1}var wt=[];function qs(){let e=fr.takeRecords();wt.push(()=>e.length>0&&gr(e));let t=wt.length;queueMicrotask(()=>{if(wt.length===t)for(;wt.length>0;)wt.shift()()})}function ee(e){if(!dr)return e();qi();let t=e();return pr(),t}var hr=!1,an=[];function Gs(){hr=!0}function Xs(){hr=!1,gr(an),an=[]}function gr(e){if(hr){an=an.concat(e);return}let t=new Set,n=new Set,r=new Map,i=new Map;for(let o=0;oa.nodeType===1&&t.add(a)),e[o].removedNodes.forEach(a=>a.nodeType===1&&n.add(a))),e[o].type==="attributes")){let a=e[o].target,s=e[o].attributeName,c=e[o].oldValue,f=()=>{r.has(a)||r.set(a,[]),r.get(a).push({name:s,value:a.getAttribute(s)})},l=()=>{i.has(a)||i.set(a,[]),i.get(a).push(s)};a.hasAttribute(s)&&c===null?f():a.hasAttribute(s)?(l(),f()):l()}i.forEach((o,a)=>{Vi(a,o)}),r.forEach((o,a)=>{Fi.forEach(s=>s(a,o))});for(let o of n)t.has(o)||Ui.forEach(a=>a(o));t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)n.has(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,Wi.forEach(a=>a(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,n=null,r=null,i=null}function Gi(e){return Ft(vt(e))}function Ht(e,t,n){return e._x_dataStack=[t,...vt(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(r=>r!==t)}}function vt(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?vt(e.host):e.parentNode?vt(e.parentNode):[]}function Ft(e){return new Proxy({objects:e},Ys)}var Ys={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(n=>Object.prototype.hasOwnProperty.call(n,t)||Reflect.has(n,t))},get({objects:e},t,n){return t=="toJSON"?Js:Reflect.get(e.find(r=>Reflect.has(r,t))||{},t,n)},set({objects:e},t,n,r){const i=e.find(a=>Object.prototype.hasOwnProperty.call(a,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(i,t);return o!=null&&o.set&&(o!=null&&o.get)?Reflect.set(i,t,n,r):Reflect.set(i,t,n)}};function Js(){return Reflect.ownKeys(this).reduce((t,n)=>(t[n]=Reflect.get(this,n),t),{})}function Xi(e){let t=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,n=(r,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([o,{value:a,enumerable:s}])=>{if(s===!1||a===void 0||typeof a=="object"&&a!==null&&a.__v_skip)return;let c=i===""?o:`${i}.${o}`;typeof a=="object"&&a!==null&&a._x_interceptor?r[o]=a.initialize(e,c,o):t(a)&&a!==r&&!(a instanceof Element)&&n(a,c)})};return n(e)}function Yi(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(r,i,o){return e(this.initialValue,()=>Zs(r,i),a=>Wn(r,i,a),i,o)}};return t(n),r=>{if(typeof r=="object"&&r!==null&&r._x_interceptor){let i=n.initialize.bind(n);n.initialize=(o,a,s)=>{let c=r.initialize(o,a,s);return n.initialValue=c,i(o,a,s)}}else n.initialValue=r;return n}}function Zs(e,t){return t.split(".").reduce((n,r)=>n[r],e)}function Wn(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Wn(e[t[0]],t.slice(1),n)}}var Ji={};function we(e,t){Ji[e]=t}function Kn(e,t){return Object.entries(Ji).forEach(([n,r])=>{let i=null;function o(){if(i)return i;{let[a,s]=ro(t);return i={interceptor:Yi,...a},lr(t,s),i}}Object.defineProperty(e,`$${n}`,{get(){return r(t,o())},enumerable:!1})}),e}function Qs(e,t,n,...r){try{return n(...r)}catch(i){Lt(i,e,t)}}function Lt(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} +var ce = 'top', + be = 'bottom', + ye = 'right', + ue = 'left', + nr = 'auto', + Bt = [ce, be, ye, ue], + dt = 'start', + Dt = 'end', + ua = 'clippingParents', + mi = 'viewport', + Et = 'popper', + la = 'reference', + Pr = Bt.reduce(function (e, t) { + return e.concat([t + '-' + dt, t + '-' + Dt]); + }, []), + xi = [].concat(Bt, [nr]).reduce(function (e, t) { + return e.concat([t, t + '-' + dt, t + '-' + Dt]); + }, []), + fa = 'beforeRead', + da = 'read', + pa = 'afterRead', + ha = 'beforeMain', + ga = 'main', + va = 'afterMain', + _a = 'beforeWrite', + ba = 'write', + ya = 'afterWrite', + ma = [fa, da, pa, ha, ga, va, _a, ba, ya]; +function Me(e) { + return e ? (e.nodeName || '').toLowerCase() : null; +} +function fe(e) { + if (e == null) return window; + if (e.toString() !== '[object Window]') { + var t = e.ownerDocument; + return (t && t.defaultView) || window; + } + return e; +} +function it(e) { + var t = fe(e).Element; + return e instanceof t || e instanceof Element; +} +function _e(e) { + var t = fe(e).HTMLElement; + return e instanceof t || e instanceof HTMLElement; +} +function rr(e) { + if (typeof ShadowRoot > 'u') return !1; + var t = fe(e).ShadowRoot; + return e instanceof t || e instanceof ShadowRoot; +} +function xa(e) { + var t = e.state; + Object.keys(t.elements).forEach(function (n) { + var r = t.styles[n] || {}, + i = t.attributes[n] || {}, + o = t.elements[n]; + !_e(o) || + !Me(o) || + (Object.assign(o.style, r), + Object.keys(i).forEach(function (a) { + var s = i[a]; + s === !1 ? o.removeAttribute(a) : o.setAttribute(a, s === !0 ? '' : s); + })); + }); +} +function Ea(e) { + var t = e.state, + n = { + popper: { position: t.options.strategy, left: '0', top: '0', margin: '0' }, + arrow: { position: 'absolute' }, + reference: {}, + }; + return ( + Object.assign(t.elements.popper.style, n.popper), + (t.styles = n), + t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), + function () { + Object.keys(t.elements).forEach(function (r) { + var i = t.elements[r], + o = t.attributes[r] || {}, + a = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), + s = a.reduce(function (c, f) { + return (c[f] = ''), c; + }, {}); + !_e(i) || + !Me(i) || + (Object.assign(i.style, s), + Object.keys(o).forEach(function (c) { + i.removeAttribute(c); + })); + }); + } + ); +} +const Ei = { name: 'applyStyles', enabled: !0, phase: 'write', fn: xa, effect: Ea, requires: ['computeStyles'] }; +function Te(e) { + return e.split('-')[0]; +} +var Ze = Math.max, + rn = Math.min, + pt = Math.round; +function Pn() { + var e = navigator.userAgentData; + return e != null && e.brands && Array.isArray(e.brands) + ? e.brands + .map(function (t) { + return t.brand + '/' + t.version; + }) + .join(' ') + : navigator.userAgent; +} +function wi() { + return !/^((?!chrome|android).)*safari/i.test(Pn()); +} +function ht(e, t, n) { + t === void 0 && (t = !1), n === void 0 && (n = !1); + var r = e.getBoundingClientRect(), + i = 1, + o = 1; + t && + _e(e) && + ((i = (e.offsetWidth > 0 && pt(r.width) / e.offsetWidth) || 1), + (o = (e.offsetHeight > 0 && pt(r.height) / e.offsetHeight) || 1)); + var a = it(e) ? fe(e) : window, + s = a.visualViewport, + c = !wi() && n, + f = (r.left + (c && s ? s.offsetLeft : 0)) / i, + l = (r.top + (c && s ? s.offsetTop : 0)) / o, + v = r.width / i, + b = r.height / o; + return { width: v, height: b, top: l, right: f + v, bottom: l + b, left: f, x: f, y: l }; +} +function ir(e) { + var t = ht(e), + n = e.offsetWidth, + r = e.offsetHeight; + return ( + Math.abs(t.width - n) <= 1 && (n = t.width), + Math.abs(t.height - r) <= 1 && (r = t.height), + { x: e.offsetLeft, y: e.offsetTop, width: n, height: r } + ); +} +function Oi(e, t) { + var n = t.getRootNode && t.getRootNode(); + if (e.contains(t)) return !0; + if (n && rr(n)) { + var r = t; + do { + if (r && e.isSameNode(r)) return !0; + r = r.parentNode || r.host; + } while (r); + } + return !1; +} +function De(e) { + return fe(e).getComputedStyle(e); +} +function wa(e) { + return ['table', 'td', 'th'].indexOf(Me(e)) >= 0; +} +function We(e) { + return ((it(e) ? e.ownerDocument : e.document) || window.document).documentElement; +} +function fn(e) { + return Me(e) === 'html' ? e : e.assignedSlot || e.parentNode || (rr(e) ? e.host : null) || We(e); +} +function kr(e) { + return !_e(e) || De(e).position === 'fixed' ? null : e.offsetParent; +} +function Oa(e) { + var t = /firefox/i.test(Pn()), + n = /Trident/i.test(Pn()); + if (n && _e(e)) { + var r = De(e); + if (r.position === 'fixed') return null; + } + var i = fn(e); + for (rr(i) && (i = i.host); _e(i) && ['html', 'body'].indexOf(Me(i)) < 0; ) { + var o = De(i); + if ( + o.transform !== 'none' || + o.perspective !== 'none' || + o.contain === 'paint' || + ['transform', 'perspective'].indexOf(o.willChange) !== -1 || + (t && o.willChange === 'filter') || + (t && o.filter && o.filter !== 'none') + ) + return i; + i = i.parentNode; + } + return null; +} +function $t(e) { + for (var t = fe(e), n = kr(e); n && wa(n) && De(n).position === 'static'; ) n = kr(n); + return n && (Me(n) === 'html' || (Me(n) === 'body' && De(n).position === 'static')) ? t : n || Oa(e) || t; +} +function or(e) { + return ['top', 'bottom'].indexOf(e) >= 0 ? 'x' : 'y'; +} +function Tt(e, t, n) { + return Ze(e, rn(t, n)); +} +function Aa(e, t, n) { + var r = Tt(e, t, n); + return r > n ? n : r; +} +function Ai() { + return { top: 0, right: 0, bottom: 0, left: 0 }; +} +function Si(e) { + return Object.assign({}, Ai(), e); +} +function Ti(e, t) { + return t.reduce(function (n, r) { + return (n[r] = e), n; + }, {}); +} +var Sa = function (t, n) { + return ( + (t = typeof t == 'function' ? t(Object.assign({}, n.rects, { placement: n.placement })) : t), + Si(typeof t != 'number' ? t : Ti(t, Bt)) + ); +}; +function Ta(e) { + var t, + n = e.state, + r = e.name, + i = e.options, + o = n.elements.arrow, + a = n.modifiersData.popperOffsets, + s = Te(n.placement), + c = or(s), + f = [ue, ye].indexOf(s) >= 0, + l = f ? 'height' : 'width'; + if (!(!o || !a)) { + var v = Sa(i.padding, n), + b = ir(o), + _ = c === 'y' ? ce : ue, + A = c === 'y' ? be : ye, + S = n.rects.reference[l] + n.rects.reference[c] - a[c] - n.rects.popper[l], + h = a[c] - n.rects.reference[c], + E = $t(o), + O = E ? (c === 'y' ? E.clientHeight || 0 : E.clientWidth || 0) : 0, + M = S / 2 - h / 2, + u = v[_], + I = O - b[l] - v[A], + m = O / 2 - b[l] / 2 + M, + L = Tt(u, m, I), + K = c; + n.modifiersData[r] = ((t = {}), (t[K] = L), (t.centerOffset = L - m), t); + } +} +function Ma(e) { + var t = e.state, + n = e.options, + r = n.element, + i = r === void 0 ? '[data-popper-arrow]' : r; + i != null && + ((typeof i == 'string' && ((i = t.elements.popper.querySelector(i)), !i)) || + (Oi(t.elements.popper, i) && (t.elements.arrow = i))); +} +const Ca = { + name: 'arrow', + enabled: !0, + phase: 'main', + fn: Ta, + effect: Ma, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'], +}; +function gt(e) { + return e.split('-')[1]; +} +var Ra = { top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' }; +function Ia(e, t) { + var n = e.x, + r = e.y, + i = t.devicePixelRatio || 1; + return { x: pt(n * i) / i || 0, y: pt(r * i) / i || 0 }; +} +function Br(e) { + var t, + n = e.popper, + r = e.popperRect, + i = e.placement, + o = e.variation, + a = e.offsets, + s = e.position, + c = e.gpuAcceleration, + f = e.adaptive, + l = e.roundOffsets, + v = e.isFixed, + b = a.x, + _ = b === void 0 ? 0 : b, + A = a.y, + S = A === void 0 ? 0 : A, + h = typeof l == 'function' ? l({ x: _, y: S }) : { x: _, y: S }; + (_ = h.x), (S = h.y); + var E = a.hasOwnProperty('x'), + O = a.hasOwnProperty('y'), + M = ue, + u = ce, + I = window; + if (f) { + var m = $t(n), + L = 'clientHeight', + K = 'clientWidth'; + if ( + (m === fe(n) && + ((m = We(n)), + De(m).position !== 'static' && s === 'absolute' && ((L = 'scrollHeight'), (K = 'scrollWidth'))), + (m = m), + i === ce || ((i === ue || i === ye) && o === Dt)) + ) { + u = be; + var P = v && m === I && I.visualViewport ? I.visualViewport.height : m[L]; + (S -= P - r.height), (S *= c ? 1 : -1); + } + if (i === ue || ((i === ce || i === be) && o === Dt)) { + M = ye; + var H = v && m === I && I.visualViewport ? I.visualViewport.width : m[K]; + (_ -= H - r.width), (_ *= c ? 1 : -1); + } + } + var q = Object.assign({ position: s }, f && Ra), + z = l === !0 ? Ia({ x: _, y: S }, fe(n)) : { x: _, y: S }; + if (((_ = z.x), (S = z.y), c)) { + var k; + return Object.assign( + {}, + q, + ((k = {}), + (k[u] = O ? '0' : ''), + (k[M] = E ? '0' : ''), + (k.transform = + (I.devicePixelRatio || 1) <= 1 + ? 'translate(' + _ + 'px, ' + S + 'px)' + : 'translate3d(' + _ + 'px, ' + S + 'px, 0)'), + k) + ); + } + return Object.assign( + {}, + q, + ((t = {}), (t[u] = O ? S + 'px' : ''), (t[M] = E ? _ + 'px' : ''), (t.transform = ''), t) + ); +} +function Da(e) { + var t = e.state, + n = e.options, + r = n.gpuAcceleration, + i = r === void 0 ? !0 : r, + o = n.adaptive, + a = o === void 0 ? !0 : o, + s = n.roundOffsets, + c = s === void 0 ? !0 : s, + f = { + placement: Te(t.placement), + variation: gt(t.placement), + popper: t.elements.popper, + popperRect: t.rects.popper, + gpuAcceleration: i, + isFixed: t.options.strategy === 'fixed', + }; + t.modifiersData.popperOffsets != null && + (t.styles.popper = Object.assign( + {}, + t.styles.popper, + Br( + Object.assign({}, f, { + offsets: t.modifiersData.popperOffsets, + position: t.options.strategy, + adaptive: a, + roundOffsets: c, + }) + ) + )), + t.modifiersData.arrow != null && + (t.styles.arrow = Object.assign( + {}, + t.styles.arrow, + Br( + Object.assign({}, f, { + offsets: t.modifiersData.arrow, + position: 'absolute', + adaptive: !1, + roundOffsets: c, + }) + ) + )), + (t.attributes.popper = Object.assign({}, t.attributes.popper, { 'data-popper-placement': t.placement })); +} +const Na = { name: 'computeStyles', enabled: !0, phase: 'beforeWrite', fn: Da, data: {} }; +var Vt = { passive: !0 }; +function La(e) { + var t = e.state, + n = e.instance, + r = e.options, + i = r.scroll, + o = i === void 0 ? !0 : i, + a = r.resize, + s = a === void 0 ? !0 : a, + c = fe(t.elements.popper), + f = [].concat(t.scrollParents.reference, t.scrollParents.popper); + return ( + o && + f.forEach(function (l) { + l.addEventListener('scroll', n.update, Vt); + }), + s && c.addEventListener('resize', n.update, Vt), + function () { + o && + f.forEach(function (l) { + l.removeEventListener('scroll', n.update, Vt); + }), + s && c.removeEventListener('resize', n.update, Vt); + } + ); +} +const Pa = { name: 'eventListeners', enabled: !0, phase: 'write', fn: function () {}, effect: La, data: {} }; +var ka = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; +function en(e) { + return e.replace(/left|right|bottom|top/g, function (t) { + return ka[t]; + }); +} +var Ba = { start: 'end', end: 'start' }; +function $r(e) { + return e.replace(/start|end/g, function (t) { + return Ba[t]; + }); +} +function ar(e) { + var t = fe(e), + n = t.pageXOffset, + r = t.pageYOffset; + return { scrollLeft: n, scrollTop: r }; +} +function sr(e) { + return ht(We(e)).left + ar(e).scrollLeft; +} +function $a(e, t) { + var n = fe(e), + r = We(e), + i = n.visualViewport, + o = r.clientWidth, + a = r.clientHeight, + s = 0, + c = 0; + if (i) { + (o = i.width), (a = i.height); + var f = wi(); + (f || (!f && t === 'fixed')) && ((s = i.offsetLeft), (c = i.offsetTop)); + } + return { width: o, height: a, x: s + sr(e), y: c }; +} +function ja(e) { + var t, + n = We(e), + r = ar(e), + i = (t = e.ownerDocument) == null ? void 0 : t.body, + o = Ze(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), + a = Ze(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), + s = -r.scrollLeft + sr(e), + c = -r.scrollTop; + return ( + De(i || n).direction === 'rtl' && (s += Ze(n.clientWidth, i ? i.clientWidth : 0) - o), + { width: o, height: a, x: s, y: c } + ); +} +function cr(e) { + var t = De(e), + n = t.overflow, + r = t.overflowX, + i = t.overflowY; + return /auto|scroll|overlay|hidden/.test(n + i + r); +} +function Mi(e) { + return ['html', 'body', '#document'].indexOf(Me(e)) >= 0 ? e.ownerDocument.body : _e(e) && cr(e) ? e : Mi(fn(e)); +} +function Mt(e, t) { + var n; + t === void 0 && (t = []); + var r = Mi(e), + i = r === ((n = e.ownerDocument) == null ? void 0 : n.body), + o = fe(r), + a = i ? [o].concat(o.visualViewport || [], cr(r) ? r : []) : r, + s = t.concat(a); + return i ? s : s.concat(Mt(fn(a))); +} +function kn(e) { + return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); +} +function Ha(e, t) { + var n = ht(e, !1, t === 'fixed'); + return ( + (n.top = n.top + e.clientTop), + (n.left = n.left + e.clientLeft), + (n.bottom = n.top + e.clientHeight), + (n.right = n.left + e.clientWidth), + (n.width = e.clientWidth), + (n.height = e.clientHeight), + (n.x = n.left), + (n.y = n.top), + n + ); +} +function jr(e, t, n) { + return t === mi ? kn($a(e, n)) : it(t) ? Ha(t, n) : kn(ja(We(e))); +} +function Fa(e) { + var t = Mt(fn(e)), + n = ['absolute', 'fixed'].indexOf(De(e).position) >= 0, + r = n && _e(e) ? $t(e) : e; + return it(r) + ? t.filter(function (i) { + return it(i) && Oi(i, r) && Me(i) !== 'body'; + }) + : []; +} +function Ua(e, t, n, r) { + var i = t === 'clippingParents' ? Fa(e) : [].concat(t), + o = [].concat(i, [n]), + a = o[0], + s = o.reduce(function (c, f) { + var l = jr(e, f, r); + return ( + (c.top = Ze(l.top, c.top)), + (c.right = rn(l.right, c.right)), + (c.bottom = rn(l.bottom, c.bottom)), + (c.left = Ze(l.left, c.left)), + c + ); + }, jr(e, a, r)); + return (s.width = s.right - s.left), (s.height = s.bottom - s.top), (s.x = s.left), (s.y = s.top), s; +} +function Ci(e) { + var t = e.reference, + n = e.element, + r = e.placement, + i = r ? Te(r) : null, + o = r ? gt(r) : null, + a = t.x + t.width / 2 - n.width / 2, + s = t.y + t.height / 2 - n.height / 2, + c; + switch (i) { + case ce: + c = { x: a, y: t.y - n.height }; + break; + case be: + c = { x: a, y: t.y + t.height }; + break; + case ye: + c = { x: t.x + t.width, y: s }; + break; + case ue: + c = { x: t.x - n.width, y: s }; + break; + default: + c = { x: t.x, y: t.y }; + } + var f = i ? or(i) : null; + if (f != null) { + var l = f === 'y' ? 'height' : 'width'; + switch (o) { + case dt: + c[f] = c[f] - (t[l] / 2 - n[l] / 2); + break; + case Dt: + c[f] = c[f] + (t[l] / 2 - n[l] / 2); + break; + } + } + return c; +} +function Nt(e, t) { + t === void 0 && (t = {}); + var n = t, + r = n.placement, + i = r === void 0 ? e.placement : r, + o = n.strategy, + a = o === void 0 ? e.strategy : o, + s = n.boundary, + c = s === void 0 ? ua : s, + f = n.rootBoundary, + l = f === void 0 ? mi : f, + v = n.elementContext, + b = v === void 0 ? Et : v, + _ = n.altBoundary, + A = _ === void 0 ? !1 : _, + S = n.padding, + h = S === void 0 ? 0 : S, + E = Si(typeof h != 'number' ? h : Ti(h, Bt)), + O = b === Et ? la : Et, + M = e.rects.popper, + u = e.elements[A ? O : b], + I = Ua(it(u) ? u : u.contextElement || We(e.elements.popper), c, l, a), + m = ht(e.elements.reference), + L = Ci({ reference: m, element: M, strategy: 'absolute', placement: i }), + K = kn(Object.assign({}, M, L)), + P = b === Et ? K : m, + H = { + top: I.top - P.top + E.top, + bottom: P.bottom - I.bottom + E.bottom, + left: I.left - P.left + E.left, + right: P.right - I.right + E.right, + }, + q = e.modifiersData.offset; + if (b === Et && q) { + var z = q[i]; + Object.keys(H).forEach(function (k) { + var U = [ye, be].indexOf(k) >= 0 ? 1 : -1, + Y = [ce, be].indexOf(k) >= 0 ? 'y' : 'x'; + H[k] += z[Y] * U; + }); + } + return H; +} +function Wa(e, t) { + t === void 0 && (t = {}); + var n = t, + r = n.placement, + i = n.boundary, + o = n.rootBoundary, + a = n.padding, + s = n.flipVariations, + c = n.allowedAutoPlacements, + f = c === void 0 ? xi : c, + l = gt(r), + v = l + ? s + ? Pr + : Pr.filter(function (A) { + return gt(A) === l; + }) + : Bt, + b = v.filter(function (A) { + return f.indexOf(A) >= 0; + }); + b.length === 0 && (b = v); + var _ = b.reduce(function (A, S) { + return (A[S] = Nt(e, { placement: S, boundary: i, rootBoundary: o, padding: a })[Te(S)]), A; + }, {}); + return Object.keys(_).sort(function (A, S) { + return _[A] - _[S]; + }); +} +function Ka(e) { + if (Te(e) === nr) return []; + var t = en(e); + return [$r(e), t, $r(t)]; +} +function za(e) { + var t = e.state, + n = e.options, + r = e.name; + if (!t.modifiersData[r]._skip) { + for ( + var i = n.mainAxis, + o = i === void 0 ? !0 : i, + a = n.altAxis, + s = a === void 0 ? !0 : a, + c = n.fallbackPlacements, + f = n.padding, + l = n.boundary, + v = n.rootBoundary, + b = n.altBoundary, + _ = n.flipVariations, + A = _ === void 0 ? !0 : _, + S = n.allowedAutoPlacements, + h = t.options.placement, + E = Te(h), + O = E === h, + M = c || (O || !A ? [en(h)] : Ka(h)), + u = [h].concat(M).reduce(function (se, G) { + return se.concat( + Te(G) === nr + ? Wa(t, { + placement: G, + boundary: l, + rootBoundary: v, + padding: f, + flipVariations: A, + allowedAutoPlacements: S, + }) + : G + ); + }, []), + I = t.rects.reference, + m = t.rects.popper, + L = new Map(), + K = !0, + P = u[0], + H = 0; + H < u.length; + H++ + ) { + var q = u[H], + z = Te(q), + k = gt(q) === dt, + U = [ce, be].indexOf(z) >= 0, + Y = U ? 'width' : 'height', + te = Nt(t, { placement: q, boundary: l, rootBoundary: v, altBoundary: b, padding: f }), + p = U ? (k ? ye : ue) : k ? be : ce; + I[Y] > m[Y] && (p = en(p)); + var y = en(p), + C = []; + if ( + (o && C.push(te[z] <= 0), + s && C.push(te[p] <= 0, te[y] <= 0), + C.every(function (se) { + return se; + })) + ) { + (P = q), (K = !1); + break; + } + L.set(q, C); + } + if (K) + for ( + var N = A ? 3 : 1, + W = function (G) { + var Z = u.find(function (Ce) { + var de = L.get(Ce); + if (de) + return de.slice(0, G).every(function (Re) { + return Re; + }); + }); + if (Z) return (P = Z), 'break'; + }, + J = N; + J > 0; + J-- + ) { + var re = W(J); + if (re === 'break') break; + } + t.placement !== P && ((t.modifiersData[r]._skip = !0), (t.placement = P), (t.reset = !0)); + } +} +const Va = { name: 'flip', enabled: !0, phase: 'main', fn: za, requiresIfExists: ['offset'], data: { _skip: !1 } }; +function Hr(e, t, n) { + return ( + n === void 0 && (n = { x: 0, y: 0 }), + { + top: e.top - t.height - n.y, + right: e.right - t.width + n.x, + bottom: e.bottom - t.height + n.y, + left: e.left - t.width - n.x, + } + ); +} +function Fr(e) { + return [ce, ye, be, ue].some(function (t) { + return e[t] >= 0; + }); +} +function qa(e) { + var t = e.state, + n = e.name, + r = t.rects.reference, + i = t.rects.popper, + o = t.modifiersData.preventOverflow, + a = Nt(t, { elementContext: 'reference' }), + s = Nt(t, { altBoundary: !0 }), + c = Hr(a, r), + f = Hr(s, i, o), + l = Fr(c), + v = Fr(f); + (t.modifiersData[n] = { + referenceClippingOffsets: c, + popperEscapeOffsets: f, + isReferenceHidden: l, + hasPopperEscaped: v, + }), + (t.attributes.popper = Object.assign({}, t.attributes.popper, { + 'data-popper-reference-hidden': l, + 'data-popper-escaped': v, + })); +} +const Ga = { name: 'hide', enabled: !0, phase: 'main', requiresIfExists: ['preventOverflow'], fn: qa }; +function Xa(e, t, n) { + var r = Te(e), + i = [ue, ce].indexOf(r) >= 0 ? -1 : 1, + o = typeof n == 'function' ? n(Object.assign({}, t, { placement: e })) : n, + a = o[0], + s = o[1]; + return (a = a || 0), (s = (s || 0) * i), [ue, ye].indexOf(r) >= 0 ? { x: s, y: a } : { x: a, y: s }; +} +function Ya(e) { + var t = e.state, + n = e.options, + r = e.name, + i = n.offset, + o = i === void 0 ? [0, 0] : i, + a = xi.reduce(function (l, v) { + return (l[v] = Xa(v, t.rects, o)), l; + }, {}), + s = a[t.placement], + c = s.x, + f = s.y; + t.modifiersData.popperOffsets != null && + ((t.modifiersData.popperOffsets.x += c), (t.modifiersData.popperOffsets.y += f)), + (t.modifiersData[r] = a); +} +const Ja = { name: 'offset', enabled: !0, phase: 'main', requires: ['popperOffsets'], fn: Ya }; +function Za(e) { + var t = e.state, + n = e.name; + t.modifiersData[n] = Ci({ + reference: t.rects.reference, + element: t.rects.popper, + strategy: 'absolute', + placement: t.placement, + }); +} +const Qa = { name: 'popperOffsets', enabled: !0, phase: 'read', fn: Za, data: {} }; +function es(e) { + return e === 'x' ? 'y' : 'x'; +} +function ts(e) { + var t = e.state, + n = e.options, + r = e.name, + i = n.mainAxis, + o = i === void 0 ? !0 : i, + a = n.altAxis, + s = a === void 0 ? !1 : a, + c = n.boundary, + f = n.rootBoundary, + l = n.altBoundary, + v = n.padding, + b = n.tether, + _ = b === void 0 ? !0 : b, + A = n.tetherOffset, + S = A === void 0 ? 0 : A, + h = Nt(t, { boundary: c, rootBoundary: f, padding: v, altBoundary: l }), + E = Te(t.placement), + O = gt(t.placement), + M = !O, + u = or(E), + I = es(u), + m = t.modifiersData.popperOffsets, + L = t.rects.reference, + K = t.rects.popper, + P = typeof S == 'function' ? S(Object.assign({}, t.rects, { placement: t.placement })) : S, + H = typeof P == 'number' ? { mainAxis: P, altAxis: P } : Object.assign({ mainAxis: 0, altAxis: 0 }, P), + q = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, + z = { x: 0, y: 0 }; + if (m) { + if (o) { + var k, + U = u === 'y' ? ce : ue, + Y = u === 'y' ? be : ye, + te = u === 'y' ? 'height' : 'width', + p = m[u], + y = p + h[U], + C = p - h[Y], + N = _ ? -K[te] / 2 : 0, + W = O === dt ? L[te] : K[te], + J = O === dt ? -K[te] : -L[te], + re = t.elements.arrow, + se = _ && re ? ir(re) : { width: 0, height: 0 }, + G = t.modifiersData['arrow#persistent'] ? t.modifiersData['arrow#persistent'].padding : Ai(), + Z = G[U], + Ce = G[Y], + de = Tt(0, L[te], se[te]), + Re = M ? L[te] / 2 - N - de - Z - H.mainAxis : W - de - Z - H.mainAxis, + Oe = M ? -L[te] / 2 + N + de + Ce + H.mainAxis : J + de + Ce + H.mainAxis, + Le = t.elements.arrow && $t(t.elements.arrow), + st = Le ? (u === 'y' ? Le.clientTop || 0 : Le.clientLeft || 0) : 0, + ze = (k = q == null ? void 0 : q[u]) != null ? k : 0, + Ie = p + Re - ze - st, + Ve = p + Oe - ze, + ie = Tt(_ ? rn(y, Ie) : y, p, _ ? Ze(C, Ve) : C); + (m[u] = ie), (z[u] = ie - p); + } + if (s) { + var qe, + Pe = u === 'x' ? ce : ue, + T = u === 'x' ? be : ye, + pe = m[I], + V = I === 'y' ? 'height' : 'width', + $ = pe + h[Pe], + he = pe - h[T], + le = [ce, ue].indexOf(E) !== -1, + ke = (qe = q == null ? void 0 : q[I]) != null ? qe : 0, + Be = le ? $ : pe - L[V] - K[V] - ke + H.altAxis, + g = le ? pe + L[V] + K[V] - ke - H.altAxis : he, + x = _ && le ? Aa(Be, pe, g) : Tt(_ ? Be : $, pe, _ ? g : he); + (m[I] = x), (z[I] = x - pe); + } + t.modifiersData[r] = z; + } +} +const ns = { name: 'preventOverflow', enabled: !0, phase: 'main', fn: ts, requiresIfExists: ['offset'] }; +function rs(e) { + return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; +} +function is(e) { + return e === fe(e) || !_e(e) ? ar(e) : rs(e); +} +function os(e) { + var t = e.getBoundingClientRect(), + n = pt(t.width) / e.offsetWidth || 1, + r = pt(t.height) / e.offsetHeight || 1; + return n !== 1 || r !== 1; +} +function as(e, t, n) { + n === void 0 && (n = !1); + var r = _e(t), + i = _e(t) && os(t), + o = We(t), + a = ht(e, i, n), + s = { scrollLeft: 0, scrollTop: 0 }, + c = { x: 0, y: 0 }; + return ( + (r || (!r && !n)) && + ((Me(t) !== 'body' || cr(o)) && (s = is(t)), + _e(t) ? ((c = ht(t, !0)), (c.x += t.clientLeft), (c.y += t.clientTop)) : o && (c.x = sr(o))), + { x: a.left + s.scrollLeft - c.x, y: a.top + s.scrollTop - c.y, width: a.width, height: a.height } + ); +} +function ss(e) { + var t = new Map(), + n = new Set(), + r = []; + e.forEach(function (o) { + t.set(o.name, o); + }); + function i(o) { + n.add(o.name); + var a = [].concat(o.requires || [], o.requiresIfExists || []); + a.forEach(function (s) { + if (!n.has(s)) { + var c = t.get(s); + c && i(c); + } + }), + r.push(o); + } + return ( + e.forEach(function (o) { + n.has(o.name) || i(o); + }), + r + ); +} +function cs(e) { + var t = ss(e); + return ma.reduce(function (n, r) { + return n.concat( + t.filter(function (i) { + return i.phase === r; + }) + ); + }, []); +} +function us(e) { + var t; + return function () { + return ( + t || + (t = new Promise(function (n) { + Promise.resolve().then(function () { + (t = void 0), n(e()); + }); + })), + t + ); + }; +} +function ls(e) { + var t = e.reduce(function (n, r) { + var i = n[r.name]; + return ( + (n[r.name] = i + ? Object.assign({}, i, r, { + options: Object.assign({}, i.options, r.options), + data: Object.assign({}, i.data, r.data), + }) + : r), + n + ); + }, {}); + return Object.keys(t).map(function (n) { + return t[n]; + }); +} +var Ur = { placement: 'bottom', modifiers: [], strategy: 'absolute' }; +function Wr() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; + return !t.some(function (r) { + return !(r && typeof r.getBoundingClientRect == 'function'); + }); +} +function fs(e) { + e === void 0 && (e = {}); + var t = e, + n = t.defaultModifiers, + r = n === void 0 ? [] : n, + i = t.defaultOptions, + o = i === void 0 ? Ur : i; + return function (s, c, f) { + f === void 0 && (f = o); + var l = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, Ur, o), + modifiersData: {}, + elements: { reference: s, popper: c }, + attributes: {}, + styles: {}, + }, + v = [], + b = !1, + _ = { + state: l, + setOptions: function (E) { + var O = typeof E == 'function' ? E(l.options) : E; + S(), + (l.options = Object.assign({}, o, l.options, O)), + (l.scrollParents = { + reference: it(s) ? Mt(s) : s.contextElement ? Mt(s.contextElement) : [], + popper: Mt(c), + }); + var M = cs(ls([].concat(r, l.options.modifiers))); + return ( + (l.orderedModifiers = M.filter(function (u) { + return u.enabled; + })), + A(), + _.update() + ); + }, + forceUpdate: function () { + if (!b) { + var E = l.elements, + O = E.reference, + M = E.popper; + if (Wr(O, M)) { + (l.rects = { reference: as(O, $t(M), l.options.strategy === 'fixed'), popper: ir(M) }), + (l.reset = !1), + (l.placement = l.options.placement), + l.orderedModifiers.forEach(function (H) { + return (l.modifiersData[H.name] = Object.assign({}, H.data)); + }); + for (var u = 0; u < l.orderedModifiers.length; u++) { + if (l.reset === !0) { + (l.reset = !1), (u = -1); + continue; + } + var I = l.orderedModifiers[u], + m = I.fn, + L = I.options, + K = L === void 0 ? {} : L, + P = I.name; + typeof m == 'function' && (l = m({ state: l, options: K, name: P, instance: _ }) || l); + } + } + } + }, + update: us(function () { + return new Promise(function (h) { + _.forceUpdate(), h(l); + }); + }), + destroy: function () { + S(), (b = !0); + }, + }; + if (!Wr(s, c)) return _; + _.setOptions(f).then(function (h) { + !b && f.onFirstUpdate && f.onFirstUpdate(h); + }); + function A() { + l.orderedModifiers.forEach(function (h) { + var E = h.name, + O = h.options, + M = O === void 0 ? {} : O, + u = h.effect; + if (typeof u == 'function') { + var I = u({ state: l, name: E, instance: _, options: M }), + m = function () {}; + v.push(I || m); + } + }); + } + function S() { + v.forEach(function (h) { + return h(); + }), + (v = []); + } + return _; + }; +} +var ds = [Pa, Qa, Na, Ei, Ja, Va, ns, Ca, Ga], + ps = fs({ defaultModifiers: ds }), + hs = 'tippy-box', + Ri = 'tippy-content', + gs = 'tippy-backdrop', + Ii = 'tippy-arrow', + Di = 'tippy-svg-arrow', + Xe = { passive: !0, capture: !0 }, + Ni = function () { + return document.body; + }; +function An(e, t, n) { + if (Array.isArray(e)) { + var r = e[t]; + return r ?? (Array.isArray(n) ? n[t] : n); + } + return e; +} +function ur(e, t) { + var n = {}.toString.call(e); + return n.indexOf('[object') === 0 && n.indexOf(t + ']') > -1; +} +function Li(e, t) { + return typeof e == 'function' ? e.apply(void 0, t) : e; +} +function Kr(e, t) { + if (t === 0) return e; + var n; + return function (r) { + clearTimeout(n), + (n = setTimeout(function () { + e(r); + }, t)); + }; +} +function vs(e) { + return e.split(/\s+/).filter(Boolean); +} +function ft(e) { + return [].concat(e); +} +function zr(e, t) { + e.indexOf(t) === -1 && e.push(t); +} +function _s(e) { + return e.filter(function (t, n) { + return e.indexOf(t) === n; + }); +} +function bs(e) { + return e.split('-')[0]; +} +function on(e) { + return [].slice.call(e); +} +function Vr(e) { + return Object.keys(e).reduce(function (t, n) { + return e[n] !== void 0 && (t[n] = e[n]), t; + }, {}); +} +function Ct() { + return document.createElement('div'); +} +function dn(e) { + return ['Element', 'Fragment'].some(function (t) { + return ur(e, t); + }); +} +function ys(e) { + return ur(e, 'NodeList'); +} +function ms(e) { + return ur(e, 'MouseEvent'); +} +function xs(e) { + return !!(e && e._tippy && e._tippy.reference === e); +} +function Es(e) { + return dn(e) ? [e] : ys(e) ? on(e) : Array.isArray(e) ? e : on(document.querySelectorAll(e)); +} +function Sn(e, t) { + e.forEach(function (n) { + n && (n.style.transitionDuration = t + 'ms'); + }); +} +function qr(e, t) { + e.forEach(function (n) { + n && n.setAttribute('data-state', t); + }); +} +function ws(e) { + var t, + n = ft(e), + r = n[0]; + return r != null && (t = r.ownerDocument) != null && t.body ? r.ownerDocument : document; +} +function Os(e, t) { + var n = t.clientX, + r = t.clientY; + return e.every(function (i) { + var o = i.popperRect, + a = i.popperState, + s = i.props, + c = s.interactiveBorder, + f = bs(a.placement), + l = a.modifiersData.offset; + if (!l) return !0; + var v = f === 'bottom' ? l.top.y : 0, + b = f === 'top' ? l.bottom.y : 0, + _ = f === 'right' ? l.left.x : 0, + A = f === 'left' ? l.right.x : 0, + S = o.top - r + v > c, + h = r - o.bottom - b > c, + E = o.left - n + _ > c, + O = n - o.right - A > c; + return S || h || E || O; + }); +} +function Tn(e, t, n) { + var r = t + 'EventListener'; + ['transitionend', 'webkitTransitionEnd'].forEach(function (i) { + e[r](i, n); + }); +} +function Gr(e, t) { + for (var n = t; n; ) { + var r; + if (e.contains(n)) return !0; + n = n.getRootNode == null || (r = n.getRootNode()) == null ? void 0 : r.host; + } + return !1; +} +var Se = { isTouch: !1 }, + Xr = 0; +function As() { + Se.isTouch || ((Se.isTouch = !0), window.performance && document.addEventListener('mousemove', Pi)); +} +function Pi() { + var e = performance.now(); + e - Xr < 20 && ((Se.isTouch = !1), document.removeEventListener('mousemove', Pi)), (Xr = e); +} +function Ss() { + var e = document.activeElement; + if (xs(e)) { + var t = e._tippy; + e.blur && !t.state.isVisible && e.blur(); + } +} +function Ts() { + document.addEventListener('touchstart', As, Xe), window.addEventListener('blur', Ss); +} +var Ms = typeof window < 'u' && typeof document < 'u', + Cs = Ms ? !!window.msCrypto : !1, + Rs = { animateFill: !1, followCursor: !1, inlinePositioning: !1, sticky: !1 }, + Is = { + allowHTML: !1, + animation: 'fade', + arrow: !0, + content: '', + inertia: !1, + maxWidth: 350, + role: 'tooltip', + theme: '', + zIndex: 9999, + }, + xe = Object.assign( + { + appendTo: Ni, + aria: { content: 'auto', expanded: 'auto' }, + delay: 0, + duration: [300, 250], + getReferenceClientRect: null, + hideOnClick: !0, + ignoreAttributes: !1, + interactive: !1, + interactiveBorder: 2, + interactiveDebounce: 0, + moveTransition: '', + offset: [0, 10], + onAfterUpdate: function () {}, + onBeforeUpdate: function () {}, + onCreate: function () {}, + onDestroy: function () {}, + onHidden: function () {}, + onHide: function () {}, + onMount: function () {}, + onShow: function () {}, + onShown: function () {}, + onTrigger: function () {}, + onUntrigger: function () {}, + onClickOutside: function () {}, + placement: 'top', + plugins: [], + popperOptions: {}, + render: null, + showOnCreate: !1, + touch: !0, + trigger: 'mouseenter focus', + triggerTarget: null, + }, + Rs, + Is + ), + Ds = Object.keys(xe), + Ns = function (t) { + var n = Object.keys(t); + n.forEach(function (r) { + xe[r] = t[r]; + }); + }; +function ki(e) { + var t = e.plugins || [], + n = t.reduce(function (r, i) { + var o = i.name, + a = i.defaultValue; + if (o) { + var s; + r[o] = e[o] !== void 0 ? e[o] : (s = xe[o]) != null ? s : a; + } + return r; + }, {}); + return Object.assign({}, e, n); +} +function Ls(e, t) { + var n = t ? Object.keys(ki(Object.assign({}, xe, { plugins: t }))) : Ds, + r = n.reduce(function (i, o) { + var a = (e.getAttribute('data-tippy-' + o) || '').trim(); + if (!a) return i; + if (o === 'content') i[o] = a; + else + try { + i[o] = JSON.parse(a); + } catch { + i[o] = a; + } + return i; + }, {}); + return r; +} +function Yr(e, t) { + var n = Object.assign({}, t, { content: Li(t.content, [e]) }, t.ignoreAttributes ? {} : Ls(e, t.plugins)); + return ( + (n.aria = Object.assign({}, xe.aria, n.aria)), + (n.aria = { + expanded: n.aria.expanded === 'auto' ? t.interactive : n.aria.expanded, + content: n.aria.content === 'auto' ? (t.interactive ? null : 'describedby') : n.aria.content, + }), + n + ); +} +var Ps = function () { + return 'innerHTML'; +}; +function Bn(e, t) { + e[Ps()] = t; +} +function Jr(e) { + var t = Ct(); + return e === !0 ? (t.className = Ii) : ((t.className = Di), dn(e) ? t.appendChild(e) : Bn(t, e)), t; +} +function Zr(e, t) { + dn(t.content) + ? (Bn(e, ''), e.appendChild(t.content)) + : typeof t.content != 'function' && (t.allowHTML ? Bn(e, t.content) : (e.textContent = t.content)); +} +function $n(e) { + var t = e.firstElementChild, + n = on(t.children); + return { + box: t, + content: n.find(function (r) { + return r.classList.contains(Ri); + }), + arrow: n.find(function (r) { + return r.classList.contains(Ii) || r.classList.contains(Di); + }), + backdrop: n.find(function (r) { + return r.classList.contains(gs); + }), + }; +} +function Bi(e) { + var t = Ct(), + n = Ct(); + (n.className = hs), n.setAttribute('data-state', 'hidden'), n.setAttribute('tabindex', '-1'); + var r = Ct(); + (r.className = Ri), + r.setAttribute('data-state', 'hidden'), + Zr(r, e.props), + t.appendChild(n), + n.appendChild(r), + i(e.props, e.props); + function i(o, a) { + var s = $n(t), + c = s.box, + f = s.content, + l = s.arrow; + a.theme ? c.setAttribute('data-theme', a.theme) : c.removeAttribute('data-theme'), + typeof a.animation == 'string' + ? c.setAttribute('data-animation', a.animation) + : c.removeAttribute('data-animation'), + a.inertia ? c.setAttribute('data-inertia', '') : c.removeAttribute('data-inertia'), + (c.style.maxWidth = typeof a.maxWidth == 'number' ? a.maxWidth + 'px' : a.maxWidth), + a.role ? c.setAttribute('role', a.role) : c.removeAttribute('role'), + (o.content !== a.content || o.allowHTML !== a.allowHTML) && Zr(f, e.props), + a.arrow + ? l + ? o.arrow !== a.arrow && (c.removeChild(l), c.appendChild(Jr(a.arrow))) + : c.appendChild(Jr(a.arrow)) + : l && c.removeChild(l); + } + return { popper: t, onUpdate: i }; +} +Bi.$$tippy = !0; +var ks = 1, + qt = [], + Mn = []; +function Bs(e, t) { + var n = Yr(e, Object.assign({}, xe, ki(Vr(t)))), + r, + i, + o, + a = !1, + s = !1, + c = !1, + f = !1, + l, + v, + b, + _ = [], + A = Kr(Ie, n.interactiveDebounce), + S, + h = ks++, + E = null, + O = _s(n.plugins), + M = { isEnabled: !0, isVisible: !1, isDestroyed: !1, isMounted: !1, isShown: !1 }, + u = { + id: h, + reference: e, + popper: Ct(), + popperInstance: E, + props: n, + state: M, + plugins: O, + clearDelayTimeouts: Be, + setProps: g, + setContent: x, + show: D, + hide: j, + hideWithInteractivity: ne, + enable: le, + disable: ke, + unmount: me, + destroy: En, + }; + if (!n.render) return u; + var I = n.render(u), + m = I.popper, + L = I.onUpdate; + m.setAttribute('data-tippy-root', ''), (m.id = 'tippy-' + u.id), (u.popper = m), (e._tippy = u), (m._tippy = u); + var K = O.map(function (d) { + return d.fn(u); + }), + P = e.hasAttribute('aria-expanded'); + return ( + Le(), + N(), + p(), + y('onCreate', [u]), + n.showOnCreate && $(), + m.addEventListener('mouseenter', function () { + u.props.interactive && u.state.isVisible && u.clearDelayTimeouts(); + }), + m.addEventListener('mouseleave', function () { + u.props.interactive && u.props.trigger.indexOf('mouseenter') >= 0 && U().addEventListener('mousemove', A); + }), + u + ); + function H() { + var d = u.props.touch; + return Array.isArray(d) ? d : [d, 0]; + } + function q() { + return H()[0] === 'hold'; + } + function z() { + var d; + return !!((d = u.props.render) != null && d.$$tippy); + } + function k() { + return S || e; + } + function U() { + var d = k().parentNode; + return d ? ws(d) : document; + } + function Y() { + return $n(m); + } + function te(d) { + return (u.state.isMounted && !u.state.isVisible) || Se.isTouch || (l && l.type === 'focus') + ? 0 + : An(u.props.delay, d ? 0 : 1, xe.delay); + } + function p(d) { + d === void 0 && (d = !1), + (m.style.pointerEvents = u.props.interactive && !d ? '' : 'none'), + (m.style.zIndex = '' + u.props.zIndex); + } + function y(d, w, R) { + if ( + (R === void 0 && (R = !0), + K.forEach(function (B) { + B[d] && B[d].apply(B, w); + }), + R) + ) { + var F; + (F = u.props)[d].apply(F, w); + } + } + function C() { + var d = u.props.aria; + if (d.content) { + var w = 'aria-' + d.content, + R = m.id, + F = ft(u.props.triggerTarget || e); + F.forEach(function (B) { + var oe = B.getAttribute(w); + if (u.state.isVisible) B.setAttribute(w, oe ? oe + ' ' + R : R); + else { + var ge = oe && oe.replace(R, '').trim(); + ge ? B.setAttribute(w, ge) : B.removeAttribute(w); + } + }); + } + } + function N() { + if (!(P || !u.props.aria.expanded)) { + var d = ft(u.props.triggerTarget || e); + d.forEach(function (w) { + u.props.interactive + ? w.setAttribute('aria-expanded', u.state.isVisible && w === k() ? 'true' : 'false') + : w.removeAttribute('aria-expanded'); + }); + } + } + function W() { + U().removeEventListener('mousemove', A), + (qt = qt.filter(function (d) { + return d !== A; + })); + } + function J(d) { + if (!(Se.isTouch && (c || d.type === 'mousedown'))) { + var w = (d.composedPath && d.composedPath()[0]) || d.target; + if (!(u.props.interactive && Gr(m, w))) { + if ( + ft(u.props.triggerTarget || e).some(function (R) { + return Gr(R, w); + }) + ) { + if (Se.isTouch || (u.state.isVisible && u.props.trigger.indexOf('click') >= 0)) return; + } else y('onClickOutside', [u, d]); + u.props.hideOnClick === !0 && + (u.clearDelayTimeouts(), + u.hide(), + (s = !0), + setTimeout(function () { + s = !1; + }), + u.state.isMounted || Z()); + } + } + } + function re() { + c = !0; + } + function se() { + c = !1; + } + function G() { + var d = U(); + d.addEventListener('mousedown', J, !0), + d.addEventListener('touchend', J, Xe), + d.addEventListener('touchstart', se, Xe), + d.addEventListener('touchmove', re, Xe); + } + function Z() { + var d = U(); + d.removeEventListener('mousedown', J, !0), + d.removeEventListener('touchend', J, Xe), + d.removeEventListener('touchstart', se, Xe), + d.removeEventListener('touchmove', re, Xe); + } + function Ce(d, w) { + Re(d, function () { + !u.state.isVisible && m.parentNode && m.parentNode.contains(m) && w(); + }); + } + function de(d, w) { + Re(d, w); + } + function Re(d, w) { + var R = Y().box; + function F(B) { + B.target === R && (Tn(R, 'remove', F), w()); + } + if (d === 0) return w(); + Tn(R, 'remove', v), Tn(R, 'add', F), (v = F); + } + function Oe(d, w, R) { + R === void 0 && (R = !1); + var F = ft(u.props.triggerTarget || e); + F.forEach(function (B) { + B.addEventListener(d, w, R), _.push({ node: B, eventType: d, handler: w, options: R }); + }); + } + function Le() { + q() && (Oe('touchstart', ze, { passive: !0 }), Oe('touchend', Ve, { passive: !0 })), + vs(u.props.trigger).forEach(function (d) { + if (d !== 'manual') + switch ((Oe(d, ze), d)) { + case 'mouseenter': + Oe('mouseleave', Ve); + break; + case 'focus': + Oe(Cs ? 'focusout' : 'blur', ie); + break; + case 'focusin': + Oe('focusout', ie); + break; + } + }); + } + function st() { + _.forEach(function (d) { + var w = d.node, + R = d.eventType, + F = d.handler, + B = d.options; + w.removeEventListener(R, F, B); + }), + (_ = []); + } + function ze(d) { + var w, + R = !1; + if (!(!u.state.isEnabled || qe(d) || s)) { + var F = ((w = l) == null ? void 0 : w.type) === 'focus'; + (l = d), + (S = d.currentTarget), + N(), + !u.state.isVisible && + ms(d) && + qt.forEach(function (B) { + return B(d); + }), + d.type === 'click' && + (u.props.trigger.indexOf('mouseenter') < 0 || a) && + u.props.hideOnClick !== !1 && + u.state.isVisible + ? (R = !0) + : $(d), + d.type === 'click' && (a = !R), + R && !F && he(d); + } + } + function Ie(d) { + var w = d.target, + R = k().contains(w) || m.contains(w); + if (!(d.type === 'mousemove' && R)) { + var F = V() + .concat(m) + .map(function (B) { + var oe, + ge = B._tippy, + ct = (oe = ge.popperInstance) == null ? void 0 : oe.state; + return ct ? { popperRect: B.getBoundingClientRect(), popperState: ct, props: n } : null; + }) + .filter(Boolean); + Os(F, d) && (W(), he(d)); + } + } + function Ve(d) { + var w = qe(d) || (u.props.trigger.indexOf('click') >= 0 && a); + if (!w) { + if (u.props.interactive) { + u.hideWithInteractivity(d); + return; + } + he(d); + } + } + function ie(d) { + (u.props.trigger.indexOf('focusin') < 0 && d.target !== k()) || + (u.props.interactive && d.relatedTarget && m.contains(d.relatedTarget)) || + he(d); + } + function qe(d) { + return Se.isTouch ? q() !== d.type.indexOf('touch') >= 0 : !1; + } + function Pe() { + T(); + var d = u.props, + w = d.popperOptions, + R = d.placement, + F = d.offset, + B = d.getReferenceClientRect, + oe = d.moveTransition, + ge = z() ? $n(m).arrow : null, + ct = B ? { getBoundingClientRect: B, contextElement: B.contextElement || k() } : e, + Lr = { + name: '$$tippy', + enabled: !0, + phase: 'beforeWrite', + requires: ['computeStyles'], + fn: function (Kt) { + var ut = Kt.state; + if (z()) { + var ca = Y(), + On = ca.box; + ['placement', 'reference-hidden', 'escaped'].forEach(function (zt) { + zt === 'placement' + ? On.setAttribute('data-placement', ut.placement) + : ut.attributes.popper['data-popper-' + zt] + ? On.setAttribute('data-' + zt, '') + : On.removeAttribute('data-' + zt); + }), + (ut.attributes.popper = {}); + } + }, + }, + Ge = [ + { name: 'offset', options: { offset: F } }, + { name: 'preventOverflow', options: { padding: { top: 2, bottom: 2, left: 5, right: 5 } } }, + { name: 'flip', options: { padding: 5 } }, + { name: 'computeStyles', options: { adaptive: !oe } }, + Lr, + ]; + z() && ge && Ge.push({ name: 'arrow', options: { element: ge, padding: 3 } }), + Ge.push.apply(Ge, (w == null ? void 0 : w.modifiers) || []), + (u.popperInstance = ps(ct, m, Object.assign({}, w, { placement: R, onFirstUpdate: b, modifiers: Ge }))); + } + function T() { + u.popperInstance && (u.popperInstance.destroy(), (u.popperInstance = null)); + } + function pe() { + var d = u.props.appendTo, + w, + R = k(); + (u.props.interactive && d === Ni) || d === 'parent' ? (w = R.parentNode) : (w = Li(d, [R])), + w.contains(m) || w.appendChild(m), + (u.state.isMounted = !0), + Pe(); + } + function V() { + return on(m.querySelectorAll('[data-tippy-root]')); + } + function $(d) { + u.clearDelayTimeouts(), d && y('onTrigger', [u, d]), G(); + var w = te(!0), + R = H(), + F = R[0], + B = R[1]; + Se.isTouch && F === 'hold' && B && (w = B), + w + ? (r = setTimeout(function () { + u.show(); + }, w)) + : u.show(); + } + function he(d) { + if ((u.clearDelayTimeouts(), y('onUntrigger', [u, d]), !u.state.isVisible)) { + Z(); + return; + } + if ( + !( + u.props.trigger.indexOf('mouseenter') >= 0 && + u.props.trigger.indexOf('click') >= 0 && + ['mouseleave', 'mousemove'].indexOf(d.type) >= 0 && + a + ) + ) { + var w = te(!1); + w + ? (i = setTimeout(function () { + u.state.isVisible && u.hide(); + }, w)) + : (o = requestAnimationFrame(function () { + u.hide(); + })); + } + } + function le() { + u.state.isEnabled = !0; + } + function ke() { + u.hide(), (u.state.isEnabled = !1); + } + function Be() { + clearTimeout(r), clearTimeout(i), cancelAnimationFrame(o); + } + function g(d) { + if (!u.state.isDestroyed) { + y('onBeforeUpdate', [u, d]), st(); + var w = u.props, + R = Yr(e, Object.assign({}, w, Vr(d), { ignoreAttributes: !0 })); + (u.props = R), + Le(), + w.interactiveDebounce !== R.interactiveDebounce && (W(), (A = Kr(Ie, R.interactiveDebounce))), + w.triggerTarget && !R.triggerTarget + ? ft(w.triggerTarget).forEach(function (F) { + F.removeAttribute('aria-expanded'); + }) + : R.triggerTarget && e.removeAttribute('aria-expanded'), + N(), + p(), + L && L(w, R), + u.popperInstance && + (Pe(), + V().forEach(function (F) { + requestAnimationFrame(F._tippy.popperInstance.forceUpdate); + })), + y('onAfterUpdate', [u, d]); + } + } + function x(d) { + u.setProps({ content: d }); + } + function D() { + var d = u.state.isVisible, + w = u.state.isDestroyed, + R = !u.state.isEnabled, + F = Se.isTouch && !u.props.touch, + B = An(u.props.duration, 0, xe.duration); + if (!(d || w || R || F) && !k().hasAttribute('disabled') && (y('onShow', [u], !1), u.props.onShow(u) !== !1)) { + if ( + ((u.state.isVisible = !0), + z() && (m.style.visibility = 'visible'), + p(), + G(), + u.state.isMounted || (m.style.transition = 'none'), + z()) + ) { + var oe = Y(), + ge = oe.box, + ct = oe.content; + Sn([ge, ct], 0); + } + (b = function () { + var Ge; + if (!(!u.state.isVisible || f)) { + if ( + ((f = !0), + m.offsetHeight, + (m.style.transition = u.props.moveTransition), + z() && u.props.animation) + ) { + var wn = Y(), + Kt = wn.box, + ut = wn.content; + Sn([Kt, ut], B), qr([Kt, ut], 'visible'); + } + C(), + N(), + zr(Mn, u), + (Ge = u.popperInstance) == null || Ge.forceUpdate(), + y('onMount', [u]), + u.props.animation && + z() && + de(B, function () { + (u.state.isShown = !0), y('onShown', [u]); + }); + } + }), + pe(); + } + } + function j() { + var d = !u.state.isVisible, + w = u.state.isDestroyed, + R = !u.state.isEnabled, + F = An(u.props.duration, 1, xe.duration); + if (!(d || w || R) && (y('onHide', [u], !1), u.props.onHide(u) !== !1)) { + if ( + ((u.state.isVisible = !1), + (u.state.isShown = !1), + (f = !1), + (a = !1), + z() && (m.style.visibility = 'hidden'), + W(), + Z(), + p(!0), + z()) + ) { + var B = Y(), + oe = B.box, + ge = B.content; + u.props.animation && (Sn([oe, ge], F), qr([oe, ge], 'hidden')); + } + C(), N(), u.props.animation ? z() && Ce(F, u.unmount) : u.unmount(); + } + } + function ne(d) { + U().addEventListener('mousemove', A), zr(qt, A), A(d); + } + function me() { + u.state.isVisible && u.hide(), + u.state.isMounted && + (T(), + V().forEach(function (d) { + d._tippy.unmount(); + }), + m.parentNode && m.parentNode.removeChild(m), + (Mn = Mn.filter(function (d) { + return d !== u; + })), + (u.state.isMounted = !1), + y('onHidden', [u])); + } + function En() { + u.state.isDestroyed || + (u.clearDelayTimeouts(), + u.unmount(), + st(), + delete e._tippy, + (u.state.isDestroyed = !0), + y('onDestroy', [u])); + } +} +function jt(e, t) { + t === void 0 && (t = {}); + var n = xe.plugins.concat(t.plugins || []); + Ts(); + var r = Object.assign({}, t, { plugins: n }), + i = Es(e), + o = i.reduce(function (a, s) { + var c = s && Bs(s, r); + return c && a.push(c), a; + }, []); + return dn(e) ? o[0] : o; +} +jt.defaultProps = xe; +jt.setDefaultProps = Ns; +jt.currentInput = Se; +Object.assign({}, Ei, { + effect: function (t) { + var n = t.state, + r = { + popper: { position: n.options.strategy, left: '0', top: '0', margin: '0' }, + arrow: { position: 'absolute' }, + reference: {}, + }; + Object.assign(n.elements.popper.style, r.popper), + (n.styles = r), + n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow); + }, +}); +jt.setDefaultProps({ render: Bi }); +var jn = !1, + Hn = !1, + Qe = [], + Fn = -1; +function $s(e) { + js(e); +} +function js(e) { + Qe.includes(e) || Qe.push(e), Hs(); +} +function $i(e) { + let t = Qe.indexOf(e); + t !== -1 && t > Fn && Qe.splice(t, 1); +} +function Hs() { + !Hn && !jn && ((jn = !0), queueMicrotask(Fs)); +} +function Fs() { + (jn = !1), (Hn = !0); + for (let e = 0; e < Qe.length; e++) Qe[e](), (Fn = e); + (Qe.length = 0), (Fn = -1), (Hn = !1); +} +var yt, + ot, + mt, + ji, + Un = !0; +function Us(e) { + (Un = !1), e(), (Un = !0); +} +function Ws(e) { + (yt = e.reactive), + (mt = e.release), + (ot = (t) => + e.effect(t, { + scheduler: (n) => { + Un ? $s(n) : n(); + }, + })), + (ji = e.raw); +} +function Qr(e) { + ot = e; +} +function Ks(e) { + let t = () => {}; + return [ + (r) => { + let i = ot(r); + return ( + e._x_effects || + ((e._x_effects = new Set()), + (e._x_runEffects = () => { + e._x_effects.forEach((o) => o()); + })), + e._x_effects.add(i), + (t = () => { + i !== void 0 && (e._x_effects.delete(i), mt(i)); + }), + i + ); + }, + () => { + t(); + }, + ]; +} +function Hi(e, t) { + let n = !0, + r, + i = ot(() => { + let o = e(); + JSON.stringify(o), + n + ? (r = o) + : queueMicrotask(() => { + t(o, r), (r = o); + }), + (n = !1); + }); + return () => mt(i); +} +var Fi = [], + Ui = [], + Wi = []; +function zs(e) { + Wi.push(e); +} +function lr(e, t) { + typeof t == 'function' ? (e._x_cleanups || (e._x_cleanups = []), e._x_cleanups.push(t)) : ((t = e), Ui.push(t)); +} +function Ki(e) { + Fi.push(e); +} +function zi(e, t, n) { + e._x_attributeCleanups || (e._x_attributeCleanups = {}), + e._x_attributeCleanups[t] || (e._x_attributeCleanups[t] = []), + e._x_attributeCleanups[t].push(n); +} +function Vi(e, t) { + e._x_attributeCleanups && + Object.entries(e._x_attributeCleanups).forEach(([n, r]) => { + (t === void 0 || t.includes(n)) && (r.forEach((i) => i()), delete e._x_attributeCleanups[n]); + }); +} +function Vs(e) { + if (e._x_cleanups) for (; e._x_cleanups.length; ) e._x_cleanups.pop()(); +} +var fr = new MutationObserver(gr), + dr = !1; +function pr() { + fr.observe(document, { subtree: !0, childList: !0, attributes: !0, attributeOldValue: !0 }), (dr = !0); +} +function qi() { + qs(), fr.disconnect(), (dr = !1); +} +var wt = []; +function qs() { + let e = fr.takeRecords(); + wt.push(() => e.length > 0 && gr(e)); + let t = wt.length; + queueMicrotask(() => { + if (wt.length === t) for (; wt.length > 0; ) wt.shift()(); + }); +} +function ee(e) { + if (!dr) return e(); + qi(); + let t = e(); + return pr(), t; +} +var hr = !1, + an = []; +function Gs() { + hr = !0; +} +function Xs() { + (hr = !1), gr(an), (an = []); +} +function gr(e) { + if (hr) { + an = an.concat(e); + return; + } + let t = new Set(), + n = new Set(), + r = new Map(), + i = new Map(); + for (let o = 0; o < e.length; o++) + if ( + !e[o].target._x_ignoreMutationObserver && + (e[o].type === 'childList' && + (e[o].addedNodes.forEach((a) => a.nodeType === 1 && t.add(a)), + e[o].removedNodes.forEach((a) => a.nodeType === 1 && n.add(a))), + e[o].type === 'attributes') + ) { + let a = e[o].target, + s = e[o].attributeName, + c = e[o].oldValue, + f = () => { + r.has(a) || r.set(a, []), r.get(a).push({ name: s, value: a.getAttribute(s) }); + }, + l = () => { + i.has(a) || i.set(a, []), i.get(a).push(s); + }; + a.hasAttribute(s) && c === null ? f() : a.hasAttribute(s) ? (l(), f()) : l(); + } + i.forEach((o, a) => { + Vi(a, o); + }), + r.forEach((o, a) => { + Fi.forEach((s) => s(a, o)); + }); + for (let o of n) t.has(o) || Ui.forEach((a) => a(o)); + t.forEach((o) => { + (o._x_ignoreSelf = !0), (o._x_ignore = !0); + }); + for (let o of t) + n.has(o) || + (o.isConnected && + (delete o._x_ignoreSelf, + delete o._x_ignore, + Wi.forEach((a) => a(o)), + (o._x_ignore = !0), + (o._x_ignoreSelf = !0))); + t.forEach((o) => { + delete o._x_ignoreSelf, delete o._x_ignore; + }), + (t = null), + (n = null), + (r = null), + (i = null); +} +function Gi(e) { + return Ft(vt(e)); +} +function Ht(e, t, n) { + return ( + (e._x_dataStack = [t, ...vt(n || e)]), + () => { + e._x_dataStack = e._x_dataStack.filter((r) => r !== t); + } + ); +} +function vt(e) { + return e._x_dataStack + ? e._x_dataStack + : typeof ShadowRoot == 'function' && e instanceof ShadowRoot + ? vt(e.host) + : e.parentNode + ? vt(e.parentNode) + : []; +} +function Ft(e) { + return new Proxy({ objects: e }, Ys); +} +var Ys = { + ownKeys({ objects: e }) { + return Array.from(new Set(e.flatMap((t) => Object.keys(t)))); + }, + has({ objects: e }, t) { + return t == Symbol.unscopables + ? !1 + : e.some((n) => Object.prototype.hasOwnProperty.call(n, t) || Reflect.has(n, t)); + }, + get({ objects: e }, t, n) { + return t == 'toJSON' ? Js : Reflect.get(e.find((r) => Reflect.has(r, t)) || {}, t, n); + }, + set({ objects: e }, t, n, r) { + const i = e.find((a) => Object.prototype.hasOwnProperty.call(a, t)) || e[e.length - 1], + o = Object.getOwnPropertyDescriptor(i, t); + return o != null && o.set && o != null && o.get ? Reflect.set(i, t, n, r) : Reflect.set(i, t, n); + }, +}; +function Js() { + return Reflect.ownKeys(this).reduce((t, n) => ((t[n] = Reflect.get(this, n)), t), {}); +} +function Xi(e) { + let t = (r) => typeof r == 'object' && !Array.isArray(r) && r !== null, + n = (r, i = '') => { + Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([o, { value: a, enumerable: s }]) => { + if (s === !1 || a === void 0 || (typeof a == 'object' && a !== null && a.__v_skip)) return; + let c = i === '' ? o : `${i}.${o}`; + typeof a == 'object' && a !== null && a._x_interceptor + ? (r[o] = a.initialize(e, c, o)) + : t(a) && a !== r && !(a instanceof Element) && n(a, c); + }); + }; + return n(e); +} +function Yi(e, t = () => {}) { + let n = { + initialValue: void 0, + _x_interceptor: !0, + initialize(r, i, o) { + return e( + this.initialValue, + () => Zs(r, i), + (a) => Wn(r, i, a), + i, + o + ); + }, + }; + return ( + t(n), + (r) => { + if (typeof r == 'object' && r !== null && r._x_interceptor) { + let i = n.initialize.bind(n); + n.initialize = (o, a, s) => { + let c = r.initialize(o, a, s); + return (n.initialValue = c), i(o, a, s); + }; + } else n.initialValue = r; + return n; + } + ); +} +function Zs(e, t) { + return t.split('.').reduce((n, r) => n[r], e); +} +function Wn(e, t, n) { + if ((typeof t == 'string' && (t = t.split('.')), t.length === 1)) e[t[0]] = n; + else { + if (t.length === 0) throw error; + return e[t[0]] || (e[t[0]] = {}), Wn(e[t[0]], t.slice(1), n); + } +} +var Ji = {}; +function we(e, t) { + Ji[e] = t; +} +function Kn(e, t) { + return ( + Object.entries(Ji).forEach(([n, r]) => { + let i = null; + function o() { + if (i) return i; + { + let [a, s] = ro(t); + return (i = { interceptor: Yi, ...a }), lr(t, s), i; + } + } + Object.defineProperty(e, `$${n}`, { + get() { + return r(t, o()); + }, + enumerable: !1, + }); + }), + e + ); +} +function Qs(e, t, n, ...r) { + try { + return n(...r); + } catch (i) { + Lt(i, e, t); + } +} +function Lt(e, t, n = void 0) { + (e = Object.assign(e ?? { message: 'No error message given.' }, { el: t, expression: n })), + console.warn( + `Alpine Expression Error: ${e.message} -${n?'Expression: "'+n+`" +${ + n + ? 'Expression: "' + + n + + `" -`:""}`,t),setTimeout(()=>{throw e},0)}var tn=!0;function Zi(e){let t=tn;tn=!1;let n=e();return tn=t,n}function et(e,t,n={}){let r;return ae(e,t)(i=>r=i,n),r}function ae(...e){return Qi(...e)}var Qi=eo;function ec(e){Qi=e}function eo(e,t){let n={};Kn(n,e);let r=[n,...vt(e)],i=typeof t=="function"?tc(r,t):rc(r,t,e);return Qs.bind(null,e,t,i)}function tc(e,t){return(n=()=>{},{scope:r={},params:i=[]}={})=>{let o=t.apply(Ft([r,...e]),i);sn(n,o)}}var Cn={};function nc(e,t){if(Cn[e])return Cn[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let a=new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Object.defineProperty(a,"name",{value:`[Alpine] ${e}`}),a}catch(a){return Lt(a,t,e),Promise.resolve()}})();return Cn[e]=o,o}function rc(e,t,n){let r=nc(t,n);return(i=()=>{},{scope:o={},params:a=[]}={})=>{r.result=void 0,r.finished=!1;let s=Ft([o,...e]);if(typeof r=="function"){let c=r(r,s).catch(f=>Lt(f,n,t));r.finished?(sn(i,r.result,s,a,n),r.result=void 0):c.then(f=>{sn(i,f,s,a,n)}).catch(f=>Lt(f,n,t)).finally(()=>r.result=void 0)}}}function sn(e,t,n,r,i){if(tn&&typeof t=="function"){let o=t.apply(n,r);o instanceof Promise?o.then(a=>sn(e,a,n,r)).catch(a=>Lt(a,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var vr="x-";function xt(e=""){return vr+e}function ic(e){vr=e}var cn={};function Q(e,t){return cn[e]=t,{before(n){if(!cn[n]){console.warn(String.raw`Cannot find directive \`${n}\`. \`${e}\` will use the default order of execution`);return}const r=Je.indexOf(n);Je.splice(r>=0?r:Je.indexOf("DEFAULT"),0,e)}}}function oc(e){return Object.keys(cn).includes(e)}function _r(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,c])=>({name:s,value:c})),a=to(o);o=o.map(s=>a.find(c=>c.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let r={};return t.map(ao((o,a)=>r[o]=a)).filter(co).map(cc(r,n)).sort(uc).map(o=>sc(e,o))}function to(e){return Array.from(e).map(ao()).filter(t=>!co(t))}var zn=!1,St=new Map,no=Symbol();function ac(e){zn=!0;let t=Symbol();no=t,St.set(t,[]);let n=()=>{for(;St.get(t).length;)St.get(t).shift()();St.delete(t)},r=()=>{zn=!1,n()};e(n),r()}function ro(e){let t=[],n=s=>t.push(s),[r,i]=Ks(e);return t.push(i),[{Alpine:Wt,effect:r,cleanup:n,evaluateLater:ae.bind(ae,e),evaluate:et.bind(et,e)},()=>t.forEach(s=>s())]}function sc(e,t){let n=()=>{},r=cn[t.type]||n,[i,o]=ro(e);zi(e,t.original,o);let a=()=>{e._x_ignore||e._x_ignoreSelf||(r.inline&&r.inline(e,t,i),r=r.bind(r,e,t,i),zn?St.get(no).push(r):r())};return a.runCleanups=o,a}var io=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r}),oo=e=>e;function ao(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:i}=so.reduce((o,a)=>a(o),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:i}}}var so=[];function br(e){so.push(e)}function co({name:e}){return uo().test(e)}var uo=()=>new RegExp(`^${vr}([^:^.]+)\\b`);function cc(e,t){return({name:n,value:r})=>{let i=n.match(uo()),o=n.match(/:([a-zA-Z0-9\-_:]+)/),a=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[n]||n;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:a.map(c=>c.replace(".","")),expression:r,original:s}}}var Vn="DEFAULT",Je=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Vn,"teleport"];function uc(e,t){let n=Je.indexOf(e.type)===-1?Vn:e.type,r=Je.indexOf(t.type)===-1?Vn:t.type;return Je.indexOf(n)-Je.indexOf(r)}function Rt(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function He(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>He(i,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)He(r,t),r=r.nextElementSibling}function ve(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var ei=!1;function lc(){ei&&ve("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),ei=!0,document.body||ve("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php index 1cd471a55b9a..ce4daad041f1 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php @@ -1,14 +1,21 @@ -
+
-
- +
+
- + {{ $exception->title() }}
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php index a8e60f3bfeed..000446321c2c 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php @@ -1,27 +1,25 @@ From 92bd3ee11ae3a576564c13597942cdebfb08537e Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 30 Apr 2024 18:04:26 +0100 Subject: [PATCH 57/91] Improves code --- .../resources/exceptions/renderer/components/editor.blade.php | 3 +-- .../resources/exceptions/renderer/components/trace.blade.php | 3 +-- .../Foundation/resources/exceptions/renderer/dist/styles.css | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php index c9ea957b9c8e..cc3de2e81566 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php @@ -14,8 +14,7 @@ class="sm:col-span-2"
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php index d057e76a96f8..f82443e056c6 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php @@ -1,7 +1,6 @@
From de630d874353ab1b4fe0c83ac874d12a84e08034 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 1 May 2024 18:15:17 +0100 Subject: [PATCH 74/91] Allows to open on editor --- .../Foundation/Exceptions/Renderer/Frame.php | 13 +++++++++++++ .../exceptions/renderer/components/editor.blade.php | 10 +++++++++- .../resources/exceptions/renderer/dist/styles.css | 2 +- .../resources/exceptions/renderer/scripts.js | 1 + 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php index 35d7aa7f1b61..25e057ddad13 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Frame.php @@ -2,10 +2,13 @@ namespace Illuminate\Foundation\Exceptions\Renderer; +use Illuminate\Foundation\Concerns\ResolvesDumpSource; use Symfony\Component\ErrorHandler\Exception\FlattenException; class Frame { + use ResolvesDumpSource; + /** * The "flatten" exception instance. * @@ -64,6 +67,16 @@ public function source() }; } + /** + * Get the frame's editor link. + * + * @return string + */ + public function editorHref() + { + return $this->resolveSourceHref($this->frame['file'], $this->frame['line']); + } + /** * Get the frame class, if any. * diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php index cc3de2e81566..94ae4b4681d7 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php @@ -6,7 +6,15 @@ class="sm:col-span-2"
- {{ $frame->file() }} + + @if (config('app.editor')) + + {{ $frame->file() }} + + @else + {{ $frame->file() }} + @endif + :{{ $frame->line() }}
diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/styles.css b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/styles.css index 70214a63942a..26f8ecbb3861 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/styles.css +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/styles.css @@ -1 +1 @@ -.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}.tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}.tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}.tippy-box[data-animation=scale][data-placement^=left]{transform-origin:right}.tippy-box[data-animation=scale][data-placement^=right]{transform-origin:left}.tippy-box[data-animation=scale][data-state=hidden]{transform:scale(.5);opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Figtree,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;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{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.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}}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.z-10{z-index:10}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.-mt-2{margin-top:-.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[32\.5rem\]{height:32.5rem}.h-\[35\.5rem\]{height:35.5rem}.max-h-32{max-height:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\[8rem\]{width:8rem}.w-full{width:100%}.min-w-0{min-width:0px}.flex-none{flex:none}.flex-grow{flex-grow:1}.origin-top-right{transform-origin:top right}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.border-l-red-500{--tw-border-opacity:1;border-left-color:rgb(239 68 68 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-200\/80{background-color:#e5e7ebcc}.bg-red-500\/20{background-color:#ef444433}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-red-500{fill:#ef4444}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-12{padding-bottom:3rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Figtree,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--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(1px + 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)}.ring-gray-900\/5{--tw-ring-color:rgb(17 24 39 / .05)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[x-cloak]{display:none}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}table.hljs-ln{color:inherit;font-size:inherit;border-spacing:2px}pre code.hljs{background:none;padding:.5em 0 0;width:100%}.hljs-ln-line{white-space-collapse:preserve;text-wrap:nowrap}.trace{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 4rem),transparent)}.scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;overflow-x:scroll}.scrollbar-hidden::-webkit-scrollbar{-webkit-appearance:none;width:0;height:0}.hljs-ln .hljs-ln-numbers{padding:5px;border-right-color:transparent;margin-right:5px}.hljs-ln-n{width:50px}.hljs-ln-numbers{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center;border-right:1px solid #ccc;vertical-align:top;padding-right:5px}.hljs-ln-code{width:100%;padding-left:10px;padding-right:10px}.hljs-ln-code:hover{background-color:#ef444433}.default\:col-span-full:default{grid-column:1 / -1}.default\:row-span-1:default{grid-row:span 1 / span 1}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f3f4f6bf}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-500:focus{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border:is(.dark *){border-width:1px}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-l-red-500:is(.dark *){--tw-border-opacity:1;border-left-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-900\/80:is(.dark *){background-color:#111827cc}.dark\:bg-gray-950\/95:is(.dark *){background-color:#030712f2}.dark\:bg-red-500\/20:is(.dark *){background-color:#ef444433}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-950:is(.dark *){--tw-text-opacity:1;color:rgb(3 7 18 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:ring-1:is(.dark *){--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(1px + 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)}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800\/75:hover:is(.dark *){background-color:#1f2937bf}.dark\:hover\:text-gray-500:hover:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:focus\:text-gray-500:focus:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mt-10{margin-top:2.5rem}.sm\:gap-6{gap:1.5rem}.sm\:p-12{padding:3rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 768px){.md\:block{display:block}.md\:inline-block{display:inline-block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-w-64{min-width:16rem}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-2{gap:.5rem}}@media (min-width: 1024px){.lg\:block{display:block}.lg\:inline-block{display:inline-block}.lg\:w-\[12rem\]{width:12rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-base{font-size:1rem;line-height:1.5rem}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}.default\:lg\:col-span-6:default{grid-column:span 6 / span 6}} +.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}.tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}.tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}.tippy-box[data-animation=scale][data-placement^=left]{transform-origin:right}.tippy-box[data-animation=scale][data-placement^=right]{transform-origin:left}.tippy-box[data-animation=scale][data-state=hidden]{transform:scale(.5);opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Figtree,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;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{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.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}}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.z-10{z-index:10}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.-mt-2{margin-top:-.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[32\.5rem\]{height:32.5rem}.h-\[35\.5rem\]{height:35.5rem}.max-h-32{max-height:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\[8rem\]{width:8rem}.w-full{width:100%}.min-w-0{min-width:0px}.flex-none{flex:none}.flex-grow{flex-grow:1}.origin-top-right{transform-origin:top right}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-transparent{border-color:transparent}.border-l-red-500{--tw-border-opacity:1;border-left-color:rgb(239 68 68 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-200\/80{background-color:#e5e7ebcc}.bg-red-500\/20{background-color:#ef444433}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-red-500{fill:#ef4444}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-12{padding-bottom:3rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Figtree,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--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(1px + 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)}.ring-gray-900\/5{--tw-ring-color:rgb(17 24 39 / .05)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[x-cloak]{display:none}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}table.hljs-ln{color:inherit;font-size:inherit;border-spacing:2px}pre code.hljs{background:none;padding:.5em 0 0;width:100%}.hljs-ln-line{white-space-collapse:preserve;text-wrap:nowrap}.trace{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 4rem),transparent)}.scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;overflow-x:scroll}.scrollbar-hidden::-webkit-scrollbar{-webkit-appearance:none;width:0;height:0}.hljs-ln .hljs-ln-numbers{padding:5px;border-right-color:transparent;margin-right:5px}.hljs-ln-n{width:50px}.hljs-ln-numbers{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center;border-right:1px solid #ccc;vertical-align:top;padding-right:5px}.hljs-ln-code{width:100%;padding-left:10px;padding-right:10px}.hljs-ln-code:hover{background-color:#ef444433}.default\:col-span-full:default{grid-column:1 / -1}.default\:row-span-1:default{grid-row:span 1 / span 1}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f3f4f6bf}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:text-gray-500:focus{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border:is(.dark *){border-width:1px}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-l-red-500:is(.dark *){--tw-border-opacity:1;border-left-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-900\/80:is(.dark *){background-color:#111827cc}.dark\:bg-gray-950\/95:is(.dark *){background-color:#030712f2}.dark\:bg-red-500\/20:is(.dark *){background-color:#ef444433}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-950:is(.dark *){--tw-text-opacity:1;color:rgb(3 7 18 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:ring-1:is(.dark *){--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(1px + 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)}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800\/75:hover:is(.dark *){background-color:#1f2937bf}.dark\:hover\:text-gray-500:hover:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:focus\:text-gray-500:focus:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mt-10{margin-top:2.5rem}.sm\:gap-6{gap:1.5rem}.sm\:p-12{padding:3rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 768px){.md\:block{display:block}.md\:inline-block{display:inline-block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-w-64{min-width:16rem}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-2{gap:.5rem}}@media (min-width: 1024px){.lg\:block{display:block}.lg\:inline-block{display:inline-block}.lg\:w-\[12rem\]{width:12rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-base{font-size:1rem;line-height:1.5rem}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}.default\:lg\:col-span-6:default{grid-column:span 6 / span 6}} diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js b/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js index cb84cf1abf08..740aae0bf7bc 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js @@ -23,3 +23,4 @@ tippy('[data-tippy-content]', { theme: 'material', animation: 'scale', }); + From c18ef5a4a2c8406f33fbd7d4c39e4ee2030672c0 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 1 May 2024 17:15:46 +0000 Subject: [PATCH 75/91] Apply fixes from StyleCI --- .../Foundation/resources/exceptions/renderer/scripts.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js b/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js index 740aae0bf7bc..cb84cf1abf08 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js @@ -23,4 +23,3 @@ tippy('[data-tippy-content]', { theme: 'material', animation: 'scale', }); - From 46d8c723bad0b57c7147a4e58145b40bbcdf7f69 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 1 May 2024 19:35:49 +0100 Subject: [PATCH 76/91] Adds context about routing --- .../Exceptions/Renderer/Exception.php | 35 +++++++++- .../renderer/components/context.blade.php | 67 ++++++++++++++++++- 2 files changed, 97 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php index 14e4cd2154bf..b3c745a63281 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Exception.php @@ -162,11 +162,42 @@ public function requestHeaders() } /** - * Get the SQL queries that caused the exception. + * Get the application route context that caused the exception. + * + * @return array|null + */ + public function applicationRouteContext() + { + $route = $this->request()->route(); + + return $route ? array_filter([ + 'controller' => $route->getActionName(), + 'route name' => $route->getName() ?: null, + 'middleware' => implode(', ', $route->gatherMiddleware()), + ]) : null; + } + + /** + * Get the application route parameters context that caused the exception. + * + * @return array|null + */ + public function applicationRouteParametersContext() + { + $parameters = $this->request()->route()->parameters(); + + return $parameters ? json_encode(array_map( + fn ($value) => $value instanceof Model ? $value->withoutRelations() : $value, + $parameters + ), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) : null; + } + + /** + * Get the application SQL queries that caused the exception. * * @return array */ - public function queries() + public function applicationQueries() { return array_map(function (array $query) { $sql = $query['sql']; diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php index 896bd777905e..e1ec31ef49be 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php @@ -60,17 +60,78 @@ class="overflow-y-hidden scrollbar-hidden overflow-x-scroll scrollbar-hidden-x"
+ + + +
+ Application +
+ +
+ Routing +
+ +
+ @forelse ($exception->applicationRouteContext() as $name => $value) +
+ {{ $name }} + +
{{ $value }}
+
+
+ @empty + +
No routing data
+
+ @endforelse +
+ + @if ($routeParametersContext = $exception->applicationRouteParametersContext()) +
+ Routing Parameters +
+ +
+
+ +
{!! $routeParametersContext !!}
+
+
+
+ @endif +
- Queries + Database Queries - @if (count($exception->queries()) === 100) + @if (count($exception->applicationQueries()) === 100) only the first 100 queries are displayed @endif
- @forelse ($exception->queries() as ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time]) + @forelse ($exception->applicationQueries() as ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time])
{{ $connectionName }} From 9c6ad796c5ec72090dbd39614c2aaef63342cad8 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 1 May 2024 19:46:35 +0100 Subject: [PATCH 77/91] Rebuilds scripts --- .../resources/exceptions/renderer/dist/scripts.js | 2 +- .../Foundation/resources/exceptions/renderer/scripts.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js index 3388b6914c85..879fcdcda7da 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js @@ -4,4 +4,4 @@ ${n?'Expression: "'+n+`" `:""}`,t),setTimeout(()=>{throw e},0)}var tn=!0;function Zi(e){let t=tn;tn=!1;let n=e();return tn=t,n}function et(e,t,n={}){let r;return ae(e,t)(i=>r=i,n),r}function ae(...e){return Qi(...e)}var Qi=eo;function ec(e){Qi=e}function eo(e,t){let n={};Kn(n,e);let r=[n,...vt(e)],i=typeof t=="function"?tc(r,t):rc(r,t,e);return Qs.bind(null,e,t,i)}function tc(e,t){return(n=()=>{},{scope:r={},params:i=[]}={})=>{let o=t.apply(Ft([r,...e]),i);sn(n,o)}}var Cn={};function nc(e,t){if(Cn[e])return Cn[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let a=new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Object.defineProperty(a,"name",{value:`[Alpine] ${e}`}),a}catch(a){return Lt(a,t,e),Promise.resolve()}})();return Cn[e]=o,o}function rc(e,t,n){let r=nc(t,n);return(i=()=>{},{scope:o={},params:a=[]}={})=>{r.result=void 0,r.finished=!1;let s=Ft([o,...e]);if(typeof r=="function"){let c=r(r,s).catch(f=>Lt(f,n,t));r.finished?(sn(i,r.result,s,a,n),r.result=void 0):c.then(f=>{sn(i,f,s,a,n)}).catch(f=>Lt(f,n,t)).finally(()=>r.result=void 0)}}}function sn(e,t,n,r,i){if(tn&&typeof t=="function"){let o=t.apply(n,r);o instanceof Promise?o.then(a=>sn(e,a,n,r)).catch(a=>Lt(a,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var vr="x-";function xt(e=""){return vr+e}function ic(e){vr=e}var cn={};function Q(e,t){return cn[e]=t,{before(n){if(!cn[n]){console.warn(String.raw`Cannot find directive \`${n}\`. \`${e}\` will use the default order of execution`);return}const r=Je.indexOf(n);Je.splice(r>=0?r:Je.indexOf("DEFAULT"),0,e)}}}function oc(e){return Object.keys(cn).includes(e)}function _r(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,c])=>({name:s,value:c})),a=to(o);o=o.map(s=>a.find(c=>c.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let r={};return t.map(ao((o,a)=>r[o]=a)).filter(co).map(cc(r,n)).sort(uc).map(o=>sc(e,o))}function to(e){return Array.from(e).map(ao()).filter(t=>!co(t))}var zn=!1,St=new Map,no=Symbol();function ac(e){zn=!0;let t=Symbol();no=t,St.set(t,[]);let n=()=>{for(;St.get(t).length;)St.get(t).shift()();St.delete(t)},r=()=>{zn=!1,n()};e(n),r()}function ro(e){let t=[],n=s=>t.push(s),[r,i]=Ks(e);return t.push(i),[{Alpine:Wt,effect:r,cleanup:n,evaluateLater:ae.bind(ae,e),evaluate:et.bind(et,e)},()=>t.forEach(s=>s())]}function sc(e,t){let n=()=>{},r=cn[t.type]||n,[i,o]=ro(e);zi(e,t.original,o);let a=()=>{e._x_ignore||e._x_ignoreSelf||(r.inline&&r.inline(e,t,i),r=r.bind(r,e,t,i),zn?St.get(no).push(r):r())};return a.runCleanups=o,a}var io=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r}),oo=e=>e;function ao(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:i}=so.reduce((o,a)=>a(o),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:i}}}var so=[];function br(e){so.push(e)}function co({name:e}){return uo().test(e)}var uo=()=>new RegExp(`^${vr}([^:^.]+)\\b`);function cc(e,t){return({name:n,value:r})=>{let i=n.match(uo()),o=n.match(/:([a-zA-Z0-9\-_:]+)/),a=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[n]||n;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:a.map(c=>c.replace(".","")),expression:r,original:s}}}var Vn="DEFAULT",Je=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Vn,"teleport"];function uc(e,t){let n=Je.indexOf(e.type)===-1?Vn:e.type,r=Je.indexOf(t.type)===-1?Vn:t.type;return Je.indexOf(n)-Je.indexOf(r)}function Rt(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function He(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>He(i,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)He(r,t),r=r.nextElementSibling}function ve(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var ei=!1;function lc(){ei&&ve("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),ei=!0,document.body||ve("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` From 821d599d0fcde96fcd0bf6c3e518e62a670b51cc Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 1 May 2024 22:11:19 +0100 Subject: [PATCH 83/91] Styling --- .../resources/exceptions/renderer/components/editor.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php index 357404282ab7..274083fb4786 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/editor.blade.php @@ -20,10 +20,10 @@ class="sm:col-span-2"
-
Only the first 100 queries are displayed