diff --git a/app/Http/Controllers/V1/User/OrderController.php b/app/Http/Controllers/V1/User/OrderController.php index a0022a2..6ad6742 100755 --- a/app/Http/Controllers/V1/User/OrderController.php +++ b/app/Http/Controllers/V1/User/OrderController.php @@ -14,6 +14,7 @@ use App\Services\CouponService; use App\Services\OrderService; use App\Services\PaymentService; use App\Services\PlanService; +use App\Services\Plugin\HookManager; use App\Services\UserService; use App\Utils\Helper; use Illuminate\Http\Request; @@ -112,6 +113,7 @@ class OrderController extends Controller if (!$order->save()) { throw new ApiException(__('Failed to create order')); } + HookManager::call('order.after_create', $order); return $this->success($order->trade_no); }); diff --git a/app/Http/Controllers/V2/Admin/PluginController.php b/app/Http/Controllers/V2/Admin/PluginController.php new file mode 100644 index 0000000..de78e3c --- /dev/null +++ b/app/Http/Controllers/V2/Admin/PluginController.php @@ -0,0 +1,195 @@ +pluginManager = $pluginManager; + $this->configService = $configService; + } + + /** + * 获取插件列表 + */ + public function index() + { + $installedPlugins = Plugin::get() + ->keyBy('code') + ->toArray(); + $pluginPath = base_path('plugins'); + $plugins = []; + + if (File::exists($pluginPath)) { + $directories = File::directories($pluginPath); + foreach ($directories as $directory) { + $pluginName = basename($directory); + $configFile = $directory . '/config.json'; + if (File::exists($configFile)) { + $config = json_decode(File::get($configFile), true); + $installed = isset($installedPlugins[$pluginName]); + // 使用配置服务获取配置 + $pluginConfig = $installed ? $this->configService->getConfig($pluginName) : ($config['config'] ?? []); + $plugins[] = [ + 'code' => $config['code'], + 'name' => $config['name'], + 'version' => $config['version'], + 'description' => $config['description'], + 'author' => $config['author'], + 'is_installed' => $installed, + 'is_enabled' => $installed ? $installedPlugins[$pluginName]['is_enabled'] : false, + 'config' => $pluginConfig, + ]; + } + } + } + + return response()->json([ + 'data' => $plugins + ]); + } + + /** + * 安装插件 + */ + public function install(Request $request) + { + $request->validate([ + 'code' => 'required|string' + ]); + + try { + $this->pluginManager->install($request->input('code')); + return response()->json([ + 'message' => '插件安装成功' + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '插件安装失败:' . $e->getMessage() + ], 400); + } + } + + /** + * 卸载插件 + */ + public function uninstall(Request $request) + { + $request->validate([ + 'code' => 'required|string' + ]); + + try { + $this->pluginManager->uninstall($request->input('code')); + return response()->json([ + 'message' => '插件卸载成功' + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '插件卸载失败:' . $e->getMessage() + ], 400); + } + } + + /** + * 启用插件 + */ + public function enable(Request $request) + { + $request->validate([ + 'code' => 'required|string' + ]); + + try { + $this->pluginManager->enable($request->input('code')); + return response()->json([ + 'message' => '插件启用成功' + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '插件启用失败:' . $e->getMessage() + ], 400); + } + } + + /** + * 禁用插件 + */ + public function disable(Request $request) + { + $request->validate([ + 'code' => 'required|string' + ]); + + try { + $this->pluginManager->disable($request->input('code')); + return response()->json([ + 'message' => '插件禁用成功' + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '插件禁用失败:' . $e->getMessage() + ], 400); + } + } + + /** + * 获取插件配置 + */ + public function getConfig(Request $request) + { + $request->validate([ + 'code' => 'required|string' + ]); + + try { + $config = $this->configService->getConfig($request->input('code')); + return response()->json([ + 'data' => $config + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '获取配置失败:' . $e->getMessage() + ], 400); + } + } + + /** + * 更新插件配置 + */ + public function updateConfig(Request $request) + { + $request->validate([ + 'code' => 'required|string', + 'config' => 'required|array' + ]); + + try { + $this->configService->updateConfig( + $request->input('code'), + $request->input('config') + ); + + return response()->json([ + 'message' => '配置更新成功' + ]); + } catch (\Exception $e) { + return response()->json([ + 'message' => '配置更新失败:' . $e->getMessage() + ], 400); + } + } +} \ No newline at end of file diff --git a/app/Http/Routes/V2/AdminRoute.php b/app/Http/Routes/V2/AdminRoute.php index 0eb522b..6e48edd 100644 --- a/app/Http/Routes/V2/AdminRoute.php +++ b/app/Http/Routes/V2/AdminRoute.php @@ -17,6 +17,7 @@ use App\Http\Controllers\V2\Admin\PaymentController; use App\Http\Controllers\V2\Admin\SystemController; use App\Http\Controllers\V2\Admin\ThemeController; use Illuminate\Contracts\Routing\Registrar; +use Illuminate\Support\Facades\Route; class AdminRoute { @@ -202,6 +203,20 @@ class AdminRoute $router->post('/saveThemeConfig', [ThemeController::class, 'saveThemeConfig']); $router->post('/getThemeConfig', [ThemeController::class, 'getThemeConfig']); }); + + // Plugin + $router->group([ + 'prefix' => 'plugin' + ], function ($router) { + $router->get('/getPlugins', [\App\Http\Controllers\V2\Admin\PluginController::class, 'index']); + $router->post('install', [\App\Http\Controllers\V2\Admin\PluginController::class, 'install']); + $router->post('uninstall', [\App\Http\Controllers\V2\Admin\PluginController::class, 'uninstall']); + $router->post('enable', [\App\Http\Controllers\V2\Admin\PluginController::class, 'enable']); + $router->post('disable', [\App\Http\Controllers\V2\Admin\PluginController::class, 'disable']); + $router->get('config', [\App\Http\Controllers\V2\Admin\PluginController::class, 'getConfig']); + $router->post('config', [\App\Http\Controllers\V2\Admin\PluginController::class, 'updateConfig']); + }); }); + } } diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php new file mode 100644 index 0000000..4926c42 --- /dev/null +++ b/app/Models/Plugin.php @@ -0,0 +1,16 @@ +app->scoped(PluginManager::class, function ($app) { + return new PluginManager(); + }); + } + + public function boot(): void + { + + if (!file_exists(base_path('plugins'))) { + mkdir(base_path('plugins'), 0755, true); + } + + try { + $plugins = Plugin::query() + ->where('is_enabled', true) + ->get(); + + foreach ($plugins as $plugin) { + $manager = $this->app->make(PluginManager::class); + $manager->enable($plugin->code); + + } + } catch (\Exception $e) { + \Log::error('Failed to load plugins: ' . $e->getMessage()); + } + } +} \ No newline at end of file diff --git a/app/Services/Plugin/AbstractPlugin.php b/app/Services/Plugin/AbstractPlugin.php new file mode 100644 index 0000000..94caa20 --- /dev/null +++ b/app/Services/Plugin/AbstractPlugin.php @@ -0,0 +1,56 @@ +config = $config; + } + + /** + * 获取配置 + */ + public function getConfig(): array + { + return $this->config; + } + + /** + * 注册事件监听器 + */ + protected function listen(string $hook, callable $callback): void + { + HookManager::register($hook, $callback); + } + + /** + * 移除事件监听器 + */ + protected function removeListener(string $hook): void + { + HookManager::remove($hook); + } +} \ No newline at end of file diff --git a/app/Services/Plugin/HookManager.php b/app/Services/Plugin/HookManager.php new file mode 100644 index 0000000..0edc69c --- /dev/null +++ b/app/Services/Plugin/HookManager.php @@ -0,0 +1,43 @@ +getDefaultConfig($pluginCode); + if (empty($defaultConfig)) { + return []; + } + $dbConfig = $this->getDbConfig($pluginCode); + + $result = []; + foreach ($defaultConfig as $key => $item) { + $result[$key] = [ + 'type' => $item['type'], + 'label' => $item['label'] ?? '', + 'placeholder' => $item['placeholder'] ?? '', + 'description' => $item['description'] ?? '', + 'value' => $dbConfig[$key] ?? $item['default'] + ]; + } + + return $result; + } + + /** + * 更新插件配置 + * + * @param string $pluginCode + * @param array $config + * @return bool + */ + public function updateConfig(string $pluginCode, array $config): bool + { + $defaultConfig = $this->getDefaultConfig($pluginCode); + if (empty($defaultConfig)) { + throw new \Exception('插件配置结构不存在'); + } + $values = []; + foreach ($config as $key => $value) { + if (!isset($defaultConfig[$key])) { + continue; + } + $values[$key] = $value; + } + Plugin::query() + ->where('code', $pluginCode) + ->update([ + 'config' => json_encode($values), + 'updated_at' => now() + ]); + + return true; + } + + /** + * 获取插件默认配置 + * + * @param string $pluginCode + * @return array + */ + protected function getDefaultConfig(string $pluginCode): array + { + $configFile = base_path("plugins/{$pluginCode}/config.json"); + if (!File::exists($configFile)) { + return []; + } + + $config = json_decode(File::get($configFile), true); + return $config['config'] ?? []; + } + + /** + * 获取数据库中的配置 + * + * @param string $pluginCode + * @return array + */ + protected function getDbConfig(string $pluginCode): array + { + $plugin = Plugin::query() + ->where('code', $pluginCode) + ->first(); + + if (!$plugin || empty($plugin->config)) { + return []; + } + + return json_decode($plugin->config, true); + } +} \ No newline at end of file diff --git a/app/Services/Plugin/PluginManager.php b/app/Services/Plugin/PluginManager.php new file mode 100644 index 0000000..c133bae --- /dev/null +++ b/app/Services/Plugin/PluginManager.php @@ -0,0 +1,180 @@ +pluginPath = base_path('plugins'); + } + + /** + * 安装插件 + */ + public function install(string $pluginCode): bool + { + $configFile = $this->pluginPath . '/' . $pluginCode . '/config.json'; + + if (!File::exists($configFile)) { + throw new \Exception('Plugin config file not found'); + } + + $config = json_decode(File::get($configFile), true); + if (!$this->validateConfig($config)) { + throw new \Exception('Invalid plugin config'); + } + + // 检查依赖 + if (!$this->checkDependencies($config['require'] ?? [])) { + throw new \Exception('Dependencies not satisfied'); + } + + // 提取配置默认值 + $defaultValues = []; + if (isset($config['config']) && is_array($config['config'])) { + foreach ($config['config'] as $key => $item) { + $defaultValues[$key] = $item['default'] ?? null; + } + } + + // 注册到数据库 + Plugin::create([ + 'code' => $pluginCode, + 'name' => $config['name'], + 'version' => $config['version'], + 'is_enabled' => false, + 'config' => json_encode($defaultValues), + 'installed_at' => now(), + ]); + + return true; + } + + /** + * 启用插件 + */ + public function enable(string $pluginCode): bool + { + $plugin = $this->loadPlugin($pluginCode); + if (!$plugin) { + throw new \Exception('Plugin not found'); + } + + // 获取插件配置 + $dbPlugin = Plugin::query() + ->where('code', $pluginCode) + ->first(); + + if ($dbPlugin && !empty($dbPlugin->config)) { + $plugin->setConfig(json_decode($dbPlugin->config, true)); + } + + // 更新数据库状态 + Plugin::query() + ->where('code', $pluginCode) + ->update([ + 'is_enabled' => true, + 'updated_at' => now(), + ]); + + // 加载路由 + $routesFile = $this->pluginPath . '/' . $pluginCode . '/routes/web.php'; + if (File::exists($routesFile)) { + require $routesFile; + } + + // 初始化插件 + if (method_exists($plugin, 'boot')) { + $plugin->boot(); + } + + return true; + } + + /** + * 禁用插件 + */ + public function disable(string $pluginCode): bool + { + $plugin = $this->loadPlugin($pluginCode); + if (!$plugin) { + throw new \Exception('Plugin not found'); + } + + // 更新数据库状态 + Plugin::query() + ->where('code', $pluginCode) + ->update([ + 'is_enabled' => false, + 'updated_at' => now(), + ]); + + // 清理插件 + if (method_exists($plugin, 'cleanup')) { + $plugin->cleanup(); + } + + return true; + } + + /** + * 卸载插件 + */ + public function uninstall(string $pluginCode): bool + { + // 先禁用插件 + $this->disable($pluginCode); + + // 删除数据库记录 + Plugin::query()->where('code', $pluginCode)->delete(); + + return true; + } + + /** + * 加载插件实例 + */ + protected function loadPlugin(string $pluginCode) + { + $pluginFile = $this->pluginPath . '/' . $pluginCode . '/Plugin.php'; + if (!File::exists($pluginFile)) { + return null; + } + + require_once $pluginFile; + $className = "Plugin\\{$pluginCode}\\Plugin"; + return new $className(); + } + + /** + * 验证配置文件 + */ + protected function validateConfig(array $config): bool + { + return isset($config['code']) + && isset($config['version']) + && isset($config['description']) + && isset($config['author']); + } + + /** + * 检查依赖关系 + */ + protected function checkDependencies(array $requires): bool + { + foreach ($requires as $package => $version) { + if ($package === 'xboard') { + // 检查xboard版本 + // 实现版本比较逻辑 + } + } + return true; + } +} \ No newline at end of file diff --git a/database/migrations/2025_01_18_140511_create_plugins_table.php b/database/migrations/2025_01_18_140511_create_plugins_table.php new file mode 100644 index 0000000..be3d070 --- /dev/null +++ b/database/migrations/2025_01_18_140511_create_plugins_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('name'); + $table->string('code')->unique(); + $table->string('version', 50); + $table->boolean('is_enabled')->default(false); + $table->json('config')->nullable(); + $table->timestamp('installed_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('v2_plugins'); + } +}; diff --git a/plugins/.gitignore b/plugins/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/plugins/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/public/assets/admin/assets/index.css b/public/assets/admin/assets/index.css index 1028d68..e0add00 100644 --- a/public/assets/admin/assets/index.css +++ b/public/assets/admin/assets/index.css @@ -1 +1 @@ -*,: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: }*,: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: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]:where(:not([hidden=until-found])){display:none}:root{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-4{left:1rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[16\/9\]{aspect-ratio:16/9}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[50px\]{width:50px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-\[4rem\]{min-width:4rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.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))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/70{background-color:#22c55eb3}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-slate-100\/80{background-color:#f1f5f9cc}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background\/80{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-background\/60{--tw-gradient-to: hsl(var(--background) / .6) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.text-base{font-size:1rem;line-height:1.5rem}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-10{line-height:2.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/90{color:hsl(var(--primary) / .9)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(0px + 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-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-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur-\[1px\]{--tw-backdrop-blur: blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-150{transition-delay:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.\*\:\!inline-block>*{display:inline-block!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--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)}.focus-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-180:hover{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-background:hover{background-color:hsl(var(--background))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-200\/80:hover{background-color:#e2e8f0cc}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:bg-opacity-80:hover{--tw-bg-opacity: .8}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(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)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:via-background\/90{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .9) var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-background\/70{--tw-gradient-to: hsl(var(--background) / .7) var(--tw-gradient-to-position)}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(:focus-visible){--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)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[540px\]{width:540px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-8{right:2rem}.md\:right-auto{right:auto}.md\:top-8{top:2rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} +*,: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: }*,: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: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]:where(:not([hidden=until-found])){display:none}:root{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-4{left:1rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[16\/9\]{aspect-ratio:16/9}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[180px\]{width:180px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[50px\]{width:50px}.w-\[60px\]{width:60px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-\[4rem\]{min-width:4rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.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))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/70{background-color:#22c55eb3}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-slate-100\/80{background-color:#f1f5f9cc}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background\/80{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-background\/60{--tw-gradient-to: hsl(var(--background) / .6) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.text-base{font-size:1rem;line-height:1.5rem}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-10{line-height:2.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/90{color:hsl(var(--primary) / .9)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(0px + 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-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-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur-\[1px\]{--tw-backdrop-blur: blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-150{transition-delay:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.\*\:\!inline-block>*{display:inline-block!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--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)}.focus-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-180:hover{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-background:hover{background-color:hsl(var(--background))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-muted\/70:hover{background-color:hsl(var(--muted) / .7)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-200\/80:hover{background-color:#e2e8f0cc}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:bg-opacity-80:hover{--tw-bg-opacity: .8}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(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)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:via-background\/90{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .9) var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-background\/70{--tw-gradient-to: hsl(var(--background) / .7) var(--tw-gradient-to-position)}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(:focus-visible){--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)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[540px\]{width:540px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-8{right:2rem}.md\:right-auto{right:auto}.md\:top-8{top:2rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/public/assets/admin/assets/index.js b/public/assets/admin/assets/index.js index fab22fb..d0748b7 100644 --- a/public/assets/admin/assets/index.js +++ b/public/assets/admin/assets/index.js @@ -1,9 +1,9 @@ -import{r as u,j as e,t as ll,c as ol,I as Na,a as Ds,S as Zt,u as cs,b as Xt,d as il,O as ea,e as cl,f as q,g as dl,h as ml,i as ul,k as xl,B as hl,l as fl,Q as pl,m as gl,R as jl,n as vl,P as bl,o as yl,p as Nl,q as Ka,F as _l,C as wl,s as Cl,v as Sl,w as kl,x as Tl,y as Ha,z as I,A as h,D as ce,E as ue,G as Ua,H as St,J as kt,K as sa,L as ze,T as Tt,M as Dt,N as Ba,U as Ga,V as Wa,W as ta,X as Ya,Y as Dl,Z as Ja,_ as Qa,$ as Za,a0 as Xa,a1 as Ps,a2 as en,a3 as Pl,a4 as sn,a5 as tn,a6 as Rl,a7 as El,a8 as Vl,a9 as Il,aa as Fl,ab as Ml,ac as Ol,ad as zl,ae as Ll,af as Al,ag as $l,ah as an,ai as ql,aj as Kl,ak as Rs,al as nn,am as Hl,an as Ul,ao as rn,ap as Bl,aq as Gl,ar as _a,as as Wl,at as ln,au as Yl,av as on,aw as Jl,ax as Ql,ay as Zl,az as Xl,aA as eo,aB as so,aC as cn,aD as to,aE as ao,aF as no,aG as Se,aH as ro,aI as lo,aJ as oo,aK as io,aL as dn,aM as mn,aN as un,aO as co,aP as xn,aQ as hn,aR as fn,aS as mo,aT as uo,aU as xo,aV as pn,aW as ho,aX as aa,aY as gn,aZ as fo,a_ as jn,a$ as po,b0 as vn,b1 as go,b2 as bn,b3 as yn,b4 as jo,b5 as vo,b6 as Nn,b7 as bo,b8 as yo,b9 as _n,ba as No,bb as wn,bc as _o,bd as wo,be as Ke,bf as se,bg as qe,bh as it,bi as Co,bj as So,bk as ko,bl as To,bm as Do,bn as Po,bo as wa,bp as Ca,bq as Ro,br as Eo,bs as Vo,bt as Io,bu as Fo,bv as Kt,bw as Ht,bx as Mo,by as Oo,bz as Cn,bA as zo,bB as Lo,bC as Sn,bD as Ao,bE as pe,bF as $o,bG as Sa,bH as Ut,bI as Bt,bJ as qo,bK as Ko,bL as kn,bM as Ho,bN as na,bO as Uo,bP as Bo,bQ as Go,bR as Tn,bS as Dn,bT as Pn,bU as Wo,bV as Yo,bW as Jo,bX as Qo,bY as Rn,bZ as Zo,b_ as ss,b$ as Xo,c0 as ei,c1 as si,c2 as bt,c3 as Ne,c4 as ka,c5 as ti,c6 as En,c7 as Vn,c8 as In,c9 as Fn,ca as Mn,cb as On,cc as ai,cd as ni,ce as ri,cf as Pt,cg as Es,ch as ds,ci as Le,cj as Ae,ck as Be,cl as Ge,cm as We,cn as li,co as oi,cp as ii,cq as Gt,cr as ra,cs as la,ct as ci,cu as ms,cv as us,cw as ct,cx as di,cy as yt,cz as mi,cA as Ta,cB as zn,cC as Da,cD as Nt,cE as ui,cF as xi,cG as hi,cH as fi,cI as Ln,cJ as pi,cK as gi,cL as An,cM as Wt,cN as $n,cO as ji,cP as qn,cQ as Kn,cR as vi,cS as bi,cT as yi,cU as Ni,cV as _i}from"./vendor.js";import"./index.js";var bh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function wi(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const Ci={theme:"system",setTheme:()=>null},Hn=u.createContext(Ci);function Si({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,i]=u.useState(()=>localStorage.getItem(a)||n);u.useEffect(()=>{const m=window.document.documentElement;if(m.classList.remove("light","dark"),r==="system"){const x=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";m.classList.add(x);return}m.classList.add(r)},[r]);const c={theme:r,setTheme:m=>{localStorage.setItem(a,m),i(m)}};return e.jsx(Hn.Provider,{...l,value:c,children:s})}const ki=()=>{const s=u.useContext(Hn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Ti=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),Di=function(s,n){return new URL(s,n).href},Pa={},oe=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const c=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),x=m?.nonce||m?.getAttribute("nonce");r=Promise.allSettled(a.map(o=>{if(o=Di(o,l),o in Pa)return;Pa[o]=!0;const d=o.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!l)for(let f=c.length-1;f>=0;f--){const _=c[f];if(_.href===o&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${p}`))return;const E=document.createElement("link");if(E.rel=d?"stylesheet":Ti,d||(E.as="script"),E.crossOrigin="",E.href=o,x&&E.setAttribute("nonce",x),document.head.appendChild(E),d)return new Promise((f,_)=>{E.addEventListener("load",f),E.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${o}`)))})}))}function i(c){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=c,window.dispatchEvent(m),!m.defaultPrevented)throw c}return r.then(c=>{for(const m of c||[])m.status==="rejected"&&i(m.reason);return n().catch(i)})};function y(...s){return ll(ol(s))}const Ks=Ds("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),V=u.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:i,loading:c=!1,leftSection:m,rightSection:x,...o},d)=>{const p=l?Zt:"button";return e.jsxs(p,{className:y(Ks({variant:n,size:a,className:s})),disabled:c||i,ref:d,...o,children:[(m&&c||!m&&!x&&c)&&e.jsx(Na,{className:"mr-2 h-4 w-4 animate-spin"}),!c&&m&&e.jsx("div",{className:"mr-2",children:m}),r,!c&&x&&e.jsx("div",{className:"ml-2",children:x}),x&&c&&e.jsx(Na,{className:"ml-2 h-4 w-4 animate-spin"})]})});V.displayName="Button";function Os({className:s,minimal:n=!1}){const a=cs();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(V,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(V,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ra(){const s=cs();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(V,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(V,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Pi(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(V,{variant:"outline",children:"Learn more"})})]})})}function Ri(s){return typeof s>"u"}function Ei(s){return s===null}function Vi(s){return Ei(s)||Ri(s)}class Ii{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:i,time:c,expire:m}=r;return Vi(m)||m>new Date().getTime()?{value:i,time:c}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Un({prefixKey:s="",storage:n=sessionStorage}){return new Ii({prefixKey:s,storage:n})}const Bn="Xboard_",Fi=function(s={}){return Un({prefixKey:s.prefixKey||"",storage:localStorage})},Mi=function(s={}){return Un({prefixKey:s.prefixKey||"",storage:sessionStorage})},Rt=Fi({prefixKey:Bn});Mi({prefixKey:Bn});const Gn="access_token";function st(){return Rt.get(Gn)}function Wn(){Rt.remove(Gn)}const Ea=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Oi({children:s}){const n=cs(),a=Xt(),l=st();return u.useEffect(()=>{if(!l.value&&!Ea.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),Ea.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const zi=()=>e.jsx(Oi,{children:e.jsx(ea,{})}),Li=il([{path:"/sign-in",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>dc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(zi,{}),children:[{path:"/",lazy:async()=>({Component:(await oe(()=>Promise.resolve().then(()=>vc),void 0,import.meta.url)).default}),errorElement:e.jsx(Os,{}),children:[{index:!0,lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Bd);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Os,{}),children:[{path:"system",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Jd);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>em);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>rm);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>dm);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>fm);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>bm);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Cm);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Pm);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Fm);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Am);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Zm);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>tu);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>cu);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>gu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Os,{}),children:[{path:"manage",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>qu);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Gu);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Xu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Os,{}),children:[{path:"plan",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>ix);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Nx);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>Rx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Os,{}),children:[{path:"manage",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>eh);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await oe(async()=>{const{default:s}=await Promise.resolve().then(()=>gh);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Os},{path:"/404",Component:Ra},{path:"/503",Component:Pi},{path:"*",Component:Ra}]),Ai="locale";function $i(){return Rt.get(Ai)}function Yn(){Wn();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const qi=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function Ki(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const O=cl.create({baseURL:Ki(),timeout:12e3,headers:{"Content-Type":"application/json"}});O.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=st();if(!qi.includes(s.url?.split("?")[0]||"")){if(!n.value)return Yn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=$i().value||"zh-CN",s},s=>Promise.reject(s));O.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&Yn(),q.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Hi(){return O.get("/user/info")}const Ot={token:st()?.value||"",userInfo:null,isLoggedIn:!!st()?.value,loading:!1,error:null},Xs=dl("user/fetchUserInfo",async()=>(await Hi()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),Jn=ml({name:"user",initialState:Ot,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>Ot},extraReducers:s=>{s.addCase(Xs.pending,n=>{n.loading=!0,n.error=null}).addCase(Xs.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(Xs.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return Ot})}}),{setToken:Ui,resetUserState:Bi}=Jn.actions,Gi=s=>s.user.userInfo,Wi=Jn.reducer,Qn=ul({reducer:{user:Wi}});st()?.value&&Qn.dispatch(Xs());xl.use(hl).use(fl).init({resources:{"en-US":window.XBOARD_TRANSLATIONS?.["en-US"]||{},"zh-CN":window.XBOARD_TRANSLATIONS?.["zh-CN"]||{},"ko-KR":window.XBOARD_TRANSLATIONS?.["ko-KR"]||{}},fallbackLng:"zh-CN",supportedLngs:["en-US","zh-CN","ko-KR"],detection:{order:["querystring","localStorage","navigator"],lookupQuerystring:"lang",lookupLocalStorage:"i18nextLng",caches:["localStorage"]},interpolation:{escapeValue:!1}});const Yi=new pl;gl.createRoot(document.getElementById("root")).render(e.jsx(jl.StrictMode,{children:e.jsx(vl,{client:Yi,children:e.jsx(bl,{store:Qn,children:e.jsxs(Si,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(yl,{router:Li}),e.jsx(Nl,{richColors:!0,position:"top-right"})]})})})}));const Ue=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...n}));Ue.displayName="Card";const ts=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...n}));ts.displayName="CardHeader";const bs=u.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...n}));bs.displayName="CardTitle";const tt=u.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...n}));tt.displayName="CardDescription";const as=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...n}));as.displayName="CardContent";const Ji=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...n}));Ji.displayName="CardFooter";const Qi=Ds("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=u.forwardRef(({className:s,...n},a)=>e.jsx(Ka,{ref:a,className:y(Qi(),s),...n}));_t.displayName=Ka.displayName;const xe=_l,Zn=u.createContext({}),v=({...s})=>e.jsx(Zn.Provider,{value:{name:s.name},children:e.jsx(wl,{...s})}),Et=()=>{const s=u.useContext(Zn),n=u.useContext(Xn),{getFieldState:a,formState:l}=Cl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:i}=n;return{id:i,name:s.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...r}},Xn=u.createContext({}),j=u.forwardRef(({className:s,...n},a)=>{const l=u.useId();return e.jsx(Xn.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...n})})});j.displayName="FormItem";const b=u.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=Et();return e.jsx(_t,{ref:a,className:y(l&&"text-destructive",s),htmlFor:r,...n})});b.displayName="FormLabel";const N=u.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:i}=Et();return e.jsx(Zt,{ref:n,id:l,"aria-describedby":a?`${r} ${i}`:`${r}`,"aria-invalid":!!a,...s})});N.displayName="FormControl";const F=u.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=Et();return e.jsx("p",{ref:a,id:l,className:y("text-[0.8rem] text-muted-foreground",s),...n})});F.displayName="FormDescription";const R=u.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:i}=Et(),c=r?String(r?.message):n;return c?e.jsx("p",{ref:l,id:i,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:c}):null});R.displayName="FormMessage";const P=u.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));P.displayName="Input";const er=u.forwardRef(({className:s,...n},a)=>{const[l,r]=u.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(V,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(i=>!i),children:l?e.jsx(Sl,{size:18}):e.jsx(kl,{size:18})})]})});er.displayName="PasswordInput";const Zi=s=>O({url:"/passport/auth/login",method:"post",data:s});function me(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Tl(s).format(n))}function Xi(s=void 0,n="YYYY-MM-DD"){return me(s,n)}function As(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function ks(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,i=>i.includes(".")?".00":i);return n?`¥${r}`:r}function wt(s){return new Promise(n=>{(async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(s);else{const l=document.createElement("textarea");l.value=s,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select();const r=document.execCommand("copy");if(document.body.removeChild(l),!r)throw new Error("execCommand failed")}n(!0)}catch(l){console.error(l),n(!1)}})()})}function Xe(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?As(r)+" TB":l>=1?As(l)+" GB":a>=1?As(a)+" MB":As(n)+" KB"}const ec="access_token";function sc(s){Rt.set(ec,s)}function tc({className:s,onForgotPassword:n,...a}){const l=cs(),r=Ha(),{t:i}=I("auth"),c=h.object({email:h.string().min(1,{message:i("signIn.validation.emailRequired")}),password:h.string().min(1,{message:i("signIn.validation.passwordRequired")}).min(7,{message:i("signIn.validation.passwordLength")})}),m=ce({resolver:ue(c),defaultValues:{email:"",password:""}});async function x(o){try{const{data:d}=await Zi(o);sc(d.auth_data),r(Ui(d.auth_data)),await r(Xs()).unwrap(),l("/")}catch(d){console.error("Login failed:",d),d.response?.data?.message&&m.setError("root",{message:d.response.data.message})}}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(xe,{...m,children:e.jsx("form",{onSubmit:m.handleSubmit(x),className:"space-y-4",children:e.jsxs("div",{className:"space-y-4",children:[m.formState.errors.root&&e.jsx("div",{className:"text-sm text-destructive",children:m.formState.errors.root.message}),e.jsx(v,{control:m.control,name:"email",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:i("signIn.email")}),e.jsx(N,{children:e.jsx(P,{placeholder:i("signIn.emailPlaceholder"),autoComplete:"email",...o})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"password",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:i("signIn.password")}),e.jsx(N,{children:e.jsx(er,{placeholder:i("signIn.passwordPlaceholder"),autoComplete:"current-password",...o})}),e.jsx(R,{})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(V,{variant:"link",type:"button",className:"px-0 text-sm font-normal text-muted-foreground hover:text-primary",onClick:n,children:i("signIn.forgotPassword")})}),e.jsx(V,{className:"w-full",size:"lg",loading:m.formState.isSubmitting,children:i("signIn.submit")})]})})})})}const ge=Ua,Me=Ba,ac=Ga,dt=sa,sr=u.forwardRef(({className:s,...n},a)=>e.jsx(St,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n}));sr.displayName=St.displayName;const he=u.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(ac,{children:[e.jsx(sr,{}),e.jsxs(kt,{ref:l,className:y("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[n,e.jsxs(sa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(ze,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));he.displayName=kt.displayName;const ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});ve.displayName="DialogHeader";const Oe=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Oe.displayName="DialogFooter";const je=u.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...n}));je.displayName=Tt.displayName;const De=u.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));De.displayName=Dt.displayName;const qs=Ds("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),J=u.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},i)=>{const c=l?Zt:"button";return e.jsx(c,{className:y(qs({variant:n,size:a,className:s})),ref:i,...r})});J.displayName="Button";const ys=Rl,Ns=El,nc=Vl,rc=u.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(Wa,{ref:r,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(ta,{className:"ml-auto h-4 w-4"})]}));rc.displayName=Wa.displayName;const lc=u.forwardRef(({className:s,...n},a)=>e.jsx(Ya,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n}));lc.displayName=Ya.displayName;const is=u.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Dl,{children:e.jsx(Ja,{ref:l,sideOffset:n,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));is.displayName=Ja.displayName;const fe=u.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(Qa,{ref:l,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));fe.displayName=Qa.displayName;const oc=u.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(Za,{ref:r,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Xa,{children:e.jsx(Ps,{className:"h-4 w-4"})})}),n]}));oc.displayName=Za.displayName;const ic=u.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(en,{ref:l,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Xa,{children:e.jsx(Pl,{className:"h-4 w-4 fill-current"})})}),n]}));ic.displayName=en.displayName;const oa=u.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(sn,{ref:l,className:y("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));oa.displayName=sn.displayName;const at=u.forwardRef(({className:s,...n},a)=>e.jsx(tn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));at.displayName=tn.displayName;const Yt=({className:s,...n})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...n});Yt.displayName="DropdownMenuShortcut";const zt=[{code:"en-US",name:"English",flag:Il,shortName:"EN"},{code:"zh-CN",name:"中文",flag:Fl,shortName:"CN"},{code:"ko-KR",name:"한국어",flag:Ml,shortName:"KR"}];function tr(){const{i18n:s}=I(),n=r=>{s.changeLanguage(r)},a=zt.find(r=>r.code===s.language)||zt[1],l=a.flag;return e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(is,{align:"end",className:"w-[120px]",children:zt.map(r=>{const i=r.flag,c=r.code===s.language;return e.jsxs(fe,{onClick:()=>n(r.code),className:y("flex items-center gap-2 px-2 py-1.5 cursor-pointer",c&&"bg-accent"),children:[e.jsx(i,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:y("text-sm",c&&"font-medium"),children:r.name})]},r.code)})})]})}function cc(){const[s,n]=u.useState(!1),{t:a}=I("auth"),l=a("signIn.resetPassword.command");return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"container relative grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:[e.jsx("div",{className:"absolute right-4 top-4 md:right-8 md:top-8",children:e.jsx(tr,{})}),e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[480px] lg:p-8",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold",children:window?.settings?.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:window?.settings?.description})]}),e.jsxs(Ue,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:a("signIn.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a("signIn.description")})]}),e.jsx(tc,{onForgotPassword:()=>n(!0)})]})]})]}),e.jsx(ge,{open:s,onOpenChange:n,children:e.jsx(he,{children:e.jsxs(ve,{children:[e.jsx(je,{children:a("signIn.resetPassword.title")}),e.jsx(De,{children:a("signIn.resetPassword.description")}),e.jsx("div",{className:"mt-4",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12 text-sm",children:l}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>wt(l).then(()=>{q.success(a("common:copy.success"))}),children:e.jsx(Ol,{className:"h-4 w-4"})})]})})]})})})]})}const dc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),we=u.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:y("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const ke=u.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));ke.displayName="LayoutBody";const ar=zl,nr=Ll,rr=Al,ie=$l,re=ql,le=Kl,te=u.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(an,{ref:l,sideOffset:n,className:y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));te.displayName=an.displayName;function Vt(){const{pathname:s}=Xt();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function lr({key:s,defaultValue:n}){const[a,l]=u.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return u.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function mc(){const[s,n]=lr({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(i=>i!==r))}}}function uc({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=I(),i=({sub:c,...m})=>{const x=`${r(m.title)}-${m.href}`;return n&&c?u.createElement(fc,{...m,sub:c,key:x,closeNav:l}):n?u.createElement(hc,{...m,key:x,closeNav:l}):c?u.createElement(xc,{...m,sub:c,key:x,closeNav:l}):u.createElement(or,{...m,key:x,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(ie,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(i)})})})}function or({title:s,icon:n,label:a,href:l,closeNav:r,subLink:i=!1}){const{checkActiveNav:c}=Vt(),{t:m}=I();return e.jsxs(Rs,{to:l,onClick:r,className:y(Ks({variant:c(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",i&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":c(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),m(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:m(a)})]})}function xc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:i}=Vt(),{isExpanded:c,toggleItem:m}=mc(),{t:x}=I(),o=!!l?.find(k=>i(k.href)),d=x(s),p=c(d)||o;return e.jsxs(ar,{open:p,onOpenChange:()=>m(d),children:[e.jsxs(nr,{className:y(Ks({variant:o?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),x(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:x(a)}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(nn,{stroke:1})})]}),e.jsx(rr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(k=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(or,{...k,subLink:!0,closeNav:r})},x(k.title)))})})]})}function hc({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:i}=Vt(),{t:c}=I();return e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsxs(Rs,{to:l,onClick:r,className:y(Ks({variant:i(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:c(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[c(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:c(a)})]})]})}function fc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:i}=Vt(),{t:c}=I(),m=!!l?.find(x=>i(x.href));return e.jsxs(ys,{children:[e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsx(Ns,{asChild:!0,children:e.jsx(V,{variant:m?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[c(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:c(a)}),e.jsx(nn,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(is,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(oa,{children:[c(s)," ",a?`(${c(a)})`:""]}),e.jsx(at,{}),l.map(({title:x,icon:o,label:d,href:p})=>e.jsx(fe,{asChild:!0,children:e.jsxs(Rs,{to:p,onClick:r,className:`${i(p)?"bg-secondary":""}`,children:[o," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:c(x)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:c(d)})]})},`${c(x)}-${p}`))]})]})}const ir=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Hl,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(Ul,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(rn,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(Bl,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(Gl,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(_a,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(Wl,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(ln,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(Yl,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(on,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(Jl,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(Ql,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(Zl,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(_a,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(Xl,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(eo,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(so,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(cn,{size:18})}]}];function pc({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=u.useState(!1),{t:i}=I();return u.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(V,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":i("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(c=>!c),children:l?e.jsx(to,{}):e.jsx(ao,{})})]}),e.jsx(uc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:ir}),e.jsx("div",{className:y("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:y("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(V,{onClick:()=>a(c=>!c),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":i("common:toggleSidebar"),children:e.jsx(no,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function gc(){const[s,n]=lr({key:"collapsed-sidebar",defaultValue:!1});return u.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function jc(){const[s,n]=gc();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(pc,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(ea,{})})]})}const vc=Object.freeze(Object.defineProperty({__proto__:null,default:jc},Symbol.toStringTag,{value:"Module"})),_s=u.forwardRef(({className:s,...n},a)=>e.jsx(Se,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));_s.displayName=Se.displayName;const bc=({children:s,...n})=>e.jsx(ge,{...n,children:e.jsx(he,{className:"overflow-hidden p-0",children:e.jsx(_s,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Vs=u.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ro,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Se.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Vs.displayName=Se.Input.displayName;const ws=u.forwardRef(({className:s,...n},a)=>e.jsx(Se.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));ws.displayName=Se.List.displayName;const Is=u.forwardRef((s,n)=>e.jsx(Se.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Is.displayName=Se.Empty.displayName;const Fe=u.forwardRef(({className:s,...n},a)=>e.jsx(Se.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Fe.displayName=Se.Group.displayName;const Hs=u.forwardRef(({className:s,...n},a)=>e.jsx(Se.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...n}));Hs.displayName=Se.Separator.displayName;const _e=u.forwardRef(({className:s,...n},a)=>e.jsx(Se.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));_e.displayName=Se.Item.displayName;function yc(){const s=[];for(const n of ir)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function Pe(){const[s,n]=u.useState(!1),a=cs(),l=yc(),{t:r}=I("search"),{t:i}=I("nav");u.useEffect(()=>{const m=x=>{x.key==="k"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),n(o=>!o))};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[]);const c=u.useCallback(m=>{n(!1),a(m)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(lo,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(bc,{open:s,onOpenChange:n,children:[e.jsx(Vs,{placeholder:r("placeholder")}),e.jsxs(ws,{children:[e.jsx(Is,{children:r("noResults")}),e.jsx(Fe,{heading:r("title"),children:l.map(m=>e.jsxs(_e,{value:`${m.parent?m.parent+" ":""}${m.title}`,onSelect:()=>c(m.href),children:[e.jsx("div",{className:"mr-2",children:m.icon}),e.jsx("span",{children:i(m.title)}),m.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:i(m.parent)})]},m.href))})]})]})]})}function Re(){const{theme:s,setTheme:n}=ki();return u.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(V,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(oo,{size:20}):e.jsx(io,{size:20})}),e.jsx(tr,{})]})}const cr=u.forwardRef(({className:s,...n},a)=>e.jsx(dn,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));cr.displayName=dn.displayName;const dr=u.forwardRef(({className:s,...n},a)=>e.jsx(mn,{ref:a,className:y("aspect-square h-full w-full",s),...n}));dr.displayName=mn.displayName;const mr=u.forwardRef(({className:s,...n},a)=>e.jsx(un,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));mr.displayName=un.displayName;function Ee(){const s=cs(),n=Ha(),a=co(Gi),{t:l}=I(["common"]),r=()=>{Wn(),n(Bi()),s("/sign-in")},i=a?.email?.split("@")[0]||l("common:user"),c=i.substring(0,2).toUpperCase();return e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsx(V,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(cr,{className:"h-8 w-8",children:[e.jsx(dr,{src:a?.avatar_url,alt:i}),e.jsx(mr,{children:c})]})})}),e.jsxs(is,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(oa,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:i}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(at,{}),e.jsx(fe,{asChild:!0,children:e.jsxs(Rs,{to:"/config/system",children:[l("common:settings"),e.jsx(Yt,{children:"⌘S"})]})}),e.jsx(at,{}),e.jsxs(fe,{onClick:r,children:[l("common:logout"),e.jsx(Yt,{children:"⇧⌘Q"})]})]})]})}const Ze=window?.settings?.secure_path,ur=5*60*1e3,Jt=new Map,Nc=s=>{const n=Jt.get(s);return n?Date.now()-n.timestamp>ur?(Jt.delete(s),null):n.data:null},_c=(s,n)=>{Jt.set(s,{data:n,timestamp:Date.now()})},wc=async(s,n=ur)=>{const a=Nc(s);if(a)return a;const l=await O.get(s);return _c(s,l),l},Cc={getList:()=>wc(`${Ze}/notice/fetch`),save:s=>O.post(`${Ze}/notice/save`,s),drop:s=>O.post(`${Ze}/notice/drop`,{id:s}),updateStatus:s=>O.post(`${Ze}/notice/show`,{id:s}),sort:s=>O.post(`${Ze}/notice/sort`,{ids:s})},Va={getSystemStatus:()=>O.get(`${Ze}/system/getSystemStatus`),getQueueStats:()=>O.get(`${Ze}/system/getQueueStats`),getQueueWorkload:()=>O.get(`${Ze}/system/getQueueWorkload`),getQueueMasters:()=>O.get(`${Ze}/system/getQueueMasters`),getSystemLog:s=>O.get(`${Ze}/system/getSystemLog`,{params:s})},L=window?.settings?.secure_path,Sc=s=>O.get(L+"/stat/getOrder",{params:s}),kc=()=>O.get(L+"/stat/getStats"),Ia=s=>O.get(L+"/stat/getTrafficRank",{params:s}),Tc=()=>O.get(L+"/theme/getThemes"),Dc=s=>O.post(L+"/theme/getThemeConfig",{name:s}),Pc=(s,n)=>O.post(L+"/theme/saveThemeConfig",{name:s,config:n}),Rc=s=>{const n=new FormData;return n.append("file",s),O.post(L+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},Ec=s=>O.post(L+"/theme/delete",{name:s}),Vc=s=>O.post(L+"/config/save",s),xr=()=>O.get(L+"/server/manage/getNodes"),Ic=s=>O.post(L+"/server/manage/save",s),Fc=s=>O.post(L+"/server/manage/drop",s),Mc=s=>O.post(L+"/server/manage/copy",s),Oc=s=>O.post(L+"/server/manage/update",s),zc=s=>O.post(L+"/server/manage/sort",s),It=()=>O.get(L+"/server/group/fetch"),Lc=s=>O.post(L+"/server/group/save",s),Ac=s=>O.post(L+"/server/group/drop",s),hr=()=>O.get(L+"/server/route/fetch"),$c=s=>O.post(L+"/server/route/save",s),qc=s=>O.post(L+"/server/route/drop",s),Kc=()=>O.get(L+"/payment/fetch"),Hc=()=>O.get(L+"/payment/getPaymentMethods"),Uc=s=>O.post(L+"/payment/getPaymentForm",s),Bc=s=>O.post(L+"/payment/save",s),Gc=s=>O.post(L+"/payment/drop",s),Wc=s=>O.post(L+"/payment/show",s),Yc=s=>O.post(L+"/payment/sort",s),Jc=()=>O.get(L+"/notice/fetch"),Qc=s=>O.post(L+"/notice/save",s),Zc=s=>O.post(L+"/notice/drop",s),Xc=s=>O.post(L+"/notice/show",s),ed=()=>O.get(L+"/knowledge/fetch"),sd=s=>O.get(L+"/knowledge/fetch?id="+s),td=s=>O.post(L+"/knowledge/save",s),ad=s=>O.post(L+"/knowledge/drop",s),nd=s=>O.post(L+"/knowledge/show",s),rd=s=>O.post(L+"/knowledge/sort",s),Fs=()=>O.get(L+"/plan/fetch"),ld=s=>O.post(L+"/plan/save",s),Lt=s=>O.post(L+"/plan/update",s),od=s=>O.post(L+"/plan/drop",s),id=s=>O.post(L+"/plan/sort",{ids:s}),cd=async s=>O.post(L+"/order/fetch",s),dd=s=>O.post(L+"/order/detail",s),md=s=>O.post(L+"/order/paid",s),ud=s=>O.post(L+"/order/cancel",s),Fa=s=>O.post(L+"/order/update",s),xd=s=>O.post(L+"/order/assign",s),hd=s=>O.post(L+"/coupon/fetch",s),fd=s=>O.post(L+"/coupon/generate",s),pd=s=>O.post(L+"/coupon/drop",s),gd=s=>O.post(L+"/coupon/update",s),jd=s=>O.post(L+"/user/fetch",s),vd=s=>O.post(L+"/user/update",s),bd=s=>O.post(L+"/user/resetSecret",s),yd=s=>O.post(L+"/user/generate",s),Nd=s=>O.post(L+"/stat/getStatUser",s),_d=s=>O.post(L+"/ticket/fetch",s),wd=s=>O.get(L+"/ticket/fetch?id= "+s),Cd=s=>O.post(L+"/ticket/reply",s),fr=s=>O.post(L+"/ticket/close",{id:s}),xs=(s="")=>O.get(L+"/config/fetch?key="+s),hs=s=>O.post(L+"/config/save",s),Sd=()=>O.get(L+"/config/getEmailTemplate"),kd=()=>O.post(L+"/config/testSendMail"),Td=()=>O.post(L+"/config/setTelegramWebhook"),Dd=Cc.sort,pr=mo,ia=u.forwardRef(({className:s,...n},a)=>e.jsx(xn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));ia.displayName=xn.displayName;const nt=u.forwardRef(({className:s,...n},a)=>e.jsx(hn,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...n}));nt.displayName=hn.displayName;const Pd=u.forwardRef(({className:s,...n},a)=>e.jsx(fn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));Pd.displayName=fn.displayName;const W=uo,ps=bo,Y=xo,B=u.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(pn,{ref:l,className:y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[n,e.jsx(ho,{asChild:!0,children:e.jsx(aa,{className:"h-4 w-4 opacity-50"})})]}));B.displayName=pn.displayName;const gr=u.forwardRef(({className:s,...n},a)=>e.jsx(gn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(fo,{className:"h-4 w-4"})}));gr.displayName=gn.displayName;const jr=u.forwardRef(({className:s,...n},a)=>e.jsx(jn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(aa,{className:"h-4 w-4"})}));jr.displayName=jn.displayName;const G=u.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(po,{children:e.jsxs(vn,{ref:r,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...l,children:[e.jsx(gr,{}),e.jsx(go,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(jr,{})]})}));G.displayName=vn.displayName;const Rd=u.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...n}));Rd.displayName=bn.displayName;const $=u.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(yn,{ref:l,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(jo,{children:e.jsx(Ps,{className:"h-4 w-4"})})}),e.jsx(vo,{children:n})]}));$.displayName=yn.displayName;const Ed=u.forwardRef(({className:s,...n},a)=>e.jsx(Nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));Ed.displayName=Nn.displayName;function Ms({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(yo,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(qs({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(qs({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...i})=>e.jsx(_n,{className:y("h-4 w-4",r),...i}),IconRight:({className:r,...i})=>e.jsx(ta,{className:y("h-4 w-4",r),...i})},...l})}Ms.displayName="Calendar";const ns=_o,rs=wo,Ye=u.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(No,{children:e.jsx(wn,{ref:r,align:n,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})}));Ye.displayName=wn.displayName;const gs={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Qs=s=>(s/100).toFixed(2),Vd=({active:s,payload:n,label:a})=>{const{t:l}=I();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,i)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${Qs(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},i))]}):null},Id=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Fd=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=Ke(a,7);break;case"30d":l=Ke(a,30);break;case"90d":l=Ke(a,90);break;case"180d":l=Ke(a,180);break;case"365d":l=Ke(a,365);break;default:l=Ke(a,30)}return{startDate:l,endDate:a}};function Md(){const[s,n]=u.useState("amount"),[a,l]=u.useState("30d"),[r,i]=u.useState({from:Ke(new Date,7),to:new Date}),{t:c}=I(),{startDate:m,endDate:x}=Fd(a,r),{data:o}=se({queryKey:["orderStat",{start_date:qe(m,"yyyy-MM-dd"),end_date:qe(x,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await Sc({start_date:qe(m,"yyyy-MM-dd"),end_date:qe(x,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(Ue,{children:[e.jsx(ts,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(bs,{children:c("dashboard:overview.title")}),e.jsxs(tt,{children:[o?.summary.start_date," ",c("dashboard:overview.to")," ",o?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(W,{value:a,onValueChange:d=>l(d),children:[e.jsx(B,{className:"w-[120px]",children:e.jsx(Y,{placeholder:c("dashboard:overview.selectTimeRange")})}),e.jsx(G,{children:Id.map(d=>e.jsx($,{value:d.value,children:c(d.label)},d.value))})]}),a==="custom"&&e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[qe(r.from,"yyyy-MM-dd")," -"," ",qe(r.to,"yyyy-MM-dd")]}):qe(r.from,"yyyy-MM-dd"):c("dashboard:overview.selectDate")})]})}),e.jsx(Ye,{className:"w-auto p-0",align:"end",children:e.jsx(Ms,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&i({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(pr,{value:s,onValueChange:d=>n(d),children:e.jsxs(ia,{children:[e.jsx(nt,{value:"amount",children:c("dashboard:overview.amount")}),e.jsx(nt,{value:"count",children:c("dashboard:overview.count")})]})})]})]})}),e.jsxs(as,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:c("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(o?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:c("dashboard:overview.totalTransactions",{count:o?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[c("dashboard:overview.avgOrderAmount")," ¥",Qs(o?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:c("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(o?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:c("dashboard:overview.totalTransactions",{count:o?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[c("dashboard:overview.commissionRate")," ",o?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Co,{width:"100%",height:"100%",children:e.jsxs(So,{data:o?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:gs.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:gs.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:gs.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:gs.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(ko,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>qe(new Date(d),"MM-dd",{locale:Ro})}),e.jsx(To,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${Qs(d)}`:c("dashboard:overview.transactions",{count:d})}),e.jsx(Do,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Po,{content:e.jsx(Vd,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(wa,{type:"monotone",dataKey:"paid_total",name:c("dashboard:overview.orderAmount"),stroke:gs.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(wa,{type:"monotone",dataKey:"commission_total",name:c("dashboard:overview.commissionAmount"),stroke:gs.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ca,{dataKey:"paid_count",name:c("dashboard:overview.orderCount"),fill:gs.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Ca,{dataKey:"commission_count",name:c("dashboard:overview.commissionCount"),fill:gs.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function Ie({className:s,...n}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...n})}function Od(){return e.jsxs(Ue,{children:[e.jsxs(ts,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ie,{className:"h-4 w-[120px]"}),e.jsx(Ie,{className:"h-4 w-4"})]}),e.jsxs(as,{children:[e.jsx(Ie,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx(Ie,{className:"h-4 w-[100px]"})]})]})]})}function zd(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(Od,{},n))})}var Z=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Z||{});const Ys={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Js={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var He=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(He||{}),ne=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(ne||{});const ut={0:"待确认",1:"发放中",2:"有效",3:"无效"},xt={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var de=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(de||{});const Ld={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var ye=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(ye||{});const Ts=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],os={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var Ve=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(Ve||{});const Ad={1:"按金额优惠",2:"按比例优惠"};var et=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(et||{}),es=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(es||{});function js({title:s,value:n,icon:a,trend:l,description:r,onClick:i,highlight:c,className:m}){return e.jsxs(Ue,{className:y("transition-colors",i&&"cursor-pointer hover:bg-muted/50",c&&"border-primary/50",m),onClick:i,children:[e.jsxs(ts,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(bs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(as,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Oo,{className:y("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function $d({className:s}){const n=cs(),{t:a}=I(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await kc()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(zd,{});const i=()=>{const c=new URLSearchParams;c.set("commission_status",ne.PENDING.toString()),c.set("status",Z.COMPLETED.toString()),c.set("commission_balance","gt:0"),n(`/finance/order?${c.toString()}`)};return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(js,{title:a("dashboard:stats.todayIncome"),value:ks(l.todayIncome),icon:e.jsx(Eo,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(js,{title:a("dashboard:stats.monthlyIncome"),value:ks(l.currentMonthIncome),icon:e.jsx(Vo,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(js,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Io,{className:y("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(js,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx(Fo,{className:y("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:i,highlight:l.commissionPendingTotal>0}),e.jsx(js,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Kt,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(js,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Kt,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(js,{title:a("dashboard:stats.monthlyUpload"),value:Xe(l.monthTraffic.upload),icon:e.jsx(Ht,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:Xe(l.todayTraffic.upload)})}),e.jsx(js,{title:a("dashboard:stats.monthlyDownload"),value:Xe(l.monthTraffic.download),icon:e.jsx(Mo,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:Xe(l.todayTraffic.download)})})]})}const rt=u.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Cn,{ref:l,className:y("relative overflow-hidden",s),...a,children:[e.jsx(zo,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(Ct,{}),e.jsx(Lo,{})]}));rt.displayName=Cn.displayName;const Ct=u.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(Sn,{ref:l,orientation:n,className:y("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Ao,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=Sn.displayName;const Qt={today:{getValue:()=>{const s=qo();return{start:s,end:Ko(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:Ke(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:Ke(s,30),end:s}}},custom:{getValue:()=>null}};function Ma({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=I(),i={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(W,{value:s,onValueChange:a,children:[e.jsx(B,{className:"w-[120px]",children:e.jsx(Y,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(G,{position:"popper",className:"z-50",children:Object.entries(Qt).map(([c])=>e.jsx($,{value:c,children:i[c]},c))})]}),s==="custom"&&e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[qe(n.from,"yyyy-MM-dd")," -"," ",qe(n.to,"yyyy-MM-dd")]}):qe(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(Ye,{className:"w-auto p-0",align:"end",children:e.jsx(Ms,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:c=>{c?.from&&c?.to&&l({from:c.from,to:c.to})},numberOfMonths:2})})]})]})}const zs=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function qd({className:s}){const{t:n}=I(),[a,l]=u.useState("today"),[r,i]=u.useState({from:Ke(new Date,7),to:new Date}),[c,m]=u.useState("today"),[x,o]=u.useState({from:Ke(new Date,7),to:new Date}),d=u.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:Qt[a].getValue(),[a,r]),p=u.useMemo(()=>c==="custom"?{start:x.from,end:x.to}:Qt[c].getValue(),[c,x]),{data:k}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>Ia({type:"node",start_time:pe.round(d.start.getTime()/1e3),end_time:pe.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:E}=se({queryKey:["userTrafficRank",p.start,p.end],queryFn:()=>Ia({type:"user",start_time:pe.round(p.start.getTime()/1e3),end_time:pe.round(p.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Ue,{children:[e.jsx(ts,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx($o,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Ma,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:i}),e.jsx(Sa,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(as,{className:"flex-1",children:k?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:k.data.map(f=>e.jsx(ie,{delayDuration:200,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Ut,{className:"mr-1 h-3 w-3"}):e.jsx(Bt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/k.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:zs(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(Ue,{children:[e.jsx(ts,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Kt,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Ma,{selectedRange:c,customDateRange:x,onRangeChange:m,onCustomRangeChange:o}),e.jsx(Sa,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(as,{className:"flex-1",children:E?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:E.data.map(f=>e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Ut,{className:"mr-1 h-3 w-3"}):e.jsx(Bt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/E.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:zs(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:zs(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Kd=Ds("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function K({className:s,variant:n,...a}){return e.jsx("div",{className:y(Kd({variant:n}),s),...a})}const vt=u.forwardRef(({className:s,value:n,...a},l)=>e.jsx(kn,{ref:l,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Ho,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));vt.displayName=kn.displayName;function Hd(){const{t:s}=I(),[n,a]=u.useState(null),[l,r]=u.useState(null),[i,c]=u.useState(!0),[m,x]=u.useState(!1),o=async()=>{try{x(!0);const[k,E]=await Promise.all([Va.getSystemStatus(),Va.getQueueStats()]);a(k.data),r(E.data)}catch(k){console.error("Error fetching system data:",k)}finally{c(!1),x(!1)}};u.useEffect(()=>{o();const k=setInterval(o,3e4);return()=>clearInterval(k)},[]);const d=()=>{o()};if(i)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(na,{className:"h-6 w-6 animate-spin"})});const p=k=>k?e.jsx(Tn,{className:"h-5 w-5 text-green-500"}):e.jsx(Dn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Ue,{children:[e.jsxs(ts,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Uo,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(tt,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:m,children:e.jsx(Bo,{className:y("h-4 w-4",m&&"animate-spin")})})]}),e.jsx(as,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[p(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(K,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(vt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(vt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(Ue,{children:[e.jsxs(ts,{children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Go,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(tt,{children:s("dashboard:queue.details.description")})]}),e.jsx(as,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(vt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Ud(){const{t:s}=I();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Pe,{}),e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsx(ke,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx($d,{}),e.jsx(Md,{}),e.jsx(qd,{}),e.jsx(Hd,{})]})})})]})}const Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Ud},Symbol.toStringTag,{value:"Module"})),be=u.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(Pn,{ref:r,decorative:a,orientation:n,className:y("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));be.displayName=Pn.displayName;function Gd({className:s,items:n,...a}){const{pathname:l}=Xt(),r=cs(),[i,c]=u.useState(l??"/settings"),m=o=>{c(o),r(o)},{t:x}=I("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(W,{value:i,onValueChange:m,children:[e.jsx(B,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(G,{children:n.map(o=>e.jsx($,{value:o.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:o.icon}),e.jsx("span",{className:"text-md",children:x(o.title)})]})},o.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(o=>e.jsxs(Rs,{to:o.href,className:y(Ks({variant:"ghost"}),l===o.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:o.icon}),x(o.title)]},o.href))})})]})}const Wd=[{title:"site.title",key:"site",icon:e.jsx(Wo,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(on,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(cn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(Yo,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(ln,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(Jo,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(Qo,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(rn,{size:18}),href:"/config/system/app",description:"app.description"}];function Yd(){const{t:s}=I("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(be,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Gd,{items:Wd})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(ea,{})})})]})]})]})}const Jd=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"})),H=u.forwardRef(({className:s,...n},a)=>e.jsx(Rn,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(Zo,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));H.displayName=Rn.displayName;const Cs=u.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}));Cs.displayName="Textarea";const Qd=h.object({logo:h.string().nullable().default(""),force_https:h.number().nullable().default(0),stop_register:h.number().nullable().default(0),app_name:h.string().nullable().default(""),app_description:h.string().nullable().default(""),app_url:h.string().nullable().default(""),subscribe_url:h.string().nullable().default(""),try_out_plan_id:h.number().nullable().default(0),try_out_hour:h.coerce.number().nullable().default(0),tos_url:h.string().nullable().default(""),currency:h.string().nullable().default(""),currency_symbol:h.string().nullable().default("")});function Zd(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>xs("site")}),{data:i}=se({queryKey:["plans"],queryFn:()=>Fs()}),c=ce({resolver:ue(Qd),defaultValues:{},mode:"onBlur"}),{mutateAsync:m}=ss({mutationFn:hs,onSuccess:d=>{d.data&&q.success(s("common.autoSaved"))}});u.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([p,k])=>{c.setValue(p,k)}),l.current=d}},[r]);const x=u.useCallback(pe.debounce(async d=>{if(!pe.isEqual(d,l.current)){a(!0);try{const p=Object.entries(d).reduce((k,[E,f])=>(k[E]=f===null?"":f,k),{});await m(p),l.current=d}finally{a(!1)}}},1e3),[m]),o=u.useCallback(d=>{x(d)},[x]);return u.useEffect(()=>{const d=c.watch(p=>{o(p)});return()=>d.unsubscribe()},[c.watch,o]),e.jsx(xe,{...c,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:c.control,name:"app_name",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.siteName.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"app_description",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.siteDescription.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"app_url",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.siteUrl.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"force_https",render:({field:d})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(F,{children:s("site.form.forceHttps.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(c.getValues())}})})]})}),e.jsx(v,{control:c.control,name:"logo",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.logo.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"subscribe_url",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(N,{children:e.jsx(Cs,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.subscribeUrl.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"tos_url",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.tosUrl.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"stop_register",render:({field:d})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(F,{children:s("site.form.stopRegister.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(c.getValues())}})})]})}),e.jsx(v,{control:c.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(N,{children:e.jsxs(W,{value:d.value?.toString(),onValueChange:p=>{d.onChange(Number(p)),o(c.getValues())},children:[e.jsx(B,{children:e.jsx(Y,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("site.form.tryOut.placeholder")}),i?.data?.map(p=>e.jsx($,{value:p.id.toString(),children:p.name},p.id.toString()))]})]})}),e.jsx(F,{children:s("site.form.tryOut.description")}),e.jsx(R,{})]})}),!!c.watch("try_out_plan_id")&&e.jsx(v,{control:c.control,name:"try_out_hour",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.tryOut.duration.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"currency",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.currency.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:c.control,name:"currency_symbol",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(c.getValues())}})}),e.jsx(F,{children:s("site.form.currencySymbol.description")}),e.jsx(R,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function Xd(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(be,{}),e.jsx(Zd,{})]})}const em=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),sm=h.object({email_verify:h.boolean().nullable(),safe_mode_enable:h.boolean().nullable(),secure_path:h.string().nullable(),email_whitelist_enable:h.boolean().nullable(),email_whitelist_suffix:h.array(h.string().nullable()).nullable(),email_gmail_limit_enable:h.boolean().nullable(),recaptcha_enable:h.boolean().nullable(),recaptcha_key:h.string().nullable(),recaptcha_site_key:h.string().nullable(),register_limit_by_ip_enable:h.boolean().nullable(),register_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:h.boolean().nullable(),password_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable()}),tm={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function am(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(sm),defaultValues:tm,mode:"onBlur"}),{data:i}=se({queryKey:["settings","safe"],queryFn:()=>xs("safe")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});u.useEffect(()=>{if(i?.data.safe){const o=i.data.safe;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[i]);const m=u.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await c(o),l.current=o}finally{a(!1)}}},1e3),[c]),x=u.useCallback(o=>{m(o)},[m]);return u.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:r.control,name:"email_verify",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(F,{children:s("safe.form.emailVerify.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"email_gmail_limit_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(F,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"safe_mode_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(F,{children:s("safe.form.safeMode.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"secure_path",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.securePath.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.securePath.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"email_whitelist_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(F,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(v,{control:r.control,name:"email_whitelist_suffix",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(N,{children:e.jsx(Cs,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...o,value:(o.value||[]).join(` +import{r as m,j as e,t as xl,c as hl,I as Pa,a as Es,S as aa,u as ms,b as na,d as fl,O as ra,e as pl,f as q,g as gl,h as jl,i as vl,k as bl,B as yl,l as Nl,Q as _l,m as wl,R as Cl,n as Sl,P as kl,o as Pl,p as Tl,q as Ja,F as Dl,C as El,s as Rl,v as Vl,w as Il,x as Fl,y as Qa,z as I,A as h,D as de,E as me,G as Za,H as Pt,J as Tt,K as la,L as Ae,T as Dt,M as Et,N as Xa,U as en,V as sn,W as oa,X as tn,Y as Ml,Z as an,_ as nn,$ as rn,a0 as ln,a1 as Rs,a2 as on,a3 as Ol,a4 as cn,a5 as dn,a6 as zl,a7 as Ll,a8 as Al,a9 as $l,aa as ql,ab as Kl,ac as Hl,ad as Ul,ae as Bl,af as Gl,ag as Wl,ah as mn,ai as Yl,aj as Jl,ak as Vs,al as un,am as Ql,an as Zl,ao as xn,ap as ia,aq as Xl,ar as eo,as as Ta,at as so,au as hn,av as to,aw as fn,ax as ao,ay as no,az as ro,aA as lo,aB as oo,aC as io,aD as pn,aE as co,aF as mo,aG as uo,aH as De,aI as xo,aJ as gn,aK as ho,aL as fo,aM as jn,aN as vn,aO as bn,aP as po,aQ as go,aR as yn,aS as Nn,aT as _n,aU as jo,aV as vo,aW as wn,aX as bo,aY as ca,aZ as Cn,a_ as yo,a$ as Sn,b0 as No,b1 as kn,b2 as _o,b3 as Pn,b4 as Tn,b5 as wo,b6 as Co,b7 as Dn,b8 as So,b9 as ko,ba as En,bb as Po,bc as Rn,bd as To,be as Do,bf as We,bg as se,bh as Ge,bi as ct,bj as Eo,bk as Ro,bl as Vo,bm as Io,bn as Fo,bo as Mo,bp as Da,bq as Ea,br as Oo,bs as zo,bt as Lo,bu as Ao,bv as $o,bw as Wt,bx as Yt,by as qo,bz as Ko,bA as Vn,bB as Ho,bC as Uo,bD as In,bE as Bo,bF as ve,bG as Go,bH as Ra,bI as Jt,bJ as Qt,bK as Wo,bL as Yo,bM as Fn,bN as Jo,bO as da,bP as Qo,bQ as Zo,bR as Xo,bS as Mn,bT as On,bU as zn,bV as ei,bW as si,bX as ti,bY as ai,bZ as Ln,b_ as ni,b$ as as,c0 as ri,c1 as li,c2 as oi,c3 as Nt,c4 as Se,c5 as Va,c6 as ii,c7 as An,c8 as $n,c9 as qn,ca as Kn,cb as Hn,cc as Un,cd as ci,ce as di,cf as mi,cg as Rt,ch as Is,ci as ns,cj as Ke,ck as He,cl as Je,cm as Qe,cn as Ze,co as ui,cp as xi,cq as hi,cr as fi,cs as pi,ct as gi,cu as ji,cv as vi,cw as bi,cx as Zt,cy as ma,cz as ua,cA as yi,cB as us,cC as xs,cD as dt,cE as Ni,cF as _t,cG as _i,cH as Ia,cI as Bn,cJ as Fa,cK as wt,cL as wi,cM as Ci,cN as Si,cO as ki,cP as Gn,cQ as Pi,cR as Ti,cS as Wn,cT as Xt,cU as Yn,cV as Di,cW as Jn,cX as Qn,cY as Ei,cZ as Ri,c_ as Vi,c$ as Ii,d0 as Fi}from"./vendor.js";import"./index.js";var Eh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Mi(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const Oi={theme:"system",setTheme:()=>null},Zn=m.createContext(Oi);function zi({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,c]=m.useState(()=>localStorage.getItem(a)||n);m.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),r==="system"){const x=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(x);return}u.classList.add(r)},[r]);const i={theme:r,setTheme:u=>{localStorage.setItem(a,u),c(u)}};return e.jsx(Zn.Provider,{...l,value:i,children:s})}const Li=()=>{const s=m.useContext(Zn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Ai=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),$i=function(s,n){return new URL(s,n).href},Ma={},ne=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const i=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),x=u?.nonce||u?.getAttribute("nonce");r=Promise.allSettled(a.map(o=>{if(o=$i(o,l),o in Ma)return;Ma[o]=!0;const d=o.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!l)for(let f=i.length-1;f>=0;f--){const g=i[f];if(g.href===o&&(!d||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${p}`))return;const R=document.createElement("link");if(R.rel=d?"stylesheet":Ai,d||(R.as="script"),R.crossOrigin="",R.href=o,x&&R.setAttribute("nonce",x),document.head.appendChild(R),d)return new Promise((f,g)=>{R.addEventListener("load",f),R.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})}))}function c(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return r.then(i=>{for(const u of i||[])u.status==="rejected"&&c(u.reason);return n().catch(c)})};function _(...s){return xl(hl(s))}const Bs=Es("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),V=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:c,loading:i=!1,leftSection:u,rightSection:x,...o},d)=>{const p=l?aa:"button";return e.jsxs(p,{className:_(Bs({variant:n,size:a,className:s})),disabled:i||c,ref:d,...o,children:[(u&&i||!u&&!x&&i)&&e.jsx(Pa,{className:"mr-2 h-4 w-4 animate-spin"}),!i&&u&&e.jsx("div",{className:"mr-2",children:u}),r,!i&&x&&e.jsx("div",{className:"ml-2",children:x}),x&&i&&e.jsx(Pa,{className:"ml-2 h-4 w-4 animate-spin"})]})});V.displayName="Button";function Ls({className:s,minimal:n=!1}){const a=ms();return e.jsx("div",{className:_("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(V,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(V,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Oa(){const s=ms();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(V,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(V,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function qi(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(V,{variant:"outline",children:"Learn more"})})]})})}function Ki(s){return typeof s>"u"}function Hi(s){return s===null}function Ui(s){return Hi(s)||Ki(s)}class Bi{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:c,time:i,expire:u}=r;return Ui(u)||u>new Date().getTime()?{value:c,time:i}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Xn({prefixKey:s="",storage:n=sessionStorage}){return new Bi({prefixKey:s,storage:n})}const er="Xboard_",Gi=function(s={}){return Xn({prefixKey:s.prefixKey||"",storage:localStorage})},Wi=function(s={}){return Xn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Vt=Gi({prefixKey:er});Wi({prefixKey:er});const sr="access_token";function nt(){return Vt.get(sr)}function tr(){Vt.remove(sr)}const za=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Yi({children:s}){const n=ms(),a=na(),l=nt();return m.useEffect(()=>{if(!l.value&&!za.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),za.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const Ji=()=>e.jsx(Yi,{children:e.jsx(ra,{})}),Qi=fl([{path:"/sign-in",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Nc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(Ji,{}),children:[{path:"/",lazy:async()=>({Component:(await ne(()=>Promise.resolve().then(()=>Ec),void 0,import.meta.url)).default}),errorElement:e.jsx(Ls,{}),children:[{index:!0,lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>em);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Ls,{}),children:[{path:"system",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>nm);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>im);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>xm);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>jm);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>_m);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Pm);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Vm);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>zm);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Km);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Wm);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>lu);return{default:s}},void 0,import.meta.url)).default})},{path:"plugin",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>cu);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>xu);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>bu);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Pu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Xu);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>nx);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>dx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Ls,{}),children:[{path:"plan",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>vx);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Vx);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>qx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>mh);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await ne(async()=>{const{default:s}=await Promise.resolve().then(()=>Ph);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Ls},{path:"/404",Component:Oa},{path:"/503",Component:qi},{path:"*",Component:Oa}]),Zi="locale";function Xi(){return Vt.get(Zi)}function ar(){tr();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const ec=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function sc(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const F=pl.create({baseURL:sc(),timeout:12e3,headers:{"Content-Type":"application/json"}});F.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=nt();if(!ec.includes(s.url?.split("?")[0]||"")){if(!n.value)return ar(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=Xi().value||"zh-CN",s},s=>Promise.reject(s));F.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&ar(),q.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function tc(){return F.get("/user/info")}const At={token:nt()?.value||"",userInfo:null,isLoggedIn:!!nt()?.value,loading:!1,error:null},tt=gl("user/fetchUserInfo",async()=>(await tc()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),nr=jl({name:"user",initialState:At,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>At},extraReducers:s=>{s.addCase(tt.pending,n=>{n.loading=!0,n.error=null}).addCase(tt.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(tt.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return At})}}),{setToken:ac,resetUserState:nc}=nr.actions,rc=s=>s.user.userInfo,lc=nr.reducer,rr=vl({reducer:{user:lc}});nt()?.value&&rr.dispatch(tt());bl.use(yl).use(Nl).init({resources:{"en-US":window.XBOARD_TRANSLATIONS?.["en-US"]||{},"zh-CN":window.XBOARD_TRANSLATIONS?.["zh-CN"]||{},"ko-KR":window.XBOARD_TRANSLATIONS?.["ko-KR"]||{}},fallbackLng:"zh-CN",supportedLngs:["en-US","zh-CN","ko-KR"],detection:{order:["querystring","localStorage","navigator"],lookupQuerystring:"lang",lookupLocalStorage:"i18nextLng",caches:["localStorage"]},interpolation:{escapeValue:!1}});const oc=new _l;wl.createRoot(document.getElementById("root")).render(e.jsx(Cl.StrictMode,{children:e.jsx(Sl,{client:oc,children:e.jsx(kl,{store:rr,children:e.jsxs(zi,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(Pl,{router:Qi}),e.jsx(Tl,{richColors:!0,position:"top-right"})]})})})}));const Me=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:_("rounded-xl border bg-card text-card-foreground shadow",s),...n}));Me.displayName="Card";const $e=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:_("flex flex-col space-y-1.5 p-6",s),...n}));$e.displayName="CardHeader";const cs=m.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:_("font-semibold leading-none tracking-tight",s),...n}));cs.displayName="CardTitle";const Hs=m.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:_("text-sm text-muted-foreground",s),...n}));Hs.displayName="CardDescription";const qe=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:_("p-6 pt-0",s),...n}));qe.displayName="CardContent";const ic=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:_("flex items-center p-6 pt-0",s),...n}));ic.displayName="CardFooter";const cc=Es("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ct=m.forwardRef(({className:s,...n},a)=>e.jsx(Ja,{ref:a,className:_(cc(),s),...n}));Ct.displayName=Ja.displayName;const ue=Dl,lr=m.createContext({}),y=({...s})=>e.jsx(lr.Provider,{value:{name:s.name},children:e.jsx(El,{...s})}),It=()=>{const s=m.useContext(lr),n=m.useContext(or),{getFieldState:a,formState:l}=Rl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:c}=n;return{id:c,name:s.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...r}},or=m.createContext({}),b=m.forwardRef(({className:s,...n},a)=>{const l=m.useId();return e.jsx(or.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:_("space-y-2",s),...n})})});b.displayName="FormItem";const N=m.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=It();return e.jsx(Ct,{ref:a,className:_(l&&"text-destructive",s),htmlFor:r,...n})});N.displayName="FormLabel";const w=m.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:c}=It();return e.jsx(aa,{ref:n,id:l,"aria-describedby":a?`${r} ${c}`:`${r}`,"aria-invalid":!!a,...s})});w.displayName="FormControl";const M=m.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=It();return e.jsx("p",{ref:a,id:l,className:_("text-[0.8rem] text-muted-foreground",s),...n})});M.displayName="FormDescription";const E=m.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:c}=It(),i=r?String(r?.message):n;return i?e.jsx("p",{ref:l,id:c,className:_("text-[0.8rem] font-medium text-destructive",s),...a,children:i}):null});E.displayName="FormMessage";const D=m.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:_("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));D.displayName="Input";const ir=m.forwardRef(({className:s,...n},a)=>{const[l,r]=m.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:_("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(V,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(c=>!c),children:l?e.jsx(Vl,{size:18}):e.jsx(Il,{size:18})})]})});ir.displayName="PasswordInput";const dc=s=>F({url:"/passport/auth/login",method:"post",data:s});function he(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Fl(s).format(n))}function mc(s=void 0,n="YYYY-MM-DD"){return he(s,n)}function qs(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function Ps(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,c=>c.includes(".")?".00":c);return n?`¥${r}`:r}function St(s){return new Promise(n=>{(async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(s);else{const l=document.createElement("textarea");l.value=s,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select();const r=document.execCommand("copy");if(document.body.removeChild(l),!r)throw new Error("execCommand failed")}n(!0)}catch(l){console.error(l),n(!1)}})()})}function ss(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?qs(r)+" TB":l>=1?qs(l)+" GB":a>=1?qs(a)+" MB":qs(n)+" KB"}const uc="access_token";function xc(s){Vt.set(uc,s)}function hc({className:s,onForgotPassword:n,...a}){const l=ms(),r=Qa(),{t:c}=I("auth"),i=h.object({email:h.string().min(1,{message:c("signIn.validation.emailRequired")}),password:h.string().min(1,{message:c("signIn.validation.passwordRequired")}).min(7,{message:c("signIn.validation.passwordLength")})}),u=de({resolver:me(i),defaultValues:{email:"",password:""}});async function x(o){try{const{data:d}=await dc(o);xc(d.auth_data),r(ac(d.auth_data)),await r(tt()).unwrap(),l("/")}catch(d){console.error("Login failed:",d),d.response?.data?.message&&u.setError("root",{message:d.response.data.message})}}return e.jsx("div",{className:_("grid gap-6",s),...a,children:e.jsx(ue,{...u,children:e.jsx("form",{onSubmit:u.handleSubmit(x),className:"space-y-4",children:e.jsxs("div",{className:"space-y-4",children:[u.formState.errors.root&&e.jsx("div",{className:"text-sm text-destructive",children:u.formState.errors.root.message}),e.jsx(y,{control:u.control,name:"email",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:c("signIn.email")}),e.jsx(w,{children:e.jsx(D,{placeholder:c("signIn.emailPlaceholder"),autoComplete:"email",...o})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"password",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:c("signIn.password")}),e.jsx(w,{children:e.jsx(ir,{placeholder:c("signIn.passwordPlaceholder"),autoComplete:"current-password",...o})}),e.jsx(E,{})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(V,{variant:"link",type:"button",className:"px-0 text-sm font-normal text-muted-foreground hover:text-primary",onClick:n,children:c("signIn.forgotPassword")})}),e.jsx(V,{className:"w-full",size:"lg",loading:u.formState.isSubmitting,children:c("signIn.submit")})]})})})})}const pe=Za,ze=Xa,fc=en,mt=la,cr=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n}));cr.displayName=Pt.displayName;const fe=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(fc,{children:[e.jsx(cr,{}),e.jsxs(Tt,{ref:l,className:_("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[n,e.jsxs(la,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Ae,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fe.displayName=Tt.displayName;const be=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});be.displayName="DialogHeader";const Le=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Le.displayName="DialogFooter";const ge=m.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:_("text-lg font-semibold leading-none tracking-tight",s),...n}));ge.displayName=Dt.displayName;const Te=m.forwardRef(({className:s,...n},a)=>e.jsx(Et,{ref:a,className:_("text-sm text-muted-foreground",s),...n}));Te.displayName=Et.displayName;const Us=Es("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),J=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},c)=>{const i=l?aa:"button";return e.jsx(i,{className:_(Us({variant:n,size:a,className:s})),ref:c,...r})});J.displayName="Button";const _s=zl,ws=Ll,pc=Al,gc=m.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(sn,{ref:r,className:_("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(oa,{className:"ml-auto h-4 w-4"})]}));gc.displayName=sn.displayName;const jc=m.forwardRef(({className:s,...n},a)=>e.jsx(tn,{ref:a,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n}));jc.displayName=tn.displayName;const ds=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Ml,{children:e.jsx(an,{ref:l,sideOffset:n,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));ds.displayName=an.displayName;const je=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(nn,{ref:l,className:_("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));je.displayName=nn.displayName;const vc=m.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(rn,{ref:r,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(ln,{children:e.jsx(Rs,{className:"h-4 w-4"})})}),n]}));vc.displayName=rn.displayName;const bc=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(on,{ref:l,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(ln,{children:e.jsx(Ol,{className:"h-4 w-4 fill-current"})})}),n]}));bc.displayName=on.displayName;const xa=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(cn,{ref:l,className:_("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));xa.displayName=cn.displayName;const rt=m.forwardRef(({className:s,...n},a)=>e.jsx(dn,{ref:a,className:_("-mx-1 my-1 h-px bg-muted",s),...n}));rt.displayName=dn.displayName;const ea=({className:s,...n})=>e.jsx("span",{className:_("ml-auto text-xs tracking-widest opacity-60",s),...n});ea.displayName="DropdownMenuShortcut";const $t=[{code:"en-US",name:"English",flag:$l,shortName:"EN"},{code:"zh-CN",name:"中文",flag:ql,shortName:"CN"},{code:"ko-KR",name:"한국어",flag:Kl,shortName:"KR"}];function dr(){const{i18n:s}=I(),n=r=>{s.changeLanguage(r)},a=$t.find(r=>r.code===s.language)||$t[1],l=a.flag;return e.jsxs(_s,{children:[e.jsx(ws,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(ds,{align:"end",className:"w-[120px]",children:$t.map(r=>{const c=r.flag,i=r.code===s.language;return e.jsxs(je,{onClick:()=>n(r.code),className:_("flex items-center gap-2 px-2 py-1.5 cursor-pointer",i&&"bg-accent"),children:[e.jsx(c,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:_("text-sm",i&&"font-medium"),children:r.name})]},r.code)})})]})}function yc(){const[s,n]=m.useState(!1),{t:a}=I("auth"),l=a("signIn.resetPassword.command");return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"container relative grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:[e.jsx("div",{className:"absolute right-4 top-4 md:right-8 md:top-8",children:e.jsx(dr,{})}),e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[480px] lg:p-8",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold",children:window?.settings?.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:window?.settings?.description})]}),e.jsxs(Me,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:a("signIn.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a("signIn.description")})]}),e.jsx(hc,{onForgotPassword:()=>n(!0)})]})]})]}),e.jsx(pe,{open:s,onOpenChange:n,children:e.jsx(fe,{children:e.jsxs(be,{children:[e.jsx(ge,{children:a("signIn.resetPassword.title")}),e.jsx(Te,{children:a("signIn.resetPassword.description")}),e.jsx("div",{className:"mt-4",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12 text-sm",children:l}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>St(l).then(()=>{q.success(a("common:copy.success"))}),children:e.jsx(Hl,{className:"h-4 w-4"})})]})})]})})})]})}const Nc=Object.freeze(Object.defineProperty({__proto__:null,default:yc},Symbol.toStringTag,{value:"Module"})),we=m.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:_("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:_("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const Pe=m.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:_("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));Pe.displayName="LayoutBody";const mr=Ul,ur=Bl,xr=Gl,ce=Wl,oe=Yl,ie=Jl,te=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(mn,{ref:l,sideOffset:n,className:_("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));te.displayName=mn.displayName;function Ft(){const{pathname:s}=na();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function hr({key:s,defaultValue:n}){const[a,l]=m.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return m.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function _c(){const[s,n]=hr({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(c=>c!==r))}}}function wc({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=I(),c=({sub:i,...u})=>{const x=`${r(u.title)}-${u.href}`;return n&&i?m.createElement(kc,{...u,sub:i,key:x,closeNav:l}):n?m.createElement(Sc,{...u,key:x,closeNav:l}):i?m.createElement(Cc,{...u,sub:i,key:x,closeNav:l}):m.createElement(fr,{...u,key:x,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:_("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(ce,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(c)})})})}function fr({title:s,icon:n,label:a,href:l,closeNav:r,subLink:c=!1}){const{checkActiveNav:i}=Ft(),{t:u}=I();return e.jsxs(Vs,{to:l,onClick:r,className:_(Bs({variant:i(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",c&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":i(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),u(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:u(a)})]})}function Cc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Ft(),{isExpanded:i,toggleItem:u}=_c(),{t:x}=I(),o=!!l?.find(T=>c(T.href)),d=x(s),p=i(d)||o;return e.jsxs(mr,{open:p,onOpenChange:()=>u(d),children:[e.jsxs(ur,{className:_(Bs({variant:o?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),x(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:x(a)}),e.jsx("span",{className:_('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(un,{stroke:1})})]}),e.jsx(xr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(T=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(fr,{...T,subLink:!0,closeNav:r})},x(T.title)))})})]})}function Sc({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:c}=Ft(),{t:i}=I();return e.jsxs(oe,{delayDuration:0,children:[e.jsx(ie,{asChild:!0,children:e.jsxs(Vs,{to:l,onClick:r,className:_(Bs({variant:c(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:i(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[i(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:i(a)})]})]})}function kc({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Ft(),{t:i}=I(),u=!!l?.find(x=>c(x.href));return e.jsxs(_s,{children:[e.jsxs(oe,{delayDuration:0,children:[e.jsx(ie,{asChild:!0,children:e.jsx(ws,{asChild:!0,children:e.jsx(V,{variant:u?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[i(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:i(a)}),e.jsx(un,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(ds,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(xa,{children:[i(s)," ",a?`(${i(a)})`:""]}),e.jsx(rt,{}),l.map(({title:x,icon:o,label:d,href:p})=>e.jsx(je,{asChild:!0,children:e.jsxs(Vs,{to:p,onClick:r,className:`${c(p)?"bg-secondary":""}`,children:[o," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:i(x)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:i(d)})]})},`${i(x)}-${p}`))]})]})}const pr=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Ql,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(Zl,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(xn,{size:18})},{title:"nav:pluginManagement",label:"",href:"/config/plugin",icon:e.jsx(ia,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(Xl,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(eo,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(Ta,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(so,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(hn,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(to,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(fn,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(ao,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(no,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(ro,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(Ta,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(lo,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(oo,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(io,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(pn,{size:18})}]}];function Pc({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=m.useState(!1),{t:c}=I();return m.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:_(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(V,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":c("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(i=>!i),children:l?e.jsx(co,{}):e.jsx(mo,{})})]}),e.jsx(wc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:pr}),e.jsx("div",{className:_("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:_("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(V,{onClick:()=>a(i=>!i),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":c("common:toggleSidebar"),children:e.jsx(uo,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function Tc(){const[s,n]=hr({key:"collapsed-sidebar",defaultValue:!1});return m.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function Dc(){const[s,n]=Tc();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(Pc,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(ra,{})})]})}const Ec=Object.freeze(Object.defineProperty({__proto__:null,default:Dc},Symbol.toStringTag,{value:"Module"})),Cs=m.forwardRef(({className:s,...n},a)=>e.jsx(De,{ref:a,className:_("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));Cs.displayName=De.displayName;const Rc=({children:s,...n})=>e.jsx(pe,{...n,children:e.jsx(fe,{className:"overflow-hidden p-0",children:e.jsx(Cs,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Fs=m.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(xo,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(De.Input,{ref:a,className:_("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Fs.displayName=De.Input.displayName;const Ss=m.forwardRef(({className:s,...n},a)=>e.jsx(De.List,{ref:a,className:_("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));Ss.displayName=De.List.displayName;const Ms=m.forwardRef((s,n)=>e.jsx(De.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Ms.displayName=De.Empty.displayName;const Oe=m.forwardRef(({className:s,...n},a)=>e.jsx(De.Group,{ref:a,className:_("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Oe.displayName=De.Group.displayName;const Gs=m.forwardRef(({className:s,...n},a)=>e.jsx(De.Separator,{ref:a,className:_("-mx-1 h-px bg-border",s),...n}));Gs.displayName=De.Separator.displayName;const ke=m.forwardRef(({className:s,...n},a)=>e.jsx(De.Item,{ref:a,className:_("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));ke.displayName=De.Item.displayName;function Vc(){const s=[];for(const n of pr)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function Ie(){const[s,n]=m.useState(!1),a=ms(),l=Vc(),{t:r}=I("search"),{t:c}=I("nav");m.useEffect(()=>{const u=x=>{x.key==="k"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),n(o=>!o))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const i=m.useCallback(u=>{n(!1),a(u)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(gn,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(Rc,{open:s,onOpenChange:n,children:[e.jsx(Fs,{placeholder:r("placeholder")}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:r("noResults")}),e.jsx(Oe,{heading:r("title"),children:l.map(u=>e.jsxs(ke,{value:`${u.parent?u.parent+" ":""}${u.title}`,onSelect:()=>i(u.href),children:[e.jsx("div",{className:"mr-2",children:u.icon}),e.jsx("span",{children:c(u.title)}),u.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:c(u.parent)})]},u.href))})]})]})]})}function Ee(){const{theme:s,setTheme:n}=Li();return m.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(V,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(ho,{size:20}):e.jsx(fo,{size:20})}),e.jsx(dr,{})]})}const gr=m.forwardRef(({className:s,...n},a)=>e.jsx(jn,{ref:a,className:_("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));gr.displayName=jn.displayName;const jr=m.forwardRef(({className:s,...n},a)=>e.jsx(vn,{ref:a,className:_("aspect-square h-full w-full",s),...n}));jr.displayName=vn.displayName;const vr=m.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:_("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));vr.displayName=bn.displayName;function Re(){const s=ms(),n=Qa(),a=po(rc),{t:l}=I(["common"]),r=()=>{tr(),n(nc()),s("/sign-in")},c=a?.email?.split("@")[0]||l("common:user"),i=c.substring(0,2).toUpperCase();return e.jsxs(_s,{children:[e.jsx(ws,{asChild:!0,children:e.jsx(V,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(gr,{className:"h-8 w-8",children:[e.jsx(jr,{src:a?.avatar_url,alt:c}),e.jsx(vr,{children:i})]})})}),e.jsxs(ds,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(xa,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:c}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(rt,{}),e.jsx(je,{asChild:!0,children:e.jsxs(Vs,{to:"/config/system",children:[l("common:settings"),e.jsx(ea,{children:"⌘S"})]})}),e.jsx(rt,{}),e.jsxs(je,{onClick:r,children:[l("common:logout"),e.jsx(ea,{children:"⇧⌘Q"})]})]})]})}const A=window?.settings?.secure_path,Ic=s=>F.get(A+"/stat/getOrder",{params:s}),Fc=()=>F.get(A+"/stat/getStats"),La=s=>F.get(A+"/stat/getTrafficRank",{params:s}),Mc=()=>F.get(A+"/theme/getThemes"),Oc=s=>F.post(A+"/theme/getThemeConfig",{name:s}),zc=(s,n)=>F.post(A+"/theme/saveThemeConfig",{name:s,config:n}),Lc=s=>{const n=new FormData;return n.append("file",s),F.post(A+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},Ac=s=>F.post(A+"/theme/delete",{name:s}),$c=s=>F.post(A+"/config/save",s),br=()=>F.get(A+"/server/manage/getNodes"),qc=s=>F.post(A+"/server/manage/save",s),Kc=s=>F.post(A+"/server/manage/drop",s),Hc=s=>F.post(A+"/server/manage/copy",s),Uc=s=>F.post(A+"/server/manage/update",s),Bc=s=>F.post(A+"/server/manage/sort",s),Mt=()=>F.get(A+"/server/group/fetch"),Gc=s=>F.post(A+"/server/group/save",s),Wc=s=>F.post(A+"/server/group/drop",s),yr=()=>F.get(A+"/server/route/fetch"),Yc=s=>F.post(A+"/server/route/save",s),Jc=s=>F.post(A+"/server/route/drop",s),Qc=()=>F.get(A+"/payment/fetch"),Zc=()=>F.get(A+"/payment/getPaymentMethods"),Xc=s=>F.post(A+"/payment/getPaymentForm",s),ed=s=>F.post(A+"/payment/save",s),sd=s=>F.post(A+"/payment/drop",s),td=s=>F.post(A+"/payment/show",s),ad=s=>F.post(A+"/payment/sort",s),nd=s=>F.post(A+"/notice/save",s),rd=s=>F.post(A+"/notice/drop",s),ld=s=>F.post(A+"/notice/show",s),od=()=>F.get(A+"/knowledge/fetch"),id=s=>F.get(A+"/knowledge/fetch?id="+s),cd=s=>F.post(A+"/knowledge/save",s),dd=s=>F.post(A+"/knowledge/drop",s),md=s=>F.post(A+"/knowledge/show",s),ud=s=>F.post(A+"/knowledge/sort",s),Os=()=>F.get(A+"/plan/fetch"),xd=s=>F.post(A+"/plan/save",s),qt=s=>F.post(A+"/plan/update",s),hd=s=>F.post(A+"/plan/drop",s),fd=s=>F.post(A+"/plan/sort",{ids:s}),pd=async s=>F.post(A+"/order/fetch",s),gd=s=>F.post(A+"/order/detail",s),jd=s=>F.post(A+"/order/paid",s),vd=s=>F.post(A+"/order/cancel",s),Aa=s=>F.post(A+"/order/update",s),bd=s=>F.post(A+"/order/assign",s),yd=s=>F.post(A+"/coupon/fetch",s),Nd=s=>F.post(A+"/coupon/generate",s),_d=s=>F.post(A+"/coupon/drop",s),wd=s=>F.post(A+"/coupon/update",s),Cd=s=>F.post(A+"/user/fetch",s),Sd=s=>F.post(A+"/user/update",s),kd=s=>F.post(A+"/user/resetSecret",s),Pd=s=>F.post(A+"/user/generate",s),Td=s=>F.post(A+"/stat/getStatUser",s),Dd=s=>F.post(A+"/ticket/fetch",s),Ed=s=>F.get(A+"/ticket/fetch?id= "+s),Rd=s=>F.post(A+"/ticket/reply",s),Nr=s=>F.post(A+"/ticket/close",{id:s}),hs=(s="")=>F.get(A+"/config/fetch?key="+s),fs=s=>F.post(A+"/config/save",s),Vd=()=>F.get(A+"/config/getEmailTemplate"),Id=()=>F.post(A+"/config/testSendMail"),Fd=()=>F.post(A+"/config/setTelegramWebhook"),ha=go,Ot=m.forwardRef(({className:s,...n},a)=>e.jsx(yn,{ref:a,className:_("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));Ot.displayName=yn.displayName;const Ns=m.forwardRef(({className:s,...n},a)=>e.jsx(Nn,{ref:a,className:_("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...n}));Ns.displayName=Nn.displayName;const bt=m.forwardRef(({className:s,...n},a)=>e.jsx(_n,{ref:a,className:_("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));bt.displayName=_n.displayName;const G=jo,js=So,W=vo,U=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(wn,{ref:l,className:_("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[n,e.jsx(bo,{asChild:!0,children:e.jsx(ca,{className:"h-4 w-4 opacity-50"})})]}));U.displayName=wn.displayName;const _r=m.forwardRef(({className:s,...n},a)=>e.jsx(Cn,{ref:a,className:_("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(yo,{className:"h-4 w-4"})}));_r.displayName=Cn.displayName;const wr=m.forwardRef(({className:s,...n},a)=>e.jsx(Sn,{ref:a,className:_("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(ca,{className:"h-4 w-4"})}));wr.displayName=Sn.displayName;const B=m.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(No,{children:e.jsxs(kn,{ref:r,className:_("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...l,children:[e.jsx(_r,{}),e.jsx(_o,{className:_("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(wr,{})]})}));B.displayName=kn.displayName;const Md=m.forwardRef(({className:s,...n},a)=>e.jsx(Pn,{ref:a,className:_("px-2 py-1.5 text-sm font-semibold",s),...n}));Md.displayName=Pn.displayName;const L=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Tn,{ref:l,className:_("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(wo,{children:e.jsx(Rs,{className:"h-4 w-4"})})}),e.jsx(Co,{children:n})]}));L.displayName=Tn.displayName;const Od=m.forwardRef(({className:s,...n},a)=>e.jsx(Dn,{ref:a,className:_("-mx-1 my-1 h-px bg-muted",s),...n}));Od.displayName=Dn.displayName;function zs({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(ko,{showOutsideDays:a,className:_("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:_(Us({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:_("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:_(Us({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...c})=>e.jsx(En,{className:_("h-4 w-4",r),...c}),IconRight:({className:r,...c})=>e.jsx(oa,{className:_("h-4 w-4",r),...c})},...l})}zs.displayName="Calendar";const rs=To,ls=Do,Xe=m.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(Po,{children:e.jsx(Rn,{ref:r,align:n,sideOffset:a,className:_("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})}));Xe.displayName=Rn.displayName;const vs={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},et=s=>(s/100).toFixed(2),zd=({active:s,payload:n,label:a})=>{const{t:l}=I();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,c)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${et(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},c))]}):null},Ld=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Ad=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=We(a,7);break;case"30d":l=We(a,30);break;case"90d":l=We(a,90);break;case"180d":l=We(a,180);break;case"365d":l=We(a,365);break;default:l=We(a,30)}return{startDate:l,endDate:a}};function $d(){const[s,n]=m.useState("amount"),[a,l]=m.useState("30d"),[r,c]=m.useState({from:We(new Date,7),to:new Date}),{t:i}=I(),{startDate:u,endDate:x}=Ad(a,r),{data:o}=se({queryKey:["orderStat",{start_date:Ge(u,"yyyy-MM-dd"),end_date:Ge(x,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await Ic({start_date:Ge(u,"yyyy-MM-dd"),end_date:Ge(x,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(Me,{children:[e.jsx($e,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(cs,{children:i("dashboard:overview.title")}),e.jsxs(Hs,{children:[o?.summary.start_date," ",i("dashboard:overview.to")," ",o?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(G,{value:a,onValueChange:d=>l(d),children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(W,{placeholder:i("dashboard:overview.selectTimeRange")})}),e.jsx(B,{children:Ld.map(d=>e.jsx(L,{value:d.value,children:i(d.label)},d.value))})]}),a==="custom"&&e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:_("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(ct,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[Ge(r.from,"yyyy-MM-dd")," -"," ",Ge(r.to,"yyyy-MM-dd")]}):Ge(r.from,"yyyy-MM-dd"):i("dashboard:overview.selectDate")})]})}),e.jsx(Xe,{className:"w-auto p-0",align:"end",children:e.jsx(zs,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&c({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(ha,{value:s,onValueChange:d=>n(d),children:e.jsxs(Ot,{children:[e.jsx(Ns,{value:"amount",children:i("dashboard:overview.amount")}),e.jsx(Ns,{value:"count",children:i("dashboard:overview.count")})]})})]})]})}),e.jsxs(qe,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:i("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",et(o?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i("dashboard:overview.totalTransactions",{count:o?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i("dashboard:overview.avgOrderAmount")," ¥",et(o?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:i("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",et(o?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i("dashboard:overview.totalTransactions",{count:o?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i("dashboard:overview.commissionRate")," ",o?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Eo,{width:"100%",height:"100%",children:e.jsxs(Ro,{data:o?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:vs.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:vs.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:vs.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:vs.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(Vo,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>Ge(new Date(d),"MM-dd",{locale:Oo})}),e.jsx(Io,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${et(d)}`:i("dashboard:overview.transactions",{count:d})}),e.jsx(Fo,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Mo,{content:e.jsx(zd,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Da,{type:"monotone",dataKey:"paid_total",name:i("dashboard:overview.orderAmount"),stroke:vs.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Da,{type:"monotone",dataKey:"commission_total",name:i("dashboard:overview.commissionAmount"),stroke:vs.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ea,{dataKey:"paid_count",name:i("dashboard:overview.orderCount"),fill:vs.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Ea,{dataKey:"commission_count",name:i("dashboard:overview.commissionCount"),fill:vs.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function le({className:s,...n}){return e.jsx("div",{className:_("animate-pulse rounded-md bg-primary/10",s),...n})}function qd(){return e.jsxs(Me,{children:[e.jsxs($e,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(le,{className:"h-4 w-[120px]"}),e.jsx(le,{className:"h-4 w-4"})]}),e.jsxs(qe,{children:[e.jsx(le,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(le,{className:"h-4 w-4"}),e.jsx(le,{className:"h-4 w-[100px]"})]})]})]})}function Kd(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(qd,{},n))})}var Z=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Z||{});const Zs={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Xs={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var Ye=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(Ye||{}),re=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(re||{});const xt={0:"待确认",1:"发放中",2:"有效",3:"无效"},ht={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var xe=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(xe||{});const Hd={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var Ne=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(Ne||{});const Ts=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],is={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var Fe=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(Fe||{});const Ud={1:"按金额优惠",2:"按比例优惠"};var at=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(at||{}),ts=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(ts||{});function bs({title:s,value:n,icon:a,trend:l,description:r,onClick:c,highlight:i,className:u}){return e.jsxs(Me,{className:_("transition-colors",c&&"cursor-pointer hover:bg-muted/50",i&&"border-primary/50",u),onClick:c,children:[e.jsxs($e,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(cs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(qe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Ko,{className:_("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:_("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function Bd({className:s}){const n=ms(),{t:a}=I(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await Fc()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(Kd,{});const c=()=>{const i=new URLSearchParams;i.set("commission_status",re.PENDING.toString()),i.set("status",Z.COMPLETED.toString()),i.set("commission_balance","gt:0"),n(`/finance/order?${i.toString()}`)};return e.jsxs("div",{className:_("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(bs,{title:a("dashboard:stats.todayIncome"),value:Ps(l.todayIncome),icon:e.jsx(zo,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(bs,{title:a("dashboard:stats.monthlyIncome"),value:Ps(l.currentMonthIncome),icon:e.jsx(Lo,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(bs,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Ao,{className:_("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(bs,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx($o,{className:_("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:c,highlight:l.commissionPendingTotal>0}),e.jsx(bs,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Wt,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(bs,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Wt,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(bs,{title:a("dashboard:stats.monthlyUpload"),value:ss(l.monthTraffic.upload),icon:e.jsx(Yt,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:ss(l.todayTraffic.upload)})}),e.jsx(bs,{title:a("dashboard:stats.monthlyDownload"),value:ss(l.monthTraffic.download),icon:e.jsx(qo,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:ss(l.todayTraffic.download)})})]})}const lt=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Vn,{ref:l,className:_("relative overflow-hidden",s),...a,children:[e.jsx(Ho,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(kt,{}),e.jsx(Uo,{})]}));lt.displayName=Vn.displayName;const kt=m.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(In,{ref:l,orientation:n,className:_("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Bo,{className:"relative flex-1 rounded-full bg-border"})}));kt.displayName=In.displayName;const sa={today:{getValue:()=>{const s=Wo();return{start:s,end:Yo(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:We(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:We(s,30),end:s}}},custom:{getValue:()=>null}};function $a({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=I(),c={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(G,{value:s,onValueChange:a,children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(W,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(sa).map(([i])=>e.jsx(L,{value:i,children:c[i]},i))})]}),s==="custom"&&e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:_("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(ct,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[Ge(n.from,"yyyy-MM-dd")," -"," ",Ge(n.to,"yyyy-MM-dd")]}):Ge(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(Xe,{className:"w-auto p-0",align:"end",children:e.jsx(zs,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:i=>{i?.from&&i?.to&&l({from:i.from,to:i.to})},numberOfMonths:2})})]})]})}const As=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Gd({className:s}){const{t:n}=I(),[a,l]=m.useState("today"),[r,c]=m.useState({from:We(new Date,7),to:new Date}),[i,u]=m.useState("today"),[x,o]=m.useState({from:We(new Date,7),to:new Date}),d=m.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:sa[a].getValue(),[a,r]),p=m.useMemo(()=>i==="custom"?{start:x.from,end:x.to}:sa[i].getValue(),[i,x]),{data:T}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>La({type:"node",start_time:ve.round(d.start.getTime()/1e3),end_time:ve.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:R}=se({queryKey:["userTrafficRank",p.start,p.end],queryFn:()=>La({type:"user",start_time:ve.round(p.start.getTime()/1e3),end_time:ve.round(p.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:_("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Me,{children:[e.jsx($e,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(cs,{className:"flex items-center text-base font-medium",children:[e.jsx(Go,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx($a,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:c}),e.jsx(Ra,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(qe,{className:"flex-1",children:T?.data?e.jsxs(lt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:T.data.map(f=>e.jsx(ce,{delayDuration:200,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:_("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Jt,{className:"mr-1 h-3 w-3"}):e.jsx(Qt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/T.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:_("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(kt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(Me,{children:[e.jsx($e,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(cs,{className:"flex items-center text-base font-medium",children:[e.jsx(Wt,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx($a,{selectedRange:i,customDateRange:x,onRangeChange:u,onCustomRangeChange:o}),e.jsx(Ra,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(qe,{className:"flex-1",children:R?.data?e.jsxs(lt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:R.data.map(f=>e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:f.name}),e.jsxs("span",{className:_("ml-2 flex items-center text-xs font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?e.jsx(Jt,{className:"mr-1 h-3 w-3"}):e.jsx(Qt,{className:"mr-1 h-3 w-3"}),Math.abs(f.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${f.value/R.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(f.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(f.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(f.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:_("font-medium",f.change>=0?"text-green-600":"text-red-600"),children:[f.change>=0?"+":"",f.change,"%"]})]})})]})},f.id))}),e.jsx(kt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Wd=Es("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function K({className:s,variant:n,...a}){return e.jsx("div",{className:_(Wd({variant:n}),s),...a})}const _e=window?.settings?.secure_path,Cr=5*60*1e3,ta=new Map,Yd=s=>{const n=ta.get(s);return n?Date.now()-n.timestamp>Cr?(ta.delete(s),null):n.data:null},Jd=(s,n)=>{ta.set(s,{data:n,timestamp:Date.now()})},Qd=async(s,n=Cr)=>{const a=Yd(s);if(a)return a;const l=await F.get(s);return Jd(s,l),l},qa={getList:()=>Qd(`${_e}/notice/fetch`),save:s=>F.post(`${_e}/notice/save`,s),drop:s=>F.post(`${_e}/notice/drop`,{id:s}),updateStatus:s=>F.post(`${_e}/notice/show`,{id:s}),sort:s=>F.post(`${_e}/notice/sort`,{ids:s})},Ka={getSystemStatus:()=>F.get(`${_e}/system/getSystemStatus`),getQueueStats:()=>F.get(`${_e}/system/getQueueStats`),getQueueWorkload:()=>F.get(`${_e}/system/getQueueWorkload`),getQueueMasters:()=>F.get(`${_e}/system/getQueueMasters`),getSystemLog:s=>F.get(`${_e}/system/getSystemLog`,{params:s})},Ds={getPluginList:()=>F.get(`${_e}/plugin/getPlugins`),installPlugin:s=>F.post(`${_e}/plugin/install`,{code:s}),uninstallPlugin:s=>F.post(`${_e}/plugin/uninstall`,{code:s}),enablePlugin:s=>F.post(`${_e}/plugin/enable`,{code:s}),disablePlugin:s=>F.post(`${_e}/plugin/disable`,{code:s}),getPluginConfig:s=>F.get(`${_e}/plugin/config`,{params:{code:s}}),updatePluginConfig:(s,n)=>F.post(`${_e}/plugin/config`,{code:s,config:n})},yt=m.forwardRef(({className:s,value:n,...a},l)=>e.jsx(Fn,{ref:l,className:_("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Jo,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));yt.displayName=Fn.displayName;function Zd(){const{t:s}=I(),[n,a]=m.useState(null),[l,r]=m.useState(null),[c,i]=m.useState(!0),[u,x]=m.useState(!1),o=async()=>{try{x(!0);const[T,R]=await Promise.all([Ka.getSystemStatus(),Ka.getQueueStats()]);a(T.data),r(R.data)}catch(T){console.error("Error fetching system data:",T)}finally{i(!1),x(!1)}};m.useEffect(()=>{o();const T=setInterval(o,3e4);return()=>clearInterval(T)},[]);const d=()=>{o()};if(c)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(da,{className:"h-6 w-6 animate-spin"})});const p=T=>T?e.jsx(Mn,{className:"h-5 w-5 text-green-500"}):e.jsx(On,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Me,{children:[e.jsxs($e,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(cs,{className:"flex items-center gap-2",children:[e.jsx(Qo,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(Hs,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:u,children:e.jsx(Zo,{className:_("h-4 w-4",u&&"animate-spin")})})]}),e.jsx(qe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[p(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(K,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(yt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(yt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(Me,{children:[e.jsxs($e,{children:[e.jsxs(cs,{className:"flex items-center gap-2",children:[e.jsx(Xo,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(Hs,{children:s("dashboard:queue.details.description")})]}),e.jsx(qe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(yt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Xd(){const{t:s}=I();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ie,{}),e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsx(Pe,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Bd,{}),e.jsx($d,{}),e.jsx(Gd,{}),e.jsx(Zd,{})]})})})]})}const em=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),ye=m.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(zn,{ref:r,decorative:a,orientation:n,className:_("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));ye.displayName=zn.displayName;function sm({className:s,items:n,...a}){const{pathname:l}=na(),r=ms(),[c,i]=m.useState(l??"/settings"),u=o=>{i(o),r(o)},{t:x}=I("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(G,{value:c,onValueChange:u,children:[e.jsx(U,{className:"h-12 sm:w-48",children:e.jsx(W,{placeholder:"Theme"})}),e.jsx(B,{children:n.map(o=>e.jsx(L,{value:o.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:o.icon}),e.jsx("span",{className:"text-md",children:x(o.title)})]})},o.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:_("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(o=>e.jsxs(Vs,{to:o.href,className:_(Bs({variant:"ghost"}),l===o.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:o.icon}),x(o.title)]},o.href))})})]})}const tm=[{title:"site.title",key:"site",icon:e.jsx(ei,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(fn,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(pn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(si,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(hn,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(ti,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(ai,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(xn,{size:18}),href:"/config/system/app",description:"app.description"}];function am(){const{t:s}=I("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(ye,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(sm,{items:tm})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(ra,{})})})]})]})]})}const nm=Object.freeze(Object.defineProperty({__proto__:null,default:am},Symbol.toStringTag,{value:"Module"})),H=m.forwardRef(({className:s,...n},a)=>e.jsx(Ln,{className:_("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(ni,{className:_("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));H.displayName=Ln.displayName;const ps=m.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:_("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}));ps.displayName="Textarea";const rm=h.object({logo:h.string().nullable().default(""),force_https:h.number().nullable().default(0),stop_register:h.number().nullable().default(0),app_name:h.string().nullable().default(""),app_description:h.string().nullable().default(""),app_url:h.string().nullable().default(""),subscribe_url:h.string().nullable().default(""),try_out_plan_id:h.number().nullable().default(0),try_out_hour:h.coerce.number().nullable().default(0),tos_url:h.string().nullable().default(""),currency:h.string().nullable().default(""),currency_symbol:h.string().nullable().default("")});function lm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>hs("site")}),{data:c}=se({queryKey:["plans"],queryFn:()=>Os()}),i=de({resolver:me(rm),defaultValues:{},mode:"onBlur"}),{mutateAsync:u}=as({mutationFn:fs,onSuccess:d=>{d.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([p,T])=>{i.setValue(p,T)}),l.current=d}},[r]);const x=m.useCallback(ve.debounce(async d=>{if(!ve.isEqual(d,l.current)){a(!0);try{const p=Object.entries(d).reduce((T,[R,f])=>(T[R]=f===null?"":f,T),{});await u(p),l.current=d}finally{a(!1)}}},1e3),[u]),o=m.useCallback(d=>{x(d)},[x]);return m.useEffect(()=>{const d=i.watch(p=>{o(p)});return()=>d.unsubscribe()},[i.watch,o]),e.jsx(ue,{...i,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:i.control,name:"app_name",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.siteName.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"app_description",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.siteDescription.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"app_url",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.siteUrl.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"force_https",render:({field:d})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(M,{children:s("site.form.forceHttps.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(i.getValues())}})})]})}),e.jsx(y,{control:i.control,name:"logo",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.logo.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"subscribe_url",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(w,{children:e.jsx(ps,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.subscribeUrl.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"tos_url",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.tosUrl.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"stop_register",render:({field:d})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(M,{children:s("site.form.stopRegister.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:!!d.value,onCheckedChange:p=>{d.onChange(Number(p)),o(i.getValues())}})})]})}),e.jsx(y,{control:i.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(w,{children:e.jsxs(G,{value:d.value?.toString(),onValueChange:p=>{d.onChange(Number(p)),o(i.getValues())},children:[e.jsx(U,{children:e.jsx(W,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("site.form.tryOut.placeholder")}),c?.data?.map(p=>e.jsx(L,{value:p.id.toString(),children:p.name},p.id.toString()))]})]})}),e.jsx(M,{children:s("site.form.tryOut.description")}),e.jsx(E,{})]})}),!!i.watch("try_out_plan_id")&&e.jsx(y,{control:i.control,name:"try_out_hour",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.tryOut.duration.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"currency",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.currency.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:i.control,name:"currency_symbol",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:p=>{d.onChange(p),o(i.getValues())}})}),e.jsx(M,{children:s("site.form.currencySymbol.description")}),e.jsx(E,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function om(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(ye,{}),e.jsx(lm,{})]})}const im=Object.freeze(Object.defineProperty({__proto__:null,default:om},Symbol.toStringTag,{value:"Module"})),cm=h.object({email_verify:h.boolean().nullable(),safe_mode_enable:h.boolean().nullable(),secure_path:h.string().nullable(),email_whitelist_enable:h.boolean().nullable(),email_whitelist_suffix:h.array(h.string().nullable()).nullable(),email_gmail_limit_enable:h.boolean().nullable(),recaptcha_enable:h.boolean().nullable(),recaptcha_key:h.string().nullable(),recaptcha_site_key:h.string().nullable(),register_limit_by_ip_enable:h.boolean().nullable(),register_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:h.boolean().nullable(),password_limit_count:h.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:h.coerce.string().transform(s=>s===""?null:s).nullable()}),dm={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function mm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(cm),defaultValues:dm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","safe"],queryFn:()=>hs("safe")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data.safe){const o=c.data.safe;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(ve.debounce(async o=>{if(!ve.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(ue,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:r.control,name:"email_verify",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(M,{children:s("safe.form.emailVerify.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"email_gmail_limit_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(M,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"safe_mode_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(M,{children:s("safe.form.safeMode.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"secure_path",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.securePath.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.securePath.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"email_whitelist_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(M,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(y,{control:r.control,name:"email_whitelist_suffix",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(w,{children:e.jsx(ps,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...o,value:(o.value||[]).join(` `),onChange:d=>{const p=d.target.value.split(` -`).filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"recaptcha_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(F,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(v,{control:r.control,name:"recaptcha_key",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.recaptcha.key.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.recaptcha.key.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"recaptcha_site_key",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(R,{})]})})]}),e.jsx(v,{control:r.control,name:"register_limit_by_ip_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(F,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(v,{control:r.control,name:"register_limit_count",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.registerLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.registerLimit.count.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"register_limit_expire",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(R,{})]})})]}),e.jsx(v,{control:r.control,name:"password_limit_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(F,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(v,{control:r.control,name:"password_limit_count",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"password_limit_expire",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(F,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(R,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function nm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(be,{}),e.jsx(am,{})]})}const rm=Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"})),lm=h.object({plan_change_enable:h.boolean().nullable().default(!1),reset_traffic_method:h.coerce.number().nullable().default(0),surplus_enable:h.boolean().nullable().default(!1),new_order_event_id:h.coerce.number().nullable().default(0),renew_order_event_id:h.coerce.number().nullable().default(0),change_order_event_id:h.coerce.number().nullable().default(0),show_info_to_server_enable:h.boolean().nullable().default(!1),show_protocol_to_server_enable:h.boolean().nullable().default(!1),default_remind_expire:h.boolean().nullable().default(!1),default_remind_traffic:h.boolean().nullable().default(!1),subscribe_path:h.string().nullable().default("s")}),om={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function im(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(lm),defaultValues:om,mode:"onBlur"}),{data:i}=se({queryKey:["settings","subscribe"],queryFn:()=>xs("subscribe")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});u.useEffect(()=>{if(i?.data?.subscribe){const o=i?.data?.subscribe;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[i]);const m=u.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await c(o),l.current=o}finally{a(!1)}}},1e3),[c]),x=u.useCallback(o=>{m(o)},[m]);return u.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:r.control,name:"plan_change_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(F,{children:s("subscribe.plan_change_enable.description")}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"reset_traffic_method",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择重置方式"})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx($,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx($,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx($,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx($,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(F,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"surplus_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(F,{children:s("subscribe.surplus_enable.description")}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"new_order_event_id",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("subscribe.new_order_event.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"renew_order_event_id",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("renew_order_event.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"change_order_event_id",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx($,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(F,{children:s("subscribe.change_order_event.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"subscribe_path",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:"subscribe",...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:o.value||"s"})]}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"show_info_to_server_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(F,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"show_protocol_to_server_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(F,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function cm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(be,{}),e.jsx(im,{})]})}const dm=Object.freeze(Object.defineProperty({__proto__:null,default:cm},Symbol.toStringTag,{value:"Module"})),mm=h.object({invite_force:h.boolean().default(!1),invite_commission:h.coerce.string().default("0"),invite_gen_limit:h.coerce.string().default("0"),invite_never_expire:h.boolean().default(!1),commission_first_time_enable:h.boolean().default(!1),commission_auto_check_enable:h.boolean().default(!1),commission_withdraw_limit:h.coerce.string().default("0"),commission_withdraw_method:h.array(h.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:h.boolean().default(!1),commission_distribution_enable:h.boolean().default(!1),commission_distribution_l1:h.coerce.number().default(0),commission_distribution_l2:h.coerce.number().default(0),commission_distribution_l3:h.coerce.number().default(0)}),um={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function xm(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(mm),defaultValues:um,mode:"onBlur"}),{data:i}=se({queryKey:["settings","invite"],queryFn:()=>xs("invite")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});u.useEffect(()=>{if(i?.data?.invite){const o=i?.data?.invite;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[i]);const m=u.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await c(o),l.current=o}finally{a(!1)}}},1e3),[c]),x=u.useCallback(o=>{m(o)},[m]);return u.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:r.control,name:"invite_force",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(F,{children:s("invite.invite_force.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"invite_commission",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("invite.invite_commission.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.invite_commission.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"invite_gen_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("invite.invite_gen_limit.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.invite_gen_limit.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"invite_never_expire",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(F,{children:s("invite.invite_never_expire.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"commission_first_time_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(F,{children:s("invite.commission_first_time.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"commission_auto_check_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(F,{children:s("invite.commission_auto_check.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"commission_withdraw_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"commission_withdraw_method",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("invite.commission_withdraw_method.placeholder"),...o,value:Array.isArray(o.value)?o.value.join(","):"",onChange:d=>{const p=d.target.value.split(",").filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(F,{children:s("invite.commission_withdraw_method.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"withdraw_close_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(F,{children:s("invite.withdraw_close.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(v,{control:r.control,name:"commission_distribution_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(F,{children:s("invite.commission_distribution.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(v,{control:r.control,name:"commission_distribution_l1",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:s("invite.commission_distribution.l1")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"commission_distribution_l2",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:s("invite.commission_distribution.l2")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"commission_distribution_l3",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:s("invite.commission_distribution.l3")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(R,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function hm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(be,{}),e.jsx(xm,{})]})}const fm=Object.freeze(Object.defineProperty({__proto__:null,default:hm},Symbol.toStringTag,{value:"Module"})),pm=h.object({frontend_theme:h.string().nullable(),frontend_theme_sidebar:h.string().nullable(),frontend_theme_header:h.string().nullable(),frontend_theme_color:h.string().nullable(),frontend_background_url:h.string().url().nullable()}),gm={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function jm(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>xs("frontend")}),n=ce({resolver:ue(pm),defaultValues:gm,mode:"onChange"});u.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,i])=>{n.setValue(r,i)})}},[s]);function a(l){hs(l).then(({data:r})=>{r&&q.success("更新成功")})}return e.jsx(xe,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(v,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:"边栏风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(N,{children:e.jsx(H,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(v,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:"头部风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(N,{children:e.jsx(H,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(v,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(j,{children:[e.jsx(b,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(N,{children:e.jsxs("select",{className:y(Ks({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(aa,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(F,{children:"主题色"}),e.jsx(R,{})]})}),e.jsx(v,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(j,{children:[e.jsx(b,{children:"背景"}),e.jsx(N,{children:e.jsx(P,{placeholder:"请输入图片地址",...l})}),e.jsx(F,{children:"将会在后台登录页面进行展示。"}),e.jsx(R,{})]})}),e.jsx(V,{type:"submit",children:"保存设置"})]})})}function vm(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(be,{}),e.jsx(jm,{})]})}const bm=Object.freeze(Object.defineProperty({__proto__:null,default:vm},Symbol.toStringTag,{value:"Module"})),ym=h.object({server_pull_interval:h.coerce.number().nullable(),server_push_interval:h.coerce.number().nullable(),server_token:h.string().nullable(),device_limit_mode:h.coerce.number().nullable()}),Nm={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function _m(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(ym),defaultValues:Nm,mode:"onBlur"}),{data:i}=se({queryKey:["settings","server"],queryFn:()=>xs("server")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:d=>{d.data&&q.success(s("common.AutoSaved"))}});u.useEffect(()=>{if(i?.data.server){const d=i.data.server;Object.entries(d).forEach(([p,k])=>{r.setValue(p,k)}),l.current=d}},[i]);const m=u.useCallback(pe.debounce(async d=>{if(!pe.isEqual(d,l.current)){a(!0);try{await c(d),l.current=d}finally{a(!1)}}},1e3),[c]),x=u.useCallback(d=>{m(d)},[m]);u.useEffect(()=>{const d=r.watch(p=>{x(p)});return()=>d.unsubscribe()},[r.watch,x]);const o=()=>{const d=Math.floor(Math.random()*17)+16,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let k="";for(let E=0;Ee.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("server.server_token.title")}),e.jsx(N,{children:e.jsxs("div",{className:"relative",children:[e.jsx(P,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:p=>{p.preventDefault(),o()},children:e.jsx(Xo,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(F,{children:s("server.server_token.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const k=p.target.value?Number(p.target.value):null;d.onChange(k)}})}),e.jsx(F,{children:s("server.server_pull_interval.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const k=p.target.value?Number(p.target.value):null;d.onChange(k)}})}),e.jsx(F,{children:s("server.server_push_interval.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(W,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx($,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(F,{children:s("server.device_limit_mode.description")}),e.jsx(R,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function wm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(be,{}),e.jsx(_m,{})]})}const Cm=Object.freeze(Object.defineProperty({__proto__:null,default:wm},Symbol.toStringTag,{value:"Module"}));function Sm({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(ge,{open:s,onOpenChange:n,children:e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Tn,{className:"h-5 w-5 text-green-500"}):e.jsx(Dn,{className:"h-5 w-5 text-destructive"}),e.jsx(je,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(De,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(rt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const km=h.object({email_template:h.string().nullable().default("classic"),email_host:h.string().nullable().default(""),email_port:h.coerce.number().nullable().default(465),email_username:h.string().nullable().default(""),email_password:h.string().nullable().default(""),email_encryption:h.string().nullable().default(""),email_from_address:h.string().email().nullable().default(""),remind_mail_enable:h.boolean().nullable().default(!1)});function Tm(){const{t:s}=I("settings"),[n,a]=u.useState(null),[l,r]=u.useState(!1),i=u.useRef(null),[c,m]=u.useState(!1),x=ce({resolver:ue(km),defaultValues:{},mode:"onBlur"}),{data:o}=se({queryKey:["settings","email"],queryFn:()=>xs("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>Sd()}),{mutateAsync:p}=ss({mutationFn:hs,onSuccess:T=>{T.data&&q.success(s("common.autoSaved"))}}),{mutate:k,isPending:E}=ss({mutationFn:kd,onMutate:()=>{a(null),r(!1)},onSuccess:T=>{a(T.data),r(!0),T.data.error?q.error(s("email.test.error")):q.success(s("email.test.success"))}});u.useEffect(()=>{if(o?.data.email){const T=o.data.email;Object.entries(T).forEach(([g,w])=>{x.setValue(g,w)}),i.current=T}},[o]);const f=u.useCallback(pe.debounce(async T=>{if(!pe.isEqual(T,i.current)){m(!0);try{await p(T),i.current=T}finally{m(!1)}}},1e3),[p]),_=u.useCallback(T=>{f(T)},[f]);return u.useEffect(()=>{const T=x.watch(g=>{_(g)});return()=>T.unsubscribe()},[x.watch,_]),e.jsxs(e.Fragment,{children:[e.jsx(xe,{...x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:x.control,name:"email_host",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_host.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...T,value:T.value||""})}),e.jsx(F,{children:s("email.email_host.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_port",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_port.title")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:s("common.placeholder"),...T,value:T.value||"",onChange:g=>{const w=g.target.value?Number(g.target.value):null;T.onChange(w)}})}),e.jsx(F,{children:s("email.email_port.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_encryption",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(W,{onValueChange:T.onChange,value:T.value||"none",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:"请选择加密方式"})})}),e.jsxs(G,{children:[e.jsx($,{value:"none",children:s("email.email_encryption.none")}),e.jsx($,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx($,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(F,{children:s("email.email_encryption.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_username",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_username.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...T,value:T.value||""})}),e.jsx(F,{children:s("email.email_username.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_password",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_password.title")}),e.jsx(N,{children:e.jsx(P,{type:"password",placeholder:s("common.placeholder"),...T,value:T.value||""})}),e.jsx(F,{children:s("email.email_password.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_from_address",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_from.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...T,value:T.value||""})}),e.jsx(F,{children:s("email.email_from.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"email_template",render:({field:T})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("email.email_template.title")}),e.jsxs(W,{onValueChange:g=>{T.onChange(g),_(x.getValues())},value:T.value||void 0,children:[e.jsx(N,{children:e.jsx(B,{className:"w-[200px]",children:e.jsx(Y,{placeholder:s("email.email_template.placeholder")})})}),e.jsx(G,{children:d?.data?.map(g=>e.jsx($,{value:g,children:g},g))})]}),e.jsx(F,{children:s("email.email_template.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"remind_mail_enable",render:({field:T})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("email.remind_mail.title")}),e.jsx(F,{children:s("email.remind_mail.description")})]}),e.jsx(N,{children:e.jsx(H,{checked:T.value||!1,onCheckedChange:g=>{T.onChange(g),_(x.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(V,{onClick:()=>k(),loading:E,disabled:E,children:s(E?"test.sending":"test.title")})})]})}),c&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(Sm,{open:l,onOpenChange:r,result:n})]})}function Dm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(be,{}),e.jsx(Tm,{})]})}const Pm=Object.freeze(Object.defineProperty({__proto__:null,default:Dm},Symbol.toStringTag,{value:"Module"})),Rm=h.object({telegram_bot_enable:h.boolean().nullable(),telegram_bot_token:h.string().nullable(),telegram_discuss_link:h.string().nullable()}),Em={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function Vm(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(Rm),defaultValues:Em,mode:"onBlur"}),{data:i}=se({queryKey:["settings","telegram"],queryFn:()=>xs("telegram")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:p=>{p.data&&q.success(s("common.autoSaved"))}}),{mutate:m,isPending:x}=ss({mutationFn:Td,onSuccess:p=>{p.data&&q.success(s("telegram.webhook.success"))}});u.useEffect(()=>{if(i?.data.telegram){const p=i.data.telegram;Object.entries(p).forEach(([k,E])=>{r.setValue(k,E)}),l.current=p}},[i]);const o=u.useCallback(pe.debounce(async p=>{if(!pe.isEqual(p,l.current)){a(!0);try{await c(p),l.current=p}finally{a(!1)}}},1e3),[c]),d=u.useCallback(p=>{o(p)},[o]);return u.useEffect(()=>{const p=r.watch(k=>{d(k)});return()=>p.unsubscribe()},[r.watch,d]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:r.control,name:"telegram_bot_token",render:({field:p})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("telegram.bot_token.placeholder"),...p,value:p.value||""})}),e.jsx(F,{children:s("telegram.bot_token.description")}),e.jsx(R,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(V,{loading:x,disabled:x,onClick:()=>m(),children:s(x?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(F,{children:s("telegram.webhook.description")}),e.jsx(R,{})]}),e.jsx(v,{control:r.control,name:"telegram_bot_enable",render:({field:p})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(F,{children:s("telegram.bot_enable.description")}),e.jsx(N,{children:e.jsx(H,{checked:p.value||!1,onCheckedChange:k=>{p.onChange(k),d(r.getValues())}})}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"telegram_discuss_link",render:({field:p})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("telegram.discuss_link.placeholder"),...p,value:p.value||""})}),e.jsx(F,{children:s("telegram.discuss_link.description")}),e.jsx(R,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Im(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(be,{}),e.jsx(Vm,{})]})}const Fm=Object.freeze(Object.defineProperty({__proto__:null,default:Im},Symbol.toStringTag,{value:"Module"})),Mm=h.object({windows_version:h.string().nullable(),windows_download_url:h.string().nullable(),macos_version:h.string().nullable(),macos_download_url:h.string().nullable(),android_version:h.string().nullable(),android_download_url:h.string().nullable()}),Om={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function zm(){const{t:s}=I("settings"),[n,a]=u.useState(!1),l=u.useRef(null),r=ce({resolver:ue(Mm),defaultValues:Om,mode:"onBlur"}),{data:i}=se({queryKey:["settings","app"],queryFn:()=>xs("app")}),{mutateAsync:c}=ss({mutationFn:hs,onSuccess:o=>{o.data&&q.success(s("app.save_success"))}});u.useEffect(()=>{if(i?.data.app){const o=i.data.app;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[i]);const m=u.useCallback(pe.debounce(async o=>{if(!pe.isEqual(o,l.current)){a(!0);try{await c(o),l.current=o}finally{a(!1)}}},1e3),[c]),x=u.useCallback(o=>{m(o)},[m]);return u.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(xe,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:r.control,name:"windows_version",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.windows.version.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"windows_download_url",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.windows.download.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"macos_version",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.macos.version.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"macos_download_url",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.macos.download.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"android_version",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.android.version.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.android.version.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"android_download_url",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{className:"text-base",children:s("app.android.download.title")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(F,{children:s("app.android.download.description")}),e.jsx(R,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Lm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(be,{}),e.jsx(zm,{})]})}const Am=Object.freeze(Object.defineProperty({__proto__:null,default:Lm},Symbol.toStringTag,{value:"Module"})),ca=u.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...n})}));ca.displayName="Table";const da=u.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...n}));da.displayName="TableHeader";const ma=u.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...n}));ma.displayName="TableBody";const $m=u.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));$m.displayName="TableFooter";const vs=u.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));vs.displayName="TableRow";const ua=u.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));ua.displayName="TableHead";const $s=u.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));$s.displayName="TableCell";const qm=u.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...n}));qm.displayName="TableCaption";function Km({table:s}){const[n,a]=u.useState(""),{t:l}=I("common");u.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const r=i=>{const c=parseInt(i);!isNaN(c)&&c>=1&&c<=s.getPageCount()?s.setPageIndex(c-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"flex-1 text-sm text-muted-foreground",children:l("table.pagination.selected",{selected:s.getFilteredSelectedRowModel().rows.length,total:s.getFilteredRowModel().rows.length})}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:l("table.pagination.itemsPerPage")}),e.jsxs(W,{value:`${s.getState().pagination.pageSize}`,onValueChange:i=>{s.setPageSize(Number(i))},children:[e.jsx(B,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50,100,500].map(i=>e.jsx($,{value:`${i}`,children:i},i))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:l("table.pagination.page")}),e.jsx(P,{type:"text",value:n,onChange:i=>a(i.target.value),onBlur:i=>r(i.target.value),onKeyDown:i=>{i.key==="Enter"&&r(i.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsx("span",{children:l("table.pagination.pageOf",{total:s.getPageCount()})})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(V,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.firstPage")}),e.jsx(ei,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.previousPage")}),e.jsx(_n,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.nextPage")}),e.jsx(ta,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.lastPage")}),e.jsx(si,{className:"h-4 w-4"})]})]})]})]})}function Je({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:i,onDragLeave:c,onDrop:m,showPagination:x=!0,isLoading:o=!1}){const{t:d}=I("common"),p=u.useRef(null),k=s.getAllColumns().filter(T=>T.getIsPinned()==="left"),E=s.getAllColumns().filter(T=>T.getIsPinned()==="right"),f=T=>k.slice(0,T).reduce((g,w)=>g+(w.getSize()??0),0),_=T=>E.slice(T+1).reduce((g,w)=>g+(w.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:p,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(ca,{children:[e.jsx(da,{children:s.getHeaderGroups().map(T=>e.jsx(vs,{className:"hover:bg-transparent",children:T.headers.map((g,w)=>{const S=g.column.getIsPinned()==="left",C=g.column.getIsPinned()==="right",D=S?f(k.indexOf(g.column)):void 0,z=C?_(E.indexOf(g.column)):void 0;return e.jsx(ua,{colSpan:g.colSpan,style:{width:g.getSize(),...S&&{left:D},...C&&{right:z}},className:y("h-11 bg-card px-4 text-muted-foreground",(S||C)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",S&&"before:right-0",C&&"before:left-0"]),children:g.isPlaceholder?null:bt(g.column.columnDef.header,g.getContext())},g.id)})},T.id))}),e.jsx(ma,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((T,g)=>e.jsx(vs,{"data-state":T.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:w=>l?.(w,g),onDragEnd:r,onDragOver:i,onDragLeave:c,onDrop:w=>m?.(w,g),children:T.getVisibleCells().map((w,S)=>{const C=w.column.getIsPinned()==="left",D=w.column.getIsPinned()==="right",z=C?f(k.indexOf(w.column)):void 0,Q=D?_(E.indexOf(w.column)):void 0;return e.jsx($s,{style:{width:w.column.getSize(),...C&&{left:z},...D&&{right:Q}},className:y("bg-card",(C||D)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",C&&"before:right-0",D&&"before:left-0"]),children:bt(w.column.columnDef.cell,w.getContext())},w.id)})},T.id)):e.jsx(vs,{children:e.jsx($s,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:d("table.noData")})})})]})})}),x&&e.jsx(Km,{table:s})]})}const Hm=s=>h.object({id:h.number().nullable(),name:h.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:h.string().optional().nullable(),notify_domain:h.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:h.coerce.number().min(0).optional().nullable(),handling_fee_percent:h.coerce.number().min(0).max(100).optional().nullable(),payment:h.string().min(1,s("form.validation.payment.required")),config:h.record(h.string(),h.string())}),Oa={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function vr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Oa}){const{t:r}=I("payment"),[i,c]=u.useState(!1),[m,x]=u.useState(!1),[o,d]=u.useState([]),[p,k]=u.useState([]),E=Hm(r),f=ce({resolver:ue(E),defaultValues:l,mode:"onChange"}),_=f.watch("payment");u.useEffect(()=>{i&&(async()=>{const{data:w}=await Hc();d(w)})()},[i]),u.useEffect(()=>{if(!_||!i)return;(async()=>{const w={payment:_,...a==="edit"&&{id:Number(f.getValues("id"))}};Uc(w).then(({data:S})=>{k(S);const C=S.reduce((D,z)=>(z.field_name&&(D[z.field_name]=z.value??""),D),{});f.setValue("config",C)})})()},[_,i,f,a]);const T=async g=>{x(!0);try{(await Bc(g)).data&&(q.success(r("form.messages.success")),f.reset(Oa),s(),c(!1))}finally{x(!1)}};return e.jsxs(ge,{open:i,onOpenChange:c,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(xe,{...f,children:e.jsxs("form",{onSubmit:f.handleSubmit(T),className:"space-y-4",children:[e.jsx(v,{control:f.control,name:"name",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:r("form.fields.name.placeholder"),...g})}),e.jsx(F,{children:r("form.fields.name.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"icon",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.icon.label")}),e.jsx(N,{children:e.jsx(P,{...g,value:g.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(F,{children:r("form.fields.icon.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"notify_domain",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.notify_domain.label")}),e.jsx(N,{children:e.jsx(P,{...g,value:g.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(F,{children:r("form.fields.notify_domain.description")}),e.jsx(R,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(v,{control:f.control,name:"handling_fee_percent",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(N,{children:e.jsx(P,{type:"number",...g,value:g.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"handling_fee_fixed",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(N,{children:e.jsx(P,{type:"number",...g,value:g.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(R,{})]})})]}),e.jsx(v,{control:f.control,name:"payment",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.payment.label")}),e.jsxs(W,{onValueChange:g.onChange,defaultValue:g.value,children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(G,{children:o.map(w=>e.jsx($,{value:w,children:w},w))})]}),e.jsx(F,{children:r("form.fields.payment.description")}),e.jsx(R,{})]})}),p.length>0&&e.jsx("div",{className:"space-y-4",children:p.map(g=>e.jsx(v,{control:f.control,name:`config.${g.field_name}`,render:({field:w})=>e.jsxs(j,{children:[e.jsx(b,{children:g.label}),e.jsx(N,{children:e.jsx(P,{...w,value:w.value||""})}),e.jsx(R,{})]})},g.field_name))}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(V,{type:"submit",disabled:m,children:r("form.buttons.submit")})]})]})})]})]})}function M({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(V,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(ka,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Ut,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Bt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(ti,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(ka,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Um=ai,Bm=ni,Gm=ri,br=u.forwardRef(({className:s,...n},a)=>e.jsx(En,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));br.displayName=En.displayName;const yr=u.forwardRef(({className:s,...n},a)=>e.jsxs(Gm,{children:[e.jsx(br,{}),e.jsx(Vn,{ref:a,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]}));yr.displayName=Vn.displayName;const Nr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});Nr.displayName="AlertDialogHeader";const _r=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});_r.displayName="AlertDialogFooter";const wr=u.forwardRef(({className:s,...n},a)=>e.jsx(In,{ref:a,className:y("text-lg font-semibold",s),...n}));wr.displayName=In.displayName;const Cr=u.forwardRef(({className:s,...n},a)=>e.jsx(Fn,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Cr.displayName=Fn.displayName;const Sr=u.forwardRef(({className:s,...n},a)=>e.jsx(Mn,{ref:a,className:y(qs(),s),...n}));Sr.displayName=Mn.displayName;const kr=u.forwardRef(({className:s,...n},a)=>e.jsx(On,{ref:a,className:y(qs({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));kr.displayName=On.displayName;function Qe({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:i="确认",variant:c="default",className:m}){return e.jsxs(Um,{children:[e.jsx(Bm,{asChild:!0,children:n}),e.jsxs(yr,{className:y("sm:max-w-[425px]",m),children:[e.jsxs(Nr,{children:[e.jsx(wr,{children:a}),e.jsx(Cr,{children:l})]}),e.jsxs(_r,{children:[e.jsx(kr,{asChild:!0,children:e.jsx(V,{variant:"outline",children:r})}),e.jsx(Sr,{asChild:!0,children:e.jsx(V,{variant:c,onClick:s,children:i})})]})]})]})}const Tr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Wm=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(H,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await Wc({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(M,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(M,{column:l,title:a("table.columns.notify_url")}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"ml-1",children:e.jsx(Tr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(M,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(vr,{refetch:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Qe,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await Gc({id:l.original.id});r&&s()},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function Ym({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("payment"),i=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(vr,{refetch:n}),e.jsx(P,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[250px]"}),i&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function Jm(){const[s,n]=u.useState([]),[a,l]=u.useState([]),[r,i]=u.useState(!1),[c,m]=u.useState([]),[x,o]=u.useState({"drag-handle":!1}),[d,p]=u.useState({pageSize:20,pageIndex:0}),{refetch:k}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:g}=await Kc();return m(g?.map(w=>({...w,enable:!!w.enable}))||[]),g}});u.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const E=(g,w)=>{r&&(g.dataTransfer.setData("text/plain",w.toString()),g.currentTarget.classList.add("opacity-50"))},f=(g,w)=>{if(!r)return;g.preventDefault(),g.currentTarget.classList.remove("bg-muted");const S=parseInt(g.dataTransfer.getData("text/plain"));if(S===w)return;const C=[...c],[D]=C.splice(S,1);C.splice(w,0,D),m(C)},_=async()=>{r?Yc({ids:c.map(g=>g.id)}).then(()=>{k(),i(!1),q.success("排序保存成功")}):i(!0)},T=Le({data:c,columns:Wm({refetch:k,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Je,{table:T,toolbar:g=>e.jsx(Ym,{table:g,refetch:k,saveOrder:_,isSortMode:r}),draggable:r,onDragStart:E,onDragEnd:g=>g.currentTarget.classList.remove("opacity-50"),onDragOver:g=>{g.preventDefault(),g.currentTarget.classList.add("bg-muted")},onDragLeave:g=>g.currentTarget.classList.remove("bg-muted"),onDrop:f,showPagination:!r})}function Qm(){const{t:s}=I("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Jm,{})})]})]})}const Zm=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"})),Xm=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(P,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(Cs,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:y(qs({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function eu({themeKey:s,themeInfo:n}){const{t:a}=I("theme"),[l,r]=u.useState(!1),[i,c]=u.useState(!1),[m,x]=u.useState(!1),o=ce({defaultValues:n.configs.reduce((k,E)=>(k[E.field_name]="",k),{})}),d=async()=>{c(!0),Dc(s).then(({data:k})=>{Object.entries(k).forEach(([E,f])=>{o.setValue(E,f)})}).finally(()=>{c(!1)})},p=async k=>{x(!0),Pc(s,k).then(()=>{q.success(a("config.success")),r(!1)}).finally(()=>{x(!1)})};return e.jsxs(ge,{open:l,onOpenChange:k=>{r(k),k?d():o.reset()},children:[e.jsx(Me,{asChild:!0,children:e.jsx(V,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(he,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:a("config.title",{name:n.name})}),e.jsx(De,{children:a("config.description")})]}),i?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(na,{className:"h-6 w-6 animate-spin"})}):e.jsx(xe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),className:"space-y-4",children:[n.configs.map(k=>e.jsx(v,{control:o.control,name:k.field_name,render:({field:E})=>e.jsxs(j,{children:[e.jsx(b,{children:k.label}),e.jsx(N,{children:Xm(k,E)}),e.jsx(R,{})]})},k.field_name)),e.jsxs(Oe,{className:"mt-6 gap-2",children:[e.jsx(V,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(V,{type:"submit",loading:m,children:a("config.save")})]})]})})]})]})}function su(){const{t:s}=I("theme"),[n,a]=u.useState(null),[l,r]=u.useState(!1),[i,c]=u.useState(!1),[m,x]=u.useState(!1),[o,d]=u.useState(null),p=u.useRef(null),[k,E]=u.useState(0),{data:f,isLoading:_,refetch:T}=se({queryKey:["themeList"],queryFn:async()=>{const{data:A}=await Tc();return A}}),g=async A=>{a(A),Vc({frontend_theme:A}).then(()=>{q.success("主题切换成功"),T()}).finally(()=>{a(null)})},w=async A=>{if(!A.name.endsWith(".zip")){q.error(s("upload.error.format"));return}r(!0),Rc(A).then(()=>{q.success("主题上传成功"),c(!1),T()}).finally(()=>{r(!1),p.current&&(p.current.value="")})},S=A=>{A.preventDefault(),A.stopPropagation(),A.type==="dragenter"||A.type==="dragover"?x(!0):A.type==="dragleave"&&x(!1)},C=A=>{A.preventDefault(),A.stopPropagation(),x(!1),A.dataTransfer.files&&A.dataTransfer.files[0]&&w(A.dataTransfer.files[0])},D=()=>{o&&E(A=>A===0?o.images.length-1:A-1)},z=()=>{o&&E(A=>A===o.images.length-1?0:A+1)},Q=(A,X)=>{E(0),d({name:A,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(V,{onClick:()=>c(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Ht,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:_?e.jsxs(e.Fragment,{children:[e.jsx(za,{}),e.jsx(za,{})]}):f?.themes&&Object.entries(f.themes).map(([A,X])=>e.jsx(Ue,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Qe,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if(A===f?.active){q.error(s("card.delete.error.active"));return}a(A),Ec(A).then(()=>{q.success("主题删除成功"),T()}).finally(()=>{a(null)})},children:e.jsx(V,{disabled:n===A,loading:n===A,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(ds,{className:"h-4 w-4"})})})}),e.jsxs(ts,{children:[e.jsx(bs,{children:X.name}),e.jsx(tt,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(as,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(V,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Q(X.name,X.images),children:e.jsx(li,{className:"h-4 w-4"})}),e.jsx(eu,{themeKey:A,themeInfo:X}),e.jsx(V,{onClick:()=>g(A),disabled:n===A||A===f.active,loading:n===A,variant:A===f.active?"secondary":"default",children:A===f.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},A))}),e.jsx(ge,{open:i,onOpenChange:c,children:e.jsxs(he,{className:"sm:max-w-md",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s("upload.title")}),e.jsx(De,{children:s("upload.description")})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",m&&"border-primary/50 bg-muted/50"),onDragEnter:S,onDragLeave:S,onDragOver:S,onDrop:C,children:[e.jsx("input",{type:"file",ref:p,className:"hidden",accept:".zip",onChange:A=>{const X=A.target.files?.[0];X&&w(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Ht,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>p.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(ge,{open:!!o,onOpenChange:A=>{A||(d(null),E(0))},children:e.jsxs(he,{className:"max-w-4xl",children:[e.jsxs(ve,{children:[e.jsxs(je,{children:[o?.name," ",s("preview.title")]}),e.jsx(De,{className:"text-center",children:o&&s("preview.imageCount",{current:k+1,total:o.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:o?.images[k]&&e.jsx("img",{src:o.images[k],alt:`${o.name} 预览图 ${k+1}`,className:"h-full w-full object-contain"})}),o&&o.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(V,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:D,children:e.jsx(oi,{className:"h-4 w-4"})}),e.jsx(V,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:z,children:e.jsx(ii,{className:"h-4 w-4"})})]})]}),o&&o.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:o.images.map((A,X)=>e.jsx("button",{onClick:()=>E(X),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",k===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:A,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function za(){return e.jsxs(Ue,{children:[e.jsxs(ts,{children:[e.jsx(Ie,{className:"h-6 w-[200px]"}),e.jsx(Ie,{className:"h-4 w-[300px]"})]}),e.jsxs(as,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ie,{className:"h-10 w-[100px]"}),e.jsx(Ie,{className:"h-10 w-[100px]"})]})]})}const tu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"})),xa=u.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[i,c]=u.useState("");u.useEffect(()=>{if(i.includes(",")){const x=new Set([...n,...i.split(",").map(o=>o.trim())]);a(Array.from(x)),c("")}},[i,a,n]);const m=()=>{if(i){const x=new Set([...n,i]);a(Array.from(x)),c("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(x=>e.jsxs(K,{variant:"secondary",children:[x,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(o=>o!==x))},children:e.jsx(Gt,{className:"w-3"})})]},x)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:i,onChange:x=>c(x.target.value),onKeyDown:x=>{x.key==="Enter"||x.key===","?(x.preventDefault(),m()):x.key==="Backspace"&&i.length===0&&n.length>0&&(x.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});xa.displayName="InputTags";const au=h.object({id:h.number().nullable(),title:h.string().min(1).max(250),content:h.string().min(1),show:h.boolean(),tags:h.array(h.string()),img_url:h.string().nullable()}),nu={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Dr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=nu}){const{t:r}=I("notice"),[i,c]=u.useState(!1),m=ce({resolver:ue(au),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new ra({html:!0});return e.jsx(xe,{...m,children:e.jsxs(ge,{onOpenChange:c,open:i,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(he,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(De,{})]}),e.jsx(v,{control:m.control,name:"title",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(P,{placeholder:r("form.fields.title.placeholder"),...o})})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"content",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.content.label")}),e.jsx(N,{children:e.jsx(la,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"img_url",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(P,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...o,value:o.value||""})})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"show",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"tags",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.fields.tags.label")}),e.jsx(N,{children:e.jsx(xa,{value:o.value,onChange:o.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(R,{})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(V,{type:"submit",onClick:o=>{o.preventDefault(),m.handleSubmit(async d=>{Qc(d).then(({data:p})=>{p&&(q.success(r("form.buttons.success")),s(),c(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function ru({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("notice"),i=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Dr,{refetch:n}),!l&&e.jsx(P,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:c=>s.getColumn("title")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),i&&!l&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const lu=s=>{const{t:n}=I("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(ci,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(K,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await Xc({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Dr,{refetch:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Qe,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{Zc({id:a.original.id}).then(()=>{q.success(n("table.actions.delete.success")),s()})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function ou(){const[s,n]=u.useState({}),[a,l]=u.useState({}),[r,i]=u.useState([]),[c,m]=u.useState([]),[x,o]=u.useState(!1),[d,p]=u.useState({}),[k,E]=u.useState({pageSize:50,pageIndex:0}),[f,_]=u.useState([]),{refetch:T}=se({queryKey:["notices"],queryFn:async()=>{const{data:D}=await Jc();return _(D),D}});u.useEffect(()=>{l({"drag-handle":x,content:!x,created_at:!x,actions:!x}),E({pageSize:x?99999:50,pageIndex:0})},[x]);const g=(D,z)=>{x&&(D.dataTransfer.setData("text/plain",z.toString()),D.currentTarget.classList.add("opacity-50"))},w=(D,z)=>{if(!x)return;D.preventDefault(),D.currentTarget.classList.remove("bg-muted");const Q=parseInt(D.dataTransfer.getData("text/plain"));if(Q===z)return;const A=[...f],[X]=A.splice(Q,1);A.splice(z,0,X),_(A)},S=async()=>{if(!x){o(!0);return}Dd(f.map(D=>D.id)).then(()=>{q.success("排序保存成功"),o(!1),T()}).finally(()=>{o(!1)})},C=Le({data:f??[],columns:lu(T),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:k},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:m,onColumnFiltersChange:i,onColumnVisibilityChange:l,onColumnSizingChange:p,onPaginationChange:E,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Je,{table:C,toolbar:D=>e.jsx(ru,{table:D,refetch:T,saveOrder:S,isSortMode:x}),draggable:x,onDragStart:g,onDragEnd:D=>D.currentTarget.classList.remove("opacity-50"),onDragOver:D=>{D.preventDefault(),D.currentTarget.classList.add("bg-muted")},onDragLeave:D=>D.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!x})})}function iu(){const{t:s}=I("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Pe,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ou,{})})]})]})}const cu=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),du=h.object({id:h.number().nullable(),language:h.string().max(250),category:h.string().max(250),title:h.string().min(1).max(250),body:h.string().min(1),show:h.boolean()}),mu={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Pr({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=mu}){const{t:r}=I("knowledge"),[i,c]=u.useState(!1),m=ce({resolver:ue(du),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new ra({html:!0});return u.useEffect(()=>{i&&l.id&&sd(l.id).then(({data:o})=>{m.reset(o)})},[l.id,m,i]),e.jsxs(ge,{onOpenChange:c,open:i,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(De,{})]}),e.jsxs(xe,{...m,children:[e.jsx(v,{control:m.control,name:"title",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(P,{placeholder:r("form.titlePlaceholder"),...o})})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"category",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(N,{children:e.jsx(P,{placeholder:r("form.categoryPlaceholder"),...o})})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"language",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.language")}),e.jsx(N,{children:e.jsxs(W,{value:o.value,onValueChange:o.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.languagePlaceholder")})}),e.jsx(G,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx($,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(v,{control:m.control,name:"body",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.content")}),e.jsx(N,{children:e.jsx(la,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"show",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(N,{children:e.jsx(H,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(R,{})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(V,{type:"submit",onClick:()=>{m.handleSubmit(o=>{td(o).then(({data:d})=>{d&&(m.reset(),q.success(r("messages.operationSuccess")),c(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function uu({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(i=>r.has(i.value)).map(i=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),e.jsx(Ye,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Fe,{children:a.map(i=>{const c=r.has(i.value);return e.jsxs(_e,{onSelect:()=>{c?r.delete(i.value):r.add(i.value);const m=Array.from(r);s?.setFilterValue(m.length?m:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),i.icon&&e.jsx(i.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:i.label}),l?.get(i.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(i.value)})]},i.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Hs,{}),e.jsx(Fe,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function xu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:i}=I("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:i("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Pr,{refreshData:n}),e.jsx(P,{placeholder:i("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:c=>s.getColumn("title")?.setFilterValue(c.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(uu,{column:s.getColumn("category"),title:i("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(c=>c.getValue("category")))).map(c=>({label:c,value:c}))}),r&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[i("toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,size:"sm",children:i(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const hu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{nd({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(K,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(M,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Pr,{refreshData:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Qe,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{ad({id:l.original.id}).then(({data:r})=>{r&&(q.success(a("messages.operationSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function fu(){const[s,n]=u.useState([]),[a,l]=u.useState([]),[r,i]=u.useState(!1),[c,m]=u.useState([]),[x,o]=u.useState({"drag-handle":!1}),[d,p]=u.useState({pageSize:20,pageIndex:0}),{refetch:k,isLoading:E,data:f}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:S}=await ed();return m(S||[]),S}});u.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const _=(S,C)=>{r&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},T=(S,C)=>{if(!r)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const D=parseInt(S.dataTransfer.getData("text/plain"));if(D===C)return;const z=[...c],[Q]=z.splice(D,1);z.splice(C,0,Q),m(z)},g=async()=>{r?rd({ids:c.map(S=>S.id)}).then(()=>{k(),i(!1),q.success("排序保存成功")}):i(!0)},w=Le({data:c,columns:hu({refetch:k,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Je,{table:w,toolbar:S=>e.jsx(xu,{table:S,refetch:k,saveOrder:g,isSortMode:r}),draggable:r,onDragStart:_,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:T,showPagination:!r})}function pu(){const{t:s}=I("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(fu,{})})]})]})}const gu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"}));function ju(s,n){const[a,l]=u.useState(s);return u.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function At(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function vu(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(i=>!n.find(c=>c.value===i.value));return a}function bu(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const Rr=u.forwardRef(({className:s,...n},a)=>di(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);Rr.displayName="CommandEmpty";const lt=u.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:i,onSearch:c,loadingIndicator:m,emptyIndicator:x,maxSelected:o=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:p,disabled:k,groupBy:E,className:f,badgeClassName:_,selectFirstItem:T=!0,creatable:g=!1,triggerSearchOnFocus:w=!1,commandProps:S,inputProps:C,hideClearAllButton:D=!1},z)=>{const Q=u.useRef(null),[A,X]=u.useState(!1),Us=u.useRef(!1),[va,ba]=u.useState(!1),[ee,Bs]=u.useState(s||[]),[Ss,ya]=u.useState(At(l,E)),[fs,Mt]=u.useState(""),Gs=ju(fs,i||500);u.useImperativeHandle(z,()=>({selectedValue:[...ee],input:Q.current,focus:()=>Q.current?.focus()}),[ee]);const mt=u.useCallback(U=>{const ae=ee.filter(Te=>Te.value!==U.value);Bs(ae),n?.(ae)},[n,ee]),el=u.useCallback(U=>{const ae=Q.current;ae&&((U.key==="Delete"||U.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||mt(ee[ee.length-1])),U.key==="Escape"&&ae.blur())},[mt,ee]);u.useEffect(()=>{s&&Bs(s)},[s]),u.useEffect(()=>{if(!r||c)return;const U=At(r||[],E);JSON.stringify(U)!==JSON.stringify(Ss)&&ya(U)},[l,r,E,c,Ss]),u.useEffect(()=>{const U=async()=>{ba(!0);const Te=await c?.(Gs);ya(At(Te||[],E)),ba(!1)};(async()=>{!c||!A||(w&&await U(),Gs&&await U())})()},[Gs,E,A,w]);const sl=()=>{if(!g||bu(Ss,[{value:fs,label:fs}])||ee.find(ae=>ae.value===fs))return;const U=e.jsx(_e,{value:fs,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=o){d?.(ee.length);return}Mt("");const Te=[...ee,{value:ae,label:ae}];Bs(Te),n?.(Te)},children:`Create "${fs}"`});if(!c&&fs.length>0||c&&Gs.length>0&&!va)return U},tl=u.useCallback(()=>{if(x)return c&&!g&&Object.keys(Ss).length===0?e.jsx(_e,{value:"-",disabled:!0,children:x}):e.jsx(Rr,{children:x})},[g,x,c,Ss]),al=u.useMemo(()=>vu(Ss,ee),[Ss,ee]),nl=u.useCallback(()=>{if(S?.filter)return S.filter;if(g)return(U,ae)=>U.toLowerCase().includes(ae.toLowerCase())?1:-1},[g,S?.filter]),rl=u.useCallback(()=>{const U=ee.filter(ae=>ae.fixed);Bs(U),n?.(U)},[n,ee]);return e.jsxs(_s,{...S,onKeyDown:U=>{el(U),S?.onKeyDown?.(U)},className:y("h-auto overflow-visible bg-transparent",S?.className),shouldFilter:S?.shouldFilter!==void 0?S.shouldFilter:!c,filter:nl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!k&&ee.length!==0},f),onClick:()=>{k||Q.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(U=>e.jsxs(K,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",_),"data-fixed":U.fixed,"data-disabled":k||void 0,children:[U.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(k||U.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&mt(U)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>mt(U),children:e.jsx(Gt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},U.value)),e.jsx(Se.Input,{...C,ref:Q,value:fs,disabled:k,onValueChange:U=>{Mt(U),C?.onValueChange?.(U)},onBlur:U=>{Us.current===!1&&X(!1),C?.onBlur?.(U)},onFocus:U=>{X(!0),w&&c?.(Gs),C?.onFocus?.(U)},placeholder:p&&ee.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":p,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},C?.className)}),e.jsx("button",{type:"button",onClick:rl,className:y((D||k||ee.length<1||ee.filter(U=>U.fixed).length===ee.length)&&"hidden"),children:e.jsx(Gt,{})})]})}),e.jsx("div",{className:"relative",children:A&&e.jsx(ws,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Us.current=!1},onMouseEnter:()=>{Us.current=!0},onMouseUp:()=>{Q.current?.focus()},children:va?e.jsx(e.Fragment,{children:m}):e.jsxs(e.Fragment,{children:[tl(),sl(),!T&&e.jsx(_e,{value:"-",className:"hidden"}),Object.entries(al).map(([U,ae])=>e.jsx(Fe,{heading:U,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(Te=>e.jsx(_e,{value:Te.value,disabled:Te.disable,onMouseDown:Ws=>{Ws.preventDefault(),Ws.stopPropagation()},onSelect:()=>{if(ee.length>=o){d?.(ee.length);return}Mt("");const Ws=[...ee,Te];Bs(Ws),n?.(Ws)},className:y("cursor-pointer",Te.disable&&"cursor-default text-muted-foreground"),children:Te.label},Te.value))})},U))]})})})]})});lt.displayName="MultipleSelector";const yu=s=>h.object({id:h.number().optional(),name:h.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function Ft({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=I("group"),i=ce({resolver:ue(yu(r)),defaultValues:a,mode:"onChange"}),[c,m]=u.useState(!1),[x,o]=u.useState(!1),d=async p=>{o(!0),Lc(p).then(()=>{q.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),i.reset(),m(!1)}).finally(()=>{o(!1)})};return e.jsxs(ge,{open:c,onOpenChange:m,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(De,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(xe,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(d),className:"space-y-4",children:[e.jsx(v,{control:i.control,name:"name",render:({field:p})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.name")}),e.jsx(N,{children:e.jsx(P,{placeholder:r("form.namePlaceholder"),...p,className:"w-full"})}),e.jsx(F,{children:r("form.nameDescription")}),e.jsx(R,{})]})}),e.jsxs(Oe,{className:"gap-2",children:[e.jsx(dt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(V,{type:"submit",disabled:x||!i.formState.isValid,children:[x&&e.jsx(na,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Er=u.createContext(void 0);function Nu({children:s,refetch:n}){const[a,l]=u.useState(!1),[r,i]=u.useState(null),[c,m]=u.useState(ye.Shadowsocks);return e.jsx(Er.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:i,serverType:c,setServerType:m,refetch:n},children:s})}function Vr(){const s=u.useContext(Er);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function $t({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=I("server");u.useEffect(()=>{console.log(n)},[n]);const[i,c]=u.useState(!1),[m,x]=u.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[o,d]=u.useState(null),p=g=>{if(!g)return null;try{const w=JSON.parse(g);return typeof w!="object"||w===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},k={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},E=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},f=()=>{const g=p(m||"");if(g){q.error(g);return}try{if(!m){a(null),c(!1);return}a(JSON.parse(m)),c(!1)}catch{q.error(r("network_settings.errors.save_failed"))}},_=g=>{x(g),d(p(g))},T=g=>{const w=k[g];if(w){const S=JSON.stringify(w.content,null,2);x(S),d(null)}};return u.useEffect(()=>{i&&console.log(n)},[i,n]),u.useEffect(()=>{i&&n&&Object.keys(n).length>0&&x(JSON.stringify(n,null,2))},[i,n]),e.jsxs(ge,{open:i,onOpenChange:g=>{!g&&i&&f(),c(g)},children:[e.jsx(Me,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[E().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:E().map(g=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>T(g),children:r("network_settings.use_template",{template:k[g].label})},g))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Cs,{className:`min-h-[200px] font-mono text-sm ${o?"border-red-500 focus-visible:ring-red-500":""}`,value:m,placeholder:E().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:g=>_(g.target.value)}),o&&e.jsx("p",{className:"text-sm text-red-500",children:o})]})]}),e.jsxs(Oe,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>c(!1),children:r("common.cancel")}),e.jsx(J,{onClick:f,disabled:!!o,children:r("common.confirm")})]})]})]})}function Nh(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const _u={},wu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),_h=wi(wu),La=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Cu=()=>{try{const s=mi.box.keyPair(),n=La(Ta.encodeBase64(s.secretKey)),a=La(Ta.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},Su=()=>{try{return Cu()}catch(s){throw console.error("Error generating key pair:",s),s}},ku=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},Tu=()=>{const s=Math.floor(Math.random()*8)*2+2;return ku(s)},Du=h.object({cipher:h.string().default("aes-128-gcm"),obfs:h.string().default("0"),obfs_settings:h.object({path:h.string().default(""),host:h.string().default("")}).default({})}),Pu=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),Ru=h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),Eu=h.object({version:h.coerce.number().default(2),alpn:h.string().default("h2"),obfs:h.object({open:h.coerce.boolean().default(!1),type:h.string().default("salamander"),password:h.string().default("")}).default({}),tls:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),bandwidth:h.object({up:h.string().default(""),down:h.string().default("")}).default({})}),Vu=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),reality_settings:h.object({server_port:h.coerce.number().default(443),server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),public_key:h.string().default(""),private_key:h.string().default(""),short_id:h.string().default("")}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({}),flow:h.string().default("")}),ls={shadowsocks:{schema:Du,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:Pu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:Ru,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:Eu,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:Vu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},Iu=({serverType:s,value:n,onChange:a})=>{const{t:l}=I("server"),r=s?ls[s]:null,i=r?.schema||h.record(h.any()),c=s?i.parse({}):{},m=ce({resolver:ue(i),defaultValues:c,mode:"onChange"});if(u.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const f=i.parse({});m.reset(f)}}else m.reset(n)},[s,n,a,m,i]),u.useEffect(()=>{const f=m.watch(_=>{a(_)});return()=>f.unsubscribe()},[m,a]),!s||!r)return null;const E={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(v,{control:m.control,name:"cipher",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.shadowsocks.ciphers.map(_=>e.jsx($,{value:_,children:_},_))})})]})})]})}),e.jsx(v,{control:m.control,name:"obfs",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(G,{children:e.jsxs(ps,{children:[e.jsx($,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx($,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),m.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"obfs_settings.path",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(N,{children:e.jsx(P,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...f})}),e.jsx(R,{})]})}),e.jsx(v,{control:m.control,name:"obfs_settings.host",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(N,{children:e.jsx(P,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...f})}),e.jsx(R,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(v,{control:m.control,name:"tls",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value?.toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx($,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),m.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(v,{control:m.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx(v,{control:m.control,name:"network",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(b,{children:[l("dynamic_form.vmess.network.label"),e.jsx($t,{value:m.watch("network_settings"),setValue:_=>m.setValue("network_settings",_),templateType:m.watch("network")})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.vmess.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"server_name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(v,{control:m.control,name:"allow_insecure",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(v,{control:m.control,name:"network",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(b,{children:[l("dynamic_form.trojan.network.label"),e.jsx($t,{value:m.watch("network_settings")||{},setValue:_=>m.setValue("network_settings",_),templateType:m.watch("network")||"tcp"})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value||"tcp",children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.trojan.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"version",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(N,{children:e.jsxs(W,{value:(f.value||2).toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.hysteria.versions.map(_=>e.jsxs($,{value:_,className:"cursor-pointer",children:["V",_]},_))})})]})})]})}),m.watch("version")==1&&e.jsx(v,{control:m.control,name:"alpn",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value||"h2",onValueChange:f.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.hysteria.alpnOptions.map(_=>e.jsx($,{value:_,children:_},_))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"obfs.open",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})}),!!m.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[m.watch("version")=="2"&&e.jsx(v,{control:m.control,name:"obfs.type",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value||"salamander",onValueChange:f.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:e.jsx($,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(v,{control:m.control,name:"obfs.password",render:({field:f})=>e.jsxs(j,{className:m.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...f,value:f.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",T=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(g=>_[g%_.length]).join("");m.setValue("obfs.password",T),q.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"tls.server_name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(v,{control:m.control,name:"tls.allow_insecure",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(v,{control:m.control,name:"bandwidth.up",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(m.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(v,{control:m.control,name:"bandwidth.down",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(m.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(v,{control:m.control,name:"tls",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.tls.label")}),e.jsx(N,{children:e.jsxs(W,{value:f.value?.toString(),onValueChange:_=>f.onChange(Number(_)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx($,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx($,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),m.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(v,{control:m.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),m.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:m.control,name:"reality_settings.server_name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...f})})]})}),e.jsx(v,{control:m.control,name:"reality_settings.server_port",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...f})})]})}),e.jsx(v,{control:m.control,name:"reality_settings.allow_insecure",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(N,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(v,{control:m.control,name:"reality_settings.private_key",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(P,{...f,className:"pr-9"})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const _=Su();m.setValue("reality_settings.private_key",_.privateKey),m.setValue("reality_settings.public_key",_.publicKey),q.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{q.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(v,{control:m.control,name:"reality_settings.public_key",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(N,{children:e.jsx(P,{...f})})]})}),e.jsx(v,{control:m.control,name:"reality_settings.short_id",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(N,{children:e.jsx(P,{...f,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const _=Tu();m.setValue("reality_settings.short_id",_),q.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Ne,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(F,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(v,{control:m.control,name:"network",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(b,{children:[l("dynamic_form.vless.network.label"),e.jsx($t,{value:m.watch("network_settings"),setValue:_=>m.setValue("network_settings",_),templateType:m.watch("network")})]}),e.jsx(N,{children:e.jsxs(W,{onValueChange:f.onChange,value:f.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(G,{children:e.jsx(ps,{children:ls.vless.networkOptions.map(_=>e.jsx($,{value:_.value,className:"cursor-pointer",children:_.label},_.value))})})]})})]})}),e.jsx(v,{control:m.control,name:"flow",render:({field:f})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dynamic_form.vless.flow.label")}),e.jsx(N,{children:e.jsxs(W,{onValueChange:_=>f.onChange(_==="none"?null:_),value:f.value||"none",children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(G,{children:ls.vless.flowOptions.map(_=>e.jsx($,{value:_,children:_},_))})]})})]})})]})};return e.jsx(ie,{children:E[s]?.()})},Fu=h.object({id:h.number().optional().nullable(),code:h.string().optional(),name:h.string().min(1,"form.name.error"),rate:h.string().min(1,"form.rate.error"),tags:h.array(h.string()).default([]),excludes:h.array(h.string()).default([]),ips:h.array(h.string()).default([]),group_ids:h.array(h.string()).default([]),host:h.string().min(1,"form.host.error"),port:h.string().min(1,"form.port.error"),server_port:h.string().min(1,"form.server_port.error"),parent_id:h.string().default("0").nullable(),route_ids:h.array(h.string()).default([]),protocol_settings:h.record(h.any()).default({}).nullable()}),ht={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function Mu(){const{t:s}=I("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:i,setServerType:c,refetch:m}=Vr(),[x,o]=u.useState([]),[d,p]=u.useState([]),[k,E]=u.useState([]),f=ce({resolver:ue(Fu),defaultValues:ht,mode:"onChange"});u.useEffect(()=>{_()},[n]),u.useEffect(()=>{l?.type&&l.type!==i&&c(l.type)},[l,i,c]),u.useEffect(()=>{l?l.type===i&&f.reset({...ht,...l}):f.reset({...ht,protocol_settings:ls[i].schema.parse({})})},[l,f,i]);const _=async()=>{if(!n)return;const[C,D,z]=await Promise.all([It(),hr(),xr()]);o(C.data?.map(Q=>({label:Q.name,value:Q.id.toString()}))||[]),p(D.data?.map(Q=>({label:Q.remarks,value:Q.id.toString()}))||[]),E(z.data||[])},T=u.useMemo(()=>k?.filter(C=>(C.parent_id===0||C.parent_id===null)&&C.type===i&&C.id!==f.watch("id")),[i,k,f]),g=()=>e.jsxs(ys,{children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(is,{align:"start",children:e.jsx(nc,{children:Ts.map(({type:C,label:D})=>e.jsx(fe,{onClick:()=>{c(C),a(!0)},className:"cursor-pointer",children:e.jsx(K,{variant:"outline",className:"text-white",style:{background:os[C]},children:D})},C))})})]}),w=()=>{a(!1),r(null),f.reset(ht)},S=async()=>{const C=f.getValues();(await Ic({...C,type:i})).data&&(w(),q.success(s("form.success")),m())};return e.jsxs(ge,{open:n,onOpenChange:w,children:[g(),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(De,{})]}),e.jsxs(xe,{...f,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{control:f.control,name:"name",render:({field:C})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:s("form.name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("form.name.placeholder"),...C})}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"rate",render:({field:C})=>e.jsxs(j,{className:"flex-[1]",children:[e.jsx(b,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(N,{children:e.jsx(P,{type:"number",min:"0",step:"0.1",...C})})}),e.jsx(R,{})]})})]}),e.jsx(v,{control:f.control,name:"code",render:({field:C})=>e.jsxs(j,{children:[e.jsxs(b,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(N,{children:e.jsx(P,{placeholder:s("form.code.placeholder"),...C,value:C.value||""})}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"tags",render:({field:C})=>e.jsxs(j,{children:[e.jsx(b,{children:s("form.tags.label")}),e.jsx(N,{children:e.jsx(xa,{value:C.value,onChange:C.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"group_ids",render:({field:C})=>e.jsxs(j,{children:[e.jsxs(b,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(Ft,{dialogTrigger:e.jsx(V,{variant:"link",children:s("form.groups.add")}),refetch:_})]}),e.jsx(N,{children:e.jsx(lt,{options:x,onChange:D=>C.onChange(D.map(z=>z.value)),value:x?.filter(D=>C.value.includes(D.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(R,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:f.control,name:"host",render:({field:C})=>e.jsxs(j,{children:[e.jsx(b,{children:s("form.host.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:s("form.host.placeholder"),...C})}),e.jsx(R,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(v,{control:f.control,name:"port",render:({field:C})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(b,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Ne,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(N,{children:e.jsx(P,{placeholder:s("form.port.placeholder"),...C})}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(V,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const D=C.value;D&&f.setValue("server_port",D)},children:e.jsx(Ne,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"server_port",render:({field:C})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(b,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Ne,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(N,{children:e.jsx(P,{placeholder:s("form.server_port.placeholder"),...C})}),e.jsx(R,{})]})})]})]}),n&&e.jsx(Iu,{serverType:i,value:f.watch("protocol_settings"),onChange:C=>f.setValue("protocol_settings",C,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(v,{control:f.control,name:"parent_id",render:({field:C})=>e.jsxs(j,{children:[e.jsx(b,{children:s("form.parent.label")}),e.jsxs(W,{onValueChange:C.onChange,value:C.value?.toString()||"0",children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:s("form.parent.none")}),T?.map(D=>e.jsx($,{value:D.id.toString(),className:"cursor-pointer",children:D.name},D.id))]})]}),e.jsx(R,{})]})}),e.jsx(v,{control:f.control,name:"route_ids",render:({field:C})=>e.jsxs(j,{children:[e.jsx(b,{children:s("form.route.label")}),e.jsx(N,{children:e.jsx(lt,{options:d,onChange:D=>C.onChange(D.map(z=>z.value)),value:d?.filter(D=>C.value.includes(D.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(R,{})]})})]}),e.jsxs(Oe,{className:"mt-6",children:[e.jsx(V,{type:"button",variant:"outline",onClick:w,children:s("form.cancel")}),e.jsx(V,{type:"submit",onClick:S,children:s("form.submit")})]})]})]})]})}function Aa({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(i=>r.has(i.value)).map(i=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),e.jsx(Ye,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Fe,{children:a.map(i=>{const c=r.has(i.value);return e.jsxs(_e,{onSelect:()=>{c?r.delete(i.value):r.add(i.value);const m=Array.from(r);s?.setFilterValue(m.length?m:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),i.icon&&e.jsx(i.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${i.color}`}),e.jsx("span",{children:i.label}),l?.get(i.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(i.value)})]},i.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Hs,{}),e.jsx(Fe,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Ou=[{value:ye.Shadowsocks,label:Ts.find(s=>s.type===ye.Shadowsocks)?.label,color:os[ye.Shadowsocks]},{value:ye.Vmess,label:Ts.find(s=>s.type===ye.Vmess)?.label,color:os[ye.Vmess]},{value:ye.Trojan,label:Ts.find(s=>s.type===ye.Trojan)?.label,color:os[ye.Trojan]},{value:ye.Hysteria,label:Ts.find(s=>s.type===ye.Hysteria)?.label,color:os[ye.Hysteria]},{value:ye.Vless,label:Ts.find(s=>s.type===ye.Vless)?.label,color:os[ye.Vless]}];function zu({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:i}=I("server"),c=l.map(m=>({label:m,value:m}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(Mu,{}),e.jsx(P,{placeholder:i("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:m=>s.getColumn("name")?.setFilterValue(m.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(Aa,{column:s.getColumn("type"),title:i("toolbar.type"),options:Ou}),s.getColumn("groups")&&e.jsx(Aa,{column:s.getColumn("groups"),title:i("columns.groups.title"),options:c})]}),r&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[i("toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:i("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:a?"default":"outline",onClick:n,size:"sm",children:i(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const ot=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),ft={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},Lu=s=>{const{t:n}=I("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Pt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(K,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:os[a.original.type]},children:[e.jsx(zn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(V,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:i=>{i.stopPropagation(),wt(r||l.toString()).then(()=>{q.success(n("common:copy.success"))})},children:e.jsx(Da,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ts.find(i=>i.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=u.useState(!!a.getValue("show"));return e.jsx(H,{checked:l,onCheckedChange:async i=>{r(i),Oc({id:a.original.id,type:a.original.type,show:i?1:0}).catch(()=>{r(!i),s()})},style:{backgroundColor:l?os[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(M,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",ft[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",ft[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(ie,{delayDuration:0,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(V,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:i=>{i.stopPropagation(),wt(l).then(()=>{q.success(n("common:copy.success"))})},children:e.jsx(Da,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(ot,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(K,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,i)=>e.jsx(K,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},i)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const i=a.getValue(l);return i?r.some(c=>i.includes(c)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(K,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:os[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:i}=Vr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(ys,{modal:!1,children:[e.jsx(Ns,{asChild:!0,children:e.jsx(V,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(Nt,{className:"size-4"})})}),e.jsxs(is,{align:"end",className:"w-40",children:[e.jsx(fe,{className:"cursor-pointer",onClick:()=>{i(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ui,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(fe,{className:"cursor-pointer",onClick:async()=>{Mc({id:a.original.id}).then(({data:c})=>{c&&(q.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(xi,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(at,{}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:c=>c.preventDefault(),children:e.jsx(Qe,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Fc({id:a.original.id}).then(({data:c})=>{c&&(q.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ds,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Au(){const[s,n]=u.useState({}),[a,l]=u.useState({"drag-handle":!1}),[r,i]=u.useState([]),[c,m]=u.useState({pageSize:500,pageIndex:0}),[x,o]=u.useState([]),[d,p]=u.useState(!1),[k,E]=u.useState({}),[f,_]=u.useState([]),{refetch:T}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:z}=await xr();return _(z),z}}),g=u.useMemo(()=>{const z=new Set;return f.forEach(Q=>{Q.groups&&Q.groups.forEach(A=>z.add(A.name))}),Array.from(z).sort()},[f]);u.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),E({name:d?2e3:200}),m({pageSize:d?99999:500,pageIndex:0})},[d]);const w=(z,Q)=>{d&&(z.dataTransfer.setData("text/plain",Q.toString()),z.currentTarget.classList.add("opacity-50"))},S=(z,Q)=>{if(!d)return;z.preventDefault(),z.currentTarget.classList.remove("bg-muted");const A=parseInt(z.dataTransfer.getData("text/plain"));if(A===Q)return;const X=[...f],[Us]=X.splice(A,1);X.splice(Q,0,Us),_(X)},C=async()=>{if(!d){p(!0);return}const z=f?.map((Q,A)=>({id:Q.id,order:A+1}));zc(z).then(()=>{q.success("排序保存成功"),p(!1),T()}).finally(()=>{p(!1)})},D=Le({data:f||[],columns:Lu(T),state:{sorting:x,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:k,pagination:c},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:o,onColumnFiltersChange:i,onColumnVisibilityChange:l,onColumnSizingChange:E,onPaginationChange:m,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Nu,{refetch:T,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Je,{table:D,toolbar:z=>e.jsx(zu,{table:z,refetch:T,saveOrder:C,isSortMode:d,groups:g}),draggable:d,onDragStart:w,onDragEnd:z=>z.currentTarget.classList.remove("opacity-50"),onDragOver:z=>{z.preventDefault(),z.currentTarget.classList.add("bg-muted")},onDragLeave:z=>z.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!d})})})}function $u(){const{t:s}=I("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Au,{})})]})]})}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));function Ku({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Ft,{refetch:n}),e.jsx(P,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]})})}const Hu=s=>{const{t:n}=I("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(ot,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(zn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Ft,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Qe,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Ac({id:a.original.id}).then(({data:l})=>{l&&(q.success(n("messages.updateSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Uu(){const[s,n]=u.useState({}),[a,l]=u.useState({}),[r,i]=u.useState([]),[c,m]=u.useState([]),{data:x,refetch:o,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:k}=await It();return k}}),p=Le({data:x||[],columns:Hu(o),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:m,onColumnFiltersChange:i,onColumnVisibilityChange:l,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Je,{table:p,toolbar:k=>e.jsx(Ku,{table:k,refetch:o}),isLoading:d})}function Bu(){const{t:s}=I("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Uu,{})})]})]})}const Gu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),Wu=s=>h.object({remarks:h.string().min(1,s("form.validation.remarks")),match:h.array(h.string()),action:h.enum(["block","dns"]),action_value:h.string().optional()});function Ir({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=I("route"),i=ce({resolver:ue(Wu(r)),defaultValues:a,mode:"onChange"}),[c,m]=u.useState(!1);return e.jsxs(ge,{open:c,onOpenChange:m,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ne,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(De,{})]}),e.jsxs(xe,{...i,children:[e.jsx(v,{control:i.control,name:"remarks",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(P,{type:"text",placeholder:r("form.remarksPlaceholder"),...x})})}),e.jsx(R,{})]})}),e.jsx(v,{control:i.control,name:"match",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(Cs,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:x.value.join(` +`).filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"recaptcha_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(M,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(y,{control:r.control,name:"recaptcha_key",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.recaptcha.key.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.recaptcha.key.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"recaptcha_site_key",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(E,{})]})})]}),e.jsx(y,{control:r.control,name:"register_limit_by_ip_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(M,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(y,{control:r.control,name:"register_limit_count",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.registerLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.registerLimit.count.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"register_limit_expire",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(E,{})]})})]}),e.jsx(y,{control:r.control,name:"password_limit_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(M,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(y,{control:r.control,name:"password_limit_count",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"password_limit_expire",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(M,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(E,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function um(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(ye,{}),e.jsx(mm,{})]})}const xm=Object.freeze(Object.defineProperty({__proto__:null,default:um},Symbol.toStringTag,{value:"Module"})),hm=h.object({plan_change_enable:h.boolean().nullable().default(!1),reset_traffic_method:h.coerce.number().nullable().default(0),surplus_enable:h.boolean().nullable().default(!1),new_order_event_id:h.coerce.number().nullable().default(0),renew_order_event_id:h.coerce.number().nullable().default(0),change_order_event_id:h.coerce.number().nullable().default(0),show_info_to_server_enable:h.boolean().nullable().default(!1),show_protocol_to_server_enable:h.boolean().nullable().default(!1),default_remind_expire:h.boolean().nullable().default(!1),default_remind_traffic:h.boolean().nullable().default(!1),subscribe_path:h.string().nullable().default("s")}),fm={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function pm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(hm),defaultValues:fm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","subscribe"],queryFn:()=>hs("subscribe")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.subscribe){const o=c?.data?.subscribe;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(ve.debounce(async o=>{if(!ve.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(ue,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:r.control,name:"plan_change_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(M,{children:s("subscribe.plan_change_enable.description")}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"reset_traffic_method",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(G,{onValueChange:o.onChange,value:o.value?.toString()||"0",children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:"请选择重置方式"})})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx(L,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx(L,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx(L,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx(L,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(M,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"surplus_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(M,{children:s("subscribe.surplus_enable.description")}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"new_order_event_id",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(w,{children:e.jsxs(G,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(U,{children:e.jsx(W,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx(L,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(M,{children:s("subscribe.new_order_event.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"renew_order_event_id",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(w,{children:e.jsxs(G,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(U,{children:e.jsx(W,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx(L,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(M,{children:s("renew_order_event.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"change_order_event_id",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(w,{children:e.jsxs(G,{onValueChange:o.onChange,value:o.value?.toString(),children:[e.jsx(U,{children:e.jsx(W,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx(L,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(M,{children:s("subscribe.change_order_event.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"subscribe_path",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:"subscribe",...o,value:o.value||"",onChange:d=>{o.onChange(d),x(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:o.value||"s"})]}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"show_info_to_server_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(M,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"show_protocol_to_server_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(M,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value||!1,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function gm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(ye,{}),e.jsx(pm,{})]})}const jm=Object.freeze(Object.defineProperty({__proto__:null,default:gm},Symbol.toStringTag,{value:"Module"})),vm=h.object({invite_force:h.boolean().default(!1),invite_commission:h.coerce.string().default("0"),invite_gen_limit:h.coerce.string().default("0"),invite_never_expire:h.boolean().default(!1),commission_first_time_enable:h.boolean().default(!1),commission_auto_check_enable:h.boolean().default(!1),commission_withdraw_limit:h.coerce.string().default("0"),commission_withdraw_method:h.array(h.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:h.boolean().default(!1),commission_distribution_enable:h.boolean().default(!1),commission_distribution_l1:h.coerce.number().default(0),commission_distribution_l2:h.coerce.number().default(0),commission_distribution_l3:h.coerce.number().default(0)}),bm={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function ym(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(vm),defaultValues:bm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","invite"],queryFn:()=>hs("invite")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:o=>{o.data&&q.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.invite){const o=c?.data?.invite;Object.entries(o).forEach(([d,p])=>{typeof p=="number"?r.setValue(d,String(p)):r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(ve.debounce(async o=>{if(!ve.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(ue,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:r.control,name:"invite_force",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(M,{children:s("invite.invite_force.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"invite_commission",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("invite.invite_commission.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("invite.invite_commission.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"invite_gen_limit",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("invite.invite_gen_limit.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("invite.invite_gen_limit.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"invite_never_expire",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(M,{children:s("invite.invite_never_expire.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"commission_first_time_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(M,{children:s("invite.commission_first_time.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"commission_auto_check_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(M,{children:s("invite.commission_auto_check.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"commission_withdraw_limit",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"commission_withdraw_method",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("invite.commission_withdraw_method.placeholder"),...o,value:Array.isArray(o.value)?o.value.join(","):"",onChange:d=>{const p=d.target.value.split(",").filter(Boolean);o.onChange(p),x(r.getValues())}})}),e.jsx(M,{children:s("invite.commission_withdraw_method.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"withdraw_close_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(M,{children:s("invite.withdraw_close.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),e.jsx(y,{control:r.control,name:"commission_distribution_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(M,{children:s("invite.commission_distribution.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:d=>{o.onChange(d),x(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(y,{control:r.control,name:"commission_distribution_l1",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:s("invite.commission_distribution.l1")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"commission_distribution_l2",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:s("invite.commission_distribution.l2")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"commission_distribution_l3",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:s("invite.commission_distribution.l3")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...o,value:o.value||"",onChange:d=>{const p=d.target.value?Number(d.target.value):0;o.onChange(p),x(r.getValues())}})}),e.jsx(E,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function Nm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(ye,{}),e.jsx(ym,{})]})}const _m=Object.freeze(Object.defineProperty({__proto__:null,default:Nm},Symbol.toStringTag,{value:"Module"})),wm=h.object({frontend_theme:h.string().nullable(),frontend_theme_sidebar:h.string().nullable(),frontend_theme_header:h.string().nullable(),frontend_theme_color:h.string().nullable(),frontend_background_url:h.string().url().nullable()}),Cm={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function Sm(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>hs("frontend")}),n=de({resolver:me(wm),defaultValues:Cm,mode:"onChange"});m.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,c])=>{n.setValue(r,c)})}},[s]);function a(l){fs(l).then(({data:r})=>{r&&q.success("更新成功")})}return e.jsx(ue,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(y,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:"边栏风格"}),e.jsx(M,{children:"边栏风格"})]}),e.jsx(w,{children:e.jsx(H,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(y,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:"头部风格"}),e.jsx(M,{children:"边栏风格"})]}),e.jsx(w,{children:e.jsx(H,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(y,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(b,{children:[e.jsx(N,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(w,{children:e.jsxs("select",{className:_(Bs({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(ca,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(M,{children:"主题色"}),e.jsx(E,{})]})}),e.jsx(y,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(b,{children:[e.jsx(N,{children:"背景"}),e.jsx(w,{children:e.jsx(D,{placeholder:"请输入图片地址",...l})}),e.jsx(M,{children:"将会在后台登录页面进行展示。"}),e.jsx(E,{})]})}),e.jsx(V,{type:"submit",children:"保存设置"})]})})}function km(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(ye,{}),e.jsx(Sm,{})]})}const Pm=Object.freeze(Object.defineProperty({__proto__:null,default:km},Symbol.toStringTag,{value:"Module"})),Tm=h.object({server_pull_interval:h.coerce.number().nullable(),server_push_interval:h.coerce.number().nullable(),server_token:h.string().nullable(),device_limit_mode:h.coerce.number().nullable()}),Dm={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function Em(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(Tm),defaultValues:Dm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","server"],queryFn:()=>hs("server")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:d=>{d.data&&q.success(s("common.AutoSaved"))}});m.useEffect(()=>{if(c?.data.server){const d=c.data.server;Object.entries(d).forEach(([p,T])=>{r.setValue(p,T)}),l.current=d}},[c]);const u=m.useCallback(ve.debounce(async d=>{if(!ve.isEqual(d,l.current)){a(!0);try{await i(d),l.current=d}finally{a(!1)}}},1e3),[i]),x=m.useCallback(d=>{u(d)},[u]);m.useEffect(()=>{const d=r.watch(p=>{x(p)});return()=>d.unsubscribe()},[r.watch,x]);const o=()=>{const d=Math.floor(Math.random()*17)+16,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let T="";for(let R=0;Re.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("server.server_token.title")}),e.jsx(w,{children:e.jsxs("div",{className:"relative",children:[e.jsx(D,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:p=>{p.preventDefault(),o()},children:e.jsx(ri,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(M,{children:s("server.server_token.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const T=p.target.value?Number(p.target.value):null;d.onChange(T)}})}),e.jsx(M,{children:s("server.server_pull_interval.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:p=>{const T=p.target.value?Number(p.target.value):null;d.onChange(T)}})}),e.jsx(M,{children:s("server.server_push_interval.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(G,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx(L,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(M,{children:s("server.device_limit_mode.description")}),e.jsx(E,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function Rm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(ye,{}),e.jsx(Em,{})]})}const Vm=Object.freeze(Object.defineProperty({__proto__:null,default:Rm},Symbol.toStringTag,{value:"Module"}));function Im({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(pe,{open:s,onOpenChange:n,children:e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Mn,{className:"h-5 w-5 text-green-500"}):e.jsx(On,{className:"h-5 w-5 text-destructive"}),e.jsx(ge,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Te,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(lt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const Fm=h.object({email_template:h.string().nullable().default("classic"),email_host:h.string().nullable().default(""),email_port:h.coerce.number().nullable().default(465),email_username:h.string().nullable().default(""),email_password:h.string().nullable().default(""),email_encryption:h.string().nullable().default(""),email_from_address:h.string().email().nullable().default(""),remind_mail_enable:h.boolean().nullable().default(!1)});function Mm(){const{t:s}=I("settings"),[n,a]=m.useState(null),[l,r]=m.useState(!1),c=m.useRef(null),[i,u]=m.useState(!1),x=de({resolver:me(Fm),defaultValues:{},mode:"onBlur"}),{data:o}=se({queryKey:["settings","email"],queryFn:()=>hs("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>Vd()}),{mutateAsync:p}=as({mutationFn:fs,onSuccess:S=>{S.data&&q.success(s("common.autoSaved"))}}),{mutate:T,isPending:R}=as({mutationFn:Id,onMutate:()=>{a(null),r(!1)},onSuccess:S=>{a(S.data),r(!0),S.data.error?q.error(s("email.test.error")):q.success(s("email.test.success"))}});m.useEffect(()=>{if(o?.data.email){const S=o.data.email;Object.entries(S).forEach(([j,C])=>{x.setValue(j,C)}),c.current=S}},[o]);const f=m.useCallback(ve.debounce(async S=>{if(!ve.isEqual(S,c.current)){u(!0);try{await p(S),c.current=S}finally{u(!1)}}},1e3),[p]),g=m.useCallback(S=>{f(S)},[f]);return m.useEffect(()=>{const S=x.watch(j=>{g(j)});return()=>S.unsubscribe()},[x.watch,g]),e.jsxs(e.Fragment,{children:[e.jsx(ue,{...x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:x.control,name:"email_host",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_host.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...S,value:S.value||""})}),e.jsx(M,{children:s("email.email_host.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_port",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_port.title")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:s("common.placeholder"),...S,value:S.value||"",onChange:j=>{const C=j.target.value?Number(j.target.value):null;S.onChange(C)}})}),e.jsx(M,{children:s("email.email_port.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_encryption",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(G,{onValueChange:S.onChange,value:S.value||"none",children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:"请选择加密方式"})})}),e.jsxs(B,{children:[e.jsx(L,{value:"none",children:s("email.email_encryption.none")}),e.jsx(L,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx(L,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(M,{children:s("email.email_encryption.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_username",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_username.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...S,value:S.value||""})}),e.jsx(M,{children:s("email.email_username.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_password",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_password.title")}),e.jsx(w,{children:e.jsx(D,{type:"password",placeholder:s("common.placeholder"),...S,value:S.value||""})}),e.jsx(M,{children:s("email.email_password.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_from_address",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_from.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...S,value:S.value||""})}),e.jsx(M,{children:s("email.email_from.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"email_template",render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("email.email_template.title")}),e.jsxs(G,{onValueChange:j=>{S.onChange(j),g(x.getValues())},value:S.value||void 0,children:[e.jsx(w,{children:e.jsx(U,{className:"w-[200px]",children:e.jsx(W,{placeholder:s("email.email_template.placeholder")})})}),e.jsx(B,{children:d?.data?.map(j=>e.jsx(L,{value:j,children:j},j))})]}),e.jsx(M,{children:s("email.email_template.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"remind_mail_enable",render:({field:S})=>e.jsxs(b,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:s("email.remind_mail.title")}),e.jsx(M,{children:s("email.remind_mail.description")})]}),e.jsx(w,{children:e.jsx(H,{checked:S.value||!1,onCheckedChange:j=>{S.onChange(j),g(x.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(V,{onClick:()=>T(),loading:R,disabled:R,children:s(R?"test.sending":"test.title")})})]})}),i&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(Im,{open:l,onOpenChange:r,result:n})]})}function Om(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(ye,{}),e.jsx(Mm,{})]})}const zm=Object.freeze(Object.defineProperty({__proto__:null,default:Om},Symbol.toStringTag,{value:"Module"})),Lm=h.object({telegram_bot_enable:h.boolean().nullable(),telegram_bot_token:h.string().nullable(),telegram_discuss_link:h.string().nullable()}),Am={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function $m(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(Lm),defaultValues:Am,mode:"onBlur"}),{data:c}=se({queryKey:["settings","telegram"],queryFn:()=>hs("telegram")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:p=>{p.data&&q.success(s("common.autoSaved"))}}),{mutate:u,isPending:x}=as({mutationFn:Fd,onSuccess:p=>{p.data&&q.success(s("telegram.webhook.success"))}});m.useEffect(()=>{if(c?.data.telegram){const p=c.data.telegram;Object.entries(p).forEach(([T,R])=>{r.setValue(T,R)}),l.current=p}},[c]);const o=m.useCallback(ve.debounce(async p=>{if(!ve.isEqual(p,l.current)){a(!0);try{await i(p),l.current=p}finally{a(!1)}}},1e3),[i]),d=m.useCallback(p=>{o(p)},[o]);return m.useEffect(()=>{const p=r.watch(T=>{d(T)});return()=>p.unsubscribe()},[r.watch,d]),e.jsx(ue,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:r.control,name:"telegram_bot_token",render:({field:p})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("telegram.bot_token.placeholder"),...p,value:p.value||""})}),e.jsx(M,{children:s("telegram.bot_token.description")}),e.jsx(E,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(V,{loading:x,disabled:x,onClick:()=>u(),children:s(x?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(M,{children:s("telegram.webhook.description")}),e.jsx(E,{})]}),e.jsx(y,{control:r.control,name:"telegram_bot_enable",render:({field:p})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(M,{children:s("telegram.bot_enable.description")}),e.jsx(w,{children:e.jsx(H,{checked:p.value||!1,onCheckedChange:T=>{p.onChange(T),d(r.getValues())}})}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"telegram_discuss_link",render:({field:p})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("telegram.discuss_link.placeholder"),...p,value:p.value||""})}),e.jsx(M,{children:s("telegram.discuss_link.description")}),e.jsx(E,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function qm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(ye,{}),e.jsx($m,{})]})}const Km=Object.freeze(Object.defineProperty({__proto__:null,default:qm},Symbol.toStringTag,{value:"Module"})),Hm=h.object({windows_version:h.string().nullable(),windows_download_url:h.string().nullable(),macos_version:h.string().nullable(),macos_download_url:h.string().nullable(),android_version:h.string().nullable(),android_download_url:h.string().nullable()}),Um={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Bm(){const{t:s}=I("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=de({resolver:me(Hm),defaultValues:Um,mode:"onBlur"}),{data:c}=se({queryKey:["settings","app"],queryFn:()=>hs("app")}),{mutateAsync:i}=as({mutationFn:fs,onSuccess:o=>{o.data&&q.success(s("app.save_success"))}});m.useEffect(()=>{if(c?.data.app){const o=c.data.app;Object.entries(o).forEach(([d,p])=>{r.setValue(d,p)}),l.current=o}},[c]);const u=m.useCallback(ve.debounce(async o=>{if(!ve.isEqual(o,l.current)){a(!0);try{await i(o),l.current=o}finally{a(!1)}}},1e3),[i]),x=m.useCallback(o=>{u(o)},[u]);return m.useEffect(()=>{const o=r.watch(d=>{x(d)});return()=>o.unsubscribe()},[r.watch,x]),e.jsx(ue,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:r.control,name:"windows_version",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.windows.version.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"windows_download_url",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.windows.download.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"macos_version",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.macos.version.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"macos_download_url",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.macos.download.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"android_version",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.android.version.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.android.version.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"android_download_url",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{className:"text-base",children:s("app.android.download.title")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("common.placeholder"),...o,value:o.value||""})}),e.jsx(M,{children:s("app.android.download.description")}),e.jsx(E,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Gm(){const{t:s}=I("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(ye,{}),e.jsx(Bm,{})]})}const Wm=Object.freeze(Object.defineProperty({__proto__:null,default:Gm},Symbol.toStringTag,{value:"Module"})),fa=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:_("w-full caption-bottom text-sm",s),...n})}));fa.displayName="Table";const pa=m.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:_("[&_tr]:border-b",s),...n}));pa.displayName="TableHeader";const ga=m.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:_("[&_tr:last-child]:border-0",s),...n}));ga.displayName="TableBody";const Ym=m.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:_("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));Ym.displayName="TableFooter";const ys=m.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:_("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));ys.displayName="TableRow";const ja=m.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:_("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));ja.displayName="TableHead";const Ks=m.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:_("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));Ks.displayName="TableCell";const Jm=m.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:_("mt-4 text-sm text-muted-foreground",s),...n}));Jm.displayName="TableCaption";function Qm({table:s}){const[n,a]=m.useState(""),{t:l}=I("common");m.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const r=c=>{const i=parseInt(c);!isNaN(i)&&i>=1&&i<=s.getPageCount()?s.setPageIndex(i-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"flex-1 text-sm text-muted-foreground",children:l("table.pagination.selected",{selected:s.getFilteredSelectedRowModel().rows.length,total:s.getFilteredRowModel().rows.length})}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:l("table.pagination.itemsPerPage")}),e.jsxs(G,{value:`${s.getState().pagination.pageSize}`,onValueChange:c=>{s.setPageSize(Number(c))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(W,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(c=>e.jsx(L,{value:`${c}`,children:c},c))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:l("table.pagination.page")}),e.jsx(D,{type:"text",value:n,onChange:c=>a(c.target.value),onBlur:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&r(c.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsx("span",{children:l("table.pagination.pageOf",{total:s.getPageCount()})})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(V,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.firstPage")}),e.jsx(li,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.previousPage")}),e.jsx(En,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.nextPage")}),e.jsx(oa,{className:"h-4 w-4"})]}),e.jsxs(V,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:l("table.pagination.lastPage")}),e.jsx(oi,{className:"h-4 w-4"})]})]})]})]})}function es({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:c,onDragLeave:i,onDrop:u,showPagination:x=!0,isLoading:o=!1}){const{t:d}=I("common"),p=m.useRef(null),T=s.getAllColumns().filter(S=>S.getIsPinned()==="left"),R=s.getAllColumns().filter(S=>S.getIsPinned()==="right"),f=S=>T.slice(0,S).reduce((j,C)=>j+(C.getSize()??0),0),g=S=>R.slice(S+1).reduce((j,C)=>j+(C.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:p,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(fa,{children:[e.jsx(pa,{children:s.getHeaderGroups().map(S=>e.jsx(ys,{className:"hover:bg-transparent",children:S.headers.map((j,C)=>{const k=j.column.getIsPinned()==="left",v=j.column.getIsPinned()==="right",P=k?f(T.indexOf(j.column)):void 0,z=v?g(R.indexOf(j.column)):void 0;return e.jsx(ja,{colSpan:j.colSpan,style:{width:j.getSize(),...k&&{left:P},...v&&{right:z}},className:_("h-11 bg-card px-4 text-muted-foreground",(k||v)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",k&&"before:right-0",v&&"before:left-0"]),children:j.isPlaceholder?null:Nt(j.column.columnDef.header,j.getContext())},j.id)})},S.id))}),e.jsx(ga,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((S,j)=>e.jsx(ys,{"data-state":S.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:C=>l?.(C,j),onDragEnd:r,onDragOver:c,onDragLeave:i,onDrop:C=>u?.(C,j),children:S.getVisibleCells().map((C,k)=>{const v=C.column.getIsPinned()==="left",P=C.column.getIsPinned()==="right",z=v?f(T.indexOf(C.column)):void 0,Q=P?g(R.indexOf(C.column)):void 0;return e.jsx(Ks,{style:{width:C.column.getSize(),...v&&{left:z},...P&&{right:Q}},className:_("bg-card",(v||P)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",v&&"before:right-0",P&&"before:left-0"]),children:Nt(C.column.columnDef.cell,C.getContext())},C.id)})},S.id)):e.jsx(ys,{children:e.jsx(Ks,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:d("table.noData")})})})]})})}),x&&e.jsx(Qm,{table:s})]})}const Zm=s=>h.object({id:h.number().nullable(),name:h.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:h.string().optional().nullable(),notify_domain:h.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:h.coerce.number().min(0).optional().nullable(),handling_fee_percent:h.coerce.number().min(0).max(100).optional().nullable(),payment:h.string().min(1,s("form.validation.payment.required")),config:h.record(h.string(),h.string())}),Ha={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function Sr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Ha}){const{t:r}=I("payment"),[c,i]=m.useState(!1),[u,x]=m.useState(!1),[o,d]=m.useState([]),[p,T]=m.useState([]),R=Zm(r),f=de({resolver:me(R),defaultValues:l,mode:"onChange"}),g=f.watch("payment");m.useEffect(()=>{c&&(async()=>{const{data:C}=await Zc();d(C)})()},[c]),m.useEffect(()=>{if(!g||!c)return;(async()=>{const C={payment:g,...a==="edit"&&{id:Number(f.getValues("id"))}};Xc(C).then(({data:k})=>{T(k);const v=k.reduce((P,z)=>(z.field_name&&(P[z.field_name]=z.value??""),P),{});f.setValue("config",v)})})()},[g,c,f,a]);const S=async j=>{x(!0);try{(await ed(j)).data&&(q.success(r("form.messages.success")),f.reset(Ha),s(),i(!1))}finally{x(!1)}};return e.jsxs(pe,{open:c,onOpenChange:i,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(ge,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(ue,{...f,children:e.jsxs("form",{onSubmit:f.handleSubmit(S),className:"space-y-4",children:[e.jsx(y,{control:f.control,name:"name",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:r("form.fields.name.placeholder"),...j})}),e.jsx(M,{children:r("form.fields.name.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"icon",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.icon.label")}),e.jsx(w,{children:e.jsx(D,{...j,value:j.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(M,{children:r("form.fields.icon.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"notify_domain",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.notify_domain.label")}),e.jsx(w,{children:e.jsx(D,{...j,value:j.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(M,{children:r("form.fields.notify_domain.description")}),e.jsx(E,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(y,{control:f.control,name:"handling_fee_percent",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(w,{children:e.jsx(D,{type:"number",...j,value:j.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"handling_fee_fixed",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(w,{children:e.jsx(D,{type:"number",...j,value:j.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(E,{})]})})]}),e.jsx(y,{control:f.control,name:"payment",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.payment.label")}),e.jsxs(G,{onValueChange:j.onChange,defaultValue:j.value,children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(B,{children:o.map(C=>e.jsx(L,{value:C,children:C},C))})]}),e.jsx(M,{children:r("form.fields.payment.description")}),e.jsx(E,{})]})}),p.length>0&&e.jsx("div",{className:"space-y-4",children:p.map(j=>e.jsx(y,{control:f.control,name:`config.${j.field_name}`,render:({field:C})=>e.jsxs(b,{children:[e.jsx(N,{children:j.label}),e.jsx(w,{children:e.jsx(D,{...C,value:C.value||""})}),e.jsx(E,{})]})},j.field_name))}),e.jsxs(Le,{children:[e.jsx(mt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(V,{type:"submit",disabled:u,children:r("form.buttons.submit")})]})]})})]})]})}function O({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(V,{variant:"ghost",size:"default",className:_("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(Va,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Jt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Qt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(ii,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:_("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsx(Va,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Xm=ci,eu=di,su=mi,kr=m.forwardRef(({className:s,...n},a)=>e.jsx(An,{className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));kr.displayName=An.displayName;const Pr=m.forwardRef(({className:s,...n},a)=>e.jsxs(su,{children:[e.jsx(kr,{}),e.jsx($n,{ref:a,className:_("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]}));Pr.displayName=$n.displayName;const Tr=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",s),...n});Tr.displayName="AlertDialogHeader";const Dr=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Dr.displayName="AlertDialogFooter";const Er=m.forwardRef(({className:s,...n},a)=>e.jsx(qn,{ref:a,className:_("text-lg font-semibold",s),...n}));Er.displayName=qn.displayName;const Rr=m.forwardRef(({className:s,...n},a)=>e.jsx(Kn,{ref:a,className:_("text-sm text-muted-foreground",s),...n}));Rr.displayName=Kn.displayName;const Vr=m.forwardRef(({className:s,...n},a)=>e.jsx(Hn,{ref:a,className:_(Us(),s),...n}));Vr.displayName=Hn.displayName;const Ir=m.forwardRef(({className:s,...n},a)=>e.jsx(Un,{ref:a,className:_(Us({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));Ir.displayName=Un.displayName;function Ue({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:c="确认",variant:i="default",className:u}){return e.jsxs(Xm,{children:[e.jsx(eu,{asChild:!0,children:n}),e.jsxs(Pr,{className:_("sm:max-w-[425px]",u),children:[e.jsxs(Tr,{children:[e.jsx(Er,{children:a}),e.jsx(Rr,{children:l})]}),e.jsxs(Dr,{children:[e.jsx(Ir,{asChild:!0,children:e.jsx(V,{variant:"outline",children:r})}),e.jsx(Vr,{asChild:!0,children:e.jsx(V,{variant:i,onClick:s,children:c})})]})]})]})}const Fr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),tu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Rt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(H,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await td({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(O,{column:l,title:a("table.columns.notify_url")}),e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{className:"ml-1",children:e.jsx(Fr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(O,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Sr,{refetch:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Ue,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await sd({id:l.original.id});r&&s()},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function au({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("payment"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Sr,{refetch:n}),e.jsx(D,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:i=>s.getColumn("name")?.setFilterValue(i.target.value),className:"h-8 w-[250px]"}),c&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function nu(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[i,u]=m.useState([]),[x,o]=m.useState({"drag-handle":!1}),[d,p]=m.useState({pageSize:20,pageIndex:0}),{refetch:T}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:j}=await Qc();return u(j?.map(C=>({...C,enable:!!C.enable}))||[]),j}});m.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const R=(j,C)=>{r&&(j.dataTransfer.setData("text/plain",C.toString()),j.currentTarget.classList.add("opacity-50"))},f=(j,C)=>{if(!r)return;j.preventDefault(),j.currentTarget.classList.remove("bg-muted");const k=parseInt(j.dataTransfer.getData("text/plain"));if(k===C)return;const v=[...i],[P]=v.splice(k,1);v.splice(C,0,P),u(v)},g=async()=>{r?ad({ids:i.map(j=>j.id)}).then(()=>{T(),c(!1),q.success("排序保存成功")}):c(!0)},S=Ke({data:i,columns:tu({refetch:T,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(es,{table:S,toolbar:j=>e.jsx(au,{table:j,refetch:T,saveOrder:g,isSortMode:r}),draggable:r,onDragStart:R,onDragEnd:j=>j.currentTarget.classList.remove("opacity-50"),onDragOver:j=>{j.preventDefault(),j.currentTarget.classList.add("bg-muted")},onDragLeave:j=>j.currentTarget.classList.remove("bg-muted"),onDrop:f,showPagination:!r})}function ru(){const{t:s}=I("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Ie,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(nu,{})})]})]})}const lu=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"}));function ou({pluginName:s,onClose:n,onSuccess:a}){const{t:l}=I("plugin"),[r,c]=m.useState(!0),[i,u]=m.useState(!1),[x,o]=m.useState(null),d=ui({config:xi(hi())}),p=de({resolver:me(d),defaultValues:{config:{}}});m.useEffect(()=>{(async()=>{try{const{data:g}=await Ds.getPluginConfig(s);o(g),p.reset({config:Object.fromEntries(Object.entries(g).map(([S,j])=>[S,j.value]))})}catch{q.error(l("messages.configLoadError"))}finally{c(!1)}})()},[s]);const T=async f=>{u(!0);try{await Ds.updatePluginConfig(s,f.config),q.success(l("messages.configSaveSuccess")),a()}catch{q.error(l("messages.configSaveError"))}finally{u(!1)}},R=(f,g)=>{switch(g.type){case"string":return e.jsx(y,{control:p.control,name:`config.${f}`,render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{children:g.label||g.description}),e.jsx(w,{children:e.jsx(D,{placeholder:g.placeholder,...S})}),g.description&&g.label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:g.description}),e.jsx(E,{})]})},f);case"number":case"percentage":return e.jsx(y,{control:p.control,name:`config.${f}`,render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{children:g.label||g.description}),e.jsx(w,{children:e.jsxs("div",{className:"relative",children:[e.jsx(D,{type:"number",placeholder:g.placeholder,...S,onChange:j=>{const C=Number(j.target.value);g.type==="percentage"?S.onChange(Math.min(100,Math.max(0,C))):S.onChange(C)},className:g.type==="percentage"?"pr-8":"",min:g.type==="percentage"?0:void 0,max:g.type==="percentage"?100:void 0,step:g.type==="percentage"?1:void 0}),g.type==="percentage"&&e.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:e.jsx(fi,{className:"h-4 w-4 text-muted-foreground"})})]})}),g.description&&g.label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:g.description}),e.jsx(E,{})]})},f);case"select":return e.jsx(y,{control:p.control,name:`config.${f}`,render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{children:g.label||g.description}),e.jsxs(G,{onValueChange:S.onChange,defaultValue:S.value,children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:g.placeholder})})}),e.jsx(B,{children:g.options?.map(j=>e.jsx(L,{value:j.value,children:j.label},j.value))})]}),g.description&&g.label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:g.description}),e.jsx(E,{})]})},f);case"boolean":return e.jsx(y,{control:p.control,name:`config.${f}`,render:({field:S})=>e.jsxs(b,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(N,{className:"text-base",children:g.label||g.description}),g.description&&g.label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:g.description})]}),e.jsx(w,{children:e.jsx(H,{checked:S.value,onCheckedChange:S.onChange})})]})},f);case"text":return e.jsx(y,{control:p.control,name:`config.${f}`,render:({field:S})=>e.jsxs(b,{children:[e.jsx(N,{children:g.label||g.description}),e.jsx(w,{children:e.jsx(ps,{placeholder:g.placeholder,...S})}),g.description&&g.label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:g.description}),e.jsx(E,{})]})},f);default:return null}};return r?e.jsxs("div",{className:"space-y-4",children:[e.jsx(le,{className:"h-4 w-[200px]"}),e.jsx(le,{className:"h-10 w-full"}),e.jsx(le,{className:"h-4 w-[200px]"}),e.jsx(le,{className:"h-10 w-full"})]}):e.jsx(ue,{...p,children:e.jsxs("form",{onSubmit:p.handleSubmit(T),className:"space-y-4",children:[x&&Object.entries(x).map(([f,g])=>R(f,g)),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(V,{type:"button",variant:"outline",onClick:n,disabled:i,children:l("config.cancel")}),e.jsx(V,{type:"submit",loading:i,disabled:i,children:l("config.save")})]})]})})}function iu(){const{t:s}=I("plugin"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,i]=m.useState(null),[u,x]=m.useState(""),[o,d]=m.useState("all"),{data:p,isLoading:T,refetch:R}=se({queryKey:["pluginList"],queryFn:async()=>{const{data:v}=await Ds.getPluginList();return v}}),f=p?["all",...new Set(p.map(v=>v.category||"other"))]:["all"],g=p?.filter(v=>{const P=v.name.toLowerCase().includes(u.toLowerCase())||v.description.toLowerCase().includes(u.toLowerCase())||v.code.toLowerCase().includes(u.toLowerCase()),z=o==="all"||v.category===o;return P&&z}),S=async v=>{a(v),Ds.installPlugin(v).then(()=>{q.success(s("messages.installSuccess")),R()}).catch(P=>{q.error(P.message||s("messages.installError"))}).finally(()=>{a(null)})},j=async v=>{a(v),Ds.uninstallPlugin(v).then(()=>{q.success(s("messages.uninstallSuccess")),R()}).catch(P=>{q.error(P.message||s("messages.uninstallError"))}).finally(()=>{a(null)})},C=async(v,P)=>{a(v),(P?Ds.disablePlugin:Ds.enablePlugin)(v).then(()=>{q.success(s(P?"messages.disableSuccess":"messages.enableSuccess")),R()}).catch(Q=>{q.error(Q.message||s(P?"messages.disableError":"messages.enableError"))}).finally(()=>{a(null)})},k=v=>{p?.find(P=>P.code===v),i(v),r(!0)};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(ia,{className:"h-6 w-6"}),e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})]}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{children:[e.jsxs("div",{className:"mb-8 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"relative max-w-sm flex-1",children:[e.jsx(gn,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(D,{placeholder:s("search.placeholder"),value:u,onChange:v=>x(v.target.value),className:"pl-9"})]}),e.jsxs(G,{value:o,onValueChange:d,children:[e.jsx(U,{className:"w-[180px]",children:e.jsx(W,{placeholder:s("category.placeholder")})}),e.jsx(B,{children:f.map(v=>e.jsx(L,{value:v,children:s(`category.${v}`)},v))})]})]}),e.jsxs(ha,{defaultValue:"all",className:"w-full",children:[e.jsxs(Ot,{children:[e.jsx(Ns,{value:"all",children:s("tabs.all")}),e.jsx(Ns,{value:"installed",children:s("tabs.installed")}),e.jsx(Ns,{value:"available",children:s("tabs.available")})]}),e.jsx(bt,{value:"all",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:T?e.jsxs(e.Fragment,{children:[e.jsx(Ht,{}),e.jsx(Ht,{}),e.jsx(Ht,{})]}):g?.map(v=>e.jsx(Kt,{plugin:v,onInstall:S,onUninstall:j,onToggleEnable:C,onOpenConfig:k,isLoading:n===v.name},v.name))})}),e.jsx(bt,{value:"installed",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:g?.filter(v=>v.is_installed).map(v=>e.jsx(Kt,{plugin:v,onInstall:S,onUninstall:j,onToggleEnable:C,onOpenConfig:k,isLoading:n===v.name},v.name))})}),e.jsx(bt,{value:"available",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:g?.filter(v=>!v.is_installed).map(v=>e.jsx(Kt,{plugin:v,onInstall:S,onUninstall:j,onToggleEnable:C,onOpenConfig:k,isLoading:n===v.name},v.code))})})]})]}),e.jsx(pe,{open:l,onOpenChange:r,children:e.jsxs(fe,{className:"sm:max-w-lg",children:[e.jsxs(be,{children:[e.jsxs(ge,{children:[p?.find(v=>v.code===c)?.name," ",s("config.title")]}),e.jsx(Te,{children:s("config.description")})]}),c&&e.jsx(ou,{pluginName:c,onClose:()=>r(!1),onSuccess:()=>{r(!1),R()}})]})})]})]})}function Kt({plugin:s,onInstall:n,onUninstall:a,onToggleEnable:l,onOpenConfig:r,isLoading:c}){const{t:i}=I("plugin");return e.jsxs(Me,{className:"group relative overflow-hidden transition-all hover:shadow-md",children:[e.jsxs($e,{children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(cs,{children:s.name}),s.is_installed&&e.jsx(K,{variant:s.is_enabled?"success":"secondary",children:s.is_enabled?i("status.enabled"):i("status.disabled")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ia,{className:"h-4 w-4"}),e.jsx("code",{className:"rounded bg-muted px-1 py-0.5",children:s.code})]}),e.jsxs("div",{children:["v",s.version]})]})]})}),e.jsx(Hs,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"mt-2",children:s.description}),e.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:e.jsxs("div",{className:"flex items-center gap-1",children:[i("author"),": ",s.author]})})]})})]}),e.jsx(qe,{children:e.jsx("div",{className:"flex items-center justify-end space-x-2",children:s.is_installed?e.jsxs(e.Fragment,{children:[e.jsxs(V,{variant:"outline",size:"sm",onClick:()=>r(s.code),disabled:!s.is_enabled||c,children:[e.jsx(pi,{className:"mr-2 h-4 w-4"}),i("button.config")]}),e.jsxs(V,{variant:s.is_enabled?"destructive":"default",size:"sm",onClick:()=>l(s.code,s.is_enabled),disabled:c,children:[e.jsx(gi,{className:"mr-2 h-4 w-4"}),s.is_enabled?i("button.disable"):i("button.enable")]}),e.jsx(Ue,{title:i("uninstall.title"),description:i("uninstall.description"),confirmText:i("uninstall.button"),variant:"destructive",onConfirm:()=>a(s.code),children:e.jsx(V,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",disabled:c,children:e.jsx(ns,{className:"h-4 w-4"})})})]}):e.jsx(V,{onClick:()=>n(s.code),disabled:c,loading:c,children:i("button.install")})})})]})}function Ht(){return e.jsxs(Me,{children:[e.jsxs($e,{children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(le,{className:"h-6 w-[200px]"}),e.jsx(le,{className:"h-6 w-[80px]"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(le,{className:"h-5 w-[120px]"}),e.jsx(le,{className:"h-5 w-[60px]"})]})]})}),e.jsxs("div",{className:"space-y-2 pt-2",children:[e.jsx(le,{className:"h-4 w-[300px]"}),e.jsx(le,{className:"h-4 w-[150px]"})]})]}),e.jsx(qe,{children:e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(le,{className:"h-9 w-[100px]"}),e.jsx(le,{className:"h-9 w-[100px]"}),e.jsx(le,{className:"h-8 w-8"})]})})]})}const cu=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),du=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(D,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(ps,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:_(Us({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function mu({themeKey:s,themeInfo:n}){const{t:a}=I("theme"),[l,r]=m.useState(!1),[c,i]=m.useState(!1),[u,x]=m.useState(!1),o=de({defaultValues:n.configs.reduce((T,R)=>(T[R.field_name]="",T),{})}),d=async()=>{i(!0),Oc(s).then(({data:T})=>{Object.entries(T).forEach(([R,f])=>{o.setValue(R,f)})}).finally(()=>{i(!1)})},p=async T=>{x(!0),zc(s,T).then(()=>{q.success(a("config.success")),r(!1)}).finally(()=>{x(!1)})};return e.jsxs(pe,{open:l,onOpenChange:T=>{r(T),T?d():o.reset()},children:[e.jsx(ze,{asChild:!0,children:e.jsx(V,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(fe,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:a("config.title",{name:n.name})}),e.jsx(Te,{children:a("config.description")})]}),c?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(da,{className:"h-6 w-6 animate-spin"})}):e.jsx(ue,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),className:"space-y-4",children:[n.configs.map(T=>e.jsx(y,{control:o.control,name:T.field_name,render:({field:R})=>e.jsxs(b,{children:[e.jsx(N,{children:T.label}),e.jsx(w,{children:du(T,R)}),e.jsx(E,{})]})},T.field_name)),e.jsxs(Le,{className:"mt-6 gap-2",children:[e.jsx(V,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(V,{type:"submit",loading:u,children:a("config.save")})]})]})})]})]})}function uu(){const{t:s}=I("theme"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,i]=m.useState(!1),[u,x]=m.useState(!1),[o,d]=m.useState(null),p=m.useRef(null),[T,R]=m.useState(0),{data:f,isLoading:g,refetch:S}=se({queryKey:["themeList"],queryFn:async()=>{const{data:$}=await Mc();return $}}),j=async $=>{a($),$c({frontend_theme:$}).then(()=>{q.success("主题切换成功"),S()}).finally(()=>{a(null)})},C=async $=>{if(!$.name.endsWith(".zip")){q.error(s("upload.error.format"));return}r(!0),Lc($).then(()=>{q.success("主题上传成功"),i(!1),S()}).finally(()=>{r(!1),p.current&&(p.current.value="")})},k=$=>{$.preventDefault(),$.stopPropagation(),$.type==="dragenter"||$.type==="dragover"?x(!0):$.type==="dragleave"&&x(!1)},v=$=>{$.preventDefault(),$.stopPropagation(),x(!1),$.dataTransfer.files&&$.dataTransfer.files[0]&&C($.dataTransfer.files[0])},P=()=>{o&&R($=>$===0?o.images.length-1:$-1)},z=()=>{o&&R($=>$===o.images.length-1?0:$+1)},Q=($,X)=>{R(0),d({name:$,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Ie,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(V,{onClick:()=>i(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Yt,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:g?e.jsxs(e.Fragment,{children:[e.jsx(Ua,{}),e.jsx(Ua,{})]}):f?.themes&&Object.entries(f.themes).map(([$,X])=>e.jsx(Me,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:_("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Ue,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if($===f?.active){q.error(s("card.delete.error.active"));return}a($),Ac($).then(()=>{q.success("主题删除成功"),S()}).finally(()=>{a(null)})},children:e.jsx(V,{disabled:n===$,loading:n===$,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(ns,{className:"h-4 w-4"})})})}),e.jsxs($e,{children:[e.jsx(cs,{children:X.name}),e.jsx(Hs,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(qe,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(V,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Q(X.name,X.images),children:e.jsx(ji,{className:"h-4 w-4"})}),e.jsx(mu,{themeKey:$,themeInfo:X}),e.jsx(V,{onClick:()=>j($),disabled:n===$||$===f.active,loading:n===$,variant:$===f.active?"secondary":"default",children:$===f.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},$))}),e.jsx(pe,{open:c,onOpenChange:i,children:e.jsxs(fe,{className:"sm:max-w-md",children:[e.jsxs(be,{children:[e.jsx(ge,{children:s("upload.title")}),e.jsx(Te,{children:s("upload.description")})]}),e.jsxs("div",{className:_("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",u&&"border-primary/50 bg-muted/50"),onDragEnter:k,onDragLeave:k,onDragOver:k,onDrop:v,children:[e.jsx("input",{type:"file",ref:p,className:"hidden",accept:".zip",onChange:$=>{const X=$.target.files?.[0];X&&C(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Yt,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>p.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(pe,{open:!!o,onOpenChange:$=>{$||(d(null),R(0))},children:e.jsxs(fe,{className:"max-w-4xl",children:[e.jsxs(be,{children:[e.jsxs(ge,{children:[o?.name," ",s("preview.title")]}),e.jsx(Te,{className:"text-center",children:o&&s("preview.imageCount",{current:T+1,total:o.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:o?.images[T]&&e.jsx("img",{src:o.images[T],alt:`${o.name} 预览图 ${T+1}`,className:"h-full w-full object-contain"})}),o&&o.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(V,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:P,children:e.jsx(vi,{className:"h-4 w-4"})}),e.jsx(V,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:z,children:e.jsx(bi,{className:"h-4 w-4"})})]})]}),o&&o.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:o.images.map(($,X)=>e.jsx("button",{onClick:()=>R(X),className:_("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",T===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:$,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function Ua(){return e.jsxs(Me,{children:[e.jsxs($e,{children:[e.jsx(le,{className:"h-6 w-[200px]"}),e.jsx(le,{className:"h-4 w-[300px]"})]}),e.jsxs(qe,{className:"flex items-center justify-end space-x-3",children:[e.jsx(le,{className:"h-10 w-[100px]"}),e.jsx(le,{className:"h-10 w-[100px]"})]})]})}const xu=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"})),va=m.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[c,i]=m.useState("");m.useEffect(()=>{if(c.includes(",")){const x=new Set([...n,...c.split(",").map(o=>o.trim())]);a(Array.from(x)),i("")}},[c,a,n]);const u=()=>{if(c){const x=new Set([...n,c]);a(Array.from(x)),i("")}};return e.jsxs("div",{className:_(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(x=>e.jsxs(K,{variant:"secondary",children:[x,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(o=>o!==x))},children:e.jsx(Zt,{className:"w-3"})})]},x)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:c,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Enter"||x.key===","?(x.preventDefault(),u()):x.key==="Backspace"&&c.length===0&&n.length>0&&(x.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});va.displayName="InputTags";const hu=h.object({id:h.number().nullable(),title:h.string().min(1).max(250),content:h.string().min(1),show:h.boolean(),tags:h.array(h.string()),img_url:h.string().nullable()}),fu={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Mr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=fu}){const{t:r}=I("notice"),[c,i]=m.useState(!1),u=de({resolver:me(hu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new ma({html:!0});return e.jsx(ue,{...u,children:e.jsxs(pe,{onOpenChange:i,open:c,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(fe,{className:"sm:max-w-[1025px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(Te,{})]}),e.jsx(y,{control:u.control,name:"title",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(w,{children:e.jsx(D,{placeholder:r("form.fields.title.placeholder"),...o})})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"content",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.content.label")}),e.jsx(w,{children:e.jsx(ua,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"img_url",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(w,{children:e.jsx(D,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...o,value:o.value||""})})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"show",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"tags",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.fields.tags.label")}),e.jsx(w,{children:e.jsx(va,{value:o.value,onChange:o.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(E,{})]})}),e.jsxs(Le,{children:[e.jsx(mt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(V,{type:"submit",onClick:o=>{o.preventDefault(),u.handleSubmit(async d=>{nd(d).then(({data:p})=>{p&&(q.success(r("form.buttons.success")),s(),i(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function pu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=I("notice"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Mr,{refetch:n}),!l&&e.jsx(D,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:i=>s.getColumn("title")?.setFilterValue(i.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),c&&!l&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const gu=s=>{const{t:n}=I("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(yi,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(K,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await ld({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Mr,{refetch:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ue,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{rd({id:a.original.id}).then(()=>{q.success(n("table.actions.delete.success")),s()})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function ju(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState(!1),[d,p]=m.useState({}),[T,R]=m.useState({pageSize:50,pageIndex:0}),[f,g]=m.useState([]),{refetch:S}=se({queryKey:["notices"],queryFn:async()=>{const{data:P}=await qa.getList();return g(P),P}});m.useEffect(()=>{l({"drag-handle":x,content:!x,created_at:!x,actions:!x}),R({pageSize:x?99999:50,pageIndex:0})},[x]);const j=(P,z)=>{x&&(P.dataTransfer.setData("text/plain",z.toString()),P.currentTarget.classList.add("opacity-50"))},C=(P,z)=>{if(!x)return;P.preventDefault(),P.currentTarget.classList.remove("bg-muted");const Q=parseInt(P.dataTransfer.getData("text/plain"));if(Q===z)return;const $=[...f],[X]=$.splice(Q,1);$.splice(z,0,X),g($)},k=async()=>{if(!x){o(!0);return}qa.sort(f.map(P=>P.id)).then(()=>{q.success("排序保存成功"),o(!1),S()}).finally(()=>{o(!1)})},v=Ke({data:f??[],columns:gu(S),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:T},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:p,onPaginationChange:R,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(es,{table:v,toolbar:P=>e.jsx(pu,{table:P,refetch:S,saveOrder:k,isSortMode:x}),draggable:x,onDragStart:j,onDragEnd:P=>P.currentTarget.classList.remove("opacity-50"),onDragOver:P=>{P.preventDefault(),P.currentTarget.classList.add("bg-muted")},onDragLeave:P=>P.currentTarget.classList.remove("bg-muted"),onDrop:C,showPagination:!x})})}function vu(){const{t:s}=I("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(Ie,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ju,{})})]})]})}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:vu},Symbol.toStringTag,{value:"Module"})),yu=h.object({id:h.number().nullable(),language:h.string().max(250),category:h.string().max(250),title:h.string().min(1).max(250),body:h.string().min(1),show:h.boolean()}),Nu={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Or({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Nu}){const{t:r}=I("knowledge"),[c,i]=m.useState(!1),u=de({resolver:me(yu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),x=new ma({html:!0});return m.useEffect(()=>{c&&l.id&&id(l.id).then(({data:o})=>{u.reset(o)})},[l.id,u,c]),e.jsxs(pe,{onOpenChange:i,open:c,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(fe,{className:"sm:max-w-[1025px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(Te,{})]}),e.jsxs(ue,{...u,children:[e.jsx(y,{control:u.control,name:"title",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(w,{children:e.jsx(D,{placeholder:r("form.titlePlaceholder"),...o})})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"category",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(w,{children:e.jsx(D,{placeholder:r("form.categoryPlaceholder"),...o})})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"language",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.language")}),e.jsx(w,{children:e.jsxs(G,{value:o.value,onValueChange:o.onChange,children:[e.jsx(U,{children:e.jsx(W,{placeholder:r("form.languagePlaceholder")})}),e.jsx(B,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx(L,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(y,{control:u.control,name:"body",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.content")}),e.jsx(w,{children:e.jsx(ua,{style:{height:"500px"},value:o.value,renderHTML:d=>x.render(d),onChange:({text:d})=>{o.onChange(d)}})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"show",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(w,{children:e.jsx(H,{checked:o.value,onCheckedChange:o.onChange})})}),e.jsx(E,{})]})}),e.jsxs(Le,{children:[e.jsx(mt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(V,{type:"submit",onClick:()=>{u.handleSubmit(o=>{cd(o).then(({data:d})=>{d&&(u.reset(),q.success(r("messages.operationSuccess")),i(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function _u({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Xe,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Cs,{children:[e.jsx(Fs,{placeholder:n}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Oe,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(ke,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:_("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Rs,{className:_("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Oe,{children:e.jsx(ke,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function wu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:c}=I("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Or,{refreshData:n}),e.jsx(D,{placeholder:c("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:i=>s.getColumn("title")?.setFilterValue(i.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(_u,{column:s.getColumn("category"),title:c("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(i=>i.getValue("category")))).map(i=>({label:i,value:i}))}),r&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[c("toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:l?"default":"outline",onClick:a,size:"sm",children:c(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const Cu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=I("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Rt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{md({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(K,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(O,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Or,{refreshData:s,dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Ue,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{dd({id:l.original.id}).then(({data:r})=>{r&&(q.success(a("messages.operationSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function Su(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[i,u]=m.useState([]),[x,o]=m.useState({"drag-handle":!1}),[d,p]=m.useState({pageSize:20,pageIndex:0}),{refetch:T,isLoading:R,data:f}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:k}=await od();return u(k||[]),k}});m.useEffect(()=>{o({"drag-handle":r,actions:!r}),p({pageSize:r?99999:10,pageIndex:0})},[r]);const g=(k,v)=>{r&&(k.dataTransfer.setData("text/plain",v.toString()),k.currentTarget.classList.add("opacity-50"))},S=(k,v)=>{if(!r)return;k.preventDefault(),k.currentTarget.classList.remove("bg-muted");const P=parseInt(k.dataTransfer.getData("text/plain"));if(P===v)return;const z=[...i],[Q]=z.splice(P,1);z.splice(v,0,Q),u(z)},j=async()=>{r?ud({ids:i.map(k=>k.id)}).then(()=>{T(),c(!1),q.success("排序保存成功")}):c(!0)},C=Ke({data:i,columns:Cu({refetch:T,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:x,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:o,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(es,{table:C,toolbar:k=>e.jsx(wu,{table:k,refetch:T,saveOrder:j,isSortMode:r}),draggable:r,onDragStart:g,onDragEnd:k=>k.currentTarget.classList.remove("opacity-50"),onDragOver:k=>{k.preventDefault(),k.currentTarget.classList.add("bg-muted")},onDragLeave:k=>k.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!r})}function ku(){const{t:s}=I("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Su,{})})]})]})}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"}));function Tu(s,n){const[a,l]=m.useState(s);return m.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function Ut(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function Du(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(c=>!n.find(i=>i.value===c.value));return a}function Eu(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const zr=m.forwardRef(({className:s,...n},a)=>Ni(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:_("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);zr.displayName="CommandEmpty";const ot=m.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:c,onSearch:i,loadingIndicator:u,emptyIndicator:x,maxSelected:o=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:p,disabled:T,groupBy:R,className:f,badgeClassName:g,selectFirstItem:S=!0,creatable:j=!1,triggerSearchOnFocus:C=!1,commandProps:k,inputProps:v,hideClearAllButton:P=!1},z)=>{const Q=m.useRef(null),[$,X]=m.useState(!1),Ws=m.useRef(!1),[Ca,Sa]=m.useState(!1),[ee,Ys]=m.useState(s||[]),[ks,ka]=m.useState(Ut(l,R)),[gs,Lt]=m.useState(""),Js=Tu(gs,c||500);m.useImperativeHandle(z,()=>({selectedValue:[...ee],input:Q.current,focus:()=>Q.current?.focus()}),[ee]);const ut=m.useCallback(Y=>{const ae=ee.filter(Ve=>Ve.value!==Y.value);Ys(ae),n?.(ae)},[n,ee]),ol=m.useCallback(Y=>{const ae=Q.current;ae&&((Y.key==="Delete"||Y.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||ut(ee[ee.length-1])),Y.key==="Escape"&&ae.blur())},[ut,ee]);m.useEffect(()=>{s&&Ys(s)},[s]),m.useEffect(()=>{if(!r||i)return;const Y=Ut(r||[],R);JSON.stringify(Y)!==JSON.stringify(ks)&&ka(Y)},[l,r,R,i,ks]),m.useEffect(()=>{const Y=async()=>{Sa(!0);const Ve=await i?.(Js);ka(Ut(Ve||[],R)),Sa(!1)};(async()=>{!i||!$||(C&&await Y(),Js&&await Y())})()},[Js,R,$,C]);const il=()=>{if(!j||Eu(ks,[{value:gs,label:gs}])||ee.find(ae=>ae.value===gs))return;const Y=e.jsx(ke,{value:gs,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=o){d?.(ee.length);return}Lt("");const Ve=[...ee,{value:ae,label:ae}];Ys(Ve),n?.(Ve)},children:`Create "${gs}"`});if(!i&&gs.length>0||i&&Js.length>0&&!Ca)return Y},cl=m.useCallback(()=>{if(x)return i&&!j&&Object.keys(ks).length===0?e.jsx(ke,{value:"-",disabled:!0,children:x}):e.jsx(zr,{children:x})},[j,x,i,ks]),dl=m.useMemo(()=>Du(ks,ee),[ks,ee]),ml=m.useCallback(()=>{if(k?.filter)return k.filter;if(j)return(Y,ae)=>Y.toLowerCase().includes(ae.toLowerCase())?1:-1},[j,k?.filter]),ul=m.useCallback(()=>{const Y=ee.filter(ae=>ae.fixed);Ys(Y),n?.(Y)},[n,ee]);return e.jsxs(Cs,{...k,onKeyDown:Y=>{ol(Y),k?.onKeyDown?.(Y)},className:_("h-auto overflow-visible bg-transparent",k?.className),shouldFilter:k?.shouldFilter!==void 0?k.shouldFilter:!i,filter:ml(),children:[e.jsx("div",{className:_("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!T&&ee.length!==0},f),onClick:()=>{T||Q.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(Y=>e.jsxs(K,{className:_("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",g),"data-fixed":Y.fixed,"data-disabled":T||void 0,children:[Y.label,e.jsx("button",{className:_("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(T||Y.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&ut(Y)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>ut(Y),children:e.jsx(Zt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},Y.value)),e.jsx(De.Input,{...v,ref:Q,value:gs,disabled:T,onValueChange:Y=>{Lt(Y),v?.onValueChange?.(Y)},onBlur:Y=>{Ws.current===!1&&X(!1),v?.onBlur?.(Y)},onFocus:Y=>{X(!0),C&&i?.(Js),v?.onFocus?.(Y)},placeholder:p&&ee.length!==0?"":a,className:_("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":p,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},v?.className)}),e.jsx("button",{type:"button",onClick:ul,className:_((P||T||ee.length<1||ee.filter(Y=>Y.fixed).length===ee.length)&&"hidden"),children:e.jsx(Zt,{})})]})}),e.jsx("div",{className:"relative",children:$&&e.jsx(Ss,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Ws.current=!1},onMouseEnter:()=>{Ws.current=!0},onMouseUp:()=>{Q.current?.focus()},children:Ca?e.jsx(e.Fragment,{children:u}):e.jsxs(e.Fragment,{children:[cl(),il(),!S&&e.jsx(ke,{value:"-",className:"hidden"}),Object.entries(dl).map(([Y,ae])=>e.jsx(Oe,{heading:Y,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(Ve=>e.jsx(ke,{value:Ve.value,disabled:Ve.disable,onMouseDown:Qs=>{Qs.preventDefault(),Qs.stopPropagation()},onSelect:()=>{if(ee.length>=o){d?.(ee.length);return}Lt("");const Qs=[...ee,Ve];Ys(Qs),n?.(Qs)},className:_("cursor-pointer",Ve.disable&&"cursor-default text-muted-foreground"),children:Ve.label},Ve.value))})},Y))]})})})]})});ot.displayName="MultipleSelector";const Ru=s=>h.object({id:h.number().optional(),name:h.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function zt({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=I("group"),c=de({resolver:me(Ru(r)),defaultValues:a,mode:"onChange"}),[i,u]=m.useState(!1),[x,o]=m.useState(!1),d=async p=>{o(!0),Gc(p).then(()=>{q.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),c.reset(),u(!1)}).finally(()=>{o(!1)})};return e.jsxs(pe,{open:i,onOpenChange:u,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(ue,{...c,children:e.jsxs("form",{onSubmit:c.handleSubmit(d),className:"space-y-4",children:[e.jsx(y,{control:c.control,name:"name",render:({field:p})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.name")}),e.jsx(w,{children:e.jsx(D,{placeholder:r("form.namePlaceholder"),...p,className:"w-full"})}),e.jsx(M,{children:r("form.nameDescription")}),e.jsx(E,{})]})}),e.jsxs(Le,{className:"gap-2",children:[e.jsx(mt,{asChild:!0,children:e.jsx(V,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(V,{type:"submit",disabled:x||!c.formState.isValid,children:[x&&e.jsx(da,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Lr=m.createContext(void 0);function Vu({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),[i,u]=m.useState(Ne.Shadowsocks);return e.jsx(Lr.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:c,serverType:i,setServerType:u,refetch:n},children:s})}function Ar(){const s=m.useContext(Lr);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Bt({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=I("server");m.useEffect(()=>{console.log(n)},[n]);const[c,i]=m.useState(!1),[u,x]=m.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[o,d]=m.useState(null),p=j=>{if(!j)return null;try{const C=JSON.parse(j);return typeof C!="object"||C===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},T={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},R=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},f=()=>{const j=p(u||"");if(j){q.error(j);return}try{if(!u){a(null),i(!1);return}a(JSON.parse(u)),i(!1)}catch{q.error(r("network_settings.errors.save_failed"))}},g=j=>{x(j),d(p(j))},S=j=>{const C=T[j];if(C){const k=JSON.stringify(C.content,null,2);x(k),d(null)}};return m.useEffect(()=>{c&&console.log(n)},[c,n]),m.useEffect(()=>{c&&n&&Object.keys(n).length>0&&x(JSON.stringify(n,null,2))},[c,n]),e.jsxs(pe,{open:c,onOpenChange:j=>{!j&&c&&f(),i(j)},children:[e.jsx(ze,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(ge,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[R().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:R().map(j=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>S(j),children:r("network_settings.use_template",{template:T[j].label})},j))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ps,{className:`min-h-[200px] font-mono text-sm ${o?"border-red-500 focus-visible:ring-red-500":""}`,value:u,placeholder:R().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:j=>g(j.target.value)}),o&&e.jsx("p",{className:"text-sm text-red-500",children:o})]})]}),e.jsxs(Le,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>i(!1),children:r("common.cancel")}),e.jsx(J,{onClick:f,disabled:!!o,children:r("common.confirm")})]})]})]})}function Vh(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const Iu={},Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),Ih=Mi(Fu),Ba=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Mu=()=>{try{const s=_i.box.keyPair(),n=Ba(Ia.encodeBase64(s.secretKey)),a=Ba(Ia.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},Ou=()=>{try{return Mu()}catch(s){throw console.error("Error generating key pair:",s),s}},zu=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},Lu=()=>{const s=Math.floor(Math.random()*8)*2+2;return zu(s)},Au=h.object({cipher:h.string().default("aes-128-gcm"),obfs:h.string().default("0"),obfs_settings:h.object({path:h.string().default(""),host:h.string().default("")}).default({})}),$u=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),qu=h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({})}),Ku=h.object({version:h.coerce.number().default(2),alpn:h.string().default("h2"),obfs:h.object({open:h.coerce.boolean().default(!1),type:h.string().default("salamander"),password:h.string().default("")}).default({}),tls:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),bandwidth:h.object({up:h.string().default(""),down:h.string().default("")}).default({})}),Hu=h.object({tls:h.coerce.number().default(0),tls_settings:h.object({server_name:h.string().default(""),allow_insecure:h.boolean().default(!1)}).default({}),reality_settings:h.object({server_port:h.coerce.number().default(443),server_name:h.string().default(""),allow_insecure:h.boolean().default(!1),public_key:h.string().default(""),private_key:h.string().default(""),short_id:h.string().default("")}).default({}),network:h.string().default("tcp"),network_settings:h.record(h.any()).default({}),flow:h.string().default("")}),os={shadowsocks:{schema:Au,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:$u,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:qu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:Ku,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:Hu,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},Uu=({serverType:s,value:n,onChange:a})=>{const{t:l}=I("server"),r=s?os[s]:null,c=r?.schema||h.record(h.any()),i=s?c.parse({}):{},u=de({resolver:me(c),defaultValues:i,mode:"onChange"});if(m.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const f=c.parse({});u.reset(f)}}else u.reset(n)},[s,n,a,u,c]),m.useEffect(()=>{const f=u.watch(g=>{a(g)});return()=>f.unsubscribe()},[u,a]),!s||!r)return null;const R={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{control:u.control,name:"cipher",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(w,{children:e.jsxs(G,{onValueChange:f.onChange,value:f.value,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.shadowsocks.ciphers.map(g=>e.jsx(L,{value:g,children:g},g))})})]})})]})}),e.jsx(y,{control:u.control,name:"obfs",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(w,{children:e.jsxs(G,{onValueChange:f.onChange,value:f.value,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(B,{children:e.jsxs(js,{children:[e.jsx(L,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx(L,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),u.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"obfs_settings.path",render:({field:f})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(w,{children:e.jsx(D,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...f})}),e.jsx(E,{})]})}),e.jsx(y,{control:u.control,name:"obfs_settings.host",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(w,{children:e.jsx(D,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...f})}),e.jsx(E,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{control:u.control,name:"tls",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(w,{children:e.jsxs(G,{value:f.value?.toString(),onValueChange:g=>f.onChange(Number(g)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx(L,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),u.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(y,{control:u.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx(y,{control:u.control,name:"network",render:({field:f})=>e.jsxs(b,{children:[e.jsxs(N,{children:[l("dynamic_form.vmess.network.label"),e.jsx(Bt,{value:u.watch("network_settings"),setValue:g=>u.setValue("network_settings",g),templateType:u.watch("network")})]}),e.jsx(w,{children:e.jsxs(G,{onValueChange:f.onChange,value:f.value,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.vmess.networkOptions.map(g=>e.jsx(L,{value:g.value,className:"cursor-pointer",children:g.label},g.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"server_name",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(y,{control:u.control,name:"allow_insecure",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(y,{control:u.control,name:"network",render:({field:f})=>e.jsxs(b,{children:[e.jsxs(N,{children:[l("dynamic_form.trojan.network.label"),e.jsx(Bt,{value:u.watch("network_settings")||{},setValue:g=>u.setValue("network_settings",g),templateType:u.watch("network")||"tcp"})]}),e.jsx(w,{children:e.jsxs(G,{onValueChange:f.onChange,value:f.value||"tcp",children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.trojan.networkOptions.map(g=>e.jsx(L,{value:g.value,className:"cursor-pointer",children:g.label},g.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"version",render:({field:f})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(w,{children:e.jsxs(G,{value:(f.value||2).toString(),onValueChange:g=>f.onChange(Number(g)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.hysteria.versions.map(g=>e.jsxs(L,{value:g,className:"cursor-pointer",children:["V",g]},g))})})]})})]})}),u.watch("version")==1&&e.jsx(y,{control:u.control,name:"alpn",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(w,{children:e.jsxs(G,{value:f.value||"h2",onValueChange:f.onChange,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.hysteria.alpnOptions.map(g=>e.jsx(L,{value:g,children:g},g))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"obfs.open",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})}),!!u.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[u.watch("version")=="2"&&e.jsx(y,{control:u.control,name:"obfs.type",render:({field:f})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(w,{children:e.jsxs(G,{value:f.value||"salamander",onValueChange:f.onChange,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:e.jsx(L,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(y,{control:u.control,name:"obfs.password",render:({field:f})=>e.jsxs(b,{className:u.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...f,value:f.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",S=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(j=>g[j%g.length]).join("");u.setValue("obfs.password",S),q.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Se,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"tls.server_name",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...f,value:f.value||""})})]})}),e.jsx(y,{control:u.control,name:"tls.allow_insecure",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value||!1,onCheckedChange:f.onChange})})})]})})]}),e.jsx(y,{control:u.control,name:"bandwidth.up",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(y,{control:u.control,name:"bandwidth.down",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...f,value:f.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(y,{control:u.control,name:"tls",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.tls.label")}),e.jsx(w,{children:e.jsxs(G,{value:f.value?.toString(),onValueChange:g=>f.onChange(Number(g)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx(L,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx(L,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),u.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"tls_settings.server_name",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...f})})]})}),e.jsx(y,{control:u.control,name:"tls_settings.allow_insecure",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),u.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:u.control,name:"reality_settings.server_name",render:({field:f})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...f})})]})}),e.jsx(y,{control:u.control,name:"reality_settings.server_port",render:({field:f})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...f})})]})}),e.jsx(y,{control:u.control,name:"reality_settings.allow_insecure",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(w,{children:e.jsx(H,{checked:f.value,onCheckedChange:f.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(y,{control:u.control,name:"reality_settings.private_key",render:({field:f})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(w,{children:e.jsx(D,{...f,className:"pr-9"})}),e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const g=Ou();u.setValue("reality_settings.private_key",g.privateKey),u.setValue("reality_settings.public_key",g.publicKey),q.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{q.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Se,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(_t,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(y,{control:u.control,name:"reality_settings.public_key",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(w,{children:e.jsx(D,{...f})})]})}),e.jsx(y,{control:u.control,name:"reality_settings.short_id",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(w,{children:e.jsx(D,{...f,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const g=Lu();u.setValue("reality_settings.short_id",g),q.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(Se,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(_t,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(M,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(y,{control:u.control,name:"network",render:({field:f})=>e.jsxs(b,{children:[e.jsxs(N,{children:[l("dynamic_form.vless.network.label"),e.jsx(Bt,{value:u.watch("network_settings"),setValue:g=>u.setValue("network_settings",g),templateType:u.watch("network")})]}),e.jsx(w,{children:e.jsxs(G,{onValueChange:f.onChange,value:f.value,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(B,{children:e.jsx(js,{children:os.vless.networkOptions.map(g=>e.jsx(L,{value:g.value,className:"cursor-pointer",children:g.label},g.value))})})]})})]})}),e.jsx(y,{control:u.control,name:"flow",render:({field:f})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dynamic_form.vless.flow.label")}),e.jsx(w,{children:e.jsxs(G,{onValueChange:g=>f.onChange(g==="none"?null:g),value:f.value||"none",children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(B,{children:os.vless.flowOptions.map(g=>e.jsx(L,{value:g,children:g},g))})]})})]})})]})};return e.jsx(ce,{children:R[s]?.()})},Bu=h.object({id:h.number().optional().nullable(),code:h.string().optional(),name:h.string().min(1,"form.name.error"),rate:h.string().min(1,"form.rate.error"),tags:h.array(h.string()).default([]),excludes:h.array(h.string()).default([]),ips:h.array(h.string()).default([]),group_ids:h.array(h.string()).default([]),host:h.string().min(1,"form.host.error"),port:h.string().min(1,"form.port.error"),server_port:h.string().min(1,"form.server_port.error"),parent_id:h.string().default("0").nullable(),route_ids:h.array(h.string()).default([]),protocol_settings:h.record(h.any()).default({}).nullable()}),ft={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function Gu(){const{t:s}=I("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:c,setServerType:i,refetch:u}=Ar(),[x,o]=m.useState([]),[d,p]=m.useState([]),[T,R]=m.useState([]),f=de({resolver:me(Bu),defaultValues:ft,mode:"onChange"});m.useEffect(()=>{g()},[n]),m.useEffect(()=>{l?.type&&l.type!==c&&i(l.type)},[l,c,i]),m.useEffect(()=>{l?l.type===c&&f.reset({...ft,...l}):f.reset({...ft,protocol_settings:os[c].schema.parse({})})},[l,f,c]);const g=async()=>{if(!n)return;const[v,P,z]=await Promise.all([Mt(),yr(),br()]);o(v.data?.map(Q=>({label:Q.name,value:Q.id.toString()}))||[]),p(P.data?.map(Q=>({label:Q.remarks,value:Q.id.toString()}))||[]),R(z.data||[])},S=m.useMemo(()=>T?.filter(v=>(v.parent_id===0||v.parent_id===null)&&v.type===c&&v.id!==f.watch("id")),[c,T,f]),j=()=>e.jsxs(_s,{children:[e.jsx(ws,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(ds,{align:"start",children:e.jsx(pc,{children:Ts.map(({type:v,label:P})=>e.jsx(je,{onClick:()=>{i(v),a(!0)},className:"cursor-pointer",children:e.jsx(K,{variant:"outline",className:"text-white",style:{background:is[v]},children:P})},v))})})]}),C=()=>{a(!1),r(null),f.reset(ft)},k=async()=>{const v=f.getValues();(await qc({...v,type:c})).data&&(C(),q.success(s("form.success")),u())};return e.jsxs(pe,{open:n,onOpenChange:C,children:[j(),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(Te,{})]}),e.jsxs(ue,{...f,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{control:f.control,name:"name",render:({field:v})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:s("form.name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("form.name.placeholder"),...v})}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"rate",render:({field:v})=>e.jsxs(b,{className:"flex-[1]",children:[e.jsx(N,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(w,{children:e.jsx(D,{type:"number",min:"0",step:"0.1",...v})})}),e.jsx(E,{})]})})]}),e.jsx(y,{control:f.control,name:"code",render:({field:v})=>e.jsxs(b,{children:[e.jsxs(N,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(w,{children:e.jsx(D,{placeholder:s("form.code.placeholder"),...v,value:v.value||""})}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"tags",render:({field:v})=>e.jsxs(b,{children:[e.jsx(N,{children:s("form.tags.label")}),e.jsx(w,{children:e.jsx(va,{value:v.value,onChange:v.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"group_ids",render:({field:v})=>e.jsxs(b,{children:[e.jsxs(N,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(zt,{dialogTrigger:e.jsx(V,{variant:"link",children:s("form.groups.add")}),refetch:g})]}),e.jsx(w,{children:e.jsx(ot,{options:x,onChange:P=>v.onChange(P.map(z=>z.value)),value:x?.filter(P=>v.value.includes(P.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(E,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:f.control,name:"host",render:({field:v})=>e.jsxs(b,{children:[e.jsx(N,{children:s("form.host.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:s("form.host.placeholder"),...v})}),e.jsx(E,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(y,{control:f.control,name:"port",render:({field:v})=>e.jsxs(b,{className:"flex-1",children:[e.jsxs(N,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(Se,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(_t,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:e.jsx(D,{placeholder:s("form.port.placeholder"),...v})}),e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(V,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const P=v.value;P&&f.setValue("server_port",P)},children:e.jsx(Se,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"server_port",render:({field:v})=>e.jsxs(b,{className:"flex-1",children:[e.jsxs(N,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(Se,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(_t,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(w,{children:e.jsx(D,{placeholder:s("form.server_port.placeholder"),...v})}),e.jsx(E,{})]})})]})]}),n&&e.jsx(Uu,{serverType:c,value:f.watch("protocol_settings"),onChange:v=>f.setValue("protocol_settings",v,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(y,{control:f.control,name:"parent_id",render:({field:v})=>e.jsxs(b,{children:[e.jsx(N,{children:s("form.parent.label")}),e.jsxs(G,{onValueChange:v.onChange,value:v.value?.toString()||"0",children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:s("form.parent.none")}),S?.map(P=>e.jsx(L,{value:P.id.toString(),className:"cursor-pointer",children:P.name},P.id))]})]}),e.jsx(E,{})]})}),e.jsx(y,{control:f.control,name:"route_ids",render:({field:v})=>e.jsxs(b,{children:[e.jsx(N,{children:s("form.route.label")}),e.jsx(w,{children:e.jsx(ot,{options:d,onChange:P=>v.onChange(P.map(z=>z.value)),value:d?.filter(P=>v.value.includes(P.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(E,{})]})})]}),e.jsxs(Le,{className:"mt-6",children:[e.jsx(V,{type:"button",variant:"outline",onClick:C,children:s("form.cancel")}),e.jsx(V,{type:"submit",onClick:k,children:s("form.submit")})]})]})]})]})}function Ga({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Xe,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Cs,{children:[e.jsx(Fs,{placeholder:n}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Oe,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(ke,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:_("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Rs,{className:_("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Oe,{children:e.jsx(ke,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Wu=[{value:Ne.Shadowsocks,label:Ts.find(s=>s.type===Ne.Shadowsocks)?.label,color:is[Ne.Shadowsocks]},{value:Ne.Vmess,label:Ts.find(s=>s.type===Ne.Vmess)?.label,color:is[Ne.Vmess]},{value:Ne.Trojan,label:Ts.find(s=>s.type===Ne.Trojan)?.label,color:is[Ne.Trojan]},{value:Ne.Hysteria,label:Ts.find(s=>s.type===Ne.Hysteria)?.label,color:is[Ne.Hysteria]},{value:Ne.Vless,label:Ts.find(s=>s.type===Ne.Vless)?.label,color:is[Ne.Vless]}];function Yu({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:c}=I("server"),i=l.map(u=>({label:u,value:u}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(Gu,{}),e.jsx(D,{placeholder:c("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:u=>s.getColumn("name")?.setFilterValue(u.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(Ga,{column:s.getColumn("type"),title:c("toolbar.type"),options:Wu}),s.getColumn("groups")&&e.jsx(Ga,{column:s.getColumn("groups"),title:c("columns.groups.title"),options:i})]}),r&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[c("toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:a?"default":"outline",onClick:n,size:"sm",children:c(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const it=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),pt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},Ju=s=>{const{t:n}=I("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Rt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(K,{variant:"outline",className:_("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:is[a.original.type]},children:[e.jsx(Bn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(V,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:c=>{c.stopPropagation(),St(r||l.toString()).then(()=>{q.success(n("common:copy.success"))})},children:e.jsx(Fa,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ts.find(c=>c.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=m.useState(!!a.getValue("show"));return e.jsx(H,{checked:l,onCheckedChange:async c=>{r(c),Uc({id:a.original.id,type:a.original.type,show:c?1:0}).catch(()=>{r(!c),s()})},style:{backgroundColor:l?is[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(O,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:_("h-2.5 w-2.5 rounded-full",pt[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:_("h-2.5 w-2.5 rounded-full",pt[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:_("h-2.5 w-2.5 rounded-full",pt[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:_("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",pt[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(ce,{delayDuration:0,children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(V,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:c=>{c.stopPropagation(),St(l).then(()=>{q.success(n("common:copy.success"))})},children:e.jsx(Fa,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(K,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,c)=>e.jsx(K,{variant:"secondary",className:_("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},c)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const c=a.getValue(l);return c?r.some(i=>c.includes(i)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(K,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:is[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:c}=Ar();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(_s,{modal:!1,children:[e.jsx(ws,{asChild:!0,children:e.jsx(V,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(wt,{className:"size-4"})})}),e.jsxs(ds,{align:"end",className:"w-40",children:[e.jsx(je,{className:"cursor-pointer",onClick:()=>{c(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(wi,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(je,{className:"cursor-pointer",onClick:async()=>{Hc({id:a.original.id}).then(({data:i})=>{i&&(q.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(Ci,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(rt,{}),e.jsx(je,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:i=>i.preventDefault(),children:e.jsx(Ue,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Kc({id:a.original.id}).then(({data:i})=>{i&&(q.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ns,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Qu(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[i,u]=m.useState({pageSize:500,pageIndex:0}),[x,o]=m.useState([]),[d,p]=m.useState(!1),[T,R]=m.useState({}),[f,g]=m.useState([]),{refetch:S}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:z}=await br();return g(z),z}}),j=m.useMemo(()=>{const z=new Set;return f.forEach(Q=>{Q.groups&&Q.groups.forEach($=>z.add($.name))}),Array.from(z).sort()},[f]);m.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),R({name:d?2e3:200}),u({pageSize:d?99999:500,pageIndex:0})},[d]);const C=(z,Q)=>{d&&(z.dataTransfer.setData("text/plain",Q.toString()),z.currentTarget.classList.add("opacity-50"))},k=(z,Q)=>{if(!d)return;z.preventDefault(),z.currentTarget.classList.remove("bg-muted");const $=parseInt(z.dataTransfer.getData("text/plain"));if($===Q)return;const X=[...f],[Ws]=X.splice($,1);X.splice(Q,0,Ws),g(X)},v=async()=>{if(!d){p(!0);return}const z=f?.map((Q,$)=>({id:Q.id,order:$+1}));Bc(z).then(()=>{q.success("排序保存成功"),p(!1),S()}).finally(()=>{p(!1)})},P=Ke({data:f||[],columns:Ju(S),state:{sorting:x,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:T,pagination:i},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:o,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:R,onPaginationChange:u,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Vu,{refetch:S,children:e.jsx("div",{className:"space-y-4",children:e.jsx(es,{table:P,toolbar:z=>e.jsx(Yu,{table:z,refetch:S,saveOrder:v,isSortMode:d,groups:j}),draggable:d,onDragStart:C,onDragEnd:z=>z.currentTarget.classList.remove("opacity-50"),onDragOver:z=>{z.preventDefault(),z.currentTarget.classList.add("bg-muted")},onDragLeave:z=>z.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!d})})})}function Zu(){const{t:s}=I("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Qu,{})})]})]})}const Xu=Object.freeze(Object.defineProperty({__proto__:null,default:Zu},Symbol.toStringTag,{value:"Module"}));function ex({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(zt,{refetch:n}),e.jsx(D,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:_("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]})})}const sx=s=>{const{t:n}=I("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Bn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(zt,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Ue,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Wc({id:a.original.id}).then(({data:l})=>{l&&(q.success(n("messages.updateSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function tx(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),{data:x,refetch:o,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:T}=await Mt();return T}}),p=Ke({data:x||[],columns:sx(o),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(es,{table:p,toolbar:T=>e.jsx(ex,{table:T,refetch:o}),isLoading:d})}function ax(){const{t:s}=I("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(tx,{})})]})]})}const nx=Object.freeze(Object.defineProperty({__proto__:null,default:ax},Symbol.toStringTag,{value:"Module"})),rx=s=>h.object({remarks:h.string().min(1,s("form.validation.remarks")),match:h.array(h.string()),action:h.enum(["block","dns"]),action_value:h.string().optional()});function $r({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=I("route"),c=de({resolver:me(rx(r)),defaultValues:a,mode:"onChange"}),[i,u]=m.useState(!1);return e.jsxs(pe,{open:i,onOpenChange:u,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Se,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{})]}),e.jsxs(ue,{...c,children:[e.jsx(y,{control:c.control,name:"remarks",render:({field:x})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(w,{children:e.jsx(D,{type:"text",placeholder:r("form.remarksPlaceholder"),...x})})}),e.jsx(E,{})]})}),e.jsx(y,{control:c.control,name:"match",render:({field:x})=>e.jsxs(b,{className:"flex-[2]",children:[e.jsx(N,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(w,{children:e.jsx(ps,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:x.value.join(` `),onChange:o=>{x.onChange(o.target.value.split(` -`))}})})}),e.jsx(R,{})]})}),e.jsx(v,{control:i.control,name:"action",render:({field:x})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsxs(W,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(G,{children:[e.jsx($,{value:"block",children:r("actions.block")}),e.jsx($,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(R,{})]})}),i.watch("action")==="dns"&&e.jsx(v,{control:i.control,name:"action_value",render:({field:x})=>e.jsxs(j,{children:[e.jsx(b,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(N,{children:e.jsx(P,{type:"text",placeholder:r("form.dnsPlaceholder"),...x})})})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(V,{variant:"outline",children:r("form.cancel")})}),e.jsx(V,{type:"submit",onClick:()=>{$c(i.getValues()).then(({data:x})=>{x&&(m(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),i.reset())})},children:r("form.submit")})]})]})]})]})}function Yu({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Ir,{refetch:n}),e.jsx(P,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]})})}function Ju({columns:s,data:n,refetch:a}){const[l,r]=u.useState({}),[i,c]=u.useState({}),[m,x]=u.useState([]),[o,d]=u.useState([]),p=Le({data:n,columns:s,state:{sorting:o,columnVisibility:i,rowSelection:l,columnFilters:m},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:x,onColumnVisibilityChange:c,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Je,{table:p,toolbar:k=>e.jsx(Yu,{table:k,refetch:a})})}const Qu=s=>{const{t:n}=I("route"),a={block:{icon:hi,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:fi,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(M,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),i=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(K,{variant:a[r]?.variant||"default",className:y("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[i&&e.jsx(i,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Ir,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Qe,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{qc({id:l.original.id}).then(({data:r})=>{r&&(q.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Zu(){const{t:s}=I("route"),[n,a]=u.useState([]);function l(){hr().then(({data:r})=>{a(r)})}return u.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ju,{data:n,columns:Qu(l),refetch:l})})]})]})}const Xu=Object.freeze(Object.defineProperty({__proto__:null,default:Zu},Symbol.toStringTag,{value:"Module"})),Fr=u.createContext(void 0);function ex({children:s,refreshData:n}){const[a,l]=u.useState(!1),[r,i]=u.useState(null);return e.jsx(Fr.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:i,refreshData:n},children:s})}function ha(){const s=u.useContext(Fr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function sx({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=ha(),{t:r}=I("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(V,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(P,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:i=>s.getColumn("name")?.setFilterValue(i.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const $a={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},tx=s=>{const{t:n}=I("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Pt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{Lt({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{Lt({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{Lt({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(ot,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(K,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(M,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:i,key:c,unit:m})=>l[c]!=null&&e.jsxs(K,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",$a[c].color,$a[c].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[i," ¥",l[c],m]},c))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=ha();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Qe,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{od({id:a.original.id}).then(({data:i})=>{i&&(q.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},ax=h.object({id:h.number().nullable(),group_id:h.union([h.number(),h.string()]).nullable().optional(),name:h.string().min(1).max(250),content:h.string().nullable().optional(),transfer_enable:h.union([h.number().min(0),h.string().min(1)]),prices:h.object({monthly:h.union([h.number(),h.string()]).nullable().optional(),quarterly:h.union([h.number(),h.string()]).nullable().optional(),half_yearly:h.union([h.number(),h.string()]).nullable().optional(),yearly:h.union([h.number(),h.string()]).nullable().optional(),two_yearly:h.union([h.number(),h.string()]).nullable().optional(),three_yearly:h.union([h.number(),h.string()]).nullable().optional(),onetime:h.union([h.number(),h.string()]).nullable().optional(),reset_traffic:h.union([h.number(),h.string()]).nullable().optional()}).default({}),speed_limit:h.union([h.number(),h.string()]).nullable().optional(),capacity_limit:h.union([h.number(),h.string()]).nullable().optional(),device_limit:h.union([h.number(),h.string()]).nullable().optional(),force_update:h.boolean().optional(),reset_traffic_method:h.number().nullable(),users_count:h.number().optional()}),Mr=u.forwardRef(({className:s,...n},a)=>e.jsx(Ln,{ref:a,className:y("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...n,children:e.jsx(pi,{className:y("flex items-center justify-center text-current"),children:e.jsx(Ps,{className:"h-4 w-4"})})}));Mr.displayName=Ln.displayName;const pt={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},nx=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function rx(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=ha(),[i,c]=u.useState(!1),{t:m}=I("subscribe"),x=ce({resolver:ue(ax),defaultValues:{...pt,...a||{}},mode:"onChange"});u.useEffect(()=>{a?x.reset({...pt,...a}):x.reset(pt)},[a,x]);const o=new ra({html:!0}),[d,p]=u.useState();async function k(){It().then(({data:_})=>{p(_)})}u.useEffect(()=>{s&&k()},[s]);const E=_=>{if(isNaN(_))return;const T=Object.entries(gt).reduce((g,[w,S])=>{const C=_*S.months*S.discount;return{...g,[w]:C.toFixed(2)}},{});x.setValue("prices",T,{shouldDirty:!0})},f=()=>{n(!1),l(null),x.reset(pt)};return e.jsx(ge,{open:s,onOpenChange:f,children:e.jsxs(he,{children:[e.jsxs(ve,{children:[e.jsx(je,{children:m(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(De,{})]}),e.jsxs(xe,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{control:x.control,name:"name",render:({field:_})=>e.jsxs(j,{children:[e.jsx(b,{children:m("plan.form.name.label")}),e.jsx(N,{children:e.jsx(P,{placeholder:m("plan.form.name.placeholder"),..._})}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"group_id",render:({field:_})=>e.jsxs(j,{children:[e.jsxs(b,{className:"flex items-center justify-between",children:[m("plan.form.group.label"),e.jsx(Ft,{dialogTrigger:e.jsx(V,{variant:"link",children:m("plan.form.group.add")}),refetch:k})]}),e.jsxs(W,{value:_.value?.toString()??"",onValueChange:T=>_.onChange(T?Number(T):null),children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:m("plan.form.group.placeholder")})})}),e.jsx(G,{children:d?.map(T=>e.jsx($,{value:T.id.toString(),children:T.name},T.id))})]}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"transfer_enable",render:({field:_})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:m("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",min:0,placeholder:m("plan.form.transfer.placeholder"),className:"rounded-r-none",..._})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:m("plan.form.transfer.unit")})]}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"speed_limit",render:({field:_})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:m("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",min:0,placeholder:m("plan.form.speed.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:m("plan.form.speed.unit")})]}),e.jsx(R,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:m("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(P,{type:"number",placeholder:m("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:_=>{const T=parseFloat(_.target.value);E(T)}})]}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(V,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const _=Object.keys(gt).reduce((T,g)=>({...T,[g]:""}),{});x.setValue("prices",_,{shouldDirty:!0})},children:m("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:m("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([_])=>!["onetime","reset_traffic"].includes(_)).map(([_,T])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(v,{control:x.control,name:`prices.${_}`,render:({field:g})=>e.jsxs(j,{children:[e.jsxs(b,{className:"text-xs font-medium text-muted-foreground",children:[m(`plan.columns.price_period.${_}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",T.months===1?m("plan.form.price.period.monthly"):m("plan.form.price.period.months",{count:T.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:"0.00",min:0,...g,value:g.value??"",onChange:w=>g.onChange(w.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},_))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([_])=>["onetime","reset_traffic"].includes(_)).map(([_,T])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(v,{control:x.control,name:`prices.${_}`,render:({field:g})=>e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(b,{className:"text-xs font-medium",children:m(`plan.columns.price_period.${_}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:m(_==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:"0.00",min:0,...g,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},_))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(v,{control:x.control,name:"device_limit",render:({field:_})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:m("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",min:0,placeholder:m("plan.form.device.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:m("plan.form.device.unit")})]}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"capacity_limit",render:({field:_})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:m("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(N,{children:e.jsx(P,{type:"number",min:0,placeholder:m("plan.form.capacity.placeholder"),className:"rounded-r-none",..._,value:_.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:m("plan.form.capacity.unit")})]}),e.jsx(R,{})]})})]}),e.jsx(v,{control:x.control,name:"reset_traffic_method",render:({field:_})=>e.jsxs(j,{children:[e.jsx(b,{children:m("plan.form.reset_method.label")}),e.jsxs(W,{value:_.value?.toString()??"null",onValueChange:T=>_.onChange(T=="null"?null:Number(T)),children:[e.jsx(N,{children:e.jsx(B,{children:e.jsx(Y,{placeholder:m("plan.form.reset_method.placeholder")})})}),e.jsx(G,{children:nx.map(T=>e.jsx($,{value:T.value?.toString()??"null",children:m(`plan.form.reset_method.options.${T.label}`)},T.value))})]}),e.jsx(F,{className:"text-xs",children:m("plan.form.reset_method.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:x.control,name:"content",render:({field:_})=>{const[T,g]=u.useState(!1);return e.jsxs(j,{className:"space-y-2",children:[e.jsxs(b,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[m("plan.form.content.label"),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(V,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>g(!T),children:T?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:m(T?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(ie,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(V,{variant:"outline",size:"sm",onClick:()=>{_.onChange(m("plan.form.content.template.content"))},children:m("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:m("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${T?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(N,{children:e.jsx(la,{style:{height:"400px"},value:_.value||"",renderHTML:w=>o.render(w),onChange:({text:w})=>_.onChange(w),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:m("plan.form.content.placeholder"),className:"rounded-md border"})})}),T&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:m("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:o.render(_.value||"")}})})]})]}),e.jsx(F,{className:"text-xs",children:m("plan.form.content.description")}),e.jsx(R,{})]})}})]}),e.jsx(Oe,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(v,{control:x.control,name:"force_update",render:({field:_})=>e.jsxs(j,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(N,{children:e.jsx(Mr,{checked:_.value,onCheckedChange:_.onChange})}),e.jsx("div",{className:"",children:e.jsx(b,{className:"text-sm",children:m("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"button",variant:"outline",onClick:f,children:m("plan.form.submit.cancel")}),e.jsx(V,{type:"submit",disabled:i,onClick:()=>{x.handleSubmit(async _=>{c(!0),(await ld(_)).data&&(q.success(m(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),f(),r()),c(!1)})()},children:m(i?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function lx(){const[s,n]=u.useState({}),[a,l]=u.useState({"drag-handle":!1}),[r,i]=u.useState([]),[c,m]=u.useState([]),[x,o]=u.useState(!1),[d,p]=u.useState({pageSize:20,pageIndex:0}),[k,E]=u.useState([]),{refetch:f}=se({queryKey:["planList"],queryFn:async()=>{const{data:S}=await Fs();return E(S),S}});u.useEffect(()=>{l({"drag-handle":x}),p({pageSize:x?99999:10,pageIndex:0})},[x]);const _=(S,C)=>{x&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},T=(S,C)=>{if(!x)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const D=parseInt(S.dataTransfer.getData("text/plain"));if(D===C)return;const z=[...k],[Q]=z.splice(D,1);z.splice(C,0,Q),E(z)},g=async()=>{if(!x){o(!0);return}const S=k?.map(C=>C.id);id(S).then(()=>{q.success("排序保存成功"),o(!1),f()}).finally(()=>{o(!1)})},w=Le({data:k||[],columns:tx(f),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:p,onRowSelectionChange:n,onSortingChange:m,onColumnFiltersChange:i,onColumnVisibilityChange:l,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}},pageCount:x?1:void 0});return e.jsx(ex,{refreshData:f,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Je,{table:w,toolbar:S=>e.jsx(sx,{table:S,refetch:f,saveOrder:g,isSortMode:x}),draggable:x,onDragStart:_,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:T,showPagination:!x}),e.jsx(rx,{})]})})}function ox(){const{t:s}=I("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(lx,{})})]})]})}const ix=Object.freeze(Object.defineProperty({__proto__:null,default:ox},Symbol.toStringTag,{value:"Module"})),Ls=[{value:Z.PENDING,label:Ys[Z.PENDING],icon:gi,color:Js[Z.PENDING]},{value:Z.PROCESSING,label:Ys[Z.PROCESSING],icon:An,color:Js[Z.PROCESSING]},{value:Z.COMPLETED,label:Ys[Z.COMPLETED],icon:Wt,color:Js[Z.COMPLETED]},{value:Z.CANCELLED,label:Ys[Z.CANCELLED],icon:$n,color:Js[Z.CANCELLED]},{value:Z.DISCOUNTED,label:Ys[Z.DISCOUNTED],icon:Wt,color:Js[Z.DISCOUNTED]}],Zs=[{value:ne.PENDING,label:ut[ne.PENDING],icon:ji,color:xt[ne.PENDING]},{value:ne.PROCESSING,label:ut[ne.PROCESSING],icon:An,color:xt[ne.PROCESSING]},{value:ne.VALID,label:ut[ne.VALID],icon:Wt,color:xt[ne.VALID]},{value:ne.INVALID,label:ut[ne.INVALID],icon:$n,color:xt[ne.INVALID]}];function jt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),i=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,i?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:i.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:i.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[i.size," selected"]}):a.filter(c=>i.has(c.value)).map(c=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Ye,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Fe,{children:a.map(c=>{const m=i.has(c.value);return e.jsxs(_e,{onSelect:()=>{const x=new Set(i);m?x.delete(c.value):x.add(c.value);const o=Array.from(x);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",m?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),i.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Hs,{}),e.jsx(Fe,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const cx=h.object({email:h.string().min(1),plan_id:h.number(),period:h.string(),total_amount:h.number()}),dx={email:"",plan_id:0,total_amount:0,period:""};function Or({refetch:s,trigger:n,defaultValues:a}){const{t:l}=I("order"),[r,i]=u.useState(!1),c=ce({resolver:ue(cx),defaultValues:{...dx,...a},mode:"onChange"}),[m,x]=u.useState([]);return u.useEffect(()=>{r&&Fs().then(({data:o})=>{x(o)})},[r]),e.jsxs(ge,{open:r,onOpenChange:i,children:[e.jsx(Me,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:l("dialog.assignOrder")}),e.jsx(De,{})]}),e.jsxs(xe,{...c,children:[e.jsx(v,{control:c.control,name:"email",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dialog.fields.userEmail")}),e.jsx(N,{children:e.jsx(P,{placeholder:l("dialog.placeholders.email"),...o})})]})}),e.jsx(v,{control:c.control,name:"plan_id",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(N,{children:e.jsxs(W,{value:o.value?o.value?.toString():void 0,onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(G,{children:m.map(d=>e.jsx($,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(v,{control:c.control,name:"period",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dialog.fields.orderPeriod")}),e.jsx(N,{children:e.jsxs(W,{value:o.value,onValueChange:o.onChange,children:[e.jsx(B,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.period")})}),e.jsx(G,{children:Object.keys(Ld).map(d=>e.jsx($,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(v,{control:c.control,name:"total_amount",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:l("dialog.fields.paymentAmount")}),e.jsx(N,{children:e.jsx(P,{type:"number",placeholder:l("dialog.placeholders.amount"),value:o.value/100,onChange:d=>o.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(R,{})]})}),e.jsxs(Oe,{children:[e.jsx(V,{variant:"outline",onClick:()=>i(!1),children:l("dialog.actions.cancel")}),e.jsx(V,{type:"submit",onClick:()=>{c.handleSubmit(o=>{xd(o).then(({data:d})=>{d&&(s&&s(),c.reset(),i(!1),q.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function mx({table:s,refetch:n}){const{t:a}=I("order"),l=s.getState().columnFilters.length>0,r=Object.values(He).filter(x=>typeof x=="number").map(x=>({label:a(`type.${He[x]}`),value:x,color:x===He.NEW?"green-500":x===He.RENEWAL?"blue-500":x===He.UPGRADE?"purple-500":"orange-500"})),i=Object.values(de).map(x=>({label:a(`period.${x}`),value:x,color:x===de.MONTH_PRICE?"slate-500":x===de.QUARTER_PRICE?"cyan-500":x===de.HALF_YEAR_PRICE?"indigo-500":x===de.YEAR_PRICE?"violet-500":x===de.TWO_YEAR_PRICE?"fuchsia-500":x===de.THREE_YEAR_PRICE?"pink-500":x===de.ONETIME_PRICE?"rose-500":"orange-500"})),c=Object.values(Z).filter(x=>typeof x=="number").map(x=>({label:a(`status.${Z[x]}`),value:x,icon:x===Z.PENDING?Ls[0].icon:x===Z.PROCESSING?Ls[1].icon:x===Z.COMPLETED?Ls[2].icon:x===Z.CANCELLED?Ls[3].icon:Ls[4].icon,color:x===Z.PENDING?"yellow-500":x===Z.PROCESSING?"blue-500":x===Z.COMPLETED?"green-500":x===Z.CANCELLED?"red-500":"green-500"})),m=Object.values(ne).filter(x=>typeof x=="number").map(x=>({label:a(`commission.${ne[x]}`),value:x,icon:x===ne.PENDING?Zs[0].icon:x===ne.PROCESSING?Zs[1].icon:x===ne.VALID?Zs[2].icon:Zs[3].icon,color:x===ne.PENDING?"yellow-500":x===ne.PROCESSING?"blue-500":x===ne.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Or,{refetch:n}),e.jsx(P,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:x=>s.getColumn("trade_no")?.setFilterValue(x.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(jt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(jt,{column:s.getColumn("period"),title:a("table.columns.period"),options:i}),s.getColumn("status")&&e.jsx(jt,{column:s.getColumn("status"),title:a("table.columns.status"),options:c}),s.getColumn("commission_status")&&e.jsx(jt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:m})]}),l&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]})}function $e({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",l),children:n||"-"})]})}function ux({status:s}){const{t:n}=I("order"),a={[Z.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Z.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Z.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Z.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Z.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(K,{variant:"secondary",className:y("font-medium",a[s]),children:n(`status.${Z[s]}`)})}function xx({id:s,trigger:n}){const[a,l]=u.useState(!1),[r,i]=u.useState(),{t:c}=I("order");return u.useEffect(()=>{(async()=>{if(a){const{data:x}=await dd({id:s});i(x)}})()},[a,s]),e.jsxs(ge,{onOpenChange:l,open:a,children:[e.jsx(Me,{asChild:!0,children:n}),e.jsxs(he,{className:"max-w-xl",children:[e.jsxs(ve,{className:"space-y-2",children:[e.jsx(je,{className:"text-lg font-medium",children:c("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[c("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(ux,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:c("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx($e,{label:c("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Rs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(qn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx($e,{label:c("dialog.fields.orderPeriod"),value:r&&c(`period.${r.period}`)}),e.jsx($e,{label:c("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx($e,{label:c("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:c("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx($e,{label:c("dialog.fields.paymentAmount"),value:ks(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(be,{className:"my-2"}),e.jsx($e,{label:c("dialog.fields.balancePayment"),value:ks(r?.balance_amount||0)}),e.jsx($e,{label:c("dialog.fields.discountAmount"),value:ks(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx($e,{label:c("dialog.fields.refundAmount"),value:ks(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx($e,{label:c("dialog.fields.deductionAmount"),value:ks(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:c("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx($e,{label:c("dialog.fields.createdAt"),value:me(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx($e,{label:c("dialog.fields.updatedAt"),value:me(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const hx={[He.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},fx={[de.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},px=s=>Z[s],gx=s=>ne[s],jx=s=>He[s],vx=s=>{const{t:n}=I("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(xx,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(qn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=hx[l];return e.jsx(K,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${jx(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=fx[l];return e.jsx(K,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(M,{column:a,title:n("table.columns.status")}),e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Tr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=Ls.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${px(l.value)}`)})]}),l.value===Z.PENDING&&e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(Nt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[140px]",children:[e.jsx(fe,{className:"cursor-pointer",onClick:async()=>{await md({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await ud({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,i=Zs.find(c=>c.value===a.getValue("commission_status"));return r==0||!i?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[i.icon&&e.jsx(i.icon,{className:`h-4 w-4 text-${i.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${gx(i.value)}`)})]}),i.value===ne.PENDING&&l===Z.COMPLETED&&e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(Nt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[120px]",children:[e.jsx(fe,{className:"cursor-pointer",onClick:async()=>{await Fa({trade_no:a.original.trade_no,commission_status:ne.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(fe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Fa({trade_no:a.original.trade_no,commission_status:ne.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:me(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function bx(){const[s]=Kn(),[n,a]=u.useState({}),[l,r]=u.useState({}),[i,c]=u.useState([]),[m,x]=u.useState([]),[o,d]=u.useState({pageIndex:0,pageSize:20});u.useEffect(()=>{const T=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([g,w])=>{const S=s.get(g);return S?{id:g,value:w==="number"?parseInt(S):S}:null}).filter(Boolean);T.length>0&&c(T)},[s]);const{refetch:p,data:k,isLoading:E}=se({queryKey:["orderList",o,i,m],queryFn:()=>cd({pageSize:o.pageSize,current:o.pageIndex+1,filter:i,sort:m})}),f=Le({data:k?.data??[],columns:vx(p),state:{sorting:m,columnVisibility:l,rowSelection:n,columnFilters:i,pagination:o},rowCount:k?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:c,onColumnVisibilityChange:r,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),onPaginationChange:d,getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Je,{table:f,toolbar:e.jsx(mx,{table:f,refetch:p}),showPagination:!0})}function yx(){const{t:s}=I("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(bx,{})})]})]})}const Nx=Object.freeze(Object.defineProperty({__proto__:null,default:yx},Symbol.toStringTag,{value:"Module"}));function _x({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(i=>r.has(i.value)).map(i=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),e.jsx(Ye,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Fe,{children:a.map(i=>{const c=r.has(i.value);return e.jsxs(_e,{onSelect:()=>{c?r.delete(i.value):r.add(i.value);const m=Array.from(r);s?.setFilterValue(m.length?m:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ps,{className:y("h-4 w-4")})}),i.icon&&e.jsx(i.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${i.color}`}),e.jsx("span",{children:i.label}),l?.get(i.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(i.value)})]},i.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Hs,{}),e.jsx(Fe,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const wx=h.object({id:h.coerce.number().nullable().optional(),name:h.string().min(1,"请输入优惠券名称"),code:h.string().nullable(),type:h.coerce.number(),value:h.coerce.number(),started_at:h.coerce.number(),ended_at:h.coerce.number(),limit_use:h.union([h.string(),h.number()]).nullable(),limit_use_with_user:h.union([h.string(),h.number()]).nullable(),generate_count:h.coerce.number().nullable().optional(),limit_plan_ids:h.array(h.number()).default([]).nullable(),limit_period:h.array(h.nativeEnum(de)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),qa={name:"",code:"",type:Ve.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function zr({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:i}){const{t:c}=I("coupon"),[m,x]=u.useState(!1),o=r??m,d=i??x,[p,k]=u.useState([]),E=ce({resolver:ue(wx),defaultValues:s||qa});u.useEffect(()=>{s&&E.reset(s)},[s,E]),u.useEffect(()=>{Fs().then(({data:g})=>k(g))},[]);const f=g=>{if(!g)return;const w=(S,C)=>{const D=new Date(C*1e3);return S.setHours(D.getHours(),D.getMinutes(),D.getSeconds()),Math.floor(S.getTime()/1e3)};g.from&&E.setValue("started_at",w(g.from,E.watch("started_at"))),g.to&&E.setValue("ended_at",w(g.to,E.watch("ended_at")))},_=async g=>{fd(g).then(()=>{d(!1),a==="create"&&E.reset(qa),n()})},T=(g,w)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:w}),e.jsx(P,{type:"datetime-local",step:"1",value:me(E.watch(g),"YYYY-MM-DDTHH:mm:ss"),onChange:S=>{const C=new Date(S.target.value);E.setValue(g,Math.floor(C.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ge,{open:o,onOpenChange:d,children:[l&&e.jsx(Me,{asChild:!0,children:l}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:c(a==="create"?"form.add":"form.edit")})}),e.jsx(xe,{...E,children:e.jsxs("form",{onSubmit:E.handleSubmit(_),className:"space-y-4",children:[e.jsx(v,{control:E.control,name:"name",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.name.label")}),e.jsx(P,{placeholder:c("form.name.placeholder"),...g}),e.jsx(R,{})]})}),e.jsx(v,{control:E.control,name:"code",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.code.label")}),e.jsx(P,{placeholder:c("form.code.placeholder"),...g,className:"h-9"}),e.jsx(F,{className:"text-xs",children:c("form.code.description")}),e.jsx(R,{})]})}),e.jsxs(j,{children:[e.jsx(b,{children:c("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(v,{control:E.control,name:"type",render:({field:g})=>e.jsxs(W,{value:g.value.toString(),onValueChange:w=>{const S=g.value,C=parseInt(w);g.onChange(C);const D=E.getValues("value");D&&(S===Ve.AMOUNT&&C===Ve.PERCENT?E.setValue("value",D/100):S===Ve.PERCENT&&C===Ve.AMOUNT&&E.setValue("value",D*100))},children:[e.jsx(B,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:c("form.type.placeholder")})}),e.jsx(G,{children:Object.entries(Ad).map(([w,S])=>e.jsx($,{value:w,children:c(`table.toolbar.types.${w}`)},w))})]})}),e.jsx(v,{control:E.control,name:"value",render:({field:g})=>{const w=g.value===""?"":E.watch("type")===Ve.AMOUNT&&typeof g.value=="number"?(g.value/100).toString():g.value.toString();return e.jsx(P,{type:"number",placeholder:c("form.value.placeholder"),...g,value:w,onChange:S=>{const C=S.target.value;if(C===""){g.onChange("");return}const D=parseFloat(C);isNaN(D)||g.onChange(E.watch("type")===Ve.AMOUNT?Math.round(D*100):D)},step:"any",min:0,className:"flex-[2] rounded-none border-x-0 text-left"})}}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:E.watch("type")==Ve.AMOUNT?"¥":"%"})})]})]}),e.jsxs(j,{children:[e.jsx(b,{children:c("form.validity.label")}),e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(V,{variant:"outline",className:y("w-full justify-start text-left font-normal",!E.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(it,{className:"mr-2 h-4 w-4"}),me(E.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",c("form.validity.to")," ",me(E.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Ye,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Ms,{mode:"range",selected:{from:new Date(E.watch("started_at")*1e3),to:new Date(E.watch("ended_at")*1e3)},onSelect:f,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[T("started_at",c("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:c("form.validity.to")}),T("ended_at",c("table.validity.endTime"))]})})]})]}),e.jsx(R,{})]}),e.jsx(v,{control:E.control,name:"limit_use",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.limitUse.label")}),e.jsx(P,{type:"number",min:0,placeholder:c("form.limitUse.placeholder"),...g,value:g.value===void 0?"":g.value,onChange:w=>g.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:c("form.limitUse.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:E.control,name:"limit_use_with_user",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.limitUseWithUser.label")}),e.jsx(P,{type:"number",min:0,placeholder:c("form.limitUseWithUser.placeholder"),...g,value:g.value===void 0?"":g.value,onChange:w=>g.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:c("form.limitUseWithUser.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:E.control,name:"limit_period",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.limitPeriod.label")}),e.jsx(lt,{options:Object.entries(de).filter(([w])=>isNaN(Number(w))).map(([w,S])=>({label:S,value:w})),onChange:w=>{if(w.length===0){g.onChange([]);return}const S=w.map(C=>de[C.value]);g.onChange(S)},value:(g.value||[]).map(w=>({label:Object.entries(de).find(([S,C])=>C===w)?.[1]||"",value:Object.entries(de).find(([S,C])=>C===w)?.[0]||""})),placeholder:c("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:c("form.limitPeriod.empty")})}),e.jsx(F,{className:"text-xs",children:c("form.limitPeriod.description")}),e.jsx(R,{})]})}),e.jsx(v,{control:E.control,name:"limit_plan_ids",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.limitPlan.label")}),e.jsx(lt,{options:p?.map(w=>({label:w.name,value:w.id.toString()}))||[],onChange:w=>g.onChange(w.map(S=>Number(S.value))),value:(p||[]).filter(w=>(g.value||[]).includes(w.id)).map(w=>({label:w.name,value:w.id.toString()})),placeholder:c("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:c("form.limitPlan.empty")})}),e.jsx(R,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(v,{control:E.control,name:"generate_count",render:({field:g})=>e.jsxs(j,{children:[e.jsx(b,{children:c("form.generateCount.label")}),e.jsx(P,{type:"number",min:0,placeholder:c("form.generateCount.placeholder"),...g,value:g.value===void 0?"":g.value,onChange:w=>g.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:c("form.generateCount.description")}),e.jsx(R,{})]})})}),e.jsx(Oe,{children:e.jsx(V,{type:"submit",disabled:E.formState.isSubmitting,children:E.formState.isSubmitting?c("form.submit.saving"):c("form.submit.save")})})]})})]})]})}function Cx({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(zr,{refetch:n,dialogTrigger:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(P,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(_x,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:Ve.AMOUNT,label:l(`table.toolbar.types.${Ve.AMOUNT}`)},{value:Ve.PERCENTAGE,label:l(`table.toolbar.types.${Ve.PERCENTAGE}`)}]}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]})}const Lr=u.createContext(void 0);function Sx({children:s,refetch:n}){const[a,l]=u.useState(!1),[r,i]=u.useState(null),c=x=>{i(x),l(!0)},m=()=>{l(!1),i(null)};return e.jsxs(Lr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:c,closeEdit:m},children:[s,r&&e.jsx(zr,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function kx(){const s=u.useContext(Lr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Tx=s=>{const{t:n}=I("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(K,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.original.show,onCheckedChange:l=>{gd({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(K,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(M,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=u.useState(!1),i=Date.now(),c=a.original.started_at*1e3,m=a.original.ended_at*1e3,x=i>m,o=ie.jsx(M,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=kx();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Qe,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{pd({id:a.original.id}).then(({data:r})=>{r&&(q.success("删除成功"),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ds,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function Dx(){const[s,n]=u.useState({}),[a,l]=u.useState({}),[r,i]=u.useState([]),[c,m]=u.useState([]),[x,o]=u.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p}=se({queryKey:["couponList",x,r,c],queryFn:()=>hd({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:c})}),k=Le({data:p?.data??[],columns:Tx(d),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},pageCount:Math.ceil((p?.total??0)/x.pageSize),rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:m,onColumnFiltersChange:i,onColumnVisibilityChange:l,onPaginationChange:o,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Sx,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Je,{table:k,toolbar:e.jsx(Cx,{table:k,refetch:d})})})})}function Px(){const{t:s}=I("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Dx,{})})]})]})}const Rx=Object.freeze(Object.defineProperty({__proto__:null,default:Px},Symbol.toStringTag,{value:"Module"})),Ex=h.object({email_prefix:h.string().optional(),email_suffix:h.string().min(1),password:h.string().optional(),expired_at:h.number().optional().nullable(),plan_id:h.number().nullable(),generate_count:h.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Vx={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Ix({refetch:s}){const{t:n}=I("user"),[a,l]=u.useState(!1),r=ce({resolver:ue(Ex),defaultValues:Vx,mode:"onChange"}),[i,c]=u.useState([]);return u.useEffect(()=>{a&&Fs().then(({data:m})=>{m&&c(m)})},[a]),e.jsxs(ge,{open:a,onOpenChange:l,children:[e.jsx(Me,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(Ne,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(he,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:n("generate.title")}),e.jsx(De,{})]}),e.jsxs(xe,{...r,children:[e.jsxs(j,{children:[e.jsx(b,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(v,{control:r.control,name:"email_prefix",render:({field:m})=>e.jsx(P,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...m})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(v,{control:r.control,name:"email_suffix",render:({field:m})=>e.jsx(P,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...m})})]})]}),e.jsx(v,{control:r.control,name:"password",render:({field:m})=>e.jsxs(j,{children:[e.jsx(b,{children:n("generate.form.password")}),e.jsx(P,{placeholder:n("generate.form.password_placeholder"),...m}),e.jsx(R,{})]})}),e.jsx(v,{control:r.control,name:"expired_at",render:({field:m})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(b,{children:n("generate.form.expire_time")}),e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsx(N,{children:e.jsxs(J,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!m.value&&"text-muted-foreground"),children:[m.value?me(m.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(it,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Ye,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(bi,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{m.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Ms,{mode:"single",selected:m.value?new Date(m.value*1e3):void 0,onSelect:x=>{x&&m.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(v,{control:r.control,name:"plan_id",render:({field:m})=>e.jsxs(j,{children:[e.jsx(b,{children:n("generate.form.subscription")}),e.jsx(N,{children:e.jsxs(W,{value:m.value?m.value.toString():"null",onValueChange:x=>m.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"null",children:n("generate.form.subscription_none")}),i.map(x=>e.jsx($,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(v,{control:r.control,name:"generate_count",render:({field:m})=>e.jsxs(j,{children:[e.jsx(b,{children:n("generate.form.generate_count")}),e.jsx(P,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:m.value||"",onChange:x=>m.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(Oe,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(m=>{yd(m).then(({data:x})=>{x&&(q.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const Ar=Ua,$r=Ba,Fx=Ga,qr=u.forwardRef(({className:s,...n},a)=>e.jsx(St,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));qr.displayName=St.displayName;const Mx=Ds("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),fa=u.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Fx,{children:[e.jsx(qr,{}),e.jsxs(kt,{ref:r,className:y(Mx({side:s}),n),...l,children:[e.jsxs(sa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(ze,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));fa.displayName=kt.displayName;const pa=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});pa.displayName="SheetHeader";const Kr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Kr.displayName="SheetFooter";const ga=u.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-lg font-semibold text-foreground",s),...n}));ga.displayName=Tt.displayName;const ja=u.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));ja.displayName=Dt.displayName;function Ox({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=I("user"),i=s.getState().columnFilters.length>0,[c,m]=u.useState([]),[x,o]=u.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],p=w=>w*1024*1024*1024,k=w=>w/(1024*1024*1024),E=()=>{m([...c,{field:"",operator:"",value:""}])},f=w=>{m(c.filter((S,C)=>C!==w))},_=(w,S,C)=>{const D=[...c];if(D[w]={...D[w],[S]:C},S==="field"){const z=d.find(Q=>Q.value===C);z&&(D[w].operator=z.operators[0].value,D[w].value=z.type==="boolean"?!1:"")}m(D)},T=(w,S)=>{const C=d.find(D=>D.value===w.field);if(!C)return null;switch(C.type){case"text":return e.jsx(P,{placeholder:r("filter.sheet.value"),value:w.value,onChange:D=>_(S,"value",D.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(P,{type:"number",placeholder:r("filter.sheet.value_number",{unit:C.unit}),value:C.unit==="GB"?k(w.value||0):w.value,onChange:D=>{const z=Number(D.target.value);_(S,"value",C.unit==="GB"?p(z):z)}}),C.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:C.unit})]});case"date":return e.jsx(Ms,{mode:"single",selected:w.value,onSelect:D=>_(S,"value",D),className:"rounded-md border"});case"select":return e.jsxs(W,{value:w.value,onValueChange:D=>_(S,"value",D),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.value")})}),e.jsx(G,{children:C.useOptions?l.map(D=>e.jsx($,{value:D.value.toString(),children:D.label},D.value)):C.options?.map(D=>e.jsx($,{value:D.value.toString(),children:D.label},D.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(H,{checked:w.value,onCheckedChange:D=>_(S,"value",D)}),e.jsx(_t,{children:w.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},g=()=>{const w=c.filter(S=>S.field&&S.operator&&S.value!=="").map(S=>{const C=d.find(z=>z.value===S.field);let D=S.value;return S.operator==="contains"?{id:S.field,value:D}:(C?.type==="date"&&D instanceof Date&&(D=Math.floor(D.getTime()/1e3)),C?.type==="boolean"&&(D=D?1:0),{id:S.field,value:`${S.operator}:${D}`})});s.setColumnFilters(w),o(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Ix,{refetch:n}),e.jsx(P,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:w=>s.getColumn("email")?.setFilterValue(w.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Ar,{open:x,onOpenChange:o,children:[e.jsx($r,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(yi,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),c.length>0&&e.jsx(K,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:c.length})]})}),e.jsxs(fa,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(pa,{children:[e.jsx(ga,{children:r("filter.sheet.title")}),e.jsx(ja,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(V,{variant:"outline",size:"sm",onClick:E,children:r("filter.sheet.add")})]}),e.jsx(rt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:c.map((w,S)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(_t,{children:r("filter.sheet.condition",{number:S+1})}),e.jsx(V,{variant:"ghost",size:"sm",onClick:()=>f(S),children:e.jsx(ze,{className:"h-4 w-4"})})]}),e.jsxs(W,{value:w.field,onValueChange:C=>_(S,"field",C),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.field")})}),e.jsx(G,{children:d.map(C=>e.jsx($,{value:C.value,children:C.label},C.value))})]}),w.field&&e.jsxs(W,{value:w.operator,onValueChange:C=>_(S,"operator",C),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:r("filter.sheet.operator")})}),e.jsx(G,{children:d.find(C=>C.value===w.field)?.operators.map(C=>e.jsx($,{value:C.value,children:C.label},C.value))})]}),w.field&&w.operator&&T(w,S)]},S))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(V,{variant:"outline",onClick:()=>{m([]),o(!1)},children:r("filter.sheet.reset")}),e.jsx(V,{onClick:g,children:r("filter.sheet.apply")})]})]})]})]}),i&&e.jsxs(V,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),m([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(ze,{className:"ml-2 h-4 w-4"})]})]})})}const zx=h.object({id:h.number(),email:h.string().email(),invite_user_email:h.string().email().nullable().optional(),password:h.string().optional().nullable(),balance:h.coerce.number(),commission_balance:h.coerce.number(),u:h.number(),d:h.number(),transfer_enable:h.number(),expired_at:h.number().nullable(),plan_id:h.number().nullable(),banned:h.number(),commission_type:h.number(),commission_rate:h.number().nullable(),discount:h.number().nullable(),speed_limit:h.number().nullable(),device_limit:h.number().nullable(),is_admin:h.number(),is_staff:h.number(),remarks:h.string().nullable()}),Hr=u.createContext(void 0);function Lx({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,i]=u.useState(!1),[c,m]=u.useState(!1),[x,o]=u.useState([]),d=ce({resolver:ue(zx),defaultValues:n,mode:"onChange"});u.useEffect(()=>{a!==void 0&&i(a)},[a]);const p=k=>{i(k),l?.(k)};return e.jsx(Hr.Provider,{value:{form:d,formOpen:r,setFormOpen:p,datePickerOpen:c,setDatePickerOpen:m,planList:x,setPlanList:o},children:s})}function Ax(){const s=u.useContext(Hr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function $x({refetch:s}){const{t:n}=I("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:i,setDatePickerOpen:c,planList:m,setPlanList:x}=Ax();return u.useEffect(()=>{l&&Fs().then(({data:o})=>{x(o)})},[l,x]),e.jsxs(xe,{...a,children:[e.jsx(v,{control:a.control,name:"email",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.email")}),e.jsx(N,{children:e.jsx(P,{...o,placeholder:n("edit.form.email_placeholder")})}),e.jsx(R,{...o})]})}),e.jsx(v,{control:a.control,name:"invite_user_email",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.inviter_email")}),e.jsx(N,{children:e.jsx(P,{value:o.value||"",onChange:d=>o.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(R,{...o})]})}),e.jsx(v,{control:a.control,name:"password",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.password")}),e.jsx(N,{children:e.jsx(P,{value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(R,{...o})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(v,{control:a.control,name:"balance",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.balance")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(R,{...o})]})}),e.jsx(v,{control:a.control,name:"commission_balance",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.commission_balance")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(R,{...o})]})}),e.jsx(v,{control:a.control,name:"u",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.upload")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(R,{...o})]})}),e.jsx(v,{control:a.control,name:"d",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.download")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(R,{...o})]})})]}),e.jsx(v,{control:a.control,name:"transfer_enable",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.total_traffic")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(R,{})]})}),e.jsx(v,{control:a.control,name:"expired_at",render:({field:o})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(b,{children:n("edit.form.expire_time")}),e.jsxs(ns,{open:i,onOpenChange:c,children:[e.jsx(rs,{asChild:!0,children:e.jsx(N,{children:e.jsxs(V,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!o.value&&"text-muted-foreground"),onClick:()=>c(!0),children:[o.value?me(o.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(it,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Ye,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{o.onChange(null),c(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),c(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),c(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Ms,{mode:"single",selected:o.value?new Date(o.value*1e3):void 0,onSelect:d=>{if(d){const p=new Date(o.value?o.value*1e3:Date.now());d.setHours(p.getHours(),p.getMinutes(),p.getSeconds()),o.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(P,{type:"datetime-local",step:"1",value:me(o.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const p=new Date(d.target.value);isNaN(p.getTime())||o.onChange(Math.floor(p.getTime()/1e3))},className:"flex-1"}),e.jsx(V,{type:"button",variant:"outline",onClick:()=>c(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(R,{})]})}),e.jsx(v,{control:a.control,name:"plan_id",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.subscription")}),e.jsx(N,{children:e.jsxs(W,{value:o.value?o.value.toString():"null",onValueChange:d=>o.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"null",children:n("edit.form.subscription_none")}),m.map(d=>e.jsx($,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(v,{control:a.control,name:"banned",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.account_status")}),e.jsx(N,{children:e.jsxs(W,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{})}),e.jsxs(G,{children:[e.jsx($,{value:"1",children:n("columns.status_text.banned")}),e.jsx($,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(v,{control:a.control,name:"commission_type",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.commission_type")}),e.jsx(N,{children:e.jsxs(W,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(B,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(G,{children:[e.jsx($,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx($,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx($,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(v,{control:a.control,name:"commission_rate",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.commission_rate")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(v,{control:a.control,name:"discount",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.discount")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(R,{})]})}),e.jsx(v,{control:a.control,name:"speed_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.speed_limit")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(R,{})]})}),e.jsx(v,{control:a.control,name:"device_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.device_limit")}),e.jsx(N,{children:e.jsxs("div",{className:"flex",children:[e.jsx(P,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(R,{})]})}),e.jsx(v,{control:a.control,name:"is_admin",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(N,{children:e.jsx(H,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(v,{control:a.control,name:"is_staff",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(N,{children:e.jsx(H,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(v,{control:a.control,name:"remarks",render:({field:o})=>e.jsxs(j,{children:[e.jsx(b,{children:n("edit.form.remarks")}),e.jsx(N,{children:e.jsx(Cs,{className:"h-24",value:o.value||"",onChange:d=>o.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(R,{})]})}),e.jsxs(Kr,{children:[e.jsx(V,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(V,{type:"submit",onClick:()=>{a.handleSubmit(o=>{vd(o).then(({data:d})=>{d&&(q.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Ur({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(V,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=I("user"),[r,i]=u.useState(!1);return e.jsx(Lx,{defaultValues:n,open:r,onOpenChange:i,children:e.jsxs(Ar,{open:r,onOpenChange:i,children:[e.jsx($r,{asChild:!0,children:a}),e.jsxs(fa,{className:"max-w-[90%] space-y-4",children:[e.jsxs(pa,{children:[e.jsx(ga,{children:l("edit.title")}),e.jsx(ja,{})]}),e.jsx($x,{refetch:s})]})]})})}const Br=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Gr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Kx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),qt=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Xi(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Br,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Xe(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Gr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Xe(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(K,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Xe(n)})}}];function Wr({user_id:s,dialogTrigger:n}){const{t:a}=I(["traffic"]),[l,r]=u.useState(!1),[i,c]=u.useState({pageIndex:0,pageSize:20}),{data:m,isLoading:x}=se({queryKey:["userStats",s,i,l],queryFn:()=>l?Nd({user_id:s,pageSize:i.pageSize,page:i.pageIndex+1}):null}),o=Le({data:m?.data??[],columns:qt,pageCount:Math.ceil((m?.total??0)/i.pageSize),state:{pagination:i},manualPagination:!0,getCoreRowModel:Ae(),onPaginationChange:c});return e.jsxs(ge,{open:l,onOpenChange:r,children:[e.jsx(Me,{asChild:!0,children:n}),e.jsxs(he,{className:"sm:max-w-[700px]",children:[e.jsx(ve,{children:e.jsx(je,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(ca,{children:[e.jsx(da,{children:o.getHeaderGroups().map(d=>e.jsx(vs,{children:d.headers.map(p=>e.jsx(ua,{className:y("h-10 px-2 text-xs",p.id==="total"&&"text-right"),children:p.isPlaceholder?null:bt(p.column.columnDef.header,p.getContext())},p.id))},d.id))}),e.jsx(ma,{children:x?Array.from({length:i.pageSize}).map((d,p)=>e.jsx(vs,{children:Array.from({length:qt.length}).map((k,E)=>e.jsx($s,{className:"p-2",children:e.jsx(Ie,{className:"h-6 w-full"})},E))},p)):o.getRowModel().rows?.length?o.getRowModel().rows.map(d=>e.jsx(vs,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(p=>e.jsx($s,{className:"px-2",children:bt(p.column.columnDef.cell,p.getContext())},p.id))},d.id)):e.jsx(vs,{children:e.jsx($s,{colSpan:qt.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(W,{value:`${o.getState().pagination.pageSize}`,onValueChange:d=>{o.setPageSize(Number(d))},children:[e.jsx(B,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:o.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx($,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:o.getState().pagination.pageIndex+1,total:o.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.previousPage(),disabled:!o.getCanPreviousPage()||x,children:e.jsx(qx,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.nextPage(),disabled:!o.getCanNextPage()||x,children:e.jsx(Kx,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Hx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Ux=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),Bx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Gx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Wx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Yx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Jx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Qx=(s,n)=>{const{t:a}=I("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,i)=>i.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,i)=>i.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,i=Date.now()/1e3-r<120,c=Math.floor(Date.now()/1e3-r);let m=i?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:me(r)});if(!i&&r!==0){const x=Math.floor(c/60),o=Math.floor(x/60),d=Math.floor(o/24);d>0?m+=` -`+a("columns.online_status.offline_duration.days",{count:d}):o>0?m+=` -`+a("columns.online_status.offline_duration.hours",{count:o}):x>0?m+=` -`+a("columns.online_status.offline_duration.minutes",{count:x}):m+=` -`+a("columns.online_status.offline_duration.seconds",{count:c})}return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",i?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:m})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,i=l.original.online_count||0;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(K,{variant:"outline",className:y("min-w-[4rem] justify-center",r!==null&&i>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[i," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(K,{className:y("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,i)=>i.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(K,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=Xe(l.original?.total_used),i=Xe(l.original?.transfer_enable),c=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(ie,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",c>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(c,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",i]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Xe(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,i=Date.now()/1e3,c=r!=null&&re.jsx(M,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=As(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=As(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(M,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:me(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(M,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(ys,{modal:!0,children:[e.jsx(Ns,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(Nt,{className:"size-4"})})})}),e.jsxs(is,{align:"end",className:"min-w-[40px]",children:[e.jsx(fe,{onSelect:i=>{i.preventDefault()},className:"p-0",children:e.jsx(Ur,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Hx,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(fe,{onSelect:i=>i.preventDefault(),className:"p-0",children:e.jsx(Or,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ux,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(fe,{onSelect:()=>{wt(l.original.subscribe_url).then(()=>{q.success(a("common:copy.success"))})},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Bx,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(fe,{onSelect:()=>{bd({id:l.original.id}).then(({data:i})=>{i&&q.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Gx,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(fe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Rs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(Wx,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(fe,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Yx,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(fe,{onSelect:i=>i.preventDefault(),className:"p-0",children:e.jsx(Wr,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Jx,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function Zx(){const[s]=Kn(),[n,a]=u.useState({}),[l,r]=u.useState({is_admin:!1,is_staff:!1}),[i,c]=u.useState([]),[m,x]=u.useState([]),[o,d]=u.useState({pageIndex:0,pageSize:20});u.useEffect(()=>{const D=s.get("email");D&&c(z=>z.some(A=>A.id==="email")?z:[...z,{id:"email",value:D}])},[s]);const{refetch:p,data:k,isLoading:E}=se({queryKey:["userList",o,i,m],queryFn:()=>jd({pageSize:o.pageSize,current:o.pageIndex+1,filter:i,sort:m})}),[f,_]=u.useState([]),[T,g]=u.useState([]);u.useEffect(()=>{It().then(({data:D})=>{_(D)}),Fs().then(({data:D})=>{g(D)})},[]);const w=f.map(D=>({label:D.name,value:D.id})),S=T.map(D=>({label:D.name,value:D.id})),C=Le({data:k?.data??[],columns:Qx(p),state:{sorting:m,columnVisibility:l,rowSelection:n,columnFilters:i,pagination:o},rowCount:k?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:c,onColumnVisibilityChange:r,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),onPaginationChange:d,getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Je,{table:C,toolbar:e.jsx(Ox,{table:C,refetch:p,serverGroupList:f,permissionGroups:w,subscriptionPlans:S})})}function Xx(){const{t:s}=I("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(Zx,{})})})]})]})}const eh=Object.freeze(Object.defineProperty({__proto__:null,default:Xx},Symbol.toStringTag,{value:"Module"}));function sh({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(ns,{children:[e.jsx(rs,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ni,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(Ye,{className:"w-[200px] p-0",align:"start",children:e.jsxs(_s,{children:[e.jsx(Vs,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Is,{children:"No results found."}),e.jsx(Fe,{children:a.map(r=>{const i=l.has(r.value);return e.jsxs(_e,{onSelect:()=>{i?l.delete(r.value):l.add(r.value);const c=Array.from(l);s?.setFilterValue(c.length?c:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(_i,{className:y("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Hs,{}),e.jsx(Fe,{children:e.jsx(_e,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const th=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function ah({table:s}){const{t:n}=I("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(pr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(ia,{className:"grid w-full grid-cols-2",children:[e.jsx(nt,{value:"0",children:n("status.pending")}),e.jsx(nt,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(sh,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:es.LOW,icon:th,color:"gray"},{label:n("level.medium"),value:es.MIDDLE,icon:Br,color:"yellow"},{label:n("level.high"),value:es.HIGH,icon:Gr,color:"red"}]})]})})}function nh(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const rh=Ds("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Yr=u.forwardRef(({className:s,variant:n,layout:a,children:l,...r},i)=>e.jsx("div",{className:y(rh({variant:n,layout:a,className:s}),"relative group"),ref:i,...r,children:u.Children.map(l,c=>u.isValidElement(c)&&typeof c.type!="string"?u.cloneElement(c,{variant:n,layout:a}):c)}));Yr.displayName="ChatBubble";const lh=Ds("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Jr=u.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...i},c)=>e.jsx("div",{className:y(lh({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:c,...i,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(nh,{})}):r}));Jr.displayName="ChatBubbleMessage";const oh=u.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));oh.displayName="ChatBubbleActionWrapper";const Qr=u.forwardRef(({className:s,...n},a)=>e.jsx(Cs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));Qr.displayName="ChatInput";const Zr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),ih=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),ch=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function dh(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ie,{className:"h-8 w-3/4"}),e.jsx(Ie,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ie,{className:"h-20 w-2/3"},s))})]})}function mh({ticketId:s,dialogTrigger:n}){const{t:a}=I("ticket"),l=cs(),r=u.useRef(null),[i,c]=u.useState(!1),[m,x]=u.useState(""),[o,d]=u.useState(!1),{data:p,refetch:k,isLoading:E}=se({queryKey:["ticket",s,i],queryFn:()=>i?wd(s):Promise.resolve(null),refetchInterval:i?5e3:!1,retry:3}),f=p?.data,_=(C="smooth")=>{if(r.current){const{scrollHeight:D,clientHeight:z}=r.current;r.current.scrollTo({top:D-z,behavior:C})}};u.useEffect(()=>{if(!i)return;const C=requestAnimationFrame(()=>{_("instant"),setTimeout(()=>_(),1e3)});return()=>{cancelAnimationFrame(C)}},[i,f?.messages]);const T=async()=>{const C=m.trim();!C||o||(d(!0),Cd({id:s,message:C}).then(()=>{x(""),k(),_()}).finally(()=>{d(!1)}))},g=async()=>{fr(s).then(()=>{q.success(a("actions.close_success")),k()})},w=()=>{f?.user&&l("/finance/order?user_id="+f.user.id)},S=f?.status===et.CLOSED;return e.jsxs(ge,{open:i,onOpenChange:c,children:[e.jsx(Me,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(he,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(je,{}),E?e.jsx(dh,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:f?.subject}),e.jsx(K,{variant:S?"secondary":"default",children:a(S?"status.closed":"status.processing")}),!S&&e.jsx(Qe,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:g,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Zr,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(ot,{className:"h-4 w-4"}),e.jsx("span",{children:f?.user?.email})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Xr,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",me(f?.created_at)]})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsx(K,{variant:"outline",children:f?.level!=null&&a(`level.${f.level===es.LOW?"low":f.level===es.MIDDLE?"medium":"high"}`)})]})]}),f?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Ur,{defaultValues:f.user,refetch:k,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(ot,{className:"h-4 w-4"})})}),e.jsx(Wr,{user_id:f.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(ih,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:w,children:e.jsx(ch,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:f?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):f?.messages?.map(C=>e.jsx(Yr,{variant:C.is_me?"sent":"received",className:C.is_me?"ml-auto":"mr-auto",children:e.jsx(Jr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:C.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:me(C.created_at)})})]})})},C.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Qr,{disabled:S||o,placeholder:a(S?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:m,onChange:C=>x(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),T())}}),e.jsx(J,{disabled:S||o||!m.trim(),onClick:T,children:a(o?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const uh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),xh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),hh=s=>{const{t:n}=I("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(uh,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===es.LOW?"default":l===es.MIDDLE?"secondary":"destructive";return e.jsx(K,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===es.LOW?"low":l===es.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,i=l===et.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),c=l===et.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(K,{variant:c,className:"whitespace-nowrap",children:i})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(Xr,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:me(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(M,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:me(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(M,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==et.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(mh,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(xh,{className:"h-4 w-4"})})}),l&&e.jsx(Qe,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{fr(a.original.id).then(()=>{q.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(Zr,{className:"h-4 w-4"})})})]})}}]};function fh(){const[s,n]=u.useState({}),[a,l]=u.useState({}),[r,i]=u.useState([{id:"status",value:"0"}]),[c,m]=u.useState([]),[x,o]=u.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p,isLoading:k}=se({queryKey:["orderList",x,r,c],queryFn:()=>_d({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:c})}),E=Le({data:p?.data??[],columns:hh(d),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:m,onColumnFiltersChange:i,onColumnVisibilityChange:l,getCoreRowModel:Ae(),getFilteredRowModel:Be(),getPaginationRowModel:Ge(),onPaginationChange:o,getSortedRowModel:We(),getFacetedRowModel:ms(),getFacetedUniqueValues:us(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(ah,{table:E,refetch:d}),e.jsx(Je,{table:E,showPagination:!0})]})}function ph(){const{t:s}=I("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Pe,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(fh,{})})]})]})}const gh=Object.freeze(Object.defineProperty({__proto__:null,default:ph},Symbol.toStringTag,{value:"Module"}));export{Nh as a,bh as c,yh as g,_h as r}; +`))}})})}),e.jsx(E,{})]})}),e.jsx(y,{control:c.control,name:"action",render:({field:x})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(w,{children:e.jsxs(G,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(U,{children:e.jsx(W,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(B,{children:[e.jsx(L,{value:"block",children:r("actions.block")}),e.jsx(L,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(E,{})]})}),c.watch("action")==="dns"&&e.jsx(y,{control:c.control,name:"action_value",render:({field:x})=>e.jsxs(b,{children:[e.jsx(N,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(w,{children:e.jsx(D,{type:"text",placeholder:r("form.dnsPlaceholder"),...x})})})]})}),e.jsxs(Le,{children:[e.jsx(mt,{asChild:!0,children:e.jsx(V,{variant:"outline",children:r("form.cancel")})}),e.jsx(V,{type:"submit",onClick:()=>{Yc(c.getValues()).then(({data:x})=>{x&&(u(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),c.reset())})},children:r("form.submit")})]})]})]})]})}function lx({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx($r,{refetch:n}),e.jsx(D,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]})})}function ox({columns:s,data:n,refetch:a}){const[l,r]=m.useState({}),[c,i]=m.useState({}),[u,x]=m.useState([]),[o,d]=m.useState([]),p=Ke({data:n,columns:s,state:{sorting:o,columnVisibility:c,rowSelection:l,columnFilters:u},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:x,onColumnVisibilityChange:i,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(es,{table:p,toolbar:T=>e.jsx(lx,{table:T,refetch:a})})}const ix=s=>{const{t:n}=I("route"),a={block:{icon:Si,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:ki,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),c=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(K,{variant:a[r]?.variant||"default",className:_("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[c&&e.jsx(c,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx($r,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Ue,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Jc({id:l.original.id}).then(({data:r})=>{r&&(q.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function cx(){const{t:s}=I("route"),[n,a]=m.useState([]);function l(){yr().then(({data:r})=>{a(r)})}return m.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ox,{data:n,columns:ix(l),refetch:l})})]})]})}const dx=Object.freeze(Object.defineProperty({__proto__:null,default:cx},Symbol.toStringTag,{value:"Module"})),qr=m.createContext(void 0);function mx({children:s,refreshData:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null);return e.jsx(qr.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:c,refreshData:n},children:s})}function ba(){const s=m.useContext(qr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function ux({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=ba(),{t:r}=I("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(V,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(D,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(V,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const Wa={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},xx=s=>{const{t:n}=I("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Rt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(K,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{qt({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{qt({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{qt({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(it,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(K,{variant:"secondary",className:_("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:c,key:i,unit:u})=>l[i]!=null&&e.jsxs(K,{variant:"secondary",className:_("px-2 py-0.5 font-medium transition-colors text-nowrap",Wa[i].color,Wa[i].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[c," ¥",l[i],u]},i))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=ba();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Ue,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{hd({id:a.original.id}).then(({data:c})=>{c&&(q.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},hx=h.object({id:h.number().nullable(),group_id:h.union([h.number(),h.string()]).nullable().optional(),name:h.string().min(1).max(250),content:h.string().nullable().optional(),transfer_enable:h.union([h.number().min(0),h.string().min(1)]),prices:h.object({monthly:h.union([h.number(),h.string()]).nullable().optional(),quarterly:h.union([h.number(),h.string()]).nullable().optional(),half_yearly:h.union([h.number(),h.string()]).nullable().optional(),yearly:h.union([h.number(),h.string()]).nullable().optional(),two_yearly:h.union([h.number(),h.string()]).nullable().optional(),three_yearly:h.union([h.number(),h.string()]).nullable().optional(),onetime:h.union([h.number(),h.string()]).nullable().optional(),reset_traffic:h.union([h.number(),h.string()]).nullable().optional()}).default({}),speed_limit:h.union([h.number(),h.string()]).nullable().optional(),capacity_limit:h.union([h.number(),h.string()]).nullable().optional(),device_limit:h.union([h.number(),h.string()]).nullable().optional(),force_update:h.boolean().optional(),reset_traffic_method:h.number().nullable(),users_count:h.number().optional()}),Kr=m.forwardRef(({className:s,...n},a)=>e.jsx(Gn,{ref:a,className:_("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...n,children:e.jsx(Pi,{className:_("flex items-center justify-center text-current"),children:e.jsx(Rs,{className:"h-4 w-4"})})}));Kr.displayName=Gn.displayName;const gt={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},jt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},fx=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function px(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=ba(),[c,i]=m.useState(!1),{t:u}=I("subscribe"),x=de({resolver:me(hx),defaultValues:{...gt,...a||{}},mode:"onChange"});m.useEffect(()=>{a?x.reset({...gt,...a}):x.reset(gt)},[a,x]);const o=new ma({html:!0}),[d,p]=m.useState();async function T(){Mt().then(({data:g})=>{p(g)})}m.useEffect(()=>{s&&T()},[s]);const R=g=>{if(isNaN(g))return;const S=Object.entries(jt).reduce((j,[C,k])=>{const v=g*k.months*k.discount;return{...j,[C]:v.toFixed(2)}},{});x.setValue("prices",S,{shouldDirty:!0})},f=()=>{n(!1),l(null),x.reset(gt)};return e.jsx(pe,{open:s,onOpenChange:f,children:e.jsxs(fe,{children:[e.jsxs(be,{children:[e.jsx(ge,{children:u(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(Te,{})]}),e.jsxs(ue,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(y,{control:x.control,name:"name",render:({field:g})=>e.jsxs(b,{children:[e.jsx(N,{children:u("plan.form.name.label")}),e.jsx(w,{children:e.jsx(D,{placeholder:u("plan.form.name.placeholder"),...g})}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"group_id",render:({field:g})=>e.jsxs(b,{children:[e.jsxs(N,{className:"flex items-center justify-between",children:[u("plan.form.group.label"),e.jsx(zt,{dialogTrigger:e.jsx(V,{variant:"link",children:u("plan.form.group.add")}),refetch:T})]}),e.jsxs(G,{value:g.value?.toString()??"",onValueChange:S=>g.onChange(S?Number(S):null),children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:u("plan.form.group.placeholder")})})}),e.jsx(B,{children:d?.map(S=>e.jsx(L,{value:S.id.toString(),children:S.name},S.id))})]}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"transfer_enable",render:({field:g})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:u("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",min:0,placeholder:u("plan.form.transfer.placeholder"),className:"rounded-r-none",...g})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.transfer.unit")})]}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"speed_limit",render:({field:g})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:u("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",min:0,placeholder:u("plan.form.speed.placeholder"),className:"rounded-r-none",...g,value:g.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.speed.unit")})]}),e.jsx(E,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:u("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(D,{type:"number",placeholder:u("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:g=>{const S=parseFloat(g.target.value);R(S)}})]}),e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(V,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const g=Object.keys(jt).reduce((S,j)=>({...S,[j]:""}),{});x.setValue("prices",g,{shouldDirty:!0})},children:u("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:u("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(jt).filter(([g])=>!["onetime","reset_traffic"].includes(g)).map(([g,S])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(y,{control:x.control,name:`prices.${g}`,render:({field:j})=>e.jsxs(b,{children:[e.jsxs(N,{className:"text-xs font-medium text-muted-foreground",children:[u(`plan.columns.price_period.${g}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",S.months===1?u("plan.form.price.period.monthly"):u("plan.form.price.period.months",{count:S.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:"0.00",min:0,...j,value:j.value??"",onChange:C=>j.onChange(C.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},g))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(jt).filter(([g])=>["onetime","reset_traffic"].includes(g)).map(([g,S])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(y,{control:x.control,name:`prices.${g}`,render:({field:j})=>e.jsx(b,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(N,{className:"text-xs font-medium",children:u(`plan.columns.price_period.${g}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:u(g==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:"0.00",min:0,...j,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},g))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(y,{control:x.control,name:"device_limit",render:({field:g})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:u("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",min:0,placeholder:u("plan.form.device.placeholder"),className:"rounded-r-none",...g,value:g.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.device.unit")})]}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"capacity_limit",render:({field:g})=>e.jsxs(b,{className:"flex-1",children:[e.jsx(N,{children:u("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(w,{children:e.jsx(D,{type:"number",min:0,placeholder:u("plan.form.capacity.placeholder"),className:"rounded-r-none",...g,value:g.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.capacity.unit")})]}),e.jsx(E,{})]})})]}),e.jsx(y,{control:x.control,name:"reset_traffic_method",render:({field:g})=>e.jsxs(b,{children:[e.jsx(N,{children:u("plan.form.reset_method.label")}),e.jsxs(G,{value:g.value?.toString()??"null",onValueChange:S=>g.onChange(S=="null"?null:Number(S)),children:[e.jsx(w,{children:e.jsx(U,{children:e.jsx(W,{placeholder:u("plan.form.reset_method.placeholder")})})}),e.jsx(B,{children:fx.map(S=>e.jsx(L,{value:S.value?.toString()??"null",children:u(`plan.form.reset_method.options.${S.label}`)},S.value))})]}),e.jsx(M,{className:"text-xs",children:u("plan.form.reset_method.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:x.control,name:"content",render:({field:g})=>{const[S,j]=m.useState(!1);return e.jsxs(b,{className:"space-y-2",children:[e.jsxs(N,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[u("plan.form.content.label"),e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(V,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>j(!S),children:S?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:u(S?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(ce,{children:e.jsxs(oe,{children:[e.jsx(ie,{asChild:!0,children:e.jsx(V,{variant:"outline",size:"sm",onClick:()=>{g.onChange(u("plan.form.content.template.content"))},children:u("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:u("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${S?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(w,{children:e.jsx(ua,{style:{height:"400px"},value:g.value||"",renderHTML:C=>o.render(C),onChange:({text:C})=>g.onChange(C),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:u("plan.form.content.placeholder"),className:"rounded-md border"})})}),S&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:u("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:o.render(g.value||"")}})})]})]}),e.jsx(M,{className:"text-xs",children:u("plan.form.content.description")}),e.jsx(E,{})]})}})]}),e.jsx(Le,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(y,{control:x.control,name:"force_update",render:({field:g})=>e.jsxs(b,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(w,{children:e.jsx(Kr,{checked:g.value,onCheckedChange:g.onChange})}),e.jsx("div",{className:"",children:e.jsx(N,{className:"text-sm",children:u("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"button",variant:"outline",onClick:f,children:u("plan.form.submit.cancel")}),e.jsx(V,{type:"submit",disabled:c,onClick:()=>{x.handleSubmit(async g=>{i(!0),(await xd(g)).data&&(q.success(u(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),f(),r()),i(!1)})()},children:u(c?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function gx(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState(!1),[d,p]=m.useState({pageSize:20,pageIndex:0}),[T,R]=m.useState([]),{refetch:f}=se({queryKey:["planList"],queryFn:async()=>{const{data:k}=await Os();return R(k),k}});m.useEffect(()=>{l({"drag-handle":x}),p({pageSize:x?99999:10,pageIndex:0})},[x]);const g=(k,v)=>{x&&(k.dataTransfer.setData("text/plain",v.toString()),k.currentTarget.classList.add("opacity-50"))},S=(k,v)=>{if(!x)return;k.preventDefault(),k.currentTarget.classList.remove("bg-muted");const P=parseInt(k.dataTransfer.getData("text/plain"));if(P===v)return;const z=[...T],[Q]=z.splice(P,1);z.splice(v,0,Q),R(z)},j=async()=>{if(!x){o(!0);return}const k=T?.map(v=>v.id);fd(k).then(()=>{q.success("排序保存成功"),o(!1),f()}).finally(()=>{o(!1)})},C=Ke({data:T||[],columns:xx(f),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:p,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}},pageCount:x?1:void 0});return e.jsx(mx,{refreshData:f,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(es,{table:C,toolbar:k=>e.jsx(ux,{table:k,refetch:f,saveOrder:j,isSortMode:x}),draggable:x,onDragStart:g,onDragEnd:k=>k.currentTarget.classList.remove("opacity-50"),onDragOver:k=>{k.preventDefault(),k.currentTarget.classList.add("bg-muted")},onDragLeave:k=>k.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!x}),e.jsx(px,{})]})})}function jx(){const{t:s}=I("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(gx,{})})]})]})}const vx=Object.freeze(Object.defineProperty({__proto__:null,default:jx},Symbol.toStringTag,{value:"Module"})),$s=[{value:Z.PENDING,label:Zs[Z.PENDING],icon:Ti,color:Xs[Z.PENDING]},{value:Z.PROCESSING,label:Zs[Z.PROCESSING],icon:Wn,color:Xs[Z.PROCESSING]},{value:Z.COMPLETED,label:Zs[Z.COMPLETED],icon:Xt,color:Xs[Z.COMPLETED]},{value:Z.CANCELLED,label:Zs[Z.CANCELLED],icon:Yn,color:Xs[Z.CANCELLED]},{value:Z.DISCOUNTED,label:Zs[Z.DISCOUNTED],icon:Xt,color:Xs[Z.DISCOUNTED]}],st=[{value:re.PENDING,label:xt[re.PENDING],icon:Di,color:ht[re.PENDING]},{value:re.PROCESSING,label:xt[re.PROCESSING],icon:Wn,color:ht[re.PROCESSING]},{value:re.VALID,label:xt[re.VALID],icon:Xt,color:ht[re.VALID]},{value:re.INVALID,label:xt[re.INVALID],icon:Yn,color:ht[re.INVALID]}];function vt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),c=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),n,c?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:c.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):a.filter(i=>c.has(i.value)).map(i=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),e.jsx(Xe,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Cs,{children:[e.jsx(Fs,{placeholder:n}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Oe,{children:a.map(i=>{const u=c.has(i.value);return e.jsxs(ke,{onSelect:()=>{const x=new Set(c);u?x.delete(i.value):x.add(i.value);const o=Array.from(x);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:_("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",u?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Rs,{className:_("h-4 w-4")})}),i.icon&&e.jsx(i.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${i.color}`}),e.jsx("span",{children:i.label}),l?.get(i.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(i.value)})]},i.value)})}),c.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Oe,{children:e.jsx(ke,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const bx=h.object({email:h.string().min(1),plan_id:h.number(),period:h.string(),total_amount:h.number()}),yx={email:"",plan_id:0,total_amount:0,period:""};function Hr({refetch:s,trigger:n,defaultValues:a}){const{t:l}=I("order"),[r,c]=m.useState(!1),i=de({resolver:me(bx),defaultValues:{...yx,...a},mode:"onChange"}),[u,x]=m.useState([]);return m.useEffect(()=>{r&&Os().then(({data:o})=>{x(o)})},[r]),e.jsxs(pe,{open:r,onOpenChange:c,children:[e.jsx(ze,{asChild:!0,children:n||e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:l("dialog.assignOrder")}),e.jsx(Te,{})]}),e.jsxs(ue,{...i,children:[e.jsx(y,{control:i.control,name:"email",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dialog.fields.userEmail")}),e.jsx(w,{children:e.jsx(D,{placeholder:l("dialog.placeholders.email"),...o})})]})}),e.jsx(y,{control:i.control,name:"plan_id",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(w,{children:e.jsxs(G,{value:o.value?o.value?.toString():void 0,onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(B,{children:u.map(d=>e.jsx(L,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(y,{control:i.control,name:"period",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dialog.fields.orderPeriod")}),e.jsx(w,{children:e.jsxs(G,{value:o.value,onValueChange:o.onChange,children:[e.jsx(U,{children:e.jsx(W,{placeholder:l("dialog.placeholders.period")})}),e.jsx(B,{children:Object.keys(Hd).map(d=>e.jsx(L,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(y,{control:i.control,name:"total_amount",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:l("dialog.fields.paymentAmount")}),e.jsx(w,{children:e.jsx(D,{type:"number",placeholder:l("dialog.placeholders.amount"),value:o.value/100,onChange:d=>o.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(E,{})]})}),e.jsxs(Le,{children:[e.jsx(V,{variant:"outline",onClick:()=>c(!1),children:l("dialog.actions.cancel")}),e.jsx(V,{type:"submit",onClick:()=>{i.handleSubmit(o=>{bd(o).then(({data:d})=>{d&&(s&&s(),i.reset(),c(!1),q.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function Nx({table:s,refetch:n}){const{t:a}=I("order"),l=s.getState().columnFilters.length>0,r=Object.values(Ye).filter(x=>typeof x=="number").map(x=>({label:a(`type.${Ye[x]}`),value:x,color:x===Ye.NEW?"green-500":x===Ye.RENEWAL?"blue-500":x===Ye.UPGRADE?"purple-500":"orange-500"})),c=Object.values(xe).map(x=>({label:a(`period.${x}`),value:x,color:x===xe.MONTH_PRICE?"slate-500":x===xe.QUARTER_PRICE?"cyan-500":x===xe.HALF_YEAR_PRICE?"indigo-500":x===xe.YEAR_PRICE?"violet-500":x===xe.TWO_YEAR_PRICE?"fuchsia-500":x===xe.THREE_YEAR_PRICE?"pink-500":x===xe.ONETIME_PRICE?"rose-500":"orange-500"})),i=Object.values(Z).filter(x=>typeof x=="number").map(x=>({label:a(`status.${Z[x]}`),value:x,icon:x===Z.PENDING?$s[0].icon:x===Z.PROCESSING?$s[1].icon:x===Z.COMPLETED?$s[2].icon:x===Z.CANCELLED?$s[3].icon:$s[4].icon,color:x===Z.PENDING?"yellow-500":x===Z.PROCESSING?"blue-500":x===Z.COMPLETED?"green-500":x===Z.CANCELLED?"red-500":"green-500"})),u=Object.values(re).filter(x=>typeof x=="number").map(x=>({label:a(`commission.${re[x]}`),value:x,icon:x===re.PENDING?st[0].icon:x===re.PROCESSING?st[1].icon:x===re.VALID?st[2].icon:st[3].icon,color:x===re.PENDING?"yellow-500":x===re.PROCESSING?"blue-500":x===re.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Hr,{refetch:n}),e.jsx(D,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:x=>s.getColumn("trade_no")?.setFilterValue(x.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(vt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(vt,{column:s.getColumn("period"),title:a("table.columns.period"),options:c}),s.getColumn("status")&&e.jsx(vt,{column:s.getColumn("status"),title:a("table.columns.status"),options:i}),s.getColumn("commission_status")&&e.jsx(vt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:u})]}),l&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]})}function Be({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:_("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:_("text-sm",l),children:n||"-"})]})}function _x({status:s}){const{t:n}=I("order"),a={[Z.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Z.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Z.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Z.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Z.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(K,{variant:"secondary",className:_("font-medium",a[s]),children:n(`status.${Z[s]}`)})}function wx({id:s,trigger:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(),{t:i}=I("order");return m.useEffect(()=>{(async()=>{if(a){const{data:x}=await gd({id:s});c(x)}})()},[a,s]),e.jsxs(pe,{onOpenChange:l,open:a,children:[e.jsx(ze,{asChild:!0,children:n}),e.jsxs(fe,{className:"max-w-xl",children:[e.jsxs(be,{className:"space-y-2",children:[e.jsx(ge,{className:"text-lg font-medium",children:i("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[i("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(_x,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Be,{label:i("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Vs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(Jn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Be,{label:i("dialog.fields.orderPeriod"),value:r&&i(`period.${r.period}`)}),e.jsx(Be,{label:i("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(Be,{label:i("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Be,{label:i("dialog.fields.paymentAmount"),value:Ps(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(ye,{className:"my-2"}),e.jsx(Be,{label:i("dialog.fields.balancePayment"),value:Ps(r?.balance_amount||0)}),e.jsx(Be,{label:i("dialog.fields.discountAmount"),value:Ps(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Be,{label:i("dialog.fields.refundAmount"),value:Ps(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Be,{label:i("dialog.fields.deductionAmount"),value:Ps(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:i("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Be,{label:i("dialog.fields.createdAt"),value:he(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Be,{label:i("dialog.fields.updatedAt"),value:he(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const Cx={[Ye.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[Ye.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[Ye.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[Ye.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},Sx={[xe.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[xe.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},kx=s=>Z[s],Px=s=>re[s],Tx=s=>Ye[s],Dx=s=>{const{t:n}=I("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(wx,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(Jn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=Cx[l];return e.jsx(K,{variant:"secondary",className:_("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${Tx(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=Sx[l];return e.jsx(K,{variant:"secondary",className:_("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(O,{column:a,title:n("table.columns.status")}),e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsx(Fr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=$s.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${kx(l.value)}`)})]}),l.value===Z.PENDING&&e.jsxs(_s,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(wt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(ds,{align:"end",className:"w-[140px]",children:[e.jsx(je,{className:"cursor-pointer",onClick:async()=>{await jd({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(je,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await vd({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,c=st.find(i=>i.value===a.getValue("commission_status"));return r==0||!c?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon&&e.jsx(c.icon,{className:`h-4 w-4 text-${c.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${Px(c.value)}`)})]}),c.value===re.PENDING&&l===Z.COMPLETED&&e.jsxs(_s,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(wt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(ds,{align:"end",className:"w-[120px]",children:[e.jsx(je,{className:"cursor-pointer",onClick:async()=>{await Aa({trade_no:a.original.trade_no,commission_status:re.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(je,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Aa({trade_no:a.original.trade_no,commission_status:re.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:he(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function Ex(){const[s]=Qn(),[n,a]=m.useState({}),[l,r]=m.useState({}),[c,i]=m.useState([]),[u,x]=m.useState([]),[o,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const S=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([j,C])=>{const k=s.get(j);return k?{id:j,value:C==="number"?parseInt(k):k}:null}).filter(Boolean);S.length>0&&i(S)},[s]);const{refetch:p,data:T,isLoading:R}=se({queryKey:["orderList",o,c,u],queryFn:()=>pd({pageSize:o.pageSize,current:o.pageIndex+1,filter:c,sort:u})}),f=Ke({data:T?.data??[],columns:Dx(p),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:o},rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:i,onColumnVisibilityChange:r,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),onPaginationChange:d,getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(es,{table:f,toolbar:e.jsx(Nx,{table:f,refetch:p}),showPagination:!0})}function Rx(){const{t:s}=I("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ex,{})})]})]})}const Vx=Object.freeze(Object.defineProperty({__proto__:null,default:Rx},Symbol.toStringTag,{value:"Module"}));function Ix({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Xe,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Cs,{children:[e.jsx(Fs,{placeholder:n}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Oe,{children:a.map(c=>{const i=r.has(c.value);return e.jsxs(ke,{onSelect:()=>{i?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:_("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",i?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Rs,{className:_("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Oe,{children:e.jsx(ke,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Fx=h.object({id:h.coerce.number().nullable().optional(),name:h.string().min(1,"请输入优惠券名称"),code:h.string().nullable(),type:h.coerce.number(),value:h.coerce.number(),started_at:h.coerce.number(),ended_at:h.coerce.number(),limit_use:h.union([h.string(),h.number()]).nullable(),limit_use_with_user:h.union([h.string(),h.number()]).nullable(),generate_count:h.coerce.number().nullable().optional(),limit_plan_ids:h.array(h.number()).default([]).nullable(),limit_period:h.array(h.nativeEnum(xe)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Ya={name:"",code:"",type:Fe.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Ur({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:c}){const{t:i}=I("coupon"),[u,x]=m.useState(!1),o=r??u,d=c??x,[p,T]=m.useState([]),R=de({resolver:me(Fx),defaultValues:s||Ya});m.useEffect(()=>{s&&R.reset(s)},[s,R]),m.useEffect(()=>{Os().then(({data:j})=>T(j))},[]);const f=j=>{if(!j)return;const C=(k,v)=>{const P=new Date(v*1e3);return k.setHours(P.getHours(),P.getMinutes(),P.getSeconds()),Math.floor(k.getTime()/1e3)};j.from&&R.setValue("started_at",C(j.from,R.watch("started_at"))),j.to&&R.setValue("ended_at",C(j.to,R.watch("ended_at")))},g=async j=>{Nd(j).then(()=>{d(!1),a==="create"&&R.reset(Ya),n()})},S=(j,C)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:C}),e.jsx(D,{type:"datetime-local",step:"1",value:he(R.watch(j),"YYYY-MM-DDTHH:mm:ss"),onChange:k=>{const v=new Date(k.target.value);R.setValue(j,Math.floor(v.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(pe,{open:o,onOpenChange:d,children:[l&&e.jsx(ze,{asChild:!0,children:l}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(ge,{children:i(a==="create"?"form.add":"form.edit")})}),e.jsx(ue,{...R,children:e.jsxs("form",{onSubmit:R.handleSubmit(g),className:"space-y-4",children:[e.jsx(y,{control:R.control,name:"name",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.name.label")}),e.jsx(D,{placeholder:i("form.name.placeholder"),...j}),e.jsx(E,{})]})}),e.jsx(y,{control:R.control,name:"code",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.code.label")}),e.jsx(D,{placeholder:i("form.code.placeholder"),...j,className:"h-9"}),e.jsx(M,{className:"text-xs",children:i("form.code.description")}),e.jsx(E,{})]})}),e.jsxs(b,{children:[e.jsx(N,{children:i("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(y,{control:R.control,name:"type",render:({field:j})=>e.jsxs(G,{value:j.value.toString(),onValueChange:C=>{const k=j.value,v=parseInt(C);j.onChange(v);const P=R.getValues("value");P&&(k===Fe.AMOUNT&&v===Fe.PERCENT?R.setValue("value",P/100):k===Fe.PERCENT&&v===Fe.AMOUNT&&R.setValue("value",P*100))},children:[e.jsx(U,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(W,{placeholder:i("form.type.placeholder")})}),e.jsx(B,{children:Object.entries(Ud).map(([C,k])=>e.jsx(L,{value:C,children:i(`table.toolbar.types.${C}`)},C))})]})}),e.jsx(y,{control:R.control,name:"value",render:({field:j})=>{const C=j.value===""?"":R.watch("type")===Fe.AMOUNT&&typeof j.value=="number"?(j.value/100).toString():j.value.toString();return e.jsx(D,{type:"number",placeholder:i("form.value.placeholder"),...j,value:C,onChange:k=>{const v=k.target.value;if(v===""){j.onChange("");return}const P=parseFloat(v);isNaN(P)||j.onChange(R.watch("type")===Fe.AMOUNT?Math.round(P*100):P)},step:"any",min:0,className:"flex-[2] rounded-none border-x-0 text-left"})}}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:R.watch("type")==Fe.AMOUNT?"¥":"%"})})]})]}),e.jsxs(b,{children:[e.jsx(N,{children:i("form.validity.label")}),e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(V,{variant:"outline",className:_("w-full justify-start text-left font-normal",!R.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),he(R.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",i("form.validity.to")," ",he(R.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Xe,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(zs,{mode:"range",selected:{from:new Date(R.watch("started_at")*1e3),to:new Date(R.watch("ended_at")*1e3)},onSelect:f,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[S("started_at",i("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:i("form.validity.to")}),S("ended_at",i("table.validity.endTime"))]})})]})]}),e.jsx(E,{})]}),e.jsx(y,{control:R.control,name:"limit_use",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.limitUse.label")}),e.jsx(D,{type:"number",min:0,placeholder:i("form.limitUse.placeholder"),...j,value:j.value===void 0?"":j.value,onChange:C=>j.onChange(C.target.value===""?"":C.target.value),className:"h-9"}),e.jsx(M,{className:"text-xs",children:i("form.limitUse.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:R.control,name:"limit_use_with_user",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.limitUseWithUser.label")}),e.jsx(D,{type:"number",min:0,placeholder:i("form.limitUseWithUser.placeholder"),...j,value:j.value===void 0?"":j.value,onChange:C=>j.onChange(C.target.value===""?"":C.target.value),className:"h-9"}),e.jsx(M,{className:"text-xs",children:i("form.limitUseWithUser.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:R.control,name:"limit_period",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.limitPeriod.label")}),e.jsx(ot,{options:Object.entries(xe).filter(([C])=>isNaN(Number(C))).map(([C,k])=>({label:k,value:C})),onChange:C=>{if(C.length===0){j.onChange([]);return}const k=C.map(v=>xe[v.value]);j.onChange(k)},value:(j.value||[]).map(C=>({label:Object.entries(xe).find(([k,v])=>v===C)?.[1]||"",value:Object.entries(xe).find(([k,v])=>v===C)?.[0]||""})),placeholder:i("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:i("form.limitPeriod.empty")})}),e.jsx(M,{className:"text-xs",children:i("form.limitPeriod.description")}),e.jsx(E,{})]})}),e.jsx(y,{control:R.control,name:"limit_plan_ids",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.limitPlan.label")}),e.jsx(ot,{options:p?.map(C=>({label:C.name,value:C.id.toString()}))||[],onChange:C=>j.onChange(C.map(k=>Number(k.value))),value:(p||[]).filter(C=>(j.value||[]).includes(C.id)).map(C=>({label:C.name,value:C.id.toString()})),placeholder:i("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:i("form.limitPlan.empty")})}),e.jsx(E,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(y,{control:R.control,name:"generate_count",render:({field:j})=>e.jsxs(b,{children:[e.jsx(N,{children:i("form.generateCount.label")}),e.jsx(D,{type:"number",min:0,placeholder:i("form.generateCount.placeholder"),...j,value:j.value===void 0?"":j.value,onChange:C=>j.onChange(C.target.value===""?"":C.target.value),className:"h-9"}),e.jsx(M,{className:"text-xs",children:i("form.generateCount.description")}),e.jsx(E,{})]})})}),e.jsx(Le,{children:e.jsx(V,{type:"submit",disabled:R.formState.isSubmitting,children:R.formState.isSubmitting?i("form.submit.saving"):i("form.submit.save")})})]})})]})]})}function Mx({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=I("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ur,{refetch:n,dialogTrigger:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(D,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(Ix,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:Fe.AMOUNT,label:l(`table.toolbar.types.${Fe.AMOUNT}`)},{value:Fe.PERCENTAGE,label:l(`table.toolbar.types.${Fe.PERCENTAGE}`)}]}),a&&e.jsxs(V,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]})}const Br=m.createContext(void 0);function Ox({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),i=x=>{c(x),l(!0)},u=()=>{l(!1),c(null)};return e.jsxs(Br.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:i,closeEdit:u},children:[s,r&&e.jsx(Ur,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function zx(){const s=m.useContext(Br);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Lx=s=>{const{t:n}=I("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(K,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.original.show,onCheckedChange:l=>{wd({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(K,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=m.useState(!1),c=Date.now(),i=a.original.started_at*1e3,u=a.original.ended_at*1e3,x=c>u,o=ce.jsx(O,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=zx();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Ue,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{_d({id:a.original.id}).then(({data:r})=>{r&&(q.success("删除成功"),s())})},children:e.jsxs(V,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(ns,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function Ax(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[i,u]=m.useState([]),[x,o]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p}=se({queryKey:["couponList",x,r,i],queryFn:()=>yd({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:i})}),T=Ke({data:p?.data??[],columns:Lx(d),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},pageCount:Math.ceil((p?.total??0)/x.pageSize),rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onPaginationChange:o,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ox,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(es,{table:T,toolbar:e.jsx(Mx,{table:T,refetch:d})})})})}function $x(){const{t:s}=I("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ax,{})})]})]})}const qx=Object.freeze(Object.defineProperty({__proto__:null,default:$x},Symbol.toStringTag,{value:"Module"})),Kx=h.object({email_prefix:h.string().optional(),email_suffix:h.string().min(1),password:h.string().optional(),expired_at:h.number().optional().nullable(),plan_id:h.number().nullable(),generate_count:h.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Hx={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Ux({refetch:s}){const{t:n}=I("user"),[a,l]=m.useState(!1),r=de({resolver:me(Kx),defaultValues:Hx,mode:"onChange"}),[c,i]=m.useState([]);return m.useEffect(()=>{a&&Os().then(({data:u})=>{u&&i(u)})},[a]),e.jsxs(pe,{open:a,onOpenChange:l,children:[e.jsx(ze,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(Se,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(fe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(ge,{children:n("generate.title")}),e.jsx(Te,{})]}),e.jsxs(ue,{...r,children:[e.jsxs(b,{children:[e.jsx(N,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(y,{control:r.control,name:"email_prefix",render:({field:u})=>e.jsx(D,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...u})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(y,{control:r.control,name:"email_suffix",render:({field:u})=>e.jsx(D,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...u})})]})]}),e.jsx(y,{control:r.control,name:"password",render:({field:u})=>e.jsxs(b,{children:[e.jsx(N,{children:n("generate.form.password")}),e.jsx(D,{placeholder:n("generate.form.password_placeholder"),...u}),e.jsx(E,{})]})}),e.jsx(y,{control:r.control,name:"expired_at",render:({field:u})=>e.jsxs(b,{className:"flex flex-col",children:[e.jsx(N,{children:n("generate.form.expire_time")}),e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsx(w,{children:e.jsxs(J,{variant:"outline",className:_("w-full pl-3 text-left font-normal",!u.value&&"text-muted-foreground"),children:[u.value?he(u.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(ct,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Xe,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(Ri,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{u.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(zs,{mode:"single",selected:u.value?new Date(u.value*1e3):void 0,onSelect:x=>{x&&u.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(y,{control:r.control,name:"plan_id",render:({field:u})=>e.jsxs(b,{children:[e.jsx(N,{children:n("generate.form.subscription")}),e.jsx(w,{children:e.jsxs(G,{value:u.value?u.value.toString():"null",onValueChange:x=>u.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(L,{value:"null",children:n("generate.form.subscription_none")}),c.map(x=>e.jsx(L,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(y,{control:r.control,name:"generate_count",render:({field:u})=>e.jsxs(b,{children:[e.jsx(N,{children:n("generate.form.generate_count")}),e.jsx(D,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:u.value||"",onChange:x=>u.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(Le,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(u=>{Pd(u).then(({data:x})=>{x&&(q.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const Gr=Za,Wr=Xa,Bx=en,Yr=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));Yr.displayName=Pt.displayName;const Gx=Es("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),ya=m.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Bx,{children:[e.jsx(Yr,{}),e.jsxs(Tt,{ref:r,className:_(Gx({side:s}),n),...l,children:[e.jsxs(la,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Ae,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));ya.displayName=Tt.displayName;const Na=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",s),...n});Na.displayName="SheetHeader";const Jr=({className:s,...n})=>e.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Jr.displayName="SheetFooter";const _a=m.forwardRef(({className:s,...n},a)=>e.jsx(Dt,{ref:a,className:_("text-lg font-semibold text-foreground",s),...n}));_a.displayName=Dt.displayName;const wa=m.forwardRef(({className:s,...n},a)=>e.jsx(Et,{ref:a,className:_("text-sm text-muted-foreground",s),...n}));wa.displayName=Et.displayName;function Wx({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=I("user"),c=s.getState().columnFilters.length>0,[i,u]=m.useState([]),[x,o]=m.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],p=C=>C*1024*1024*1024,T=C=>C/(1024*1024*1024),R=()=>{u([...i,{field:"",operator:"",value:""}])},f=C=>{u(i.filter((k,v)=>v!==C))},g=(C,k,v)=>{const P=[...i];if(P[C]={...P[C],[k]:v},k==="field"){const z=d.find(Q=>Q.value===v);z&&(P[C].operator=z.operators[0].value,P[C].value=z.type==="boolean"?!1:"")}u(P)},S=(C,k)=>{const v=d.find(P=>P.value===C.field);if(!v)return null;switch(v.type){case"text":return e.jsx(D,{placeholder:r("filter.sheet.value"),value:C.value,onChange:P=>g(k,"value",P.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(D,{type:"number",placeholder:r("filter.sheet.value_number",{unit:v.unit}),value:v.unit==="GB"?T(C.value||0):C.value,onChange:P=>{const z=Number(P.target.value);g(k,"value",v.unit==="GB"?p(z):z)}}),v.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:v.unit})]});case"date":return e.jsx(zs,{mode:"single",selected:C.value,onSelect:P=>g(k,"value",P),className:"rounded-md border"});case"select":return e.jsxs(G,{value:C.value,onValueChange:P=>g(k,"value",P),children:[e.jsx(U,{children:e.jsx(W,{placeholder:r("filter.sheet.value")})}),e.jsx(B,{children:v.useOptions?l.map(P=>e.jsx(L,{value:P.value.toString(),children:P.label},P.value)):v.options?.map(P=>e.jsx(L,{value:P.value.toString(),children:P.label},P.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(H,{checked:C.value,onCheckedChange:P=>g(k,"value",P)}),e.jsx(Ct,{children:C.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},j=()=>{const C=i.filter(k=>k.field&&k.operator&&k.value!=="").map(k=>{const v=d.find(z=>z.value===k.field);let P=k.value;return k.operator==="contains"?{id:k.field,value:P}:(v?.type==="date"&&P instanceof Date&&(P=Math.floor(P.getTime()/1e3)),v?.type==="boolean"&&(P=P?1:0),{id:k.field,value:`${k.operator}:${P}`})});s.setColumnFilters(C),o(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Ux,{refetch:n}),e.jsx(D,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:C=>s.getColumn("email")?.setFilterValue(C.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Gr,{open:x,onOpenChange:o,children:[e.jsx(Wr,{asChild:!0,children:e.jsxs(V,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Vi,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),i.length>0&&e.jsx(K,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:i.length})]})}),e.jsxs(ya,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(Na,{children:[e.jsx(_a,{children:r("filter.sheet.title")}),e.jsx(wa,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(V,{variant:"outline",size:"sm",onClick:R,children:r("filter.sheet.add")})]}),e.jsx(lt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:i.map((C,k)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Ct,{children:r("filter.sheet.condition",{number:k+1})}),e.jsx(V,{variant:"ghost",size:"sm",onClick:()=>f(k),children:e.jsx(Ae,{className:"h-4 w-4"})})]}),e.jsxs(G,{value:C.field,onValueChange:v=>g(k,"field",v),children:[e.jsx(U,{children:e.jsx(W,{placeholder:r("filter.sheet.field")})}),e.jsx(B,{children:d.map(v=>e.jsx(L,{value:v.value,children:v.label},v.value))})]}),C.field&&e.jsxs(G,{value:C.operator,onValueChange:v=>g(k,"operator",v),children:[e.jsx(U,{children:e.jsx(W,{placeholder:r("filter.sheet.operator")})}),e.jsx(B,{children:d.find(v=>v.value===C.field)?.operators.map(v=>e.jsx(L,{value:v.value,children:v.label},v.value))})]}),C.field&&C.operator&&S(C,k)]},k))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(V,{variant:"outline",onClick:()=>{u([]),o(!1)},children:r("filter.sheet.reset")}),e.jsx(V,{onClick:j,children:r("filter.sheet.apply")})]})]})]})]}),c&&e.jsxs(V,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),u([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(Ae,{className:"ml-2 h-4 w-4"})]})]})})}const Yx=h.object({id:h.number(),email:h.string().email(),invite_user_email:h.string().email().nullable().optional(),password:h.string().optional().nullable(),balance:h.coerce.number(),commission_balance:h.coerce.number(),u:h.number(),d:h.number(),transfer_enable:h.number(),expired_at:h.number().nullable(),plan_id:h.number().nullable(),banned:h.number(),commission_type:h.number(),commission_rate:h.number().nullable(),discount:h.number().nullable(),speed_limit:h.number().nullable(),device_limit:h.number().nullable(),is_admin:h.number(),is_staff:h.number(),remarks:h.string().nullable()}),Qr=m.createContext(void 0);function Jx({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,c]=m.useState(!1),[i,u]=m.useState(!1),[x,o]=m.useState([]),d=de({resolver:me(Yx),defaultValues:n,mode:"onChange"});m.useEffect(()=>{a!==void 0&&c(a)},[a]);const p=T=>{c(T),l?.(T)};return e.jsx(Qr.Provider,{value:{form:d,formOpen:r,setFormOpen:p,datePickerOpen:i,setDatePickerOpen:u,planList:x,setPlanList:o},children:s})}function Qx(){const s=m.useContext(Qr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Zx({refetch:s}){const{t:n}=I("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:c,setDatePickerOpen:i,planList:u,setPlanList:x}=Qx();return m.useEffect(()=>{l&&Os().then(({data:o})=>{x(o)})},[l,x]),e.jsxs(ue,{...a,children:[e.jsx(y,{control:a.control,name:"email",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.email")}),e.jsx(w,{children:e.jsx(D,{...o,placeholder:n("edit.form.email_placeholder")})}),e.jsx(E,{...o})]})}),e.jsx(y,{control:a.control,name:"invite_user_email",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.inviter_email")}),e.jsx(w,{children:e.jsx(D,{value:o.value||"",onChange:d=>o.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(E,{...o})]})}),e.jsx(y,{control:a.control,name:"password",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.password")}),e.jsx(w,{children:e.jsx(D,{value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(E,{...o})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(y,{control:a.control,name:"balance",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.balance")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(E,{...o})]})}),e.jsx(y,{control:a.control,name:"commission_balance",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.commission_balance")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:o.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(E,{...o})]})}),e.jsx(y,{control:a.control,name:"u",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.upload")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(E,{...o})]})}),e.jsx(y,{control:a.control,name:"d",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.download")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(E,{...o})]})})]}),e.jsx(y,{control:a.control,name:"transfer_enable",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.total_traffic")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value/1024/1024/1024||"",onChange:d=>o.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(E,{})]})}),e.jsx(y,{control:a.control,name:"expired_at",render:({field:o})=>e.jsxs(b,{className:"flex flex-col",children:[e.jsx(N,{children:n("edit.form.expire_time")}),e.jsxs(rs,{open:c,onOpenChange:i,children:[e.jsx(ls,{asChild:!0,children:e.jsx(w,{children:e.jsxs(V,{type:"button",variant:"outline",className:_("w-full pl-3 text-left font-normal",!o.value&&"text-muted-foreground"),onClick:()=>i(!0),children:[o.value?he(o.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(ct,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Xe,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{o.onChange(null),i(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),i(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(V,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3)),i(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(zs,{mode:"single",selected:o.value?new Date(o.value*1e3):void 0,onSelect:d=>{if(d){const p=new Date(o.value?o.value*1e3:Date.now());d.setHours(p.getHours(),p.getMinutes(),p.getSeconds()),o.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),o.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(D,{type:"datetime-local",step:"1",value:he(o.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const p=new Date(d.target.value);isNaN(p.getTime())||o.onChange(Math.floor(p.getTime()/1e3))},className:"flex-1"}),e.jsx(V,{type:"button",variant:"outline",onClick:()=>i(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(E,{})]})}),e.jsx(y,{control:a.control,name:"plan_id",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.subscription")}),e.jsx(w,{children:e.jsxs(G,{value:o.value?o.value.toString():"null",onValueChange:d=>o.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(L,{value:"null",children:n("edit.form.subscription_none")}),u.map(d=>e.jsx(L,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(y,{control:a.control,name:"banned",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.account_status")}),e.jsx(w,{children:e.jsxs(G,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(U,{children:e.jsx(W,{})}),e.jsxs(B,{children:[e.jsx(L,{value:"1",children:n("columns.status_text.banned")}),e.jsx(L,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(y,{control:a.control,name:"commission_type",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.commission_type")}),e.jsx(w,{children:e.jsxs(G,{value:o.value.toString(),onValueChange:d=>o.onChange(parseInt(d)),children:[e.jsx(U,{children:e.jsx(W,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(L,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx(L,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx(L,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(y,{control:a.control,name:"commission_rate",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.commission_rate")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(y,{control:a.control,name:"discount",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.discount")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(E,{})]})}),e.jsx(y,{control:a.control,name:"speed_limit",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.speed_limit")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(E,{})]})}),e.jsx(y,{control:a.control,name:"device_limit",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.device_limit")}),e.jsx(w,{children:e.jsxs("div",{className:"flex",children:[e.jsx(D,{type:"number",value:o.value||"",onChange:d=>o.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(E,{})]})}),e.jsx(y,{control:a.control,name:"is_admin",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(w,{children:e.jsx(H,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(y,{control:a.control,name:"is_staff",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(w,{children:e.jsx(H,{checked:o.value===1,onCheckedChange:d=>o.onChange(d?1:0)})})})]})}),e.jsx(y,{control:a.control,name:"remarks",render:({field:o})=>e.jsxs(b,{children:[e.jsx(N,{children:n("edit.form.remarks")}),e.jsx(w,{children:e.jsx(ps,{className:"h-24",value:o.value||"",onChange:d=>o.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(E,{})]})}),e.jsxs(Jr,{children:[e.jsx(V,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(V,{type:"submit",onClick:()=>{a.handleSubmit(o=>{Sd(o).then(({data:d})=>{d&&(q.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Zr({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(V,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=I("user"),[r,c]=m.useState(!1);return e.jsx(Jx,{defaultValues:n,open:r,onOpenChange:c,children:e.jsxs(Gr,{open:r,onOpenChange:c,children:[e.jsx(Wr,{asChild:!0,children:a}),e.jsxs(ya,{className:"max-w-[90%] space-y-4",children:[e.jsxs(Na,{children:[e.jsx(_a,{children:l("edit.title")}),e.jsx(wa,{})]}),e.jsx(Zx,{refetch:s})]})]})})}const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Xx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),eh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),Gt=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:mc(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Xr,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:ss(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(el,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:ss(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(K,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:ss(n)})}}];function sl({user_id:s,dialogTrigger:n}){const{t:a}=I(["traffic"]),[l,r]=m.useState(!1),[c,i]=m.useState({pageIndex:0,pageSize:20}),{data:u,isLoading:x}=se({queryKey:["userStats",s,c,l],queryFn:()=>l?Td({user_id:s,pageSize:c.pageSize,page:c.pageIndex+1}):null}),o=Ke({data:u?.data??[],columns:Gt,pageCount:Math.ceil((u?.total??0)/c.pageSize),state:{pagination:c},manualPagination:!0,getCoreRowModel:He(),onPaginationChange:i});return e.jsxs(pe,{open:l,onOpenChange:r,children:[e.jsx(ze,{asChild:!0,children:n}),e.jsxs(fe,{className:"sm:max-w-[700px]",children:[e.jsx(be,{children:e.jsx(ge,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(fa,{children:[e.jsx(pa,{children:o.getHeaderGroups().map(d=>e.jsx(ys,{children:d.headers.map(p=>e.jsx(ja,{className:_("h-10 px-2 text-xs",p.id==="total"&&"text-right"),children:p.isPlaceholder?null:Nt(p.column.columnDef.header,p.getContext())},p.id))},d.id))}),e.jsx(ga,{children:x?Array.from({length:c.pageSize}).map((d,p)=>e.jsx(ys,{children:Array.from({length:Gt.length}).map((T,R)=>e.jsx(Ks,{className:"p-2",children:e.jsx(le,{className:"h-6 w-full"})},R))},p)):o.getRowModel().rows?.length?o.getRowModel().rows.map(d=>e.jsx(ys,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(p=>e.jsx(Ks,{className:"px-2",children:Nt(p.column.columnDef.cell,p.getContext())},p.id))},d.id)):e.jsx(ys,{children:e.jsx(Ks,{colSpan:Gt.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(G,{value:`${o.getState().pagination.pageSize}`,onValueChange:d=>{o.setPageSize(Number(d))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(W,{placeholder:o.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx(L,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:o.getState().pagination.pageIndex+1,total:o.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.previousPage(),disabled:!o.getCanPreviousPage()||x,children:e.jsx(Xx,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>o.nextPage(),disabled:!o.getCanNextPage()||x,children:e.jsx(eh,{className:"h-4 w-4"})})]})]})]})]})]})]})}const sh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),th=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),ah=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),nh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),rh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),lh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),oh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),ih=(s,n)=>{const{t:a}=I("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(K,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,c=Date.now()/1e3-r<120,i=Math.floor(Date.now()/1e3-r);let u=c?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:he(r)});if(!c&&r!==0){const x=Math.floor(i/60),o=Math.floor(x/60),d=Math.floor(o/24);d>0?u+=` +`+a("columns.online_status.offline_duration.days",{count:d}):o>0?u+=` +`+a("columns.online_status.offline_duration.hours",{count:o}):x>0?u+=` +`+a("columns.online_status.offline_duration.minutes",{count:x}):u+=` +`+a("columns.online_status.offline_duration.seconds",{count:i})}return e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:_("size-2.5 rounded-full ring-2 ring-offset-2",c?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:u})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,c=l.original.online_count||0;return e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(K,{variant:"outline",className:_("min-w-[4rem] justify-center",r!==null&&c>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[c," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(K,{className:_("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(K,{variant:"outline",className:_("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=ss(l.original?.total_used),c=ss(l.original?.transfer_enable),i=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(ce,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ie,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[i.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:_("h-full rounded-full transition-all",i>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(i,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",c]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:ss(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,c=Date.now()/1e3,i=r!=null&&re.jsx(O,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=qs(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=qs(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:he(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(O,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(_s,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(wt,{className:"size-4"})})})}),e.jsxs(ds,{align:"end",className:"min-w-[40px]",children:[e.jsx(je,{onSelect:c=>{c.preventDefault()},className:"p-0",children:e.jsx(Zr,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(sh,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(je,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Hr,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(th,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(je,{onSelect:()=>{St(l.original.subscribe_url).then(()=>{q.success(a("common:copy.success"))})},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(ah,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(je,{onSelect:()=>{kd({id:l.original.id}).then(({data:c})=>{c&&q.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(nh,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(je,{onSelect:()=>{},className:"p-0",children:e.jsxs(Vs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(rh,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(je,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(lh,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(je,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(sl,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(oh,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function ch(){const[s]=Qn(),[n,a]=m.useState({}),[l,r]=m.useState({is_admin:!1,is_staff:!1}),[c,i]=m.useState([]),[u,x]=m.useState([]),[o,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const P=s.get("email");P&&i(z=>z.some($=>$.id==="email")?z:[...z,{id:"email",value:P}])},[s]);const{refetch:p,data:T,isLoading:R}=se({queryKey:["userList",o,c,u],queryFn:()=>Cd({pageSize:o.pageSize,current:o.pageIndex+1,filter:c,sort:u})}),[f,g]=m.useState([]),[S,j]=m.useState([]);m.useEffect(()=>{Mt().then(({data:P})=>{g(P)}),Os().then(({data:P})=>{j(P)})},[]);const C=f.map(P=>({label:P.name,value:P.id})),k=S.map(P=>({label:P.name,value:P.id})),v=Ke({data:T?.data??[],columns:ih(p),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:o},rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:x,onColumnFiltersChange:i,onColumnVisibilityChange:r,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),onPaginationChange:d,getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(es,{table:v,toolbar:e.jsx(Wx,{table:v,refetch:p,serverGroupList:f,permissionGroups:C,subscriptionPlans:k})})}function dh(){const{t:s}=I("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(ch,{})})})]})]})}const mh=Object.freeze(Object.defineProperty({__proto__:null,default:dh},Symbol.toStringTag,{value:"Module"}));function uh({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(rs,{children:[e.jsx(ls,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ii,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(K,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(Xe,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Cs,{children:[e.jsx(Fs,{placeholder:n}),e.jsxs(Ss,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Oe,{children:a.map(r=>{const c=l.has(r.value);return e.jsxs(ke,{onSelect:()=>{c?l.delete(r.value):l.add(r.value);const i=Array.from(l);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:_("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Fi,{className:_("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Oe,{children:e.jsx(ke,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const xh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function hh({table:s}){const{t:n}=I("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(ha,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(Ot,{className:"grid w-full grid-cols-2",children:[e.jsx(Ns,{value:"0",children:n("status.pending")}),e.jsx(Ns,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(uh,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:ts.LOW,icon:xh,color:"gray"},{label:n("level.medium"),value:ts.MIDDLE,icon:Xr,color:"yellow"},{label:n("level.high"),value:ts.HIGH,icon:el,color:"red"}]})]})})}function fh(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const ph=Es("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),tl=m.forwardRef(({className:s,variant:n,layout:a,children:l,...r},c)=>e.jsx("div",{className:_(ph({variant:n,layout:a,className:s}),"relative group"),ref:c,...r,children:m.Children.map(l,i=>m.isValidElement(i)&&typeof i.type!="string"?m.cloneElement(i,{variant:n,layout:a}):i)}));tl.displayName="ChatBubble";const gh=Es("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),al=m.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...c},i)=>e.jsx("div",{className:_(gh({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:i,...c,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(fh,{})}):r}));al.displayName="ChatBubbleMessage";const jh=m.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:_("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));jh.displayName="ChatBubbleActionWrapper";const nl=m.forwardRef(({className:s,...n},a)=>e.jsx(ps,{autoComplete:"off",ref:a,name:"message",className:_("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));nl.displayName="ChatInput";const rl=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),ll=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),vh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),bh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function yh(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(le,{className:"h-8 w-3/4"}),e.jsx(le,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(le,{className:"h-20 w-2/3"},s))})]})}function Nh({ticketId:s,dialogTrigger:n}){const{t:a}=I("ticket"),l=ms(),r=m.useRef(null),[c,i]=m.useState(!1),[u,x]=m.useState(""),[o,d]=m.useState(!1),{data:p,refetch:T,isLoading:R}=se({queryKey:["ticket",s,c],queryFn:()=>c?Ed(s):Promise.resolve(null),refetchInterval:c?5e3:!1,retry:3}),f=p?.data,g=(v="smooth")=>{if(r.current){const{scrollHeight:P,clientHeight:z}=r.current;r.current.scrollTo({top:P-z,behavior:v})}};m.useEffect(()=>{if(!c)return;const v=requestAnimationFrame(()=>{g("instant"),setTimeout(()=>g(),1e3)});return()=>{cancelAnimationFrame(v)}},[c,f?.messages]);const S=async()=>{const v=u.trim();!v||o||(d(!0),Rd({id:s,message:v}).then(()=>{x(""),T(),g()}).finally(()=>{d(!1)}))},j=async()=>{Nr(s).then(()=>{q.success(a("actions.close_success")),T()})},C=()=>{f?.user&&l("/finance/order?user_id="+f.user.id)},k=f?.status===at.CLOSED;return e.jsxs(pe,{open:c,onOpenChange:i,children:[e.jsx(ze,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(fe,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(ge,{}),R?e.jsx(yh,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:f?.subject}),e.jsx(K,{variant:k?"secondary":"default",children:a(k?"status.closed":"status.processing")}),!k&&e.jsx(Ue,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:j,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(rl,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{children:f?.user?.email})]}),e.jsx(ye,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(ll,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",he(f?.created_at)]})]}),e.jsx(ye,{orientation:"vertical",className:"h-4"}),e.jsx(K,{variant:"outline",children:f?.level!=null&&a(`level.${f.level===ts.LOW?"low":f.level===ts.MIDDLE?"medium":"high"}`)})]})]}),f?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Zr,{defaultValues:f.user,refetch:T,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(it,{className:"h-4 w-4"})})}),e.jsx(sl,{user_id:f.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(vh,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:C,children:e.jsx(bh,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:f?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):f?.messages?.map(v=>e.jsx(tl,{variant:v.is_me?"sent":"received",className:v.is_me?"ml-auto":"mr-auto",children:e.jsx(al,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:v.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:he(v.created_at)})})]})})},v.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(nl,{disabled:k||o,placeholder:a(k?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:u,onChange:v=>x(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),S())}}),e.jsx(J,{disabled:k||o||!u.trim(),onClick:S,children:a(o?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const _h=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),wh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),Ch=s=>{const{t:n}=I("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(K,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(_h,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===ts.LOW?"default":l===ts.MIDDLE?"secondary":"destructive";return e.jsx(K,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===ts.LOW?"low":l===ts.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,c=l===at.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),i=l===at.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(K,{variant:i,className:"whitespace-nowrap",children:c})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(ll,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:he(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:he(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==at.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Nh,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(wh,{className:"h-4 w-4"})})}),l&&e.jsx(Ue,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{Nr(a.original.id).then(()=>{q.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(rl,{className:"h-4 w-4"})})})]})}}]};function Sh(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([{id:"status",value:"0"}]),[i,u]=m.useState([]),[x,o]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:p,isLoading:T}=se({queryKey:["orderList",x,r,i],queryFn:()=>Dd({pageSize:x.pageSize,current:x.pageIndex+1,filter:r,sort:i})}),R=Ke({data:p?.data??[],columns:Ch(d),state:{sorting:i,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:x},rowCount:p?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:He(),getFilteredRowModel:Je(),getPaginationRowModel:Qe(),onPaginationChange:o,getSortedRowModel:Ze(),getFacetedRowModel:us(),getFacetedUniqueValues:xs(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(hh,{table:R,refetch:d}),e.jsx(es,{table:R,showPagination:!0})]})}function kh(){const{t:s}=I("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(Ie,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ee,{}),e.jsx(Re,{})]})]}),e.jsxs(Pe,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Sh,{})})]})]})}const Ph=Object.freeze(Object.defineProperty({__proto__:null,default:kh},Symbol.toStringTag,{value:"Module"}));export{Vh as a,Eh as c,Rh as g,Ih as r}; diff --git a/public/assets/admin/assets/vendor.js b/public/assets/admin/assets/vendor.js index 9070284..c6aaffc 100644 --- a/public/assets/admin/assets/vendor.js +++ b/public/assets/admin/assets/vendor.js @@ -46,7 +46,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Loe(){return Math.random().toString(36).substr(2,8)}function XT(e,t){return{usr:e.state,key:e.key,idx:t}}function Y0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:n,key:t&&t.key||r||Loe()})}function Uc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Pu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Foe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Y0(v.location,b,w);n(x,b),l=c()+1;let S=XT(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Y0(v.location,b,w);n(x,b),l=c();let S=XT(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Uc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(ZT,f),u=b,()=>{i.removeEventListener(ZT,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const joe=new Set(["lazy","caseSensitive","path","id","index","children"]);function Boe(e){return e.index===!0}function Ty(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Boe(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=Ty(i.children,t,a,r)),u}})}function gc(e,t,n){return n===void 0&&(n="/"),q1(e,t,n,!1)}function q1(e,t,n,r){let i=typeof t=="string"?Pu(t):t,o=Mh(i.pathname||"/",n);if(o==null)return null;let a=TF(e);Uoe(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),TF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Yoe(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of MF(o.path))i(o,a,u)}),t}function MF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=MF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Uoe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Voe=/^:[\w-]+$/,Woe=3,Hoe=2,Koe=1,qoe=10,Goe=-2,QT=e=>e==="*";function Yoe(e,t){let n=e.split("/"),r=n.length;return n.some(QT)&&(r+=Goe),t&&(r+=Hoe),n.filter(i=>!QT(i)).reduce((i,o)=>i+(Voe.test(o)?Woe:o===""?Koe:qoe),r)}function Zoe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Xoe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Qoe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Joe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function eae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Pu(e):e;return{pathname:n?n.startsWith("/")?n:tae(n,t):t,search:rae(r),hash:iae(i)}}function tae(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function eS(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function RF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function b5(e,t){let n=RF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function x5(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Pu(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),eS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),eS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),eS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=eae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),nae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class My{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Bx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const DF=["post","put","patch","delete"],oae=new Set(DF),aae=["get",...DF],sae=new Set(aae),uae=new Set([301,302,303,307,308]),lae=new Set([307,308]),tS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},w5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$F="remix-router-transitions";function dae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let re=e.detectErrorBoundary;i=se=>({hasErrorBoundary:re(se)})}else i=fae;let o={},a=Ty(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||mae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=gc(a,e.history.location,u),S=null;if(x==null&&!c){let re=ro(404,{pathname:e.history.location.pathname}),{matches:se,route:ve}=cM(a);x=se,S={[ve.id]:re}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(re=>re.route.lazy))O=!1;else if(!x.some(re=>re.route.loader))O=!0;else if(f.v7_partialHydration){let re=e.hydrationData?e.hydrationData.loaderData:null,se=e.hydrationData?e.hydrationData.errors:null;if(se){let ve=x.findIndex(T=>se[T.route.id]!==void 0);O=x.slice(0,ve+1).every(T=>!kC(T.route,re,se))}else O=x.every(ve=>!kC(ve.route,re,se))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let re=Xr(null,a,e.history.location.pathname);re.active&&re.matches&&(x=re.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:tS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,L,U=!1,H=new Map,V=null,ne=!1,Z=!1,G=[],q=new Set,W=new Map,j=0,K=-1,Y=new Map,oe=new Set,ae=new Map,ue=new Map,be=new Set,we=new Map,He=new Map,Ee;function it(){if(h=e.history.listen(re=>{let{action:se,location:ve,delta:T}=re;if(Ee){Ee(),Ee=void 0;return}zc(He.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:ve,historyAction:se});if(D&&T!=null){let $=new Promise(A=>{Ee=A});e.history.go(T*-1),xi(D,{state:"blocked",location:ve,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),$.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set(D,Pp),De({blockers:A})}});return}return Nt(se,ve)}),n){Tae(t,H);let re=()=>Mae(t,H);t.addEventListener("pagehide",re),V=()=>t.removeEventListener("pagehide",re)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function ke(){h&&h(),V&&V(),p.clear(),L&&L.abort(),C.fetchers.forEach((re,se)=>br(se)),C.blockers.forEach((re,se)=>yo(se))}function Le(re){return p.add(re),()=>p.delete(re)}function De(re,se){se===void 0&&(se={}),C=ir({},C,re);let ve=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(be.has($)?T.push($):ve.push($))}),[...p].forEach(D=>D(C,{deletedFetchers:T,viewTransitionOpts:se.viewTransitionOpts,flushSync:se.flushSync===!0})),f.v7_fetcherPersist&&(ve.forEach(D=>C.fetchers.delete(D)),T.forEach(D=>br(D)))}function me(re,se,ve){var T,D;let{flushSync:$}=ve===void 0?{}:ve,A=C.actionData!=null&&C.navigation.formMethod!=null&&Ra(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=re.state)==null?void 0:T._isRedirect)!==!0,N;se.actionData?Object.keys(se.actionData).length>0?N=se.actionData:N=null:A?N=C.actionData:N=null;let Q=se.loaderData?uM(C.loaderData,se.loaderData,se.matches||[],se.errors):C.loaderData,ee=C.blockers;ee.size>0&&(ee=new Map(ee),ee.forEach((je,We)=>ee.set(We,Pp)));let fe=M===!0||C.navigation.formMethod!=null&&Ra(C.navigation.formMethod)&&((D=re.state)==null?void 0:D._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(re,re.state):k===kr.Replace&&e.history.replace(re,re.state));let _e;if(k===kr.Pop){let je=H.get(C.location.pathname);je&&je.has(re.pathname)?_e={currentLocation:C.location,nextLocation:re}:H.has(re.pathname)&&(_e={currentLocation:re,nextLocation:C.location})}else if(U){let je=H.get(C.location.pathname);je?je.add(re.pathname):(je=new Set([re.pathname]),H.set(C.location.pathname,je)),_e={currentLocation:C.location,nextLocation:re}}De(ir({},se,{actionData:N,loaderData:Q,historyAction:k,location:re,initialized:!0,navigation:tS,revalidation:"idle",restoreScrollPosition:ur(re,se.matches||C.matches),preventScrollReset:fe,blockers:ee}),{viewTransitionOpts:_e,flushSync:$===!0}),k=kr.Pop,M=!1,U=!1,ne=!1,Z=!1,G=[]}async function yt(re,se){if(typeof re=="number"){e.history.go(re);return}let ve=PC(C.location,C.matches,u,f.v7_prependBasename,re,f.v7_relativeSplatPath,se?.fromRouteId,se?.relative),{path:T,submission:D,error:$}=eM(f.v7_normalizeFormMethod,!1,ve,se),A=C.location,N=Y0(C.location,T,se&&se.state);N=ir({},N,e.history.encodeLocation(N));let Q=se&&se.replace!=null?se.replace:void 0,ee=kr.Push;Q===!0?ee=kr.Replace:Q===!1||D!=null&&Ra(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(ee=kr.Replace);let fe=se&&"preventScrollReset"in se?se.preventScrollReset===!0:void 0,_e=(se&&se.flushSync)===!0,je=Dr({currentLocation:A,nextLocation:N,historyAction:ee});if(je){xi(je,{state:"blocked",location:N,proceed(){xi(je,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),yt(re,se)},reset(){let We=new Map(C.blockers);We.set(je,Pp),De({blockers:We})}});return}return await Nt(ee,N,{submission:D,pendingError:$,preventScrollReset:fe,replace:se&&se.replace,enableViewTransition:se&&se.viewTransition,flushSync:_e})}function lt(){if(xn(),De({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function Nt(re,se,ve){L&&L.abort(),L=null,k=re,ne=(ve&&ve.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(ve&&ve.preventScrollReset)===!0,U=(ve&&ve.enableViewTransition)===!0;let T=s||a,D=ve&&ve.overrideNavigation,$=gc(T,se,u),A=(ve&&ve.flushSync)===!0,N=Xr($,T,se.pathname);if(N.active&&N.matches&&($=N.matches),!$){let{error:ct,notFoundMatches:Ie,route:nt}=_a(se.pathname);me(se,{matches:Ie,loaderData:{},errors:{[nt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&_ae(C.location,se)&&!(ve&&ve.submission&&Ra(ve.submission.formMethod))){me(se,{matches:$},{flushSync:A});return}L=new AbortController;let Q=Ff(e.history,se,L.signal,ve&&ve.submission),ee;if(ve&&ve.pendingError)ee=[mc($).route.id,{type:In.error,error:ve.pendingError}];else if(ve&&ve.submission&&Ra(ve.submission.formMethod)){let ct=await yn(Q,se,ve.submission,$,N.active,{replace:ve.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ie,nt]=ct.pendingActionResult;if(Mo(nt)&&Bx(nt.error)&&nt.error.status===404){L=null,me(se,{matches:ct.matches,loaderData:{},errors:{[Ie]:nt.error}});return}}$=ct.matches||$,ee=ct.pendingActionResult,D=nS(se,ve.submission),A=!1,N.active=!1,Q=Ff(e.history,Q.url,Q.signal)}let{shortCircuited:fe,matches:_e,loaderData:je,errors:We}=await nn(Q,se,$,N.active,D,ve&&ve.submission,ve&&ve.fetcherSubmission,ve&&ve.replace,ve&&ve.initialHydration===!0,A,ee);fe||(L=null,me(se,ir({matches:_e||$},lM(ee),{loaderData:je,errors:We})))}async function yn(re,se,ve,T,D,$){$===void 0&&($={}),xn();let A=Pae(se,ve);if(De({navigation:A},{flushSync:$.flushSync===!0}),D){let ee=await bo(T,se.pathname,re.signal);if(ee.type==="aborted")return{shortCircuited:!0};if(ee.type==="error"){let fe=mc(ee.partialMatches).route.id;return{matches:ee.partialMatches,pendingActionResult:[fe,{type:In.error,error:ee.error}]}}else if(ee.matches)T=ee.matches;else{let{notFoundMatches:fe,error:_e,route:je}=_a(se.pathname);return{matches:fe,pendingActionResult:[je.id,{type:In.error,error:_e}]}}}let N,Q=r0(T,se);if(!Q.route.action&&!Q.route.lazy)N={type:In.error,error:ro(405,{method:re.method,pathname:se.pathname,routeId:Q.route.id})};else if(N=(await tt("action",C,re,[Q],T,null))[Q.route.id],re.signal.aborted)return{shortCircuited:!0};if(xc(N)){let ee;return $&&$.replace!=null?ee=$.replace:ee=oM(N.response.headers.get("Location"),new URL(re.url),u)===C.location.pathname+C.location.search,await Ae(re,N,!0,{submission:ve,replace:ee}),{shortCircuited:!0}}if(sl(N))throw ro(400,{type:"defer-action"});if(Mo(N)){let ee=mc(T,Q.route.id);return($&&$.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[ee.route.id,N]}}return{matches:T,pendingActionResult:[Q.route.id,N]}}async function nn(re,se,ve,T,D,$,A,N,Q,ee,fe){let _e=D||nS(se,$),je=$||A||dM(_e),We=!ne&&(!f.v7_partialHydration||!Q);if(T){if(We){let Ke=te(fe);De(ir({navigation:_e},Ke!==void 0?{actionData:Ke}:{}),{flushSync:ee})}let Ne=await bo(ve,se.pathname,re.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let Ke=mc(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,loaderData:{},errors:{[Ke]:Ne.error}}}else if(Ne.matches)ve=Ne.matches;else{let{error:Ke,notFoundMatches:Ge,route:pe}=_a(se.pathname);return{matches:Ge,loaderData:{},errors:{[pe.id]:Ke}}}}let ct=s||a,[Ie,nt]=nM(e.history,C,ve,je,se,f.v7_partialHydration&&Q===!0,f.v7_skipActionErrorRevalidation,Z,G,q,be,ae,oe,ct,u,fe);if(_t(Ne=>!(ve&&ve.some(Ke=>Ke.route.id===Ne))||Ie&&Ie.some(Ke=>Ke.route.id===Ne)),K=++j,Ie.length===0&&nt.length===0){let Ne=bi();return me(se,ir({matches:ve,loaderData:{},errors:fe&&Mo(fe[1])?{[fe[0]]:fe[1].error}:null},lM(fe),Ne?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ee}),{shortCircuited:!0}}if(We){let Ne={};if(!T){Ne.navigation=_e;let Ke=te(fe);Ke!==void 0&&(Ne.actionData=Ke)}nt.length>0&&(Ne.fetchers=de(nt)),De(Ne,{flushSync:ee})}nt.forEach(Ne=>{sr(Ne.key),Ne.controller&&W.set(Ne.key,Ne.controller)});let bt=()=>nt.forEach(Ne=>sr(Ne.key));L&&L.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,ve,Ie,nt,re);if(re.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",bt),nt.forEach(Ne=>W.delete(Ne.key));let ht=Qv(Ot);if(ht)return await Ae(re,ht.result,!0,{replace:N}),{shortCircuited:!0};if(ht=Qv(gt),ht)return oe.add(ht.key),await Ae(re,ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=sM(C,ve,Ot,fe,nt,gt,we);we.forEach((Ne,Ke)=>{Ne.subscribe(Ge=>{(Ge||Ne.done)&&we.delete(Ke)})}),f.v7_partialHydration&&Q&&C.errors&&(wt=ir({},C.errors,wt));let Qe=bi(),ut=Rr(K),Xe=Qe||ut||nt.length>0;return ir({matches:ve,loaderData:xt,errors:wt},Xe?{fetchers:new Map(C.fetchers)}:{})}function te(re){if(re&&!Mo(re[1]))return{[re[0]]:re[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function de(re){return re.forEach(se=>{let ve=C.fetchers.get(se.key),T=kp(void 0,ve?ve.data:void 0);C.fetchers.set(se.key,T)}),new Map(C.fetchers)}function ge(re,se,ve,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(re);let D=(T&&T.flushSync)===!0,$=s||a,A=PC(C.location,C.matches,u,f.v7_prependBasename,ve,f.v7_relativeSplatPath,se,T?.relative),N=gc($,A,u),Q=Xr(N,$,A);if(Q.active&&Q.matches&&(N=Q.matches),!N){wn(re,se,ro(404,{pathname:A}),{flushSync:D});return}let{path:ee,submission:fe,error:_e}=eM(f.v7_normalizeFormMethod,!0,A,T);if(_e){wn(re,se,_e,{flushSync:D});return}let je=r0(N,ee),We=(T&&T.preventScrollReset)===!0;if(fe&&Ra(fe.formMethod)){ze(re,se,ee,je,N,Q.active,D,We,fe);return}ae.set(re,{routeId:se,path:ee}),Fe(re,se,ee,je,N,Q.active,D,We,fe)}async function ze(re,se,ve,T,D,$,A,N,Q){xn(),ae.delete(re);function ee(he){if(!he.route.action&&!he.route.lazy){let Re=ro(405,{method:Q.formMethod,pathname:ve,routeId:se});return wn(re,se,Re,{flushSync:A}),!0}return!1}if(!$&&ee(T))return;let fe=C.fetchers.get(re);Ht(re,kae(Q,fe),{flushSync:A});let _e=new AbortController,je=Ff(e.history,ve,_e.signal,Q);if($){let he=await bo(D,ve,je.signal);if(he.type==="aborted")return;if(he.type==="error"){wn(re,se,he.error,{flushSync:A});return}else if(he.matches){if(D=he.matches,T=r0(D,ve),ee(T))return}else{wn(re,se,ro(404,{pathname:ve}),{flushSync:A});return}}W.set(re,_e);let We=j,Ie=(await tt("action",C,je,[T],D,re))[T.route.id];if(je.signal.aborted){W.get(re)===_e&&W.delete(re);return}if(f.v7_fetcherPersist&&be.has(re)){if(xc(Ie)||Mo(Ie)){Ht(re,qu(void 0));return}}else{if(xc(Ie))if(W.delete(re),K>We){Ht(re,qu(void 0));return}else return oe.add(re),Ht(re,kp(Q)),Ae(je,Ie,!1,{fetcherSubmission:Q,preventScrollReset:N});if(Mo(Ie)){wn(re,se,Ie.error);return}}if(sl(Ie))throw ro(400,{type:"defer-action"});let nt=C.navigation.location||C.location,bt=Ff(e.history,nt,_e.signal),Ot=s||a,gt=C.navigation.state!=="idle"?gc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++j;Y.set(re,ht);let xt=kp(Q,Ie.data);C.fetchers.set(re,xt);let[wt,Qe]=nM(e.history,C,gt,Q,nt,!1,f.v7_skipActionErrorRevalidation,Z,G,q,be,ae,oe,Ot,u,[T.route.id,Ie]);Qe.filter(he=>he.key!==re).forEach(he=>{let Re=he.key,Oe=C.fetchers.get(Re),Pe=kp(void 0,Oe?Oe.data:void 0);C.fetchers.set(Re,Pe),sr(Re),he.controller&&W.set(Re,he.controller)}),De({fetchers:new Map(C.fetchers)});let ut=()=>Qe.forEach(he=>sr(he.key));_e.signal.addEventListener("abort",ut);let{loaderResults:Xe,fetcherResults:Ne}=await mt(C,gt,wt,Qe,bt);if(_e.signal.aborted)return;_e.signal.removeEventListener("abort",ut),Y.delete(re),W.delete(re),Qe.forEach(he=>W.delete(he.key));let Ke=Qv(Xe);if(Ke)return Ae(bt,Ke.result,!1,{preventScrollReset:N});if(Ke=Qv(Ne),Ke)return oe.add(Ke.key),Ae(bt,Ke.result,!1,{preventScrollReset:N});let{loaderData:Ge,errors:pe}=sM(C,gt,Xe,void 0,Qe,Ne,we);if(C.fetchers.has(re)){let he=qu(Ie.data);C.fetchers.set(re,he)}Rr(ht),C.navigation.state==="loading"&&ht>K?(fn(k,"Expected pending action"),L&&L.abort(),me(C.navigation.location,{matches:gt,loaderData:Ge,errors:pe,fetchers:new Map(C.fetchers)})):(De({errors:pe,loaderData:uM(C.loaderData,Ge,gt,pe),fetchers:new Map(C.fetchers)}),Z=!1)}async function Fe(re,se,ve,T,D,$,A,N,Q){let ee=C.fetchers.get(re);Ht(re,kp(Q,ee?ee.data:void 0),{flushSync:A});let fe=new AbortController,_e=Ff(e.history,ve,fe.signal);if($){let Ie=await bo(D,ve,_e.signal);if(Ie.type==="aborted")return;if(Ie.type==="error"){wn(re,se,Ie.error,{flushSync:A});return}else if(Ie.matches)D=Ie.matches,T=r0(D,ve);else{wn(re,se,ro(404,{pathname:ve}),{flushSync:A});return}}W.set(re,fe);let je=j,ct=(await tt("loader",C,_e,[T],D,re))[T.route.id];if(sl(ct)&&(ct=await _5(ct,_e.signal,!0)||ct),W.get(re)===fe&&W.delete(re),!_e.signal.aborted){if(be.has(re)){Ht(re,qu(void 0));return}if(xc(ct))if(K>je){Ht(re,qu(void 0));return}else{oe.add(re),await Ae(_e,ct,!1,{preventScrollReset:N});return}if(Mo(ct)){wn(re,se,ct.error);return}fn(!sl(ct),"Unhandled fetcher deferred data"),Ht(re,qu(ct.data))}}async function Ae(re,se,ve,T){let{submission:D,fetcherSubmission:$,preventScrollReset:A,replace:N}=T===void 0?{}:T;se.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let Q=se.response.headers.get("Location");fn(Q,"Expected a Location header on the redirect Response"),Q=oM(Q,new URL(re.url),u);let ee=Y0(C.location,Q,{_isRedirect:!0});if(n){let Ie=!1;if(se.response.headers.has("X-Remix-Reload-Document"))Ie=!0;else if(w5.test(Q)){const nt=e.history.createURL(Q);Ie=nt.origin!==t.location.origin||Mh(nt.pathname,u)==null}if(Ie){N?t.location.replace(Q):t.location.assign(Q);return}}L=null;let fe=N===!0||se.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:_e,formAction:je,formEncType:We}=C.navigation;!D&&!$&&_e&&je&&We&&(D=dM(C.navigation));let ct=D||$;if(lae.has(se.response.status)&&ct&&Ra(ct.formMethod))await Nt(fe,ee,{submission:ir({},ct,{formAction:Q}),preventScrollReset:A||M,enableViewTransition:ve?U:void 0});else{let Ie=nS(ee,D);await Nt(fe,ee,{overrideNavigation:Ie,fetcherSubmission:$,preventScrollReset:A||M,enableViewTransition:ve?U:void 0})}}async function tt(re,se,ve,T,D,$){let A,N={};try{A=await vae(l,re,se,ve,T,D,$,o,i)}catch(Q){return T.forEach(ee=>{N[ee.route.id]={type:In.error,error:Q}}),N}for(let[Q,ee]of Object.entries(A))if(Sae(ee)){let fe=ee.result;N[Q]={type:In.redirect,response:xae(fe,ve,Q,D,u,f.v7_relativeSplatPath)}}else N[Q]=await bae(ee);return N}async function mt(re,se,ve,T,D){let $=re.matches,A=tt("loader",re,D,ve,se,null),N=Promise.all(T.map(async fe=>{if(fe.matches&&fe.match&&fe.controller){let je=(await tt("loader",re,Ff(e.history,fe.path,fe.controller.signal),[fe.match],fe.matches,fe.key))[fe.match.route.id];return{[fe.key]:je}}else return Promise.resolve({[fe.key]:{type:In.error,error:ro(404,{pathname:fe.path})}})})),Q=await A,ee=(await N).reduce((fe,_e)=>Object.assign(fe,_e),{});return await Promise.all([Oae(se,Q,D.signal,$,re.loaderData),Aae(se,ee,T)]),{loaderResults:Q,fetcherResults:ee}}function xn(){Z=!0,G.push(..._t()),ae.forEach((re,se)=>{W.has(se)&&q.add(se),sr(se)})}function Ht(re,se,ve){ve===void 0&&(ve={}),C.fetchers.set(re,se),De({fetchers:new Map(C.fetchers)},{flushSync:(ve&&ve.flushSync)===!0})}function wn(re,se,ve,T){T===void 0&&(T={});let D=mc(C.matches,se);br(re),De({errors:{[D.route.id]:ve},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(re){return f.v7_fetcherPersist&&(ue.set(re,(ue.get(re)||0)+1),be.has(re)&&be.delete(re)),C.fetchers.get(re)||cae}function br(re){let se=C.fetchers.get(re);W.has(re)&&!(se&&se.state==="loading"&&Y.has(re))&&sr(re),ae.delete(re),Y.delete(re),oe.delete(re),be.delete(re),q.delete(re),C.fetchers.delete(re)}function yi(re){if(f.v7_fetcherPersist){let se=(ue.get(re)||0)-1;se<=0?(ue.delete(re),be.add(re)):ue.set(re,se)}else br(re);De({fetchers:new Map(C.fetchers)})}function sr(re){let se=W.get(re);se&&(se.abort(),W.delete(re))}function si(re){for(let se of re){let ve=Ii(se),T=qu(ve.data);C.fetchers.set(se,T)}}function bi(){let re=[],se=!1;for(let ve of oe){let T=C.fetchers.get(ve);fn(T,"Expected fetcher: "+ve),T.state==="loading"&&(oe.delete(ve),re.push(ve),se=!0)}return si(re),se}function Rr(re){let se=[];for(let[ve,T]of Y)if(T0}function Xi(re,se){let ve=C.blockers.get(re)||Pp;return He.get(re)!==se&&He.set(re,se),ve}function yo(re){C.blockers.delete(re),He.delete(re)}function xi(re,se){let ve=C.blockers.get(re)||Pp;fn(ve.state==="unblocked"&&se.state==="blocked"||ve.state==="blocked"&&se.state==="blocked"||ve.state==="blocked"&&se.state==="proceeding"||ve.state==="blocked"&&se.state==="unblocked"||ve.state==="proceeding"&&se.state==="unblocked","Invalid blocker state transition: "+ve.state+" -> "+se.state);let T=new Map(C.blockers);T.set(re,se),De({blockers:T})}function Dr(re){let{currentLocation:se,nextLocation:ve,historyAction:T}=re;if(He.size===0)return;He.size>1&&zc(!1,"A router only supports one blocker at a time");let D=Array.from(He.entries()),[$,A]=D[D.length-1],N=C.blockers.get($);if(!(N&&N.state==="proceeding")&&A({currentLocation:se,nextLocation:ve,historyAction:T}))return $}function _a(re){let se=ro(404,{pathname:re}),ve=s||a,{matches:T,route:D}=cM(ve);return _t(),{notFoundMatches:T,route:D,error:se}}function _t(re){let se=[];return we.forEach((ve,T)=>{(!re||re(T))&&(ve.cancel(),se.push(T),we.delete(T))}),se}function hn(re,se,ve){if(m=re,b=se,v=ve||null,!w&&C.navigation===tS){w=!0;let T=ur(C.location,C.matches);T!=null&&De({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(re,se){return v&&v(re,se.map(T=>zoe(T,C.loaderData)))||re.key}function qn(re,se){if(m&&b){let ve=_n(re,se);m[ve]=b()}}function ur(re,se){if(m){let ve=_n(re,se),T=m[ve];if(typeof T=="number")return T}return null}function Xr(re,se,ve){if(c)if(re){if(Object.keys(re[0].params).length>0)return{active:!0,matches:q1(se,ve,u,!0)}}else return{active:!0,matches:q1(se,ve,u,!0)||[]};return{active:!1,matches:null}}async function bo(re,se,ve){if(!c)return{type:"success",matches:re};let T=re;for(;;){let D=s==null,$=s||a,A=o;try{await c({path:se,matches:T,patch:(ee,fe)=>{ve.aborted||iM(ee,fe,$,A,i)}})}catch(ee){return{type:"error",error:ee,partialMatches:T}}finally{D&&!ve.aborted&&(a=[...a])}if(ve.aborted)return{type:"aborted"};let N=gc($,se,u);if(N)return{type:"success",matches:N};let Q=q1($,se,u,!0);if(!Q||T.length===Q.length&&T.every((ee,fe)=>ee.route.id===Q[fe].route.id))return{type:"success",matches:null};T=Q}}function Zl(re){o={},s=Ty(re,i,void 0,o)}function Sf(re,se){let ve=s==null;iM(re,se,s||a,o,i),ve&&(a=[...a],De({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:it,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ge,revalidate:lt,createHref:re=>e.history.createHref(re),encodeLocation:re=>e.history.encodeLocation(re),getFetcher:Ii,deleteFetcher:yi,dispose:ke,getBlocker:Xi,deleteBlocker:yo,patchRoutes:Sf,_internalFetchControllers:W,_internalActiveDeferreds:we,_internalSetRoutes:Zl},E}function hae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function PC(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=x5(i||".",b5(u,o),Mh(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=S5(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Uc(c)}function eM(e,t,n,r){if(!r||!hae(r))return{path:n};if(r.formMethod&&!Eae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=LF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ra(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` + */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Loe(){return Math.random().toString(36).substr(2,8)}function XT(e,t){return{usr:e.state,key:e.key,idx:t}}function Y0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:n,key:t&&t.key||r||Loe()})}function Uc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Pu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Foe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Y0(v.location,b,w);n(x,b),l=c()+1;let S=XT(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Y0(v.location,b,w);n(x,b),l=c();let S=XT(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Uc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(ZT,f),u=b,()=>{i.removeEventListener(ZT,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const joe=new Set(["lazy","caseSensitive","path","id","index","children"]);function Boe(e){return e.index===!0}function Ty(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Boe(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=Ty(i.children,t,a,r)),u}})}function gc(e,t,n){return n===void 0&&(n="/"),q1(e,t,n,!1)}function q1(e,t,n,r){let i=typeof t=="string"?Pu(t):t,o=Mh(i.pathname||"/",n);if(o==null)return null;let a=TF(e);Uoe(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),TF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Yoe(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of MF(o.path))i(o,a,u)}),t}function MF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=MF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Uoe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Voe=/^:[\w-]+$/,Woe=3,Hoe=2,Koe=1,qoe=10,Goe=-2,QT=e=>e==="*";function Yoe(e,t){let n=e.split("/"),r=n.length;return n.some(QT)&&(r+=Goe),t&&(r+=Hoe),n.filter(i=>!QT(i)).reduce((i,o)=>i+(Voe.test(o)?Woe:o===""?Koe:qoe),r)}function Zoe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Xoe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Qoe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Joe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function eae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Pu(e):e;return{pathname:n?n.startsWith("/")?n:tae(n,t):t,search:rae(r),hash:iae(i)}}function tae(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function eS(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function RF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function b5(e,t){let n=RF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function x5(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Pu(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),eS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),eS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),eS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=eae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),nae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class My{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Bx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const DF=["post","put","patch","delete"],oae=new Set(DF),aae=["get",...DF],sae=new Set(aae),uae=new Set([301,302,303,307,308]),lae=new Set([307,308]),tS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},w5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$F="remix-router-transitions";function dae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let re=e.detectErrorBoundary;i=se=>({hasErrorBoundary:re(se)})}else i=fae;let o={},a=Ty(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||mae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=gc(a,e.history.location,u),S=null;if(x==null&&!c){let re=ro(404,{pathname:e.history.location.pathname}),{matches:se,route:ve}=cM(a);x=se,S={[ve.id]:re}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(re=>re.route.lazy))O=!1;else if(!x.some(re=>re.route.loader))O=!0;else if(f.v7_partialHydration){let re=e.hydrationData?e.hydrationData.loaderData:null,se=e.hydrationData?e.hydrationData.errors:null;if(se){let ve=x.findIndex(T=>se[T.route.id]!==void 0);O=x.slice(0,ve+1).every(T=>!kC(T.route,re,se))}else O=x.every(ve=>!kC(ve.route,re,se))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let re=Xr(null,a,e.history.location.pathname);re.active&&re.matches&&(x=re.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:tS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,L,U=!1,H=new Map,V=null,ne=!1,Z=!1,G=[],q=new Set,W=new Map,j=0,K=-1,Y=new Map,oe=new Set,ae=new Map,ue=new Map,be=new Set,we=new Map,He=new Map,Ee;function it(){if(h=e.history.listen(re=>{let{action:se,location:ve,delta:T}=re;if(Ee){Ee(),Ee=void 0;return}zc(He.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:ve,historyAction:se});if(D&&T!=null){let $=new Promise(A=>{Ee=A});e.history.go(T*-1),xi(D,{state:"blocked",location:ve,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),$.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set(D,Pp),De({blockers:A})}});return}return Nt(se,ve)}),n){Tae(t,H);let re=()=>Mae(t,H);t.addEventListener("pagehide",re),V=()=>t.removeEventListener("pagehide",re)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function ke(){h&&h(),V&&V(),p.clear(),L&&L.abort(),C.fetchers.forEach((re,se)=>br(se)),C.blockers.forEach((re,se)=>yo(se))}function Le(re){return p.add(re),()=>p.delete(re)}function De(re,se){se===void 0&&(se={}),C=ir({},C,re);let ve=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(be.has($)?T.push($):ve.push($))}),[...p].forEach(D=>D(C,{deletedFetchers:T,viewTransitionOpts:se.viewTransitionOpts,flushSync:se.flushSync===!0})),f.v7_fetcherPersist&&(ve.forEach(D=>C.fetchers.delete(D)),T.forEach(D=>br(D)))}function me(re,se,ve){var T,D;let{flushSync:$}=ve===void 0?{}:ve,A=C.actionData!=null&&C.navigation.formMethod!=null&&Ra(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=re.state)==null?void 0:T._isRedirect)!==!0,N;se.actionData?Object.keys(se.actionData).length>0?N=se.actionData:N=null:A?N=C.actionData:N=null;let Q=se.loaderData?uM(C.loaderData,se.loaderData,se.matches||[],se.errors):C.loaderData,ee=C.blockers;ee.size>0&&(ee=new Map(ee),ee.forEach((je,We)=>ee.set(We,Pp)));let fe=M===!0||C.navigation.formMethod!=null&&Ra(C.navigation.formMethod)&&((D=re.state)==null?void 0:D._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(re,re.state):k===kr.Replace&&e.history.replace(re,re.state));let _e;if(k===kr.Pop){let je=H.get(C.location.pathname);je&&je.has(re.pathname)?_e={currentLocation:C.location,nextLocation:re}:H.has(re.pathname)&&(_e={currentLocation:re,nextLocation:C.location})}else if(U){let je=H.get(C.location.pathname);je?je.add(re.pathname):(je=new Set([re.pathname]),H.set(C.location.pathname,je)),_e={currentLocation:C.location,nextLocation:re}}De(ir({},se,{actionData:N,loaderData:Q,historyAction:k,location:re,initialized:!0,navigation:tS,revalidation:"idle",restoreScrollPosition:ur(re,se.matches||C.matches),preventScrollReset:fe,blockers:ee}),{viewTransitionOpts:_e,flushSync:$===!0}),k=kr.Pop,M=!1,U=!1,ne=!1,Z=!1,G=[]}async function yt(re,se){if(typeof re=="number"){e.history.go(re);return}let ve=PC(C.location,C.matches,u,f.v7_prependBasename,re,f.v7_relativeSplatPath,se?.fromRouteId,se?.relative),{path:T,submission:D,error:$}=eM(f.v7_normalizeFormMethod,!1,ve,se),A=C.location,N=Y0(C.location,T,se&&se.state);N=ir({},N,e.history.encodeLocation(N));let Q=se&&se.replace!=null?se.replace:void 0,ee=kr.Push;Q===!0?ee=kr.Replace:Q===!1||D!=null&&Ra(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(ee=kr.Replace);let fe=se&&"preventScrollReset"in se?se.preventScrollReset===!0:void 0,_e=(se&&se.flushSync)===!0,je=Dr({currentLocation:A,nextLocation:N,historyAction:ee});if(je){xi(je,{state:"blocked",location:N,proceed(){xi(je,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),yt(re,se)},reset(){let We=new Map(C.blockers);We.set(je,Pp),De({blockers:We})}});return}return await Nt(ee,N,{submission:D,pendingError:$,preventScrollReset:fe,replace:se&&se.replace,enableViewTransition:se&&se.viewTransition,flushSync:_e})}function lt(){if(xn(),De({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function Nt(re,se,ve){L&&L.abort(),L=null,k=re,ne=(ve&&ve.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(ve&&ve.preventScrollReset)===!0,U=(ve&&ve.enableViewTransition)===!0;let T=s||a,D=ve&&ve.overrideNavigation,$=gc(T,se,u),A=(ve&&ve.flushSync)===!0,N=Xr($,T,se.pathname);if(N.active&&N.matches&&($=N.matches),!$){let{error:ct,notFoundMatches:Ie,route:nt}=_a(se.pathname);me(se,{matches:Ie,loaderData:{},errors:{[nt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&_ae(C.location,se)&&!(ve&&ve.submission&&Ra(ve.submission.formMethod))){me(se,{matches:$},{flushSync:A});return}L=new AbortController;let Q=Ff(e.history,se,L.signal,ve&&ve.submission),ee;if(ve&&ve.pendingError)ee=[mc($).route.id,{type:In.error,error:ve.pendingError}];else if(ve&&ve.submission&&Ra(ve.submission.formMethod)){let ct=await yn(Q,se,ve.submission,$,N.active,{replace:ve.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ie,nt]=ct.pendingActionResult;if(Mo(nt)&&Bx(nt.error)&&nt.error.status===404){L=null,me(se,{matches:ct.matches,loaderData:{},errors:{[Ie]:nt.error}});return}}$=ct.matches||$,ee=ct.pendingActionResult,D=nS(se,ve.submission),A=!1,N.active=!1,Q=Ff(e.history,Q.url,Q.signal)}let{shortCircuited:fe,matches:_e,loaderData:je,errors:We}=await nn(Q,se,$,N.active,D,ve&&ve.submission,ve&&ve.fetcherSubmission,ve&&ve.replace,ve&&ve.initialHydration===!0,A,ee);fe||(L=null,me(se,ir({matches:_e||$},lM(ee),{loaderData:je,errors:We})))}async function yn(re,se,ve,T,D,$){$===void 0&&($={}),xn();let A=Pae(se,ve);if(De({navigation:A},{flushSync:$.flushSync===!0}),D){let ee=await bo(T,se.pathname,re.signal);if(ee.type==="aborted")return{shortCircuited:!0};if(ee.type==="error"){let fe=mc(ee.partialMatches).route.id;return{matches:ee.partialMatches,pendingActionResult:[fe,{type:In.error,error:ee.error}]}}else if(ee.matches)T=ee.matches;else{let{notFoundMatches:fe,error:_e,route:je}=_a(se.pathname);return{matches:fe,pendingActionResult:[je.id,{type:In.error,error:_e}]}}}let N,Q=r0(T,se);if(!Q.route.action&&!Q.route.lazy)N={type:In.error,error:ro(405,{method:re.method,pathname:se.pathname,routeId:Q.route.id})};else if(N=(await tt("action",C,re,[Q],T,null))[Q.route.id],re.signal.aborted)return{shortCircuited:!0};if(xc(N)){let ee;return $&&$.replace!=null?ee=$.replace:ee=oM(N.response.headers.get("Location"),new URL(re.url),u)===C.location.pathname+C.location.search,await Ae(re,N,!0,{submission:ve,replace:ee}),{shortCircuited:!0}}if(sl(N))throw ro(400,{type:"defer-action"});if(Mo(N)){let ee=mc(T,Q.route.id);return($&&$.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[ee.route.id,N]}}return{matches:T,pendingActionResult:[Q.route.id,N]}}async function nn(re,se,ve,T,D,$,A,N,Q,ee,fe){let _e=D||nS(se,$),je=$||A||dM(_e),We=!ne&&(!f.v7_partialHydration||!Q);if(T){if(We){let Ke=te(fe);De(ir({navigation:_e},Ke!==void 0?{actionData:Ke}:{}),{flushSync:ee})}let Ne=await bo(ve,se.pathname,re.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let Ke=mc(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,loaderData:{},errors:{[Ke]:Ne.error}}}else if(Ne.matches)ve=Ne.matches;else{let{error:Ke,notFoundMatches:Ge,route:pe}=_a(se.pathname);return{matches:Ge,loaderData:{},errors:{[pe.id]:Ke}}}}let ct=s||a,[Ie,nt]=nM(e.history,C,ve,je,se,f.v7_partialHydration&&Q===!0,f.v7_skipActionErrorRevalidation,Z,G,q,be,ae,oe,ct,u,fe);if(_t(Ne=>!(ve&&ve.some(Ke=>Ke.route.id===Ne))||Ie&&Ie.some(Ke=>Ke.route.id===Ne)),K=++j,Ie.length===0&&nt.length===0){let Ne=bi();return me(se,ir({matches:ve,loaderData:{},errors:fe&&Mo(fe[1])?{[fe[0]]:fe[1].error}:null},lM(fe),Ne?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ee}),{shortCircuited:!0}}if(We){let Ne={};if(!T){Ne.navigation=_e;let Ke=te(fe);Ke!==void 0&&(Ne.actionData=Ke)}nt.length>0&&(Ne.fetchers=de(nt)),De(Ne,{flushSync:ee})}nt.forEach(Ne=>{sr(Ne.key),Ne.controller&&W.set(Ne.key,Ne.controller)});let bt=()=>nt.forEach(Ne=>sr(Ne.key));L&&L.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,ve,Ie,nt,re);if(re.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",bt),nt.forEach(Ne=>W.delete(Ne.key));let ht=Qv(Ot);if(ht)return await Ae(re,ht.result,!0,{replace:N}),{shortCircuited:!0};if(ht=Qv(gt),ht)return oe.add(ht.key),await Ae(re,ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=sM(C,ve,Ot,fe,nt,gt,we);we.forEach((Ne,Ke)=>{Ne.subscribe(Ge=>{(Ge||Ne.done)&&we.delete(Ke)})}),f.v7_partialHydration&&Q&&C.errors&&(wt=ir({},C.errors,wt));let Qe=bi(),ut=Rr(K),Xe=Qe||ut||nt.length>0;return ir({matches:ve,loaderData:xt,errors:wt},Xe?{fetchers:new Map(C.fetchers)}:{})}function te(re){if(re&&!Mo(re[1]))return{[re[0]]:re[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function de(re){return re.forEach(se=>{let ve=C.fetchers.get(se.key),T=kp(void 0,ve?ve.data:void 0);C.fetchers.set(se.key,T)}),new Map(C.fetchers)}function ge(re,se,ve,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(re);let D=(T&&T.flushSync)===!0,$=s||a,A=PC(C.location,C.matches,u,f.v7_prependBasename,ve,f.v7_relativeSplatPath,se,T?.relative),N=gc($,A,u),Q=Xr(N,$,A);if(Q.active&&Q.matches&&(N=Q.matches),!N){wn(re,se,ro(404,{pathname:A}),{flushSync:D});return}let{path:ee,submission:fe,error:_e}=eM(f.v7_normalizeFormMethod,!0,A,T);if(_e){wn(re,se,_e,{flushSync:D});return}let je=r0(N,ee),We=(T&&T.preventScrollReset)===!0;if(fe&&Ra(fe.formMethod)){ze(re,se,ee,je,N,Q.active,D,We,fe);return}ae.set(re,{routeId:se,path:ee}),Fe(re,se,ee,je,N,Q.active,D,We,fe)}async function ze(re,se,ve,T,D,$,A,N,Q){xn(),ae.delete(re);function ee(he){if(!he.route.action&&!he.route.lazy){let Re=ro(405,{method:Q.formMethod,pathname:ve,routeId:se});return wn(re,se,Re,{flushSync:A}),!0}return!1}if(!$&&ee(T))return;let fe=C.fetchers.get(re);Kt(re,kae(Q,fe),{flushSync:A});let _e=new AbortController,je=Ff(e.history,ve,_e.signal,Q);if($){let he=await bo(D,ve,je.signal);if(he.type==="aborted")return;if(he.type==="error"){wn(re,se,he.error,{flushSync:A});return}else if(he.matches){if(D=he.matches,T=r0(D,ve),ee(T))return}else{wn(re,se,ro(404,{pathname:ve}),{flushSync:A});return}}W.set(re,_e);let We=j,Ie=(await tt("action",C,je,[T],D,re))[T.route.id];if(je.signal.aborted){W.get(re)===_e&&W.delete(re);return}if(f.v7_fetcherPersist&&be.has(re)){if(xc(Ie)||Mo(Ie)){Kt(re,qu(void 0));return}}else{if(xc(Ie))if(W.delete(re),K>We){Kt(re,qu(void 0));return}else return oe.add(re),Kt(re,kp(Q)),Ae(je,Ie,!1,{fetcherSubmission:Q,preventScrollReset:N});if(Mo(Ie)){wn(re,se,Ie.error);return}}if(sl(Ie))throw ro(400,{type:"defer-action"});let nt=C.navigation.location||C.location,bt=Ff(e.history,nt,_e.signal),Ot=s||a,gt=C.navigation.state!=="idle"?gc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++j;Y.set(re,ht);let xt=kp(Q,Ie.data);C.fetchers.set(re,xt);let[wt,Qe]=nM(e.history,C,gt,Q,nt,!1,f.v7_skipActionErrorRevalidation,Z,G,q,be,ae,oe,Ot,u,[T.route.id,Ie]);Qe.filter(he=>he.key!==re).forEach(he=>{let Re=he.key,Oe=C.fetchers.get(Re),Pe=kp(void 0,Oe?Oe.data:void 0);C.fetchers.set(Re,Pe),sr(Re),he.controller&&W.set(Re,he.controller)}),De({fetchers:new Map(C.fetchers)});let ut=()=>Qe.forEach(he=>sr(he.key));_e.signal.addEventListener("abort",ut);let{loaderResults:Xe,fetcherResults:Ne}=await mt(C,gt,wt,Qe,bt);if(_e.signal.aborted)return;_e.signal.removeEventListener("abort",ut),Y.delete(re),W.delete(re),Qe.forEach(he=>W.delete(he.key));let Ke=Qv(Xe);if(Ke)return Ae(bt,Ke.result,!1,{preventScrollReset:N});if(Ke=Qv(Ne),Ke)return oe.add(Ke.key),Ae(bt,Ke.result,!1,{preventScrollReset:N});let{loaderData:Ge,errors:pe}=sM(C,gt,Xe,void 0,Qe,Ne,we);if(C.fetchers.has(re)){let he=qu(Ie.data);C.fetchers.set(re,he)}Rr(ht),C.navigation.state==="loading"&&ht>K?(fn(k,"Expected pending action"),L&&L.abort(),me(C.navigation.location,{matches:gt,loaderData:Ge,errors:pe,fetchers:new Map(C.fetchers)})):(De({errors:pe,loaderData:uM(C.loaderData,Ge,gt,pe),fetchers:new Map(C.fetchers)}),Z=!1)}async function Fe(re,se,ve,T,D,$,A,N,Q){let ee=C.fetchers.get(re);Kt(re,kp(Q,ee?ee.data:void 0),{flushSync:A});let fe=new AbortController,_e=Ff(e.history,ve,fe.signal);if($){let Ie=await bo(D,ve,_e.signal);if(Ie.type==="aborted")return;if(Ie.type==="error"){wn(re,se,Ie.error,{flushSync:A});return}else if(Ie.matches)D=Ie.matches,T=r0(D,ve);else{wn(re,se,ro(404,{pathname:ve}),{flushSync:A});return}}W.set(re,fe);let je=j,ct=(await tt("loader",C,_e,[T],D,re))[T.route.id];if(sl(ct)&&(ct=await _5(ct,_e.signal,!0)||ct),W.get(re)===fe&&W.delete(re),!_e.signal.aborted){if(be.has(re)){Kt(re,qu(void 0));return}if(xc(ct))if(K>je){Kt(re,qu(void 0));return}else{oe.add(re),await Ae(_e,ct,!1,{preventScrollReset:N});return}if(Mo(ct)){wn(re,se,ct.error);return}fn(!sl(ct),"Unhandled fetcher deferred data"),Kt(re,qu(ct.data))}}async function Ae(re,se,ve,T){let{submission:D,fetcherSubmission:$,preventScrollReset:A,replace:N}=T===void 0?{}:T;se.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let Q=se.response.headers.get("Location");fn(Q,"Expected a Location header on the redirect Response"),Q=oM(Q,new URL(re.url),u);let ee=Y0(C.location,Q,{_isRedirect:!0});if(n){let Ie=!1;if(se.response.headers.has("X-Remix-Reload-Document"))Ie=!0;else if(w5.test(Q)){const nt=e.history.createURL(Q);Ie=nt.origin!==t.location.origin||Mh(nt.pathname,u)==null}if(Ie){N?t.location.replace(Q):t.location.assign(Q);return}}L=null;let fe=N===!0||se.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:_e,formAction:je,formEncType:We}=C.navigation;!D&&!$&&_e&&je&&We&&(D=dM(C.navigation));let ct=D||$;if(lae.has(se.response.status)&&ct&&Ra(ct.formMethod))await Nt(fe,ee,{submission:ir({},ct,{formAction:Q}),preventScrollReset:A||M,enableViewTransition:ve?U:void 0});else{let Ie=nS(ee,D);await Nt(fe,ee,{overrideNavigation:Ie,fetcherSubmission:$,preventScrollReset:A||M,enableViewTransition:ve?U:void 0})}}async function tt(re,se,ve,T,D,$){let A,N={};try{A=await vae(l,re,se,ve,T,D,$,o,i)}catch(Q){return T.forEach(ee=>{N[ee.route.id]={type:In.error,error:Q}}),N}for(let[Q,ee]of Object.entries(A))if(Sae(ee)){let fe=ee.result;N[Q]={type:In.redirect,response:xae(fe,ve,Q,D,u,f.v7_relativeSplatPath)}}else N[Q]=await bae(ee);return N}async function mt(re,se,ve,T,D){let $=re.matches,A=tt("loader",re,D,ve,se,null),N=Promise.all(T.map(async fe=>{if(fe.matches&&fe.match&&fe.controller){let je=(await tt("loader",re,Ff(e.history,fe.path,fe.controller.signal),[fe.match],fe.matches,fe.key))[fe.match.route.id];return{[fe.key]:je}}else return Promise.resolve({[fe.key]:{type:In.error,error:ro(404,{pathname:fe.path})}})})),Q=await A,ee=(await N).reduce((fe,_e)=>Object.assign(fe,_e),{});return await Promise.all([Oae(se,Q,D.signal,$,re.loaderData),Aae(se,ee,T)]),{loaderResults:Q,fetcherResults:ee}}function xn(){Z=!0,G.push(..._t()),ae.forEach((re,se)=>{W.has(se)&&q.add(se),sr(se)})}function Kt(re,se,ve){ve===void 0&&(ve={}),C.fetchers.set(re,se),De({fetchers:new Map(C.fetchers)},{flushSync:(ve&&ve.flushSync)===!0})}function wn(re,se,ve,T){T===void 0&&(T={});let D=mc(C.matches,se);br(re),De({errors:{[D.route.id]:ve},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(re){return f.v7_fetcherPersist&&(ue.set(re,(ue.get(re)||0)+1),be.has(re)&&be.delete(re)),C.fetchers.get(re)||cae}function br(re){let se=C.fetchers.get(re);W.has(re)&&!(se&&se.state==="loading"&&Y.has(re))&&sr(re),ae.delete(re),Y.delete(re),oe.delete(re),be.delete(re),q.delete(re),C.fetchers.delete(re)}function yi(re){if(f.v7_fetcherPersist){let se=(ue.get(re)||0)-1;se<=0?(ue.delete(re),be.add(re)):ue.set(re,se)}else br(re);De({fetchers:new Map(C.fetchers)})}function sr(re){let se=W.get(re);se&&(se.abort(),W.delete(re))}function si(re){for(let se of re){let ve=Ii(se),T=qu(ve.data);C.fetchers.set(se,T)}}function bi(){let re=[],se=!1;for(let ve of oe){let T=C.fetchers.get(ve);fn(T,"Expected fetcher: "+ve),T.state==="loading"&&(oe.delete(ve),re.push(ve),se=!0)}return si(re),se}function Rr(re){let se=[];for(let[ve,T]of Y)if(T0}function Xi(re,se){let ve=C.blockers.get(re)||Pp;return He.get(re)!==se&&He.set(re,se),ve}function yo(re){C.blockers.delete(re),He.delete(re)}function xi(re,se){let ve=C.blockers.get(re)||Pp;fn(ve.state==="unblocked"&&se.state==="blocked"||ve.state==="blocked"&&se.state==="blocked"||ve.state==="blocked"&&se.state==="proceeding"||ve.state==="blocked"&&se.state==="unblocked"||ve.state==="proceeding"&&se.state==="unblocked","Invalid blocker state transition: "+ve.state+" -> "+se.state);let T=new Map(C.blockers);T.set(re,se),De({blockers:T})}function Dr(re){let{currentLocation:se,nextLocation:ve,historyAction:T}=re;if(He.size===0)return;He.size>1&&zc(!1,"A router only supports one blocker at a time");let D=Array.from(He.entries()),[$,A]=D[D.length-1],N=C.blockers.get($);if(!(N&&N.state==="proceeding")&&A({currentLocation:se,nextLocation:ve,historyAction:T}))return $}function _a(re){let se=ro(404,{pathname:re}),ve=s||a,{matches:T,route:D}=cM(ve);return _t(),{notFoundMatches:T,route:D,error:se}}function _t(re){let se=[];return we.forEach((ve,T)=>{(!re||re(T))&&(ve.cancel(),se.push(T),we.delete(T))}),se}function hn(re,se,ve){if(m=re,b=se,v=ve||null,!w&&C.navigation===tS){w=!0;let T=ur(C.location,C.matches);T!=null&&De({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(re,se){return v&&v(re,se.map(T=>zoe(T,C.loaderData)))||re.key}function qn(re,se){if(m&&b){let ve=_n(re,se);m[ve]=b()}}function ur(re,se){if(m){let ve=_n(re,se),T=m[ve];if(typeof T=="number")return T}return null}function Xr(re,se,ve){if(c)if(re){if(Object.keys(re[0].params).length>0)return{active:!0,matches:q1(se,ve,u,!0)}}else return{active:!0,matches:q1(se,ve,u,!0)||[]};return{active:!1,matches:null}}async function bo(re,se,ve){if(!c)return{type:"success",matches:re};let T=re;for(;;){let D=s==null,$=s||a,A=o;try{await c({path:se,matches:T,patch:(ee,fe)=>{ve.aborted||iM(ee,fe,$,A,i)}})}catch(ee){return{type:"error",error:ee,partialMatches:T}}finally{D&&!ve.aborted&&(a=[...a])}if(ve.aborted)return{type:"aborted"};let N=gc($,se,u);if(N)return{type:"success",matches:N};let Q=q1($,se,u,!0);if(!Q||T.length===Q.length&&T.every((ee,fe)=>ee.route.id===Q[fe].route.id))return{type:"success",matches:null};T=Q}}function Zl(re){o={},s=Ty(re,i,void 0,o)}function Sf(re,se){let ve=s==null;iM(re,se,s||a,o,i),ve&&(a=[...a],De({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:it,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ge,revalidate:lt,createHref:re=>e.history.createHref(re),encodeLocation:re=>e.history.encodeLocation(re),getFetcher:Ii,deleteFetcher:yi,dispose:ke,getBlocker:Xi,deleteBlocker:yo,patchRoutes:Sf,_internalFetchControllers:W,_internalActiveDeferreds:we,_internalSetRoutes:Zl},E}function hae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function PC(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=x5(i||".",b5(u,o),Mh(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=S5(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Uc(c)}function eM(e,t,n,r){if(!r||!hae(r))return{path:n};if(r.formMethod&&!Eae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=LF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ra(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` `},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Ra(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}fn(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=TC(r.formData),l=r.formData;else if(r.body instanceof FormData)u=TC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=aM(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=aM(u)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ra(c.formMethod))return{path:n,submission:c};let f=Pu(n);return t&&f.search&&S5(f.search)&&u.append("index",""),f.search="?"+u,{path:Uc(f),submission:c}}function tM(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function nM(e,t,n,r,i,o,a,s,u,l,c,f,h,p,m,v){let b=v?Mo(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=tM(n,Object.keys(t.errors)[0],!0):v&&Mo(v[1])&&(S=tM(n,v[0]));let O=v?v[1].statusCode:void 0,E=a&&O&&O>=400,C=S.filter((M,L)=>{let{route:U}=M;if(U.lazy)return!0;if(U.loader==null)return!1;if(o)return kC(U,t.loaderData,t.errors);if(pae(t.loaderData,t.matches[L],M)||u.some(ne=>ne===M.route.id))return!0;let H=t.matches[L],V=M;return rM(M,ir({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:V.params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||IF(H,V)}))}),k=[];return f.forEach((M,L)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(L))return;let U=gc(p,M.path,m);if(!U){k.push({key:L,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(L),V=r0(U,M.path),ne=!1;h.has(L)?ne=!1:l.has(L)?(l.delete(L),ne=!0):H&&H.state!=="idle"&&H.data===void 0?ne=s:ne=rM(V,ir({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s})),ne&&k.push({key:L,routeId:M.routeId,path:M.path,matches:U,match:V,controller:new AbortController})}),[C,k]}function kC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function pae(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function IF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function rM(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function iM(e,t,n,r,i){var o;let a;if(e){let l=r[e];fn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let s=t.filter(l=>!a.some(c=>NF(l,c))),u=Ty(s,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...u)}function NF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>NF(n,o))}):!1}async function gae(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];fn(i,"No route found in manifest");let o={};for(let a in r){let u=i[a]!==void 0&&a!=="hasErrorBoundary";zc(!u,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!joe.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,ir({},t(i),{lazy:void 0}))}async function mae(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function vae(e,t,n,r,i,o,a,s,u,l){let c=o.map(p=>p.route.lazy?gae(p.route,u,s):void 0),f=o.map((p,m)=>{let v=c[m],b=i.some(x=>x.route.id===p.route.id);return ir({},p,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?yae(t,r,p,v,x,l):Promise.resolve({type:In.data,result:void 0}))})}),h=await e({matches:f,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function yae(e,t,n,r,i,o){let a,s,u=l=>{let c,f=new Promise((m,v)=>c=v);s=()=>c(),t.signal.addEventListener("abort",s);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let l=n.route[e];if(r)if(l){let c,[f]=await Promise.all([u(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=f}else if(await r,l=n.route[e],l)a=await u(l);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw ro(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:In.data,result:void 0};else if(l)a=await u(l);else{let c=new URL(t.url),f=c.pathname+c.search;throw ro(404,{pathname:f})}fn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:In.error,result:l}}finally{s&&t.signal.removeEventListener("abort",s)}return a}async function bae(e){let{result:t,type:n}=e;if(FF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:In.error,error:c}}return n===In.error?{type:In.error,error:new My(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:In.data,data:l,statusCode:t.status,headers:t.headers}}if(n===In.error){if(fM(t)){var r;if(t.data instanceof Error){var i;return{type:In.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new My(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:In.error,error:t,statusCode:Bx(t)?t.status:void 0}}if(Cae(t)){var o,a;return{type:In.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(fM(t)){var s,u;return{type:In.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:In.data,data:t}}function xae(e,t,n,r,i,o){let a=e.headers.get("Location");if(fn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!w5.test(a)){let s=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=PC(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function oM(e,t,n){if(w5.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mh(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Ff(e,t,n,r){let i=e.createURL(LF(t)).toString(),o={signal:n};if(r&&Ra(r.formMethod)){let{formMethod:a,formEncType:s}=r;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=TC(r.formData):o.body=r.formData}return new Request(i,o)}function TC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function aM(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function wae(e,t,n,r,i){let o={},a=null,s,u=!1,l={},c=n&&Mo(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(fn(!xc(p),"Cannot handle redirect results in processLoaderData"),Mo(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),a=a||{};{let v=mc(e,h);a[v.route.id]==null&&(a[v.route.id]=m)}o[h]=void 0,u||(u=!0,s=Bx(p.error)?p.error.status:500),p.headers&&(l[h]=p.headers)}else sl(p)?(r.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function sM(e,t,n,r,i,o,a){let{loaderData:s,errors:u}=wae(t,n,r,a);return i.forEach(l=>{let{key:c,match:f,controller:h}=l,p=o[c];if(fn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Mo(p)){let m=mc(e.matches,f?.route.id);u&&u[m.route.id]||(u=ir({},u,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(xc(p))fn(!1,"Unhandled fetcher revalidation redirect");else if(sl(p))fn(!1,"Unhandled fetcher deferred data");else{let m=qu(p.data);e.fetchers.set(c,m)}}),{loaderData:s,errors:u}}function uM(e,t,n,r){let i=ir({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function lM(e){return e?Mo(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function mc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function cM(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ro(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new My(e||500,s,new Error(u),!0)}function Qv(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(xc(i))return{key:r,result:i}}}function LF(e){let t=typeof e=="string"?Pu(e):e;return Uc(ir({},t,{hash:""}))}function _ae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Sae(e){return FF(e.result)&&uae.has(e.result.status)}function sl(e){return e.type===In.deferred}function Mo(e){return e.type===In.error}function xc(e){return(e&&e.type)===In.redirect}function fM(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Cae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function FF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Eae(e){return sae.has(e.toLowerCase())}function Ra(e){return oae.has(e.toLowerCase())}async function Oae(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===s);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),f=c!=null&&!IF(c,l)&&(i&&i[l.route.id])!==void 0;sl(u)&&f&&await _5(u,n,!1).then(h=>{h&&(t[s]=h)})}}async function Aae(e,t,n){for(let r=0;rl?.route.id===o)&&sl(s)&&(fn(a,"Expected an AbortController for revalidating fetcher deferred result"),await _5(s,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function _5(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:In.data,data:e.deferredData.unwrappedData}}catch(i){return{type:In.error,error:i}}return{type:In.data,data:e.deferredData.data}}}function S5(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function r0(e,t){let n=typeof t=="string"?Pu(t).search:t.search;if(e[e.length-1].route.index&&S5(n||""))return e[e.length-1];let r=RF(e);return r[r.length-1]}function dM(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function nS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function qu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Tae(e,t){try{let n=e.sessionStorage.getItem($F);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Mae(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem($F,JSON.stringify(n))}catch(r){zc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.28.1 * @@ -73,13 +73,13 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vm=y;function vse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yse=typeof Object.is=="function"?Object.is:vse,bse=vm.useSyncExternalStore,xse=vm.useRef,wse=vm.useEffect,_se=vm.useMemo,Sse=vm.useDebugValue;qF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=xse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=_se(function(){function u(p){if(!l){if(l=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var m=a.value;if(i(m,p))return f=m}return f=p}if(m=f,yse(c,p))return m;var v=r(p);return i!==void 0&&i(m,v)?(c=p,m):(c=p,f=v)}var l=!1,c,f,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,i]);var s=bse(e,o[0],o[1]);return wse(function(){a.hasValue=!0,a.value=s},[s]),Sse(s),s};KF.exports=qF;var Cse=KF.exports;function Ese(e){e()}function Ose(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Ese(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var bM={notify(){},get:()=>[]};function Ase(e,t){let n,r=bM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Ose())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=bM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var Pse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kse=Pse(),Tse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Mse=Tse(),Rse=()=>kse||Mse?y.useLayoutEffect:y.useEffect,Dse=Rse(),$se=Symbol.for("react-redux-context"),Ise=typeof globalThis<"u"?globalThis:{};function Nse(){if(!y.createContext)return{};const e=Ise[$se]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Ol=Nse();function Lse(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Ase(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Dse(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Ol;return y.createElement(s.Provider,{value:o},t)}var UGe=Lse;function E5(e=Ol){return function(){return y.useContext(e)}}var GF=E5();function YF(e=Ol){const t=e===Ol?GF:E5(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Fse=YF();function jse(e=Ol){const t=e===Ol?Fse:YF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var VGe=jse(),Bse=(e,t)=>e===t;function zse(e=Ol){const t=e===Ol?GF:E5(e),n=(r,i={})=>{const{equalityFn:o=Bse}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Cse.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var WGe=zse();function xM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ux(...e){return t=>{let n=!1;const r=e.map(i=>{const o=xM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Use);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return I.jsx(RC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return I.jsx(RC,{...r,ref:t,children:n})});Al.displayName="Slot";var RC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Wse(n);return y.cloneElement(n,{...Vse(r,n.props),ref:t?Ux(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});RC.displayName="SlotClone";var O5=({children:e})=>I.jsx(I.Fragment,{children:e});function Use(e){return y.isValidElement(e)&&e.type===O5}function Vse(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Wse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ZF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,_M=dn,HGe=(e,t)=>n=>{var r;if(t?.variants==null)return _M(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=wM(c)||wM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return _M(e,a,u,n?.class,n?.className)},A5="-",Hse=e=>{const t=qse(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(A5);return s[0]===""&&s.length!==1&&s.shift(),XF(s,t)||Kse(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},XF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?XF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(A5);return t.validators.find(({validator:a})=>a(o))?.classGroupId},SM=/^\[(.+)\]$/,Kse=e=>{if(SM.test(e)){const t=SM.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},qse=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Yse(Object.entries(e.classGroups),n).forEach(([o,a])=>{DC(a,r,o,t)}),r},DC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:CM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Gse(i)){DC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{DC(a,CM(t,o),n,r)})})},CM=(e,t)=>{let n=e;return t.split(A5).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Gse=e=>e.isThemeGetter,Yse=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,Zse=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},QF="!",Xse=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},Qse=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Jse=e=>({cache:Zse(e.cacheSize),parseClassName:Xse(e),...Hse(e)}),eue=/\s+/,tue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(eue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=Qse(c).join(":"),w=f?b+QF:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function nue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=Jse(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=tue(u,n);return i(u,c),c}return function(){return o(nue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ej=/^\[(?:([a-z-]+):)?(.+)\]$/i,iue=/^\d+\/\d+$/,oue=new Set(["px","full","screen"]),aue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=e=>Ed(e)||oue.has(e)||iue.test(e),Wu=e=>Rh(e,"length",yue),Ed=e=>!!e&&!Number.isNaN(Number(e)),rS=e=>Rh(e,"number",Ed),Mp=e=>!!e&&Number.isInteger(Number(e)),fue=e=>e.endsWith("%")&&Ed(e.slice(0,-1)),Xt=e=>ej.test(e),Hu=e=>aue.test(e),due=new Set(["length","size","percentage"]),hue=e=>Rh(e,due,tj),pue=e=>Rh(e,"position",tj),gue=new Set(["image","url"]),mue=e=>Rh(e,gue,xue),vue=e=>Rh(e,"",bue),Rp=()=>!0,Rh=(e,t,n)=>{const r=ej.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yue=e=>sue.test(e)&&!uue.test(e),tj=()=>!1,bue=e=>lue.test(e),xue=e=>cue.test(e),wue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),L=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Xt,t],V=()=>[Xt,t],ne=()=>["",Ks,Wu],Z=()=>["auto",Ed,Xt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Xt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ed,Xt];return{cacheSize:500,separator:":",theme:{colors:[Rp],spacing:[Ks,Wu],blur:["none","",Hu,Xt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Hu,Xt],borderSpacing:V(),borderWidth:ne(),contrast:oe(),grayscale:K(),hueRotate:oe(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[fue,Wu],inset:H(),margin:H(),opacity:oe(),padding:V(),saturate:oe(),scale:oe(),sepia:K(),skew:oe(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[Hu]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Xt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mp,Xt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Mp,Xt]}],"grid-cols":[{"grid-cols":[Rp]}],"col-start-end":[{col:["auto",{span:["full",Mp,Xt]},Xt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Rp]}],"row-start-end":[{row:["auto",{span:[Mp,Xt]},Xt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[Hu]},Hu]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rS]}],"font-family":[{font:[Rp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Xt]}],"line-clamp":[{"line-clamp":["none",Ed,rS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ks,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ks,Wu]}],"underline-offset":[{"underline-offset":["auto",Ks,Xt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),pue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Ks,Xt]}],"outline-w":[{outline:[Ks,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ks,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hu,vue]}],"shadow-color":[{shadow:[Rp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Hu,Xt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Mp,Xt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ks,Wu,rS]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},KGe=rue(wue);var nj={exports:{}},_ue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Sue=_ue,Cue=Sue;function rj(){}function ij(){}ij.resetWarningCache=rj;var Eue=function(){function e(r,i,o,a,s,u){if(u!==Cue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ij,resetWarningCache:rj};return n.PropTypes=n,n};nj.exports=Eue();var Oue=nj.exports;const Mt=Dn(Oue);var Aue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Pue=Object.defineProperty,kue=Object.defineProperties,Tue=Object.getOwnPropertyDescriptors,$y=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,aj=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?Pue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OM=(e,t)=>{for(var n in t||(t={}))oj.call(t,n)&&EM(e,n,t[n]);if($y)for(var n of $y(t))aj.call(t,n)&&EM(e,n,t[n]);return e},Mue=(e,t)=>kue(e,Tue(t)),Rue=(e,t)=>{var n={};for(var r in e)oj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$y)for(var r of $y(e))t.indexOf(r)<0&&aj.call(e,r)&&(n[r]=e[r]);return n},En=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Rue(a,["color","size","stroke","children"]);return y.createElement("svg",OM(Mue(OM({ref:o},Aue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},qGe=En("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),GGe=En("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),YGe=En("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),ZGe=En("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),XGe=En("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),QGe=En("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),JGe=En("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),eYe=En("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),tYe=En("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),nYe=En("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),rYe=En("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),iYe=En("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),oYe=En("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),aYe=En("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),sYe=En("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),uYe=En("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),lYe=En("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),cYe=En("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),fYe=En("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),dYe=En("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),hYe=En("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),pYe=En("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),gYe=En("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),mYe=En("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),vYe=En("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),yYe=En("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),bYe=En("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),xYe=En("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),wYe=En("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),_Ye=En("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),SYe=En("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Due=typeof Symbol=="function"&&Symbol.observable||"@@observable",AM=Due,iS=()=>Math.random().toString(36).substring(7).split("").join("."),$ue={INIT:`@@redux/INIT${iS()}`,REPLACE:`@@redux/REPLACE${iS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${iS()}`},Iy=$ue;function P5(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function sj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(sj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!P5(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:Iy.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[AM](){return this}}}return h({type:Iy.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[AM]:m}}function Iue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Iy.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:Iy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Nue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function Ny(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Lue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=Ny(...s)(i.dispatch),{...i,dispatch:o}}}function Fue(e){return P5(e)&&"type"in e&&typeof e.type=="string"}var uj=Symbol.for("immer-nothing"),PM=Symbol.for("immer-draftable"),zo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[zo]}function yu(e){return e?lj(e)||Array.isArray(e)||!!e[PM]||!!e.constructor?.[PM]||Wx(e)||Hx(e):!1}var jue=Object.prototype.constructor.toString();function lj(e){if(!e||typeof e!="object")return!1;const t=Kd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===jue}function Ly(e,t){Vx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Vx(e){const t=e[zo];return t?t.type_:Array.isArray(e)?1:Wx(e)?2:Hx(e)?3:0}function $C(e,t){return Vx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cj(e,t,n){const r=Vx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wx(e){return e instanceof Map}function Hx(e){return e instanceof Set}function lc(e){return e.copy_||e.base_}function IC(e,t){if(Wx(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&lj(e))return Kd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=zue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>k5(r,!0))),e}function zue(){Fa(2)}function Kx(e){return Object.isFrozen(e)}var Uue={};function Wc(e){const t=Uue[e];return t||Fa(0,e),t}var X0;function fj(){return X0}function Vue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function NC(e){LC(e),e.drafts_.forEach(Wue),e.drafts_=null}function LC(e){e===X0&&(X0=e.parent_)}function TM(e){return X0=Vue(X0,e)}function Wue(e){const t=e[zo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function MM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zo].modified_&&(NC(t),Fa(4)),yu(e)&&(e=Fy(t,e),t.parent_||jy(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[zo].base_,e,t.patches_,t.inversePatches_)):e=Fy(t,n,[]),NC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uj?e:void 0}function Fy(e,t,n){if(Kx(t))return t;const r=t[zo];if(!r)return Ly(t,(i,o)=>RM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return jy(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),Ly(o,(s,u)=>RM(e,r,i,s,u,n,a)),jy(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function RM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!$C(t.assigned_,r)?o.concat(r):void 0,u=Fy(e,i,s);if(cj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(yu(i)&&!Kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fy(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&jy(e,i)}}function jy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&k5(t,n)}function Hue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=T5;n&&(i=[r],o=Q0);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var T5={get(e,t){if(t===zo)return e;const n=lc(e);if(!$C(n,t))return Kue(e,n,t);const r=n[t];return e.finalized_||!yu(r)?r:r===oS(e.base_,t)?(aS(e),e.copy_[t]=jC(r,e)):r},has(e,t){return t in lc(e)},ownKeys(e){return Reflect.ownKeys(lc(e))},set(e,t,n){const r=dj(lc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=oS(lc(e),t),o=i?.[zo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bue(n,i)&&(n!==void 0||$C(e.base_,t)))return!0;aS(e),FC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aS(e),FC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Kd(e.base_)},setPrototypeOf(){Fa(12)}},Q0={};Ly(T5,(e,t)=>{Q0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q0.deleteProperty=function(e,t){return Q0.set.call(this,e,t,void 0)};Q0.set=function(e,t,n){return T5.set.call(this,e[0],t,n,e[0])};function oS(e,t){const n=e[zo];return(n?lc(n):e)[t]}function Kue(e,t,n){const r=dj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function dj(e,t){if(!(t in e))return;let n=Kd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kd(n)}}function FC(e){e.modified_||(e.modified_=!0,e.parent_&&FC(e.parent_))}function aS(e){e.copy_||(e.copy_=IC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var que=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(yu(t)){const o=TM(this),a=jC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?NC(o):LC(o)}return kM(o,r),MM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===uj&&(i=void 0),this.autoFreeze_&&k5(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yu(e)||Fa(8),Vc(e)&&(e=Gue(e));const t=TM(this),n=jC(e,void 0);return n[zo].isManual_=!0,LC(t),n}finishDraft(e,t){const n=e&&e[zo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return kM(r,t),MM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jC(e,t){const n=Wx(e)?Wc("MapSet").proxyMap_(e,t):Hx(e)?Wc("MapSet").proxySet_(e,t):Hue(e,t);return(t?t.scope_:fj()).drafts_.push(n),n}function Gue(e){return Vc(e)||Fa(10,e),hj(e)}function hj(e){if(!yu(e)||Kx(e))return e;const t=e[zo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=IC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=IC(e,!0);return Ly(n,(r,i)=>{cj(n,r,hj(i))}),t&&(t.finalized_=!1),n}var Uo=new que,pj=Uo.produce;Uo.produceWithPatches.bind(Uo);Uo.setAutoFreeze.bind(Uo);Uo.setUseStrictShallowCopy.bind(Uo);Uo.applyPatches.bind(Uo);Uo.createDraft.bind(Uo);Uo.finishDraft.bind(Uo);function Yue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Zue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Xue(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var DM=e=>Array.isArray(e)?e:[e];function Que(e){const t=Array.isArray(e[0])?e[0]:e;return Xue(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Jue(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Jv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function rle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Yue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=gj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=DM(h),w=DM(m),x=Que(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=Jue(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var ile=rle(gj),ole=Object.assign((e,t=ile)=>{Zue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>ole});function mj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var ale=mj(),sle=mj,ule=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ny:Ny.apply(null,arguments)},lle=e=>e&&typeof e.match=="function";function b0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Fue(r)&&r.type===e,n}var vj=class i0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,i0.prototype)}static get[Symbol.species](){return i0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new i0(...t[0].concat(this)):new i0(...t.concat(this))}};function IM(e){return yu(e)?pj(e,()=>{}):e}function NM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function cle(e){return typeof e=="boolean"}var fle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new vj;return n&&(cle(n)?a.push(ale):a.push(sle(n.extraArgument))),a},dle="RTK_autoBatch",LM=e=>t=>{setTimeout(t,e)},hle=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:LM(10):e.type==="callback"?e.queueNotification:LM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[dle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},ple=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new vj(e);return r&&i.push(hle(typeof r=="object"?r:void 0)),i};function CYe(e){const t=fle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(P5(n))s=Nue(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=Ny;i&&(l=ule({trace:!1,...typeof i=="object"&&i}));const c=Lue(...u),f=ple(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return sj(s,o,p)}function yj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function gle(e){return typeof e=="function"}function mle(e,t){let[n,r,i]=yj(t),o;if(gle(e))o=()=>IM(e());else{const s=IM(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(yu(c))return pj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var vle=(e,t)=>lle(e)?e.match(t):e(t);function yle(...e){return t=>e.some(n=>vle(n,t))}var ble="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xle=(e=21)=>{let t="",n=e;for(;n--;)t+=ble[Math.random()*64|0];return t},wle=["name","message","stack","code"],sS=class{constructor(e,t){this.payload=e,this.meta=t}_type},FM=class{constructor(e,t){this.payload=e,this.meta=t}_type},_le=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of wle)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},EYe=(()=>{function e(t,n,r){const i=b0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=b0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=b0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||_le)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):xle(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Cle(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new sS(C,k),fulfillWithValue:(C,k)=>new FM(C,k)})).then(C=>{if(C instanceof sS)throw C;return C instanceof FM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof sS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Sle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:yle(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Sle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Cle(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ele=Symbol.for("rtk-slice-createasyncthunk");function Ole(e,t){return`${e}/${t}`}function Ale({creators:e}={}){const t=e?.asyncThunk?.[Ele];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(kle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:Ole(i,x),createNotation:typeof r.reducers=="function"};Mle(S)?Dle(O,S,l,t):Tle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?yj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return mle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=NM(h,S,()=>new WeakMap);return NM(k,C,()=>{const M={};for(const[L,U]of Object.entries(r.selectors??{}))M[L]=Ple(U,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function Ple(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var OYe=Ale();function kle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Tle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Rle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?b0(e,a):b0(e))}function Mle(e){return e._reducerDefinitionType==="asyncThunk"}function Rle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dle({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||e1,pending:s||e1,rejected:u||e1,settled:l||e1})}function e1(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function bj(e,t){return function(){return e.apply(t,arguments)}}const{toString:$le}=Object.prototype,{getPrototypeOf:M5}=Object,qx=(e=>t=>{const n=$le.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>qx(t)===e),Gx=e=>t=>typeof t===e,{isArray:Dh}=Array,J0=Gx("undefined");function Ile(e){return e!==null&&!J0(e)&&e.constructor!==null&&!J0(e.constructor)&&No(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xj=ts("ArrayBuffer");function Nle(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xj(e.buffer),t}const Lle=Gx("string"),No=Gx("function"),wj=Gx("number"),Yx=e=>e!==null&&typeof e=="object",Fle=e=>e===!0||e===!1,G1=e=>{if(qx(e)!=="object")return!1;const t=M5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jle=ts("Date"),Ble=ts("File"),zle=ts("Blob"),Ule=ts("FileList"),Vle=e=>Yx(e)&&No(e.pipe),Wle=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||No(e.append)&&((t=qx(e))==="formdata"||t==="object"&&No(e.toString)&&e.toString()==="[object FormData]"))},Hle=ts("URLSearchParams"),[Kle,qle,Gle,Yle]=["ReadableStream","Request","Response","Headers"].map(ts),Zle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ym(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sj=e=>!J0(e)&&e!==wc;function BC(){const{caseless:e}=Sj(this)&&this||{},t={},n=(r,i)=>{const o=e&&_j(t,i)||i;G1(t[o])&&G1(r)?t[o]=BC(t[o],r):G1(r)?t[o]=BC({},r):Dh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ym(t,(i,o)=>{n&&No(i)?e[o]=bj(i,n):e[o]=i},{allOwnKeys:r}),e),Qle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ece=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&M5(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},nce=e=>{if(!e)return null;if(Dh(e))return e;let t=e.length;if(!wj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rce=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&M5(Uint8Array)),ice=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},oce=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ace=ts("HTMLFormElement"),sce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uce=ts("RegExp"),Cj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ym(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},lce=e=>{Cj(e,(t,n)=>{if(No(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(No(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dh(e)?r(e):r(String(e).split(t)),n},fce=()=>{},dce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uS="abcdefghijklmnopqrstuvwxyz",BM="0123456789",Ej={DIGIT:BM,ALPHA:uS,ALPHA_DIGIT:uS+uS.toUpperCase()+BM},hce=(e=16,t=Ej.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pce(e){return!!(e&&No(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gce=e=>{const t=new Array(10),n=(r,i)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Dh(r)?[]:{};return ym(r,(a,s)=>{const u=n(a,i+1);!J0(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},mce=ts("AsyncFunction"),vce=e=>e&&(Yx(e)||No(e))&&No(e.then)&&No(e.catch),Oj=((e,t)=>e?setImmediate:t?((n,r)=>(wc.addEventListener("message",({source:i,data:o})=>{i===wc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),wc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",No(wc.postMessage)),yce=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||Oj,xe={isArray:Dh,isArrayBuffer:xj,isBuffer:Ile,isFormData:Wle,isArrayBufferView:Nle,isString:Lle,isNumber:wj,isBoolean:Fle,isObject:Yx,isPlainObject:G1,isReadableStream:Kle,isRequest:qle,isResponse:Gle,isHeaders:Yle,isUndefined:J0,isDate:jle,isFile:Ble,isBlob:zle,isRegExp:uce,isFunction:No,isStream:Vle,isURLSearchParams:Hle,isTypedArray:rce,isFileList:Ule,forEach:ym,merge:BC,extend:Xle,trim:Zle,stripBOM:Qle,inherits:Jle,toFlatObject:ece,kindOf:qx,kindOfTest:ts,endsWith:tce,toArray:nce,forEachEntry:ice,matchAll:oce,isHTMLForm:ace,hasOwnProperty:jM,hasOwnProp:jM,reduceDescriptors:Cj,freezeMethods:lce,toObjectSet:cce,toCamelCase:sce,noop:fce,toFiniteNumber:dce,findKey:_j,global:wc,isContextDefined:Sj,ALPHABET:Ej,generateString:hce,isSpecCompliantForm:pce,toJSONObject:gce,isAsyncFn:mce,isThenable:vce,setImmediate:Oj,asap:yce};function Kt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}xe.inherits(Kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xe.toJSONObject(this.config),code:this.code,status:this.status}}});const Aj=Kt.prototype,Pj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pj[e]={value:e}});Object.defineProperties(Kt,Pj);Object.defineProperty(Aj,"isAxiosError",{value:!0});Kt.from=(e,t,n,r,i,o)=>{const a=Object.create(Aj);return xe.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Kt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const bce=null;function zC(e){return xe.isPlainObject(e)||xe.isArray(e)}function kj(e){return xe.endsWith(e,"[]")?e.slice(0,-2):e}function zM(e,t,n){return e?e.concat(t).map(function(i,o){return i=kj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function xce(e){return xe.isArray(e)&&!e.some(zC)}const wce=xe.toFlatObject(xe,{},null,function(t){return/^is[A-Z]/.test(t)});function Zx(e,t,n){if(!xe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=xe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!xe.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&xe.isSpecCompliantForm(t);if(!xe.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(xe.isDate(m))return m.toISOString();if(!u&&xe.isBlob(m))throw new Kt("Blob is not supported. Use a Buffer instead.");return xe.isArrayBuffer(m)||xe.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(xe.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(xe.isArray(m)&&xce(m)||(xe.isFileList(m)||xe.endsWith(v,"[]"))&&(w=xe.toArray(m)))return v=kj(v),w.forEach(function(S,O){!(xe.isUndefined(S)||S===null)&&t.append(a===!0?zM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return zC(m)?!0:(t.append(zM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(wce,{defaultVisitor:c,convertValue:l,isVisitable:zC});function p(m,v){if(!xe.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),xe.forEach(m,function(w,x){(!(xe.isUndefined(w)||w===null)&&i.call(t,w,xe.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!xe.isObject(e))throw new TypeError("data must be an object");return p(e),t}function UM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function R5(e,t){this._pairs=[],e&&Zx(e,this,t)}const Tj=R5.prototype;Tj.append=function(t,n){this._pairs.push([t,n])};Tj.toString=function(t){const n=t?function(r){return t.call(this,r,UM)}:UM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mj(e,t,n){if(!t)return e;const r=n&&n.encode||_ce;xe.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=xe.isURLSearchParams(t)?t.toString():new R5(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class VM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){xe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Rj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sce=typeof URLSearchParams<"u"?URLSearchParams:R5,Cce=typeof FormData<"u"?FormData:null,Ece=typeof Blob<"u"?Blob:null,Oce={isBrowser:!0,classes:{URLSearchParams:Sce,FormData:Cce,Blob:Ece},protocols:["http","https","file","blob","url","data"]},D5=typeof window<"u"&&typeof document<"u",UC=typeof navigator=="object"&&navigator||void 0,Ace=D5&&(!UC||["ReactNative","NativeScript","NS"].indexOf(UC.product)<0),Pce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kce=D5&&window.location.href||"http://localhost",Tce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:D5,hasStandardBrowserEnv:Ace,hasStandardBrowserWebWorkerEnv:Pce,navigator:UC,origin:kce},Symbol.toStringTag,{value:"Module"})),Mi={...Tce,...Oce};function Mce(e,t){return Zx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&xe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Rce(e){return xe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&xe.isArray(i)?i.length:a,u?(xe.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!xe.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&xe.isArray(i[a])&&(i[a]=Dce(i[a])),!s)}if(xe.isFormData(e)&&xe.isFunction(e.entries)){const n={};return xe.forEachEntry(e,(r,i)=>{t(Rce(r),i,n,0)}),n}return null}function $ce(e,t,n){if(xe.isString(e))try{return(t||JSON.parse)(e),xe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const bm={transitional:Rj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=xe.isObject(t);if(o&&xe.isHTMLForm(t)&&(t=new FormData(t)),xe.isFormData(t))return i?JSON.stringify(Dj(t)):t;if(xe.isArrayBuffer(t)||xe.isBuffer(t)||xe.isStream(t)||xe.isFile(t)||xe.isBlob(t)||xe.isReadableStream(t))return t;if(xe.isArrayBufferView(t))return t.buffer;if(xe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mce(t,this.formSerializer).toString();if((s=xe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zx(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),$ce(t)):t}],transformResponse:[function(t){const n=this.transitional||bm.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(xe.isResponse(t)||xe.isReadableStream(t))return t;if(t&&xe.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Kt.from(s,Kt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xe.forEach(["delete","get","head","post","put","patch"],e=>{bm.headers[e]={}});const Ice=xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nce=e=>{const t={};let n,r,i;return e&&e.split(` + */var vm=y;function vse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yse=typeof Object.is=="function"?Object.is:vse,bse=vm.useSyncExternalStore,xse=vm.useRef,wse=vm.useEffect,_se=vm.useMemo,Sse=vm.useDebugValue;qF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=xse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=_se(function(){function u(p){if(!l){if(l=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var m=a.value;if(i(m,p))return f=m}return f=p}if(m=f,yse(c,p))return m;var v=r(p);return i!==void 0&&i(m,v)?(c=p,m):(c=p,f=v)}var l=!1,c,f,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,i]);var s=bse(e,o[0],o[1]);return wse(function(){a.hasValue=!0,a.value=s},[s]),Sse(s),s};KF.exports=qF;var Cse=KF.exports;function Ese(e){e()}function Ose(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Ese(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var bM={notify(){},get:()=>[]};function Ase(e,t){let n,r=bM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Ose())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=bM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var Pse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kse=Pse(),Tse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Mse=Tse(),Rse=()=>kse||Mse?y.useLayoutEffect:y.useEffect,Dse=Rse(),$se=Symbol.for("react-redux-context"),Ise=typeof globalThis<"u"?globalThis:{};function Nse(){if(!y.createContext)return{};const e=Ise[$se]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Ol=Nse();function Lse(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Ase(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Dse(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Ol;return y.createElement(s.Provider,{value:o},t)}var UGe=Lse;function E5(e=Ol){return function(){return y.useContext(e)}}var GF=E5();function YF(e=Ol){const t=e===Ol?GF:E5(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Fse=YF();function jse(e=Ol){const t=e===Ol?Fse:YF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var VGe=jse(),Bse=(e,t)=>e===t;function zse(e=Ol){const t=e===Ol?GF:E5(e),n=(r,i={})=>{const{equalityFn:o=Bse}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Cse.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var WGe=zse();function xM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ux(...e){return t=>{let n=!1;const r=e.map(i=>{const o=xM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Use);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return I.jsx(RC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return I.jsx(RC,{...r,ref:t,children:n})});Al.displayName="Slot";var RC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Wse(n);return y.cloneElement(n,{...Vse(r,n.props),ref:t?Ux(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});RC.displayName="SlotClone";var O5=({children:e})=>I.jsx(I.Fragment,{children:e});function Use(e){return y.isValidElement(e)&&e.type===O5}function Vse(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Wse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ZF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,_M=dn,HGe=(e,t)=>n=>{var r;if(t?.variants==null)return _M(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=wM(c)||wM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return _M(e,a,u,n?.class,n?.className)},A5="-",Hse=e=>{const t=qse(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(A5);return s[0]===""&&s.length!==1&&s.shift(),XF(s,t)||Kse(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},XF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?XF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(A5);return t.validators.find(({validator:a})=>a(o))?.classGroupId},SM=/^\[(.+)\]$/,Kse=e=>{if(SM.test(e)){const t=SM.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},qse=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Yse(Object.entries(e.classGroups),n).forEach(([o,a])=>{DC(a,r,o,t)}),r},DC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:CM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Gse(i)){DC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{DC(a,CM(t,o),n,r)})})},CM=(e,t)=>{let n=e;return t.split(A5).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Gse=e=>e.isThemeGetter,Yse=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,Zse=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},QF="!",Xse=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},Qse=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Jse=e=>({cache:Zse(e.cacheSize),parseClassName:Xse(e),...Hse(e)}),eue=/\s+/,tue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(eue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=Qse(c).join(":"),w=f?b+QF:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function nue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=Jse(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=tue(u,n);return i(u,c),c}return function(){return o(nue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ej=/^\[(?:([a-z-]+):)?(.+)\]$/i,iue=/^\d+\/\d+$/,oue=new Set(["px","full","screen"]),aue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=e=>Ed(e)||oue.has(e)||iue.test(e),Wu=e=>Rh(e,"length",yue),Ed=e=>!!e&&!Number.isNaN(Number(e)),rS=e=>Rh(e,"number",Ed),Mp=e=>!!e&&Number.isInteger(Number(e)),fue=e=>e.endsWith("%")&&Ed(e.slice(0,-1)),Qt=e=>ej.test(e),Hu=e=>aue.test(e),due=new Set(["length","size","percentage"]),hue=e=>Rh(e,due,tj),pue=e=>Rh(e,"position",tj),gue=new Set(["image","url"]),mue=e=>Rh(e,gue,xue),vue=e=>Rh(e,"",bue),Rp=()=>!0,Rh=(e,t,n)=>{const r=ej.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yue=e=>sue.test(e)&&!uue.test(e),tj=()=>!1,bue=e=>lue.test(e),xue=e=>cue.test(e),wue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),L=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Qt,t],V=()=>[Qt,t],ne=()=>["",Ks,Wu],Z=()=>["auto",Ed,Qt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Qt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ed,Qt];return{cacheSize:500,separator:":",theme:{colors:[Rp],spacing:[Ks,Wu],blur:["none","",Hu,Qt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Hu,Qt],borderSpacing:V(),borderWidth:ne(),contrast:oe(),grayscale:K(),hueRotate:oe(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[fue,Wu],inset:H(),margin:H(),opacity:oe(),padding:V(),saturate:oe(),scale:oe(),sepia:K(),skew:oe(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Qt]}],container:["container"],columns:[{columns:[Hu]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Qt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mp,Qt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Mp,Qt]}],"grid-cols":[{"grid-cols":[Rp]}],"col-start-end":[{col:["auto",{span:["full",Mp,Qt]},Qt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Rp]}],"row-start-end":[{row:["auto",{span:[Mp,Qt]},Qt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qt,t]}],"min-w":[{"min-w":[Qt,t,"min","max","fit"]}],"max-w":[{"max-w":[Qt,t,"none","full","min","max","fit","prose",{screen:[Hu]},Hu]}],h:[{h:[Qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rS]}],"font-family":[{font:[Rp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qt]}],"line-clamp":[{"line-clamp":["none",Ed,rS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ks,Qt]}],"list-image":[{"list-image":["none",Qt]}],"list-style-type":[{list:["none","disc","decimal",Qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ks,Wu]}],"underline-offset":[{"underline-offset":["auto",Ks,Qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),pue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Ks,Qt]}],"outline-w":[{outline:[Ks,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ks,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hu,vue]}],"shadow-color":[{shadow:[Rp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Hu,Qt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Qt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Mp,Qt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ks,Wu,rS]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},KGe=rue(wue);var nj={exports:{}},_ue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Sue=_ue,Cue=Sue;function rj(){}function ij(){}ij.resetWarningCache=rj;var Eue=function(){function e(r,i,o,a,s,u){if(u!==Cue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ij,resetWarningCache:rj};return n.PropTypes=n,n};nj.exports=Eue();var Oue=nj.exports;const Mt=Dn(Oue);var Aue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Pue=Object.defineProperty,kue=Object.defineProperties,Tue=Object.getOwnPropertyDescriptors,$y=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,aj=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?Pue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OM=(e,t)=>{for(var n in t||(t={}))oj.call(t,n)&&EM(e,n,t[n]);if($y)for(var n of $y(t))aj.call(t,n)&&EM(e,n,t[n]);return e},Mue=(e,t)=>kue(e,Tue(t)),Rue=(e,t)=>{var n={};for(var r in e)oj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$y)for(var r of $y(e))t.indexOf(r)<0&&aj.call(e,r)&&(n[r]=e[r]);return n},En=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Rue(a,["color","size","stroke","children"]);return y.createElement("svg",OM(Mue(OM({ref:o},Aue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},qGe=En("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),GGe=En("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),YGe=En("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),ZGe=En("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),XGe=En("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),QGe=En("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),JGe=En("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),eYe=En("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),tYe=En("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),nYe=En("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),rYe=En("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),iYe=En("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),oYe=En("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),aYe=En("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),sYe=En("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),uYe=En("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),lYe=En("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),cYe=En("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),fYe=En("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),dYe=En("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),hYe=En("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),pYe=En("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),gYe=En("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),mYe=En("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),vYe=En("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),yYe=En("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),bYe=En("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),xYe=En("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),wYe=En("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),_Ye=En("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),SYe=En("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Due=typeof Symbol=="function"&&Symbol.observable||"@@observable",AM=Due,iS=()=>Math.random().toString(36).substring(7).split("").join("."),$ue={INIT:`@@redux/INIT${iS()}`,REPLACE:`@@redux/REPLACE${iS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${iS()}`},Iy=$ue;function P5(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function sj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(sj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!P5(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:Iy.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[AM](){return this}}}return h({type:Iy.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[AM]:m}}function Iue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Iy.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:Iy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Nue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function Ny(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Lue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=Ny(...s)(i.dispatch),{...i,dispatch:o}}}function Fue(e){return P5(e)&&"type"in e&&typeof e.type=="string"}var uj=Symbol.for("immer-nothing"),PM=Symbol.for("immer-draftable"),zo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[zo]}function yu(e){return e?lj(e)||Array.isArray(e)||!!e[PM]||!!e.constructor?.[PM]||Wx(e)||Hx(e):!1}var jue=Object.prototype.constructor.toString();function lj(e){if(!e||typeof e!="object")return!1;const t=Kd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===jue}function Ly(e,t){Vx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Vx(e){const t=e[zo];return t?t.type_:Array.isArray(e)?1:Wx(e)?2:Hx(e)?3:0}function $C(e,t){return Vx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cj(e,t,n){const r=Vx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wx(e){return e instanceof Map}function Hx(e){return e instanceof Set}function lc(e){return e.copy_||e.base_}function IC(e,t){if(Wx(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&lj(e))return Kd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=zue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>k5(r,!0))),e}function zue(){Fa(2)}function Kx(e){return Object.isFrozen(e)}var Uue={};function Wc(e){const t=Uue[e];return t||Fa(0,e),t}var X0;function fj(){return X0}function Vue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function NC(e){LC(e),e.drafts_.forEach(Wue),e.drafts_=null}function LC(e){e===X0&&(X0=e.parent_)}function TM(e){return X0=Vue(X0,e)}function Wue(e){const t=e[zo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function MM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zo].modified_&&(NC(t),Fa(4)),yu(e)&&(e=Fy(t,e),t.parent_||jy(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[zo].base_,e,t.patches_,t.inversePatches_)):e=Fy(t,n,[]),NC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uj?e:void 0}function Fy(e,t,n){if(Kx(t))return t;const r=t[zo];if(!r)return Ly(t,(i,o)=>RM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return jy(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),Ly(o,(s,u)=>RM(e,r,i,s,u,n,a)),jy(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function RM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!$C(t.assigned_,r)?o.concat(r):void 0,u=Fy(e,i,s);if(cj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(yu(i)&&!Kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fy(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&jy(e,i)}}function jy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&k5(t,n)}function Hue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=T5;n&&(i=[r],o=Q0);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var T5={get(e,t){if(t===zo)return e;const n=lc(e);if(!$C(n,t))return Kue(e,n,t);const r=n[t];return e.finalized_||!yu(r)?r:r===oS(e.base_,t)?(aS(e),e.copy_[t]=jC(r,e)):r},has(e,t){return t in lc(e)},ownKeys(e){return Reflect.ownKeys(lc(e))},set(e,t,n){const r=dj(lc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=oS(lc(e),t),o=i?.[zo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bue(n,i)&&(n!==void 0||$C(e.base_,t)))return!0;aS(e),FC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aS(e),FC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Kd(e.base_)},setPrototypeOf(){Fa(12)}},Q0={};Ly(T5,(e,t)=>{Q0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q0.deleteProperty=function(e,t){return Q0.set.call(this,e,t,void 0)};Q0.set=function(e,t,n){return T5.set.call(this,e[0],t,n,e[0])};function oS(e,t){const n=e[zo];return(n?lc(n):e)[t]}function Kue(e,t,n){const r=dj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function dj(e,t){if(!(t in e))return;let n=Kd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kd(n)}}function FC(e){e.modified_||(e.modified_=!0,e.parent_&&FC(e.parent_))}function aS(e){e.copy_||(e.copy_=IC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var que=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(yu(t)){const o=TM(this),a=jC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?NC(o):LC(o)}return kM(o,r),MM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===uj&&(i=void 0),this.autoFreeze_&&k5(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yu(e)||Fa(8),Vc(e)&&(e=Gue(e));const t=TM(this),n=jC(e,void 0);return n[zo].isManual_=!0,LC(t),n}finishDraft(e,t){const n=e&&e[zo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return kM(r,t),MM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jC(e,t){const n=Wx(e)?Wc("MapSet").proxyMap_(e,t):Hx(e)?Wc("MapSet").proxySet_(e,t):Hue(e,t);return(t?t.scope_:fj()).drafts_.push(n),n}function Gue(e){return Vc(e)||Fa(10,e),hj(e)}function hj(e){if(!yu(e)||Kx(e))return e;const t=e[zo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=IC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=IC(e,!0);return Ly(n,(r,i)=>{cj(n,r,hj(i))}),t&&(t.finalized_=!1),n}var Uo=new que,pj=Uo.produce;Uo.produceWithPatches.bind(Uo);Uo.setAutoFreeze.bind(Uo);Uo.setUseStrictShallowCopy.bind(Uo);Uo.applyPatches.bind(Uo);Uo.createDraft.bind(Uo);Uo.finishDraft.bind(Uo);function Yue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Zue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Xue(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var DM=e=>Array.isArray(e)?e:[e];function Que(e){const t=Array.isArray(e[0])?e[0]:e;return Xue(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Jue(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Jv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function rle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Yue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=gj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=DM(h),w=DM(m),x=Que(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=Jue(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var ile=rle(gj),ole=Object.assign((e,t=ile)=>{Zue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>ole});function mj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var ale=mj(),sle=mj,ule=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ny:Ny.apply(null,arguments)},lle=e=>e&&typeof e.match=="function";function b0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Fue(r)&&r.type===e,n}var vj=class i0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,i0.prototype)}static get[Symbol.species](){return i0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new i0(...t[0].concat(this)):new i0(...t.concat(this))}};function IM(e){return yu(e)?pj(e,()=>{}):e}function NM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function cle(e){return typeof e=="boolean"}var fle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new vj;return n&&(cle(n)?a.push(ale):a.push(sle(n.extraArgument))),a},dle="RTK_autoBatch",LM=e=>t=>{setTimeout(t,e)},hle=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:LM(10):e.type==="callback"?e.queueNotification:LM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[dle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},ple=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new vj(e);return r&&i.push(hle(typeof r=="object"?r:void 0)),i};function CYe(e){const t=fle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(P5(n))s=Nue(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=Ny;i&&(l=ule({trace:!1,...typeof i=="object"&&i}));const c=Lue(...u),f=ple(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return sj(s,o,p)}function yj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function gle(e){return typeof e=="function"}function mle(e,t){let[n,r,i]=yj(t),o;if(gle(e))o=()=>IM(e());else{const s=IM(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(yu(c))return pj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var vle=(e,t)=>lle(e)?e.match(t):e(t);function yle(...e){return t=>e.some(n=>vle(n,t))}var ble="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xle=(e=21)=>{let t="",n=e;for(;n--;)t+=ble[Math.random()*64|0];return t},wle=["name","message","stack","code"],sS=class{constructor(e,t){this.payload=e,this.meta=t}_type},FM=class{constructor(e,t){this.payload=e,this.meta=t}_type},_le=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of wle)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},EYe=(()=>{function e(t,n,r){const i=b0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=b0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=b0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||_le)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):xle(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Cle(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new sS(C,k),fulfillWithValue:(C,k)=>new FM(C,k)})).then(C=>{if(C instanceof sS)throw C;return C instanceof FM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof sS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Sle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:yle(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Sle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Cle(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ele=Symbol.for("rtk-slice-createasyncthunk");function Ole(e,t){return`${e}/${t}`}function Ale({creators:e}={}){const t=e?.asyncThunk?.[Ele];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(kle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:Ole(i,x),createNotation:typeof r.reducers=="function"};Mle(S)?Dle(O,S,l,t):Tle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?yj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return mle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=NM(h,S,()=>new WeakMap);return NM(k,C,()=>{const M={};for(const[L,U]of Object.entries(r.selectors??{}))M[L]=Ple(U,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function Ple(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var OYe=Ale();function kle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Tle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Rle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?b0(e,a):b0(e))}function Mle(e){return e._reducerDefinitionType==="asyncThunk"}function Rle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Dle({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||e1,pending:s||e1,rejected:u||e1,settled:l||e1})}function e1(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function bj(e,t){return function(){return e.apply(t,arguments)}}const{toString:$le}=Object.prototype,{getPrototypeOf:M5}=Object,qx=(e=>t=>{const n=$le.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>qx(t)===e),Gx=e=>t=>typeof t===e,{isArray:Dh}=Array,J0=Gx("undefined");function Ile(e){return e!==null&&!J0(e)&&e.constructor!==null&&!J0(e.constructor)&&No(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xj=ts("ArrayBuffer");function Nle(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xj(e.buffer),t}const Lle=Gx("string"),No=Gx("function"),wj=Gx("number"),Yx=e=>e!==null&&typeof e=="object",Fle=e=>e===!0||e===!1,G1=e=>{if(qx(e)!=="object")return!1;const t=M5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jle=ts("Date"),Ble=ts("File"),zle=ts("Blob"),Ule=ts("FileList"),Vle=e=>Yx(e)&&No(e.pipe),Wle=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||No(e.append)&&((t=qx(e))==="formdata"||t==="object"&&No(e.toString)&&e.toString()==="[object FormData]"))},Hle=ts("URLSearchParams"),[Kle,qle,Gle,Yle]=["ReadableStream","Request","Response","Headers"].map(ts),Zle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ym(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sj=e=>!J0(e)&&e!==wc;function BC(){const{caseless:e}=Sj(this)&&this||{},t={},n=(r,i)=>{const o=e&&_j(t,i)||i;G1(t[o])&&G1(r)?t[o]=BC(t[o],r):G1(r)?t[o]=BC({},r):Dh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ym(t,(i,o)=>{n&&No(i)?e[o]=bj(i,n):e[o]=i},{allOwnKeys:r}),e),Qle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ece=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&M5(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},nce=e=>{if(!e)return null;if(Dh(e))return e;let t=e.length;if(!wj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rce=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&M5(Uint8Array)),ice=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},oce=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ace=ts("HTMLFormElement"),sce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uce=ts("RegExp"),Cj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ym(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},lce=e=>{Cj(e,(t,n)=>{if(No(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(No(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dh(e)?r(e):r(String(e).split(t)),n},fce=()=>{},dce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uS="abcdefghijklmnopqrstuvwxyz",BM="0123456789",Ej={DIGIT:BM,ALPHA:uS,ALPHA_DIGIT:uS+uS.toUpperCase()+BM},hce=(e=16,t=Ej.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pce(e){return!!(e&&No(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gce=e=>{const t=new Array(10),n=(r,i)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Dh(r)?[]:{};return ym(r,(a,s)=>{const u=n(a,i+1);!J0(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},mce=ts("AsyncFunction"),vce=e=>e&&(Yx(e)||No(e))&&No(e.then)&&No(e.catch),Oj=((e,t)=>e?setImmediate:t?((n,r)=>(wc.addEventListener("message",({source:i,data:o})=>{i===wc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),wc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",No(wc.postMessage)),yce=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||Oj,xe={isArray:Dh,isArrayBuffer:xj,isBuffer:Ile,isFormData:Wle,isArrayBufferView:Nle,isString:Lle,isNumber:wj,isBoolean:Fle,isObject:Yx,isPlainObject:G1,isReadableStream:Kle,isRequest:qle,isResponse:Gle,isHeaders:Yle,isUndefined:J0,isDate:jle,isFile:Ble,isBlob:zle,isRegExp:uce,isFunction:No,isStream:Vle,isURLSearchParams:Hle,isTypedArray:rce,isFileList:Ule,forEach:ym,merge:BC,extend:Xle,trim:Zle,stripBOM:Qle,inherits:Jle,toFlatObject:ece,kindOf:qx,kindOfTest:ts,endsWith:tce,toArray:nce,forEachEntry:ice,matchAll:oce,isHTMLForm:ace,hasOwnProperty:jM,hasOwnProp:jM,reduceDescriptors:Cj,freezeMethods:lce,toObjectSet:cce,toCamelCase:sce,noop:fce,toFiniteNumber:dce,findKey:_j,global:wc,isContextDefined:Sj,ALPHABET:Ej,generateString:hce,isSpecCompliantForm:pce,toJSONObject:gce,isAsyncFn:mce,isThenable:vce,setImmediate:Oj,asap:yce};function qt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}xe.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xe.toJSONObject(this.config),code:this.code,status:this.status}}});const Aj=qt.prototype,Pj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pj[e]={value:e}});Object.defineProperties(qt,Pj);Object.defineProperty(Aj,"isAxiosError",{value:!0});qt.from=(e,t,n,r,i,o)=>{const a=Object.create(Aj);return xe.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),qt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const bce=null;function zC(e){return xe.isPlainObject(e)||xe.isArray(e)}function kj(e){return xe.endsWith(e,"[]")?e.slice(0,-2):e}function zM(e,t,n){return e?e.concat(t).map(function(i,o){return i=kj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function xce(e){return xe.isArray(e)&&!e.some(zC)}const wce=xe.toFlatObject(xe,{},null,function(t){return/^is[A-Z]/.test(t)});function Zx(e,t,n){if(!xe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=xe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!xe.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&xe.isSpecCompliantForm(t);if(!xe.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(xe.isDate(m))return m.toISOString();if(!u&&xe.isBlob(m))throw new qt("Blob is not supported. Use a Buffer instead.");return xe.isArrayBuffer(m)||xe.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(xe.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(xe.isArray(m)&&xce(m)||(xe.isFileList(m)||xe.endsWith(v,"[]"))&&(w=xe.toArray(m)))return v=kj(v),w.forEach(function(S,O){!(xe.isUndefined(S)||S===null)&&t.append(a===!0?zM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return zC(m)?!0:(t.append(zM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(wce,{defaultVisitor:c,convertValue:l,isVisitable:zC});function p(m,v){if(!xe.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),xe.forEach(m,function(w,x){(!(xe.isUndefined(w)||w===null)&&i.call(t,w,xe.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!xe.isObject(e))throw new TypeError("data must be an object");return p(e),t}function UM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function R5(e,t){this._pairs=[],e&&Zx(e,this,t)}const Tj=R5.prototype;Tj.append=function(t,n){this._pairs.push([t,n])};Tj.toString=function(t){const n=t?function(r){return t.call(this,r,UM)}:UM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mj(e,t,n){if(!t)return e;const r=n&&n.encode||_ce;xe.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=xe.isURLSearchParams(t)?t.toString():new R5(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class VM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){xe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Rj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sce=typeof URLSearchParams<"u"?URLSearchParams:R5,Cce=typeof FormData<"u"?FormData:null,Ece=typeof Blob<"u"?Blob:null,Oce={isBrowser:!0,classes:{URLSearchParams:Sce,FormData:Cce,Blob:Ece},protocols:["http","https","file","blob","url","data"]},D5=typeof window<"u"&&typeof document<"u",UC=typeof navigator=="object"&&navigator||void 0,Ace=D5&&(!UC||["ReactNative","NativeScript","NS"].indexOf(UC.product)<0),Pce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kce=D5&&window.location.href||"http://localhost",Tce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:D5,hasStandardBrowserEnv:Ace,hasStandardBrowserWebWorkerEnv:Pce,navigator:UC,origin:kce},Symbol.toStringTag,{value:"Module"})),Mi={...Tce,...Oce};function Mce(e,t){return Zx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&xe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Rce(e){return xe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&xe.isArray(i)?i.length:a,u?(xe.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!xe.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&xe.isArray(i[a])&&(i[a]=Dce(i[a])),!s)}if(xe.isFormData(e)&&xe.isFunction(e.entries)){const n={};return xe.forEachEntry(e,(r,i)=>{t(Rce(r),i,n,0)}),n}return null}function $ce(e,t,n){if(xe.isString(e))try{return(t||JSON.parse)(e),xe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const bm={transitional:Rj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=xe.isObject(t);if(o&&xe.isHTMLForm(t)&&(t=new FormData(t)),xe.isFormData(t))return i?JSON.stringify(Dj(t)):t;if(xe.isArrayBuffer(t)||xe.isBuffer(t)||xe.isStream(t)||xe.isFile(t)||xe.isBlob(t)||xe.isReadableStream(t))return t;if(xe.isArrayBufferView(t))return t.buffer;if(xe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mce(t,this.formSerializer).toString();if((s=xe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zx(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),$ce(t)):t}],transformResponse:[function(t){const n=this.transitional||bm.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(xe.isResponse(t)||xe.isReadableStream(t))return t;if(t&&xe.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?qt.from(s,qt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xe.forEach(["delete","get","head","post","put","patch"],e=>{bm.headers[e]={}});const Ice=xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nce=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Ice[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},WM=Symbol("internals");function Dp(e){return e&&String(e).trim().toLowerCase()}function Y1(e){return e===!1||e==null?e:xe.isArray(e)?e.map(Y1):String(e)}function Lce(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Fce=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lS(e,t,n,r,i){if(xe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!xe.isString(t)){if(xe.isString(r))return t.indexOf(r)!==-1;if(xe.isRegExp(r))return r.test(t)}}function jce(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bce(e,t){const n=xe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class ho{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=Dp(u);if(!c)throw new Error("header name must be a non-empty string");const f=xe.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Y1(s))}const a=(s,u)=>xe.forEach(s,(l,c)=>o(l,c,u));if(xe.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(xe.isString(t)&&(t=t.trim())&&!Fce(t))a(Nce(t),n);else if(xe.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Dp(t),t){const r=xe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Lce(i);if(xe.isFunction(n))return n.call(this,i,r);if(xe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dp(t),t){const r=xe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Dp(a),a){const s=xe.findKey(r,a);s&&(!n||lS(r,r[s],s,n))&&(delete r[s],i=!0)}}return xe.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||lS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return xe.forEach(this,(i,o)=>{const a=xe.findKey(r,o);if(a){n[a]=Y1(i),delete n[o];return}const s=t?jce(o):String(o).trim();s!==o&&delete n[o],n[s]=Y1(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return xe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&xe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[WM]=this[WM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dp(a);r[s]||(Bce(i,a),r[s]=!0)}return xe.isArray(t)?t.forEach(o):o(t),this}}ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);xe.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});xe.freezeMethods(ho);function cS(e,t){const n=this||bm,r=t||n,i=ho.from(r.headers);let o=r.data;return xe.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function $j(e){return!!(e&&e.__CANCEL__)}function $h(e,t,n){Kt.call(this,e??"canceled",Kt.ERR_CANCELED,t,n),this.name="CanceledError"}xe.inherits($h,Kt,{__CANCEL__:!0});function Ij(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Kt("Request failed with status code "+n.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Uce(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const By=(e,t,n=3)=>{let r=0;const i=Uce(50,250);return Vce(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},HM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},KM=e=>(...t)=>xe.asap(()=>e(...t)),Wce=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Hce=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];xe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),xe.isString(r)&&a.push("path="+r),xe.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Kce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nj(e,t){return e&&!Kce(t)?qce(e,t):t}const qM=e=>e instanceof ho?{...e}:e;function Hc(e,t){t=t||{};const n={};function r(l,c,f,h){return xe.isPlainObject(l)&&xe.isPlainObject(c)?xe.merge.call({caseless:h},l,c):xe.isPlainObject(c)?xe.merge({},c):xe.isArray(c)?c.slice():c}function i(l,c,f,h){if(xe.isUndefined(c)){if(!xe.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!xe.isUndefined(c))return r(void 0,c)}function a(l,c){if(xe.isUndefined(c)){if(!xe.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(qM(l),qM(c),f,!0)};return xe.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);xe.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Lj=e=>{const t=Hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ho.from(a),t.url=Mj(Nj(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(xe.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&xe.isFunction(r)&&(r=r(t)),r||r!==!1&&Wce(t.url))){const l=i&&o&&Hce.read(o);l&&a.set(i,l)}return t},Gce=typeof XMLHttpRequest<"u",Yce=Gce&&function(e){return new Promise(function(n,r){const i=Lj(e);let o=i.data;const a=ho.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=ho.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};Ij(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Kt("Network Error",Kt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Rj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new Kt(O,E.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&xe.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),xe.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=By(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=By(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new $h(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=zce(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Kt("Unsupported protocol "+x+":",Kt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Zce=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Kt?c:new $h(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>xe.asap(s),u}},Xce=function*(e,t){let n=e.byteLength;if(n{const i=Qce(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Xx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fj=Xx&&typeof ReadableStream=="function",efe=Xx&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),jj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tfe=Fj&&jj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),YM=64*1024,VC=Fj&&jj(()=>xe.isReadableStream(new Response("").body)),zy={stream:VC&&(e=>e.body)};Xx&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zy[t]&&(zy[t]=xe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Kt(`Response type '${t}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})})})(new Response);const nfe=async e=>{if(e==null)return 0;if(xe.isBlob(e))return e.size;if(xe.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(xe.isArrayBufferView(e)||xe.isArrayBuffer(e))return e.byteLength;if(xe.isURLSearchParams(e)&&(e=e+""),xe.isString(e))return(await efe(e)).byteLength},rfe=async(e,t)=>{const n=xe.toFiniteNumber(e.getContentLength());return n??nfe(t)},ife=Xx&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Lj(e);l=l?(l+"").toLowerCase():"text";let p=Zce([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&tfe&&n!=="get"&&n!=="head"&&(b=await rfe(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(xe.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=HM(b,By(KM(u)));r=GM(E.body,YM,k,M)}}xe.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=VC&&(l==="stream"||l==="response");if(VC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=x[L]});const C=xe.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&HM(C,By(KM(s),!0))||[];x=new Response(GM(x.body,YM,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await zy[xe.findKey(zy,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{Ij(E,C,{data:O,headers:ho.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,m),{cause:w.cause||w}):Kt.from(w,w&&w.code,e,m)}}),WC={http:bce,xhr:Yce,fetch:ife};xe.forEach(WC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ZM=e=>`- ${e}`,ofe=e=>xe.isFunction(e)||e===null||e===!1,Bj={getAdapter:e=>{e=xe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[WM]=this[WM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dp(a);r[s]||(Bce(i,a),r[s]=!0)}return xe.isArray(t)?t.forEach(o):o(t),this}}ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);xe.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});xe.freezeMethods(ho);function cS(e,t){const n=this||bm,r=t||n,i=ho.from(r.headers);let o=r.data;return xe.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function $j(e){return!!(e&&e.__CANCEL__)}function $h(e,t,n){qt.call(this,e??"canceled",qt.ERR_CANCELED,t,n),this.name="CanceledError"}xe.inherits($h,qt,{__CANCEL__:!0});function Ij(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new qt("Request failed with status code "+n.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Uce(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const By=(e,t,n=3)=>{let r=0;const i=Uce(50,250);return Vce(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},HM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},KM=e=>(...t)=>xe.asap(()=>e(...t)),Wce=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Hce=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];xe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),xe.isString(r)&&a.push("path="+r),xe.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Kce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nj(e,t){return e&&!Kce(t)?qce(e,t):t}const qM=e=>e instanceof ho?{...e}:e;function Hc(e,t){t=t||{};const n={};function r(l,c,f,h){return xe.isPlainObject(l)&&xe.isPlainObject(c)?xe.merge.call({caseless:h},l,c):xe.isPlainObject(c)?xe.merge({},c):xe.isArray(c)?c.slice():c}function i(l,c,f,h){if(xe.isUndefined(c)){if(!xe.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!xe.isUndefined(c))return r(void 0,c)}function a(l,c){if(xe.isUndefined(c)){if(!xe.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(qM(l),qM(c),f,!0)};return xe.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);xe.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Lj=e=>{const t=Hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ho.from(a),t.url=Mj(Nj(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(xe.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&xe.isFunction(r)&&(r=r(t)),r||r!==!1&&Wce(t.url))){const l=i&&o&&Hce.read(o);l&&a.set(i,l)}return t},Gce=typeof XMLHttpRequest<"u",Yce=Gce&&function(e){return new Promise(function(n,r){const i=Lj(e);let o=i.data;const a=ho.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=ho.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};Ij(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new qt("Request aborted",qt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new qt("Network Error",qt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Rj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new qt(O,E.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&xe.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),xe.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=By(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=By(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new $h(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=zce(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new qt("Unsupported protocol "+x+":",qt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Zce=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof qt?c:new $h(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new qt(`timeout ${t} of ms exceeded`,qt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>xe.asap(s),u}},Xce=function*(e,t){let n=e.byteLength;if(n{const i=Qce(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Xx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fj=Xx&&typeof ReadableStream=="function",efe=Xx&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),jj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tfe=Fj&&jj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),YM=64*1024,VC=Fj&&jj(()=>xe.isReadableStream(new Response("").body)),zy={stream:VC&&(e=>e.body)};Xx&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zy[t]&&(zy[t]=xe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new qt(`Response type '${t}' is not supported`,qt.ERR_NOT_SUPPORT,r)})})})(new Response);const nfe=async e=>{if(e==null)return 0;if(xe.isBlob(e))return e.size;if(xe.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(xe.isArrayBufferView(e)||xe.isArrayBuffer(e))return e.byteLength;if(xe.isURLSearchParams(e)&&(e=e+""),xe.isString(e))return(await efe(e)).byteLength},rfe=async(e,t)=>{const n=xe.toFiniteNumber(e.getContentLength());return n??nfe(t)},ife=Xx&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Lj(e);l=l?(l+"").toLowerCase():"text";let p=Zce([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&tfe&&n!=="get"&&n!=="head"&&(b=await rfe(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(xe.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=HM(b,By(KM(u)));r=GM(E.body,YM,k,M)}}xe.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=VC&&(l==="stream"||l==="response");if(VC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=x[L]});const C=xe.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&HM(C,By(KM(s),!0))||[];x=new Response(GM(x.body,YM,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await zy[xe.findKey(zy,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{Ij(E,C,{data:O,headers:ho.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new qt("Network Error",qt.ERR_NETWORK,e,m),{cause:w.cause||w}):qt.from(w,w&&w.code,e,m)}}),WC={http:bce,xhr:Yce,fetch:ife};xe.forEach(WC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ZM=e=>`- ${e}`,ofe=e=>xe.isFunction(e)||e===null||e===!1,Bj={getAdapter:e=>{e=xe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : `+o.map(ZM).join(` -`):" "+ZM(o[0]):"as no adapter specified";throw new Kt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:WC};function fS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $h(null,e)}function XM(e){return fS(e),e.headers=ho.from(e.headers),e.data=cS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bj.getAdapter(e.adapter||bm.adapter)(e).then(function(r){return fS(e),r.data=cS.call(e,e.transformResponse,r),r.headers=ho.from(r.headers),r},function(r){return $j(r)||(fS(e),r&&r.response&&(r.response.data=cS.call(e,e.transformResponse,r.response),r.response.headers=ho.from(r.response.headers))),Promise.reject(r)})}const zj="1.7.9",Qx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const QM={};Qx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+zj+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Kt(i(a," has been removed"+(n?" in "+n:"")),Kt.ERR_DEPRECATED);return n&&!QM[a]&&(QM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};Qx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function afe(e,t,n){if(typeof e!="object")throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Kt("option "+o+" must be "+u,Kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Kt("Unknown option "+o,Kt.ERR_BAD_OPTION)}}const Z1={assertOptions:afe,validators:Qx},ls=Z1.validators;class Tc{constructor(t){this.defaults=t,this.interceptors={request:new VM,response:new VM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Z1.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(xe.isFunction(i)?n.paramsSerializer={serialize:i}:Z1.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Z1.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&xe.merge(o.common,o[n.method]);o&&xe.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ho.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[XM.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $h(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $5(function(i){t=i}),cancel:t}}}function sfe(e){return function(n){return e.apply(null,n)}}function ufe(e){return xe.isObject(e)&&e.isAxiosError===!0}const HC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HC).forEach(([e,t])=>{HC[t]=e});function Uj(e){const t=new Tc(e),n=bj(Tc.prototype.request,t);return xe.extend(n,Tc.prototype,t,{allOwnKeys:!0}),xe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Uj(Hc(e,i))},n}const qr=Uj(bm);qr.Axios=Tc;qr.CanceledError=$h;qr.CancelToken=$5;qr.isCancel=$j;qr.VERSION=zj;qr.toFormData=Zx;qr.AxiosError=Kt;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=sfe;qr.isAxiosError=ufe;qr.mergeConfig=Hc;qr.AxiosHeaders=ho;qr.formToJSON=e=>Dj(xe.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=Bj.getAdapter;qr.HttpStatusCode=HC;qr.default=qr;var lfe=e=>{switch(e){case"success":return dfe;case"info":return pfe;case"warning":return hfe;case"error":return gfe;default:return null}},cfe=Array(12).fill(0),ffe=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},cfe.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),pfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vfe=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},KC=1,yfe=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:KC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async u=>{if(o=["resolve",u],F.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(xfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||KC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Po=new yfe,bfe=(e,t)=>{let n=t?.id||KC++;return Po.addToast({title:e,...t,id:n}),n},xfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wfe=bfe,_fe=()=>Po.toasts,AYe=Object.assign(wfe,{success:Po.success,info:Po.info,warning:Po.warning,error:Po.error,custom:Po.custom,message:Po.message,promise:Po.promise,dismiss:Po.dismiss,loading:Po.loading},{getHistory:_fe});function Sfe(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Sfe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function t1(e){return e.label!==void 0}var Cfe=3,Efe="32px",JM=4e3,Ofe=356,Afe=14,Pfe=20,kfe=200;function Tfe(...e){return e.filter(Boolean).join(" ")}var Mfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:L,cancelButtonStyle:U,actionButtonStyle:H,className:V="",descriptionClassName:ne="",duration:Z,position:G,gap:q,loadingIcon:W,expandByDefault:j,classNames:K,icons:Y,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:ae,cn:ue}=e,[be,we]=F.useState(!1),[He,Ee]=F.useState(!1),[it,ke]=F.useState(!1),[Le,De]=F.useState(!1),[me,yt]=F.useState(!1),[lt,Nt]=F.useState(0),[yn,nn]=F.useState(0),te=F.useRef(p.duration||Z||JM),de=F.useRef(null),ge=F.useRef(null),ze=S===0,Fe=S+1<=w,Ae=p.type,tt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Ht=F.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=F.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);F.useMemo(()=>p.duration||Z||JM,[p.duration,Z]);let Ii=F.useRef(0),br=F.useRef(0),yi=F.useRef(0),sr=F.useRef(null),[si,bi]=G.split("-"),Rr=F.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Ht?_t:_t+hn.height,0),[x,Ht]),Xi=vfe(),yo=p.invert||h,xi=Ae==="loading";br.current=F.useMemo(()=>Ht*q+Rr,[Ht,Rr]),F.useEffect(()=>{we(!0)},[]),F.useEffect(()=>{let _t=ge.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(qn=>qn.toastId!==p.id))}},[b,p.id]),F.useLayoutEffect(()=>{if(!be)return;let _t=ge.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(qn=>qn.find(ur=>ur.toastId===p.id)?qn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...qn])},[be,p.title,p.description,b,p.id]);let Dr=F.useCallback(()=>{Ee(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},kfe)},[p,C,b,br]);F.useEffect(()=>{if(p.promise&&Ae==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||ae&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},te.current)),()=>clearTimeout(_t)},[E,v,p,Ae,ae,Xi,Dr]),F.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function _a(){var _t,hn,_n;return Y!=null&&Y.loading?F.createElement("div",{className:ue(K?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":Ae==="loading"},Y.loading):W?F.createElement("div",{className:ue(K?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":Ae==="loading"},W):F.createElement(ffe,{className:ue(K?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:Ae==="loading"})}return F.createElement("li",{tabIndex:0,ref:ge,className:ue(V,mt,K?.toast,(t=p?.classNames)==null?void 0:t.toast,K?.default,K?.[Ae],(n=p?.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":be,"data-promise":!!p.promise,"data-swiped":me,"data-removed":He,"data-visible":Fe,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":ze,"data-swiping":it,"data-dismissible":tt,"data-type":Ae,"data-invert":yo,"data-swipe-out":Le,"data-expanded":!!(E||j&&be),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${He?lt:br.current}px`,"--initial-height":j?"auto":`${yn}px`,...L,...p.style},onPointerDown:_t=>{xi||!tt||(de.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(ke(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,qn;if(Le||!tt)return;sr.current=null;let ur=Number(((_t=ge.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=de.current)==null?void 0:hn.getTime()),bo=Math.abs(ur)/Xr;if(Math.abs(ur)>=Pfe||bo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),De(!0),yt(!1);return}(qn=ge.current)==null||qn.style.setProperty("--swipe-amount","0px"),ke(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!tt)return;let qn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ge.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?F.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!tt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:ue(K?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:mfe):null,p.jsx||F.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,Ae||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:ue(K?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||_a():null,p.type!=="loading"?p.icon||Y?.[Ae]||lfe(Ae):null):null,F.createElement("div",{"data-content":"",className:ue(K?.content,(s=p?.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:ue(K?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:ue(ne,xn,K?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&t1(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||U,onClick:_t=>{var hn,_n;t1(p.cancel)&&tt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:ue(K?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&t1(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:_t=>{var hn,_n;t1(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:ue(K?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function eR(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var PYe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Cfe,toastOptions:m,dir:v=eR(),gap:b=Afe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Tfe}=e,[C,k]=F.useState([]),M=F.useMemo(()=>Array.from(new Set([r].concat(C.filter(ae=>ae.position).map(ae=>ae.position)))),[C,r]),[L,U]=F.useState([]),[H,V]=F.useState(!1),[ne,Z]=F.useState(!1),[G,q]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=F.useRef(null),Y=F.useRef(!1),oe=F.useCallback(ae=>{k(ue=>{var be;return(be=ue.find(we=>we.id===ae.id))!=null&&be.delete||Po.dismiss(ae.id),ue.filter(({id:we})=>we!==ae.id)})},[]);return F.useEffect(()=>Po.subscribe(ae=>{if(ae.dismiss){k(ue=>ue.map(be=>be.id===ae.id?{...be,delete:!0}:be));return}setTimeout(()=>{jx.flushSync(()=>{k(ue=>{let be=ue.findIndex(we=>we.id===ae.id);return be!==-1?[...ue.slice(0,be),{...ue[be],...ae},...ue.slice(be+1)]:[ae,...ue]})})})}),[]),F.useEffect(()=>{if(l!=="system"){q(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let ae=window.matchMedia("(prefers-color-scheme: dark)");try{ae.addEventListener("change",({matches:ue})=>{q(ue?"dark":"light")})}catch{ae.addListener(({matches:be})=>{try{q(be?"dark":"light")}catch(we){console.error(we)}})}},[l]),F.useEffect(()=>{C.length<=1&&V(!1)},[C]),F.useEffect(()=>{let ae=ue=>{var be,we;i.every(He=>ue[He]||ue.code===He)&&(V(!0),(be=W.current)==null||be.focus()),ue.code==="Escape"&&(document.activeElement===W.current||(we=W.current)!=null&&we.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[i]),F.useEffect(()=>{if(W.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,Y.current=!1)}},[W.current]),F.createElement("section",{"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((ae,ue)=>{var be;let[we,He]=ae.split("-");return C.length?F.createElement("ol",{key:ae,dir:v==="auto"?eR():v,tabIndex:-1,ref:W,className:s,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":we,"data-lifted":H&&C.length>1&&!o,"data-x-position":He,style:{"--front-toast-height":`${((be=L[0])==null?void 0:be.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Efe,"--width":`${Ofe}px`,"--gap":`${b}px`,...h},onBlur:Ee=>{Y.current&&!Ee.currentTarget.contains(Ee.relatedTarget)&&(Y.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,K.current=Ee.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{ne||V(!1)},onPointerDown:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(Ee=>!Ee.position&&ue===0||Ee.position===ae).map((Ee,it)=>{var ke,Le;return F.createElement(Mfe,{key:Ee.id,icons:x,index:it,toast:Ee,defaultRichColors:c,duration:(ke=m?.duration)!=null?ke:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:ae,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter(De=>De.position==Ee.position),heights:L.filter(De=>De.position==Ee.position),setHeights:U,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Ih=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kc=typeof window>"u"||"Deno"in globalThis;function oa(){}function Rfe(e,t){return typeof e=="function"?e(t):e}function qC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Od(e,t){return typeof e=="function"?e(t):e}function Na(e,t){return typeof e=="function"?e(t):e}function tR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==I5(a,t.options))return!1}else if(!eg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function nR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!eg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I5(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>GC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!eg(e[n],t[n])):!1}function Wj(e,t){if(e===t)return e;const n=rR(e)&&rR(t);if(n||GC(e)&&GC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function YC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wj(e,t):t}function $fe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ife(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var N5=Symbol();function Hj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===N5?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Nfe=class extends Ih{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},L5=new Nfe,Lfe=class extends Ih{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Vy=new Lfe;function ZC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Ffe(e){return Math.min(1e3*2**e,3e4)}function Kj(e){return(e??"online")==="online"?Vy.isOnline():!0}var qj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dS(e){return e instanceof qj}function Gj(e){let t=!1,n=0,r=!1,i;const o=ZC(),a=v=>{r||(h(new qj(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>L5.isFocused()&&(e.networkMode==="always"||Vy.isOnline())&&e.canRun(),c=()=>Kj(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??Ffe,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function jfe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=jfe(),Yj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Bfe=class extends Yj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=zfe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=YC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Na(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===N5||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Vj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=Hj(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{dS(s)&&s.silent||this.#i({type:"error",error:s}),dS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=Gj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Zj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return dS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Zj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zfe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ufe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??I5(r,t);let o=this.get(i);return o||(o=new Bfe({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vfe=class extends Yj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Xj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=Gj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Xj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Vfe({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=n1(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=n1(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(n1(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(n1(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>nR(t,n))}findAll(e={}){return this.getAll().filter(t=>nR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(oa))))}};function n1(e){return e.options.scope?.id??String(e.mutationId)}function oR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=Hj(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?Ife:$fe;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?Hfe:aR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:aR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function aR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Hfe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var kYe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new Ufe,this.#t=e.mutationCache||new Wfe,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=L5.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Vy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Od(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Rfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Od(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oa).catch(oa)}fetchInfiniteQuery(e){return e.behavior=oR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oa).catch(oa)}ensureInfiniteQueryData(e){return e.behavior=oR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vy.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{eg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{eg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=I5(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===N5&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Kfe=class extends Ih{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ZC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return XC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return XC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Na(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!Uy(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&uR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Na(this.options.enabled,this.#t)!==Na(n.enabled,this.#t)||Od(this.options.staleTime,this.#t)!==Od(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||Na(this.options.enabled,this.#t)!==Na(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Gfe(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(oa)),t}#m(){this.#x();const e=Od(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!qC(e))return;const n=Vj(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||Na(this.options.enabled,this.#t)===!1||!qC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||L5.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&sR(e,t),L=k&&uR(e,n,t,r);(M||L)&&(c={...c,...Zj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=YC(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=YC(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:F5(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},M=()=>{const U=this.#i=C.promise=ZC();k(U)},L=this.#i;switch(L.status){case"pending":e.queryHash===n.queryHash&&k(L);break;case"fulfilled":(C.status==="error"||C.data!==L.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==L.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),Uy(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function qfe(e,t){return Na(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sR(e,t){return qfe(e,t)||e.state.data!==void 0&&XC(e,t,t.refetchOnMount)}function XC(e,t,n){if(Na(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&F5(e,t)}return!1}function uR(e,t,n,r){return(e!==t||Na(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&F5(e,n)}function F5(e,t){return Na(t.enabled,e)!==!1&&e.isStaleByTime(Od(t.staleTime,e))}function Gfe(e,t){return!Uy(e.getCurrentResult(),t)}var Yfe=class extends Ih{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Uy(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&qc(n.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??Xj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},Qj=y.createContext(void 0),Jj=e=>{const t=y.useContext(Qj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MYe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(Qj.Provider,{value:e,children:t})),eB=y.createContext(!1),Zfe=()=>y.useContext(eB);eB.Provider;function Xfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qfe=y.createContext(Xfe()),Jfe=()=>y.useContext(Qfe);function tB(e,t){return typeof e=="function"?e(...t):!!e}function QC(){}var ede=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tde=e=>{y.useEffect(()=>{e.clearReset()},[e])},nde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tB(n,[e.error,r]),rde=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ide=(e,t)=>e.isLoading&&e.isFetching&&!t,ode=(e,t)=>e?.suspense&&t.isPending,lR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ade(e,t,n){const r=Jj(),i=Zfe(),o=Jfe(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",rde(a),ede(a,o),tde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?QC:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ode(a,l))throw lR(a,u,o);if(nde({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&ide(l,i)&&(s?lR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(QC).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function RYe(e,t){return ade(e,Kfe)}function DYe(e,t){const n=Jj(),[r]=y.useState(()=>new Yfe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(QC)},[r]);if(i.error&&tB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",$p=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},cR=e=>e==null?"":""+e,sde=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ude=/###/g,fR=e=>e&&e.indexOf("###")>-1?e.replace(ude,"."):e,dR=e=>!e||It(e),x0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=x0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=x0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=x0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},lde=(e,t,n,r)=>{const{obj:i,k:o}=x0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Wy=(e,t)=>{const{obj:n,k:r}=x0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},cde=(e,t,n)=>{const r=Wy(e,n);return r!==void 0?r:Wy(t,n)},nB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):nB(e[r],t[r],n):e[r]=t[r]);return e},Bf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var fde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const dde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>fde[t]):e;class hde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const pde=[" ",",","?","!",";"],gde=new hde(20),mde=(e,t,n)=>{t=t||"",n=n||"";const r=pde.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=gde.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},JC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),vde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let yde=class eE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||vde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=Wy(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:JC(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),hR(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=Wy(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?nB(u,r,o):u={...u,...r},hR(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var rB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const gR={};class Ky extends Jx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),sde(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!mde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=Ky.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",L=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",U=C&&!n.ordinal&&n.count===0,H=U&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${L}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=H),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&H!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?H:h),o){const j=this.resolve(a,{...n,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let j=0;j{const oe=k&&Y!==h?Y:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,K,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,u,K,oe,Z,n),this.emit("missingKey",j,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?G.forEach(j=>{const K=this.pluralResolver.getSuffixes(j,n);U&&n[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(Y=>{W([j],a+Y,n[`defaultValue${Y}`]||H)})}):W(G,a,H))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!gR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(gR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=Hy(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Hy(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const vR={zero:0,one:1,two:2,few:3,many:4,other:5},yR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Hy(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),yR;if(!t.match(/-|_/))return yR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>vR[i]-vR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const bR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=cde(e,t,n);return!o&&i&&It(n)&&(o=JC(e,n,r),o===void 0&&(o=JC(t,n,r))),o},hS=e=>e.replace(/\$/g,"$$$$");class xde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:dde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Bf(o):a||"{{",this.suffix=s?Bf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Bf(h):p||Bf("$t("),this.nestingSuffix=m?Bf(m):v||Bf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=bR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(bR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>hS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?hS(this.escape(p)):hS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=cR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=cR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const wde=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},zf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Hy(r),i),t[a]=s),s(n)}};class _de{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:zf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:zf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:zf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=wde(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Sde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Cde extends Jx{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{lde(u.loaded,[o],a),Sde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),wR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),r1=()=>{},Ede=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let iB=class tE extends Jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=wR(t),this.services={},this.logger=ms,this.modules={external:[]},Ede(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=xR();this.options={...i,...this.options,...wR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=_de;const f=new mR(this.options);this.store=new pR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new bde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new xde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Cde(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=r1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=$p(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r1;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=$p();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=r1),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$p();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=$p();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$p();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new mR(xR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new tE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r1;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new tE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new pR(s,i),o.services.resourceStore=o.store}return o.translator=new Ky(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Mc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_R={},nE=(e,t,n,r)=>{Mc(n)&&_R[n]||(Mc(n)&&(_R[n]=new Date),Ode(e,t,n,r))},oB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rE=(e,t,n)=>{e.loadNamespaces(t,oB(e,n))},SR=(e,t,n,r)=>{if(Mc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,oB(e,r))},Ade=(e,t,n={})=>!t.languages||!t.languages.length?(nE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Mc=e=>typeof e=="string",Pde=e=>typeof e=="object"&&e!==null,kde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Tde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Mde=e=>Tde[e],Rde=e=>e.replace(kde,Mde);let iE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rde};const Dde=(e={})=>{iE={...iE,...e}},$de=()=>iE;let aB;const Ide=e=>{aB=e},Nde=()=>aB,IYe={type:"3rdParty",init(e){Dde(e.options.react),Ide(e)}},Lde=y.createContext();class Fde{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const jde=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},sB=(e,t,n,r)=>e.getFixedT(t,n,r),Bde=(e,t,n,r)=>y.useCallback(sB(e,t,n,r),[e,t,n,r]),NYe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(Lde)||{},o=n||r||Nde();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Fde),!o){nE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Mc(k)?k:Pde(k)&&Mc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&nE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...$de(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Mc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Ade(O,o,a)),f=Bde(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>sB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=jde(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?SR(o,t.lng,l,()=>{x.current&&v(p)}):rE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?SR(o,t.lng,l,()=>O()):rE(o,l,()=>O())})},{slice:zde,forEach:Ude}=[];function Vde(e){return Ude.call(zde.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const CR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Wde=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!CR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!CR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},ER={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Wde(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Ip=null;const OR=()=>{if(Ip!==null)return Ip;try{Ip=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ip=!1}return Ip};var qde={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&OR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&OR()&&window.localStorage.setItem(n,e)}};let Np=null;const AR=()=>{if(Np!==null)return Np;try{Np=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Np=!1}return Np};var Gde={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&AR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&AR()&&window.sessionStorage.setItem(n,e)}},Yde={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},Zde={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Xde={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Qde={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let uB=!1;try{document.cookie,uB=!0}catch{}const lB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];uB||lB.splice(1,1);const Jde=()=>({order:lB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class ehe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Vde(n,this.options||{},Jde()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Hde),this.addDetector(Kde),this.addDetector(qde),this.addDetector(Gde),this.addDetector(Yde),this.addDetector(Zde),this.addDetector(Xde),this.addDetector(Qde)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}ehe.type="languageDetector";var xm=e=>e.type==="checkbox",_c=e=>e instanceof Date,zi=e=>e==null;const cB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&cB(e)&&!_c(e),fB=e=>Or(e)&&e.target?xm(e.target)?e.target.checked:e.target.value:e,the=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dB=(e,t)=>e.has(the(t)),nhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},j5=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(j5&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!nhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var ew=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Ze=(e,t,n)=>{if(!t||!Or(e))return n;const r=ew(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},aa=e=>typeof e=="boolean",B5=e=>/^\w*$/.test(e),hB=e=>ew(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=B5(t)?[t]:hB(t),o=i.length,a=o-1;for(;++rF.useContext(pB),LYe=e=>{const{children:t,...n}=e;return F.createElement(pB.Provider,{value:n},t)};var gB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,mB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},w0=e=>Array.isArray(e)?e:[e],vB=(e,t,n)=>!e||!t||e===t||w0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function U5(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function rhe(e){const t=z5(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=F.useState(n._formState),u=F.useRef(!0),l=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=F.useRef(i);return c.current=i,U5({disabled:r,next:f=>u.current&&vB(c.current,f.name,o)&&mB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),F.useMemo(()=>gB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",yB=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Ze(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Ze(n,o))):(r&&(t.watchAll=!0),n);function ihe(e){const t=z5(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=F.useRef(r);s.current=r,U5({disabled:o,subject:n._subjects.values,next:c=>{vB(s.current,c.name,a)&&l(no(yB(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=F.useState(n._getWatch(r,i));return F.useEffect(()=>n._removeUnmounted()),u}function ohe(e){const t=z5(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=dB(i._names.array,n),s=ihe({control:i,name:n,defaultValue:Ze(i._formValues,n,Ze(i._defaultValues,n,e.defaultValue)),exact:!0}),u=rhe({control:i,name:n,exact:!0}),l=F.useRef(i.register(n,{...e.rules,value:s,...aa(e.disabled)?{disabled:e.disabled}:{}})),c=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ze(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ze(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ze(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ze(u.validatingFields,n)},error:{enumerable:!0,get:()=>Ze(u.errors,n)}}),[u,n]),f=F.useMemo(()=>({name:n,value:s,...aa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:fB(h),name:n},type:qy.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Ze(i._formValues,n),name:n},type:qy.BLUR}),ref:h=>{const p=Ze(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return F.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Ze(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Ze(i._options.defaultValues,n));An(i._defaultValues,n,m),Sr(Ze(i._formValues,n))&&An(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),F.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),F.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const FYe=e=>e.render(ohe(e));var bB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},PR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),kR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Ze(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(_0(s,t))break}else if(Or(s)&&_0(s,t))break}}};var ahe=(e,t,n)=>{const r=w0(Ze(e,n));return An(r,"root",t[n]),An(e,n,r),e},V5=e=>e.type==="file",hs=e=>typeof e=="function",Gy=e=>{if(!j5)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},X1=e=>vs(e),W5=e=>e.type==="radio",Yy=e=>e instanceof RegExp;const TR={value:!1,isValid:!1},MR={value:!0,isValid:!0};var xB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?MR:{value:e[0].value,isValid:!0}:MR:TR}return TR};const RR={isValid:!1,value:null};var wB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,RR):RR;function DR(e,t,n="validate"){if(X1(e)||Array.isArray(e)&&e.every(X1)||aa(e)&&!e)return{type:n,message:X1(e)?e:"",ref:t}}var Uf=e=>Or(e)&&!Yy(e)?e:{value:e,message:""},$R=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Ze(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=V=>{i&&S.reportValidity&&(S.setCustomValidity(aa(V)?"":V||""),S.reportValidity())},E={},C=W5(a),k=xm(a),M=C||k,L=(b||V5(a))&&Sr(a.value)&&Sr(x)||Gy(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,U=bB.bind(null,v,r,E),H=(V,ne,Z,G=qs.maxLength,q=qs.minLength)=>{const W=V?ne:Z;E[v]={type:V?G:q,message:W,ref:a,...U(V?G:q,W)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(L||zi(x))||aa(x)&&!x||k&&!xB(s).isValid||C&&!wB(s).isValid)){const{value:V,message:ne}=X1(u)?{value:!!u,message:u}:Uf(u);if(V&&(E[v]={type:qs.required,message:ne,ref:S,...U(qs.required,ne)},!r))return O(ne),E}if(!L&&(!zi(f)||!zi(h))){let V,ne;const Z=Uf(h),G=Uf(f);if(!zi(x)&&!isNaN(x)){const q=a.valueAsNumber||x&&+x;zi(Z.value)||(V=q>Z.value),zi(G.value)||(ne=qnew Date(new Date().toDateString()+" "+Y),j=a.type=="time",K=a.type=="week";vs(Z.value)&&x&&(V=j?W(x)>W(Z.value):K?x>Z.value:q>new Date(Z.value)),vs(G.value)&&x&&(ne=j?W(x)+V.value,G=!zi(ne.value)&&x.length<+ne.value;if((Z||G)&&(H(Z,V.message,ne.message),!r))return O(E[v].message),E}if(p&&!L&&vs(x)){const{value:V,message:ne}=Uf(p);if(Yy(V)&&!x.match(V)&&(E[v]={type:qs.pattern,message:ne,ref:a,...U(qs.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const V=await m(x,n),ne=DR(V,S);if(ne&&(E[v]={...ne,...U(qs.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let V={};for(const ne in m){if(!io(V)&&!r)break;const Z=DR(await m[ne](x,n),S,ne);Z&&(V={...Z,...U(ne,Z.message)},O(Z.message),r&&(E[v]=V))}if(!io(V)&&(E[v]={ref:S,...V},!r))return E}}return O(!0),E};function she(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},oE=e=>zi(e)||!cB(e);function nl(e,t){if(oE(e)||oE(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(_c(o)&&_c(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!nl(o,a):o!==a)return!1}}return!0}var _B=e=>e.type==="select-multiple",lhe=e=>W5(e)||xm(e),gS=e=>Gy(e)&&e.isConnected,SB=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function Zy(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!SB(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Zy(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function CB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!SB(e[i])?Sr(t)||oE(n[i])?n[i]=Array.isArray(e[i])?Zy(e[i],[]):{...Zy(e[i])}:CB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!nl(e[i],t[i]);return n}var Lp=(e,t)=>CB(e,t,Zy(t)),EB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function mS(e){const t=e.ref;return V5(t)?t.files:W5(t)?wB(e.refs).value:_B(t)?[...t.selectedOptions].map(({value:n})=>n):xm(t)?xB(e.refs).value:EB(Sr(t.value)?e.ref.value:t.value,e)}var che=(e,t,n,r)=>{const i={};for(const o of e){const a=Ze(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fp=e=>Sr(e)?e:Yy(e)?e.source:Or(e)?Yy(e.value)?e.value.source:e.value:e;const IR="AsyncFunction";var fhe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===IR||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IR)),dhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function NR(e,t,n){const r=Ze(e,n);if(r||B5(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Ze(t,o),s=Ze(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var hhe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,phe=(e,t)=>!ew(Ze(e,t)).length&&Br(e,t);const ghe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function mhe(e={}){let t={...ghe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:pS(),array:pS(),state:pS()},h=PR(t.mode),p=PR(t.reValidateMode),m=t.criteriaMode===ja.all,v=te=>de=>{clearTimeout(l),l=setTimeout(te,de)},b=async te=>{if(!t.disabled&&(c.isValid||te)){const de=t.resolver?io((await M()).errors):await U(r,!0);de!==n.isValid&&f.state.next({isValid:de})}},w=(te,de)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((te||Array.from(s.mount)).forEach(ge=>{ge&&(de?An(n.validatingFields,ge,de):Br(n.validatingFields,ge))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(te,de=[],ge,ze,Fe=!0,Ae=!0)=>{if(ze&&ge&&!t.disabled){if(a.action=!0,Ae&&Array.isArray(Ze(r,te))){const tt=ge(Ze(r,te),ze.argA,ze.argB);Fe&&An(r,te,tt)}if(Ae&&Array.isArray(Ze(n.errors,te))){const tt=ge(Ze(n.errors,te),ze.argA,ze.argB);Fe&&An(n.errors,te,tt),phe(n.errors,te)}if(c.touchedFields&&Ae&&Array.isArray(Ze(n.touchedFields,te))){const tt=ge(Ze(n.touchedFields,te),ze.argA,ze.argB);Fe&&An(n.touchedFields,te,tt)}c.dirtyFields&&(n.dirtyFields=Lp(i,o)),f.state.next({name:te,isDirty:V(te,de),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,te,de)},S=(te,de)=>{An(n.errors,te,de),f.state.next({errors:n.errors})},O=te=>{n.errors=te,f.state.next({errors:n.errors,isValid:!1})},E=(te,de,ge,ze)=>{const Fe=Ze(r,te);if(Fe){const Ae=Ze(o,te,Sr(ge)?Ze(i,te):ge);Sr(Ae)||ze&&ze.defaultChecked||de?An(o,te,de?Ae:mS(Fe._f)):G(te,Ae),a.mount&&b()}},C=(te,de,ge,ze,Fe)=>{let Ae=!1,tt=!1;const mt={name:te};if(!t.disabled){const xn=!!(Ze(r,te)&&Ze(r,te)._f&&Ze(r,te)._f.disabled);if(!ge||ze){c.isDirty&&(tt=n.isDirty,n.isDirty=mt.isDirty=V(),Ae=tt!==mt.isDirty);const Ht=xn||nl(Ze(i,te),de);tt=!!(!xn&&Ze(n.dirtyFields,te)),Ht||xn?Br(n.dirtyFields,te):An(n.dirtyFields,te,!0),mt.dirtyFields=n.dirtyFields,Ae=Ae||c.dirtyFields&&tt!==!Ht}if(ge){const Ht=Ze(n.touchedFields,te);Ht||(An(n.touchedFields,te,ge),mt.touchedFields=n.touchedFields,Ae=Ae||c.touchedFields&&Ht!==ge)}Ae&&Fe&&f.state.next(mt)}return Ae?mt:{}},k=(te,de,ge,ze)=>{const Fe=Ze(n.errors,te),Ae=c.isValid&&aa(de)&&n.isValid!==de;if(t.delayError&&ge?(u=v(()=>S(te,ge)),u(t.delayError)):(clearTimeout(l),u=null,ge?An(n.errors,te,ge):Br(n.errors,te)),(ge?!nl(Fe,ge):Fe)||!io(ze)||Ae){const tt={...ze,...Ae&&aa(de)?{isValid:de}:{},errors:n.errors,name:te};n={...n,...tt},f.state.next(tt)}},M=async te=>{w(te,!0);const de=await t.resolver(o,t.context,che(te||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(te),de},L=async te=>{const{errors:de}=await M(te);if(te)for(const ge of te){const ze=Ze(de,ge);ze?An(n.errors,ge,ze):Br(n.errors,ge)}else n.errors=de;return de},U=async(te,de,ge={valid:!0})=>{for(const ze in te){const Fe=te[ze];if(Fe){const{_f:Ae,...tt}=Fe;if(Ae){const mt=s.array.has(Ae.name),xn=Fe._f&&fhe(Fe._f);xn&&c.validatingFields&&w([ze],!0);const Ht=await $R(Fe,s.disabled,o,m,t.shouldUseNativeValidation&&!de,mt);if(xn&&c.validatingFields&&w([ze]),Ht[Ae.name]&&(ge.valid=!1,de))break;!de&&(Ze(Ht,Ae.name)?mt?ahe(n.errors,Ht,Ae.name):An(n.errors,Ae.name,Ht[Ae.name]):Br(n.errors,Ae.name))}!io(tt)&&await U(tt,de,ge)}}return ge.valid},H=()=>{for(const te of s.unMount){const de=Ze(r,te);de&&(de._f.refs?de._f.refs.every(ge=>!gS(ge)):!gS(de._f.ref))&&He(te)}s.unMount=new Set},V=(te,de)=>!t.disabled&&(te&&de&&An(o,te,de),!nl(oe(),i)),ne=(te,de,ge)=>yB(te,s,{...a.mount?o:Sr(de)?i:vs(te)?{[te]:de}:de},ge,de),Z=te=>ew(Ze(a.mount?o:i,te,t.shouldUnregister?Ze(i,te,[]):[])),G=(te,de,ge={})=>{const ze=Ze(r,te);let Fe=de;if(ze){const Ae=ze._f;Ae&&(!Ae.disabled&&An(o,te,EB(de,Ae)),Fe=Gy(Ae.ref)&&zi(de)?"":de,_B(Ae.ref)?[...Ae.ref.options].forEach(tt=>tt.selected=Fe.includes(tt.value)):Ae.refs?xm(Ae.ref)?Ae.refs.length>1?Ae.refs.forEach(tt=>(!tt.defaultChecked||!tt.disabled)&&(tt.checked=Array.isArray(Fe)?!!Fe.find(mt=>mt===tt.value):Fe===tt.value)):Ae.refs[0]&&(Ae.refs[0].checked=!!Fe):Ae.refs.forEach(tt=>tt.checked=tt.value===Fe):V5(Ae.ref)?Ae.ref.value="":(Ae.ref.value=Fe,Ae.ref.type||f.values.next({name:te,values:{...o}})))}(ge.shouldDirty||ge.shouldTouch)&&C(te,Fe,ge.shouldTouch,ge.shouldDirty,!0),ge.shouldValidate&&Y(te)},q=(te,de,ge)=>{for(const ze in de){const Fe=de[ze],Ae=`${te}.${ze}`,tt=Ze(r,Ae);(s.array.has(te)||Or(Fe)||tt&&!tt._f)&&!_c(Fe)?q(Ae,Fe,ge):G(Ae,Fe,ge)}},W=(te,de,ge={})=>{const ze=Ze(r,te),Fe=s.array.has(te),Ae=no(de);An(o,te,Ae),Fe?(f.array.next({name:te,values:{...o}}),(c.isDirty||c.dirtyFields)&&ge.shouldDirty&&f.state.next({name:te,dirtyFields:Lp(i,o),isDirty:V(te,Ae)})):ze&&!ze._f&&!zi(Ae)?q(te,Ae,ge):G(te,Ae,ge),kR(te,s)&&f.state.next({...n}),f.values.next({name:a.mount?te:void 0,values:{...o}})},j=async te=>{a.mount=!0;const de=te.target;let ge=de.name,ze=!0;const Fe=Ze(r,ge),Ae=()=>de.type?mS(Fe._f):fB(te),tt=mt=>{ze=Number.isNaN(mt)||_c(mt)&&isNaN(mt.getTime())||nl(mt,Ze(o,ge,mt))};if(Fe){let mt,xn;const Ht=Ae(),wn=te.type===qy.BLUR||te.type===qy.FOCUS_OUT,Ii=!dhe(Fe._f)&&!t.resolver&&!Ze(n.errors,ge)&&!Fe._f.deps||hhe(wn,Ze(n.touchedFields,ge),n.isSubmitted,p,h),br=kR(ge,s,wn);An(o,ge,Ht),wn?(Fe._f.onBlur&&Fe._f.onBlur(te),u&&u(0)):Fe._f.onChange&&Fe._f.onChange(te);const yi=C(ge,Ht,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ge,type:te.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ge,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ge]);if(tt(Ht),ze){const bi=NR(n.errors,r,ge),Rr=NR(si,r,bi.name||ge);mt=Rr.error,ge=Rr.name,xn=io(si)}}else w([ge],!0),mt=(await $R(Fe,s.disabled,o,m,t.shouldUseNativeValidation))[ge],w([ge]),tt(Ht),ze&&(mt?xn=!1:c.isValid&&(xn=await U(r,!0)));ze&&(Fe._f.deps&&Y(Fe._f.deps),k(ge,xn,mt,yi))}},K=(te,de)=>{if(Ze(n.errors,de)&&te.focus)return te.focus(),1},Y=async(te,de={})=>{let ge,ze;const Fe=w0(te);if(t.resolver){const Ae=await L(Sr(te)?te:Fe);ge=io(Ae),ze=te?!Fe.some(tt=>Ze(Ae,tt)):ge}else te?(ze=(await Promise.all(Fe.map(async Ae=>{const tt=Ze(r,Ae);return await U(tt&&tt._f?{[Ae]:tt}:tt)}))).every(Boolean),!(!ze&&!n.isValid)&&b()):ze=ge=await U(r);return f.state.next({...!vs(te)||c.isValid&&ge!==n.isValid?{}:{name:te},...t.resolver||!te?{isValid:ge}:{},errors:n.errors}),de.shouldFocus&&!ze&&_0(r,K,te?Fe:s.mount),ze},oe=te=>{const de={...a.mount?o:i};return Sr(te)?de:vs(te)?Ze(de,te):te.map(ge=>Ze(de,ge))},ae=(te,de)=>({invalid:!!Ze((de||n).errors,te),isDirty:!!Ze((de||n).dirtyFields,te),error:Ze((de||n).errors,te),isValidating:!!Ze(n.validatingFields,te),isTouched:!!Ze((de||n).touchedFields,te)}),ue=te=>{te&&w0(te).forEach(de=>Br(n.errors,de)),f.state.next({errors:te?n.errors:{}})},be=(te,de,ge)=>{const ze=(Ze(r,te,{_f:{}})._f||{}).ref,Fe=Ze(n.errors,te)||{},{ref:Ae,message:tt,type:mt,...xn}=Fe;An(n.errors,te,{...xn,...de,ref:ze}),f.state.next({name:te,errors:n.errors,isValid:!1}),ge&&ge.shouldFocus&&ze&&ze.focus&&ze.focus()},we=(te,de)=>hs(te)?f.values.subscribe({next:ge=>te(ne(void 0,de),ge)}):ne(te,de,!0),He=(te,de={})=>{for(const ge of te?w0(te):s.mount)s.mount.delete(ge),s.array.delete(ge),de.keepValue||(Br(r,ge),Br(o,ge)),!de.keepError&&Br(n.errors,ge),!de.keepDirty&&Br(n.dirtyFields,ge),!de.keepTouched&&Br(n.touchedFields,ge),!de.keepIsValidating&&Br(n.validatingFields,ge),!t.shouldUnregister&&!de.keepDefaultValue&&Br(i,ge);f.values.next({values:{...o}}),f.state.next({...n,...de.keepDirty?{isDirty:V()}:{}}),!de.keepIsValid&&b()},Ee=({disabled:te,name:de,field:ge,fields:ze})=>{(aa(te)&&a.mount||te||s.disabled.has(de))&&(te?s.disabled.add(de):s.disabled.delete(de),C(de,mS(ge?ge._f:Ze(ze,de)._f),!1,!1,!0))},it=(te,de={})=>{let ge=Ze(r,te);const ze=aa(de.disabled)||aa(t.disabled);return An(r,te,{...ge||{},_f:{...ge&&ge._f?ge._f:{ref:{name:te}},name:te,mount:!0,...de}}),s.mount.add(te),ge?Ee({field:ge,disabled:aa(de.disabled)?de.disabled:t.disabled,name:te}):E(te,!0,de.value),{...ze?{disabled:de.disabled||t.disabled}:{},...t.progressive?{required:!!de.required,min:Fp(de.min),max:Fp(de.max),minLength:Fp(de.minLength),maxLength:Fp(de.maxLength),pattern:Fp(de.pattern)}:{},name:te,onChange:j,onBlur:j,ref:Fe=>{if(Fe){it(te,de),ge=Ze(r,te);const Ae=Sr(Fe.value)&&Fe.querySelectorAll&&Fe.querySelectorAll("input,select,textarea")[0]||Fe,tt=lhe(Ae),mt=ge._f.refs||[];if(tt?mt.find(xn=>xn===Ae):Ae===ge._f.ref)return;An(r,te,{_f:{...ge._f,...tt?{refs:[...mt.filter(gS),Ae,...Array.isArray(Ze(i,te))?[{}]:[]],ref:{type:Ae.type,name:te}}:{ref:Ae}}}),E(te,!1,void 0,Ae)}else ge=Ze(r,te,{}),ge._f&&(ge._f.mount=!1),(t.shouldUnregister||de.shouldUnregister)&&!(dB(s.array,te)&&a.action)&&s.unMount.add(te)}}},ke=()=>t.shouldFocusError&&_0(r,K,s.mount),Le=te=>{aa(te)&&(f.state.next({disabled:te}),_0(r,(de,ge)=>{const ze=Ze(r,ge);ze&&(de.disabled=ze._f.disabled||te,Array.isArray(ze._f.refs)&&ze._f.refs.forEach(Fe=>{Fe.disabled=ze._f.disabled||te}))},0,!1))},De=(te,de)=>async ge=>{let ze;ge&&(ge.preventDefault&&ge.preventDefault(),ge.persist&&ge.persist());let Fe=no(o);if(s.disabled.size)for(const Ae of s.disabled)An(Fe,Ae,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Ae,values:tt}=await M();n.errors=Ae,Fe=tt}else await U(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await te(Fe,ge)}catch(Ae){ze=Ae}}else de&&await de({...n.errors},ge),ke(),setTimeout(ke);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!ze,submitCount:n.submitCount+1,errors:n.errors}),ze)throw ze},me=(te,de={})=>{Ze(r,te)&&(Sr(de.defaultValue)?W(te,no(Ze(i,te))):(W(te,de.defaultValue),An(i,te,no(de.defaultValue))),de.keepTouched||Br(n.touchedFields,te),de.keepDirty||(Br(n.dirtyFields,te),n.isDirty=de.defaultValue?V(te,no(Ze(i,te))):V()),de.keepError||(Br(n.errors,te),c.isValid&&b()),f.state.next({...n}))},yt=(te,de={})=>{const ge=te?no(te):i,ze=no(ge),Fe=io(te),Ae=Fe?i:ze;if(de.keepDefaultValues||(i=ge),!de.keepValues){if(de.keepDirtyValues){const tt=new Set([...s.mount,...Object.keys(Lp(i,o))]);for(const mt of Array.from(tt))Ze(n.dirtyFields,mt)?An(Ae,mt,Ze(o,mt)):W(mt,Ze(Ae,mt))}else{if(j5&&Sr(te))for(const tt of s.mount){const mt=Ze(r,tt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(Gy(xn)){const Ht=xn.closest("form");if(Ht){Ht.reset();break}}}}r={}}o=t.shouldUnregister?de.keepDefaultValues?no(i):{}:no(Ae),f.array.next({values:{...Ae}}),f.values.next({values:{...Ae}})}s={mount:de.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!de.keepIsValid||!!de.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:de.keepSubmitCount?n.submitCount:0,isDirty:Fe?!1:de.keepDirty?n.isDirty:!!(de.keepDefaultValues&&!nl(te,i)),isSubmitted:de.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Fe?{}:de.keepDirtyValues?de.keepDefaultValues&&o?Lp(i,o):n.dirtyFields:de.keepDefaultValues&&te?Lp(i,te):de.keepDirty?n.dirtyFields:{},touchedFields:de.keepTouched?n.touchedFields:{},errors:de.keepErrors?n.errors:{},isSubmitSuccessful:de.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(te,de)=>yt(hs(te)?te(o):te,de);return{control:{register:it,unregister:He,getFieldState:ae,handleSubmit:De,setError:be,_executeSchema:M,_getWatch:ne,_getDirty:V,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:Ee,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(te=>{lt(te,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:te=>{n={...n,...te}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(te){a=te},get _defaultValues(){return i},get _names(){return s},set _names(te){s=te},get _formState(){return n},set _formState(te){n=te},get _options(){return t},set _options(te){t={...t,...te}}},trigger:Y,register:it,handleSubmit:De,watch:we,setValue:W,getValues:oe,reset:lt,resetField:me,clearErrors:ue,unregister:He,setError:be,setFocus:(te,de={})=>{const ge=Ze(r,te),ze=ge&&ge._f;if(ze){const Fe=ze.refs?ze.refs[0]:ze.ref;Fe.focus&&(Fe.focus(),de.shouldSelect&&hs(Fe.select)&&Fe.select())}},getFieldState:ae}}function jYe(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[r,i]=F.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...mhe(e),formState:r});const o=t.current.control;return o._options=e,U5({subject:o._subjects.state,next:a=>{mB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),F.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),F.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),F.useEffect(()=>{e.values&&!nl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),F.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),F.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=gB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var aE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aE||(aE={}));const rt=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return rt.undefined;case"string":return rt.string;case"number":return isNaN(e)?rt.nan:rt.number;case"boolean":return rt.boolean;case"function":return rt.function;case"bigint":return rt.bigint;case"symbol":return rt.symbol;case"object":return Array.isArray(e)?rt.array:e===null?rt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?rt.promise:typeof Map<"u"&&e instanceof Map?rt.map:typeof Set<"u"&&e instanceof Set?rt.set:typeof Date<"u"&&e instanceof Date?rt.date:rt.object;default:return rt.unknown}},Ue=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Lo.create=e=>new Lo(e);const qd=(e,t)=>{let n;switch(e.code){case Ue.invalid_type:e.received===rt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ue.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ue.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ue.invalid_union:n="Invalid input";break;case Ue.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ue.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ue.invalid_arguments:n="Invalid function arguments";break;case Ue.invalid_return_type:n="Invalid function return type";break;case Ue.invalid_date:n="Invalid date";break;case Ue.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ue.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ue.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ue.custom:n="Invalid input";break;case Ue.invalid_intersection_types:n="Intersection results could not be merged";break;case Ue.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ue.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let OB=qd;function yhe(e){OB=e}function Xy(){return OB}const Qy=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},bhe=[];function et(e,t){const n=Xy(),r=Qy({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qd?void 0:qd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),gd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),sE=e=>e.status==="aborted",uE=e=>e.status==="dirty",Gc=e=>e.status==="valid",tg=e=>typeof Promise<"u"&&e instanceof Promise;function Jy(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function AB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var o0,a0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const LR=(e,t)=>{if(Gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lo(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Jt{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return LR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(tg(i)?i:Promise.resolve(i));return LR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:Ue.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ha.create(this)}promise(){return Yd.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return ag.create(this,t,this._def)}transform(t){return new Ya({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new H5({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dg({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return wm.create(this,t)}readonly(){return hg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xhe=/^c[^\s-]{8,}$/i,whe=/^[0-9a-z]+$/,_he=/^[0-9A-HJKMNP-TV-Z]{26}$/i,She=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Che=/^[a-z0-9_-]{21}$/i,Ehe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ohe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ahe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Phe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vS;const khe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,The=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Mhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Rhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dhe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$he=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ihe=new RegExp(`^${PB}$`);function kB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Nhe(e){return new RegExp(`^${kB(e)}$`)}function TB(e){let t=`${PB}T${kB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Lhe(e,t){return!!((t==="v4"||!t)&&khe.test(e)||(t==="v6"||!t)&&Mhe.test(e))}function Fhe(e,t){if(!Ehe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function jhe(e,t){return!!((t==="v4"||!t)&&The.test(e)||(t==="v6"||!t)&&Rhe.test(e))}class za extends Jt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==rt.string){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),et(i,{code:Ue.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:Ue.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function Bhe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==rt.number){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Bhe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class kl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==rt.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return et(n,{code:Ue.invalid_type,expected:rt.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class ng extends Jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==rt.boolean){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}ng.create=e=>new ng({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Yc extends Jt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==rt.date){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),et(i,{code:Ue.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Yc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class eb extends Jt{_parse(t){if(this._getType(t)!==rt.symbol){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}eb.create=e=>new eb({typeName:Tt.ZodSymbol,...qt(e)});class rg extends Jt{_parse(t){if(this._getType(t)!==rt.undefined){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}rg.create=e=>new rg({typeName:Tt.ZodUndefined,...qt(e)});class ig extends Jt{_parse(t){if(this._getType(t)!==rt.null){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.null,received:r.parsedType}),Dt}return Hi(t.data)}}ig.create=e=>new ig({typeName:Tt.ZodNull,...qt(e)});class Gd extends Jt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}Gd.create=e=>new Gd({typeName:Tt.ZodAny,...qt(e)});class Rc extends Jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Rc.create=e=>new Rc({typeName:Tt.ZodUnknown,...qt(e)});class bu extends Jt{_parse(t){const n=this._getOrReturnCtx(t);return et(n,{code:Ue.invalid_type,expected:rt.never,received:n.parsedType}),Dt}}bu.create=e=>new bu({typeName:Tt.ZodNever,...qt(e)});class tb extends Jt{_parse(t){if(this._getType(t)!==rt.undefined){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.void,received:r.parsedType}),Dt}return Hi(t.data)}}tb.create=e=>new tb({typeName:Tt.ZodVoid,...qt(e)});class Ha extends Jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==rt.array)return et(n,{code:Ue.invalid_type,expected:rt.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(et(n,{code:Ue.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ha({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Ha({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Ha({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ha.create=(e,t)=>new Ha({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function ed(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(ed(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Ha?new Ha({...e._def,type:ed(e.element)}):e instanceof Es?Es.create(ed(e.unwrap())):e instanceof Ml?Ml.create(ed(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>ed(t))):e}class cr extends Jt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==rt.object){const l=this._getOrReturnCtx(t);return et(l,{code:Ue.invalid_type,expected:rt.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof bu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof bu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(et(i,{code:Ue.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return ed(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return MB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});class og extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Lo(s.ctx.common.issues));return et(n,{code:Ue.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Lo(u));return et(n,{code:Ue.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:Tt.ZodUnion,...qt(t)});const Zs=e=>e instanceof ug?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof lg?[e.value]:e instanceof Tl?e.options:e instanceof cg?gn.objectValues(e.enum):e instanceof fg?Zs(e._def.innerType):e instanceof rg?[void 0]:e instanceof ig?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Ml?[null,...Zs(e.unwrap())]:e instanceof H5||e instanceof hg?Zs(e.unwrap()):e instanceof dg?Zs(e._def.innerType):[];class tw extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.object)return et(n,{code:Ue.invalid_type,expected:rt.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(et(n,{code:Ue.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new tw({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function lE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===rt.object&&r===rt.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=lE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===rt.array&&r===rt.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(sE(o)||sE(a))return Dt;const s=lE(o.value,a.value);return s.valid?((uE(o)||uE(a))&&n.dirty(),{status:n.value,value:s.data}):(et(r,{code:Ue.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ag.create=(e,t,n)=>new ag({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Ts extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.array)return et(r,{code:Ue.invalid_type,expected:rt.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(et(r,{code:Ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class sg extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.object)return et(r,{code:Ue.invalid_type,expected:rt.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Jt?new sg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new sg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class nb extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.map)return et(r,{code:Ue.invalid_type,expected:rt.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}nb.create=(e,t,n)=>new nb({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Zc extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.set)return et(r,{code:Ue.invalid_type,expected:rt.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(et(r,{code:Ue.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Zc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Zc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class Ad extends Jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.function)return et(n,{code:Ue.invalid_type,expected:rt.function,received:n.parsedType}),Dt;function r(s,u){return Qy({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xy(),qd].filter(l=>!!l),issueData:{code:Ue.invalid_arguments,argumentsError:u}})}function i(s,u){return Qy({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xy(),qd].filter(l=>!!l),issueData:{code:Ue.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yd){const s=this;return Hi(async function(...u){const l=new Lo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Hi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Lo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Lo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ad({...this._def,args:Ts.create(t).rest(Rc.create())})}returns(t){return new Ad({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ad({args:t||Ts.create([]).rest(Rc.create()),returns:n||Rc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class ug extends Jt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Tt.ZodLazy,...qt(t)});class lg extends Jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return et(n,{received:n.data,code:Ue.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}lg.create=(e,t)=>new lg({value:e,typeName:Tt.ZodLiteral,...qt(t)});function MB(e,t){return new Tl({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Tl extends Jt{constructor(){super(...arguments),o0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return et(n,{expected:gn.joinValues(r),received:n.parsedType,code:Ue.invalid_type}),Dt}if(Jy(this,o0)||AB(this,o0,new Set(this._def.values)),!Jy(this,o0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return et(n,{received:n.data,code:Ue.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Tl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}o0=new WeakMap;Tl.create=MB;class cg extends Jt{constructor(){super(...arguments),a0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==rt.string&&r.parsedType!==rt.number){const i=gn.objectValues(n);return et(r,{expected:gn.joinValues(i),received:r.parsedType,code:Ue.invalid_type}),Dt}if(Jy(this,a0)||AB(this,a0,new Set(gn.getValidEnumValues(this._def.values))),!Jy(this,a0).has(t.data)){const i=gn.objectValues(n);return et(r,{received:r.data,code:Ue.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}a0=new WeakMap;cg.create=(e,t)=>new cg({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Yd extends Jt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.promise&&n.common.async===!1)return et(n,{code:Ue.invalid_type,expected:rt.promise,received:n.parsedType}),Dt;const r=n.parsedType===rt.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(e,t)=>new Yd({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ya extends Jt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{et(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?gd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?gd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class Es extends Jt{_parse(t){return this._getType(t)===rt.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Ml extends Jt{_parse(t){return this._getType(t)===rt.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class fg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===rt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class dg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tg(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dg.create=(e,t)=>new dg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class rb extends Jt{_parse(t){if(this._getType(t)!==rt.nan){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}rb.create=e=>new rb({typeName:Tt.ZodNaN,...qt(e)});const zhe=Symbol("zod_brand");class H5 extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class wm extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),gd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new wm({in:t,out:n,typeName:Tt.ZodPipeline})}}class hg extends Jt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Gc(i)&&(i.value=Object.freeze(i.value)),i);return tg(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hg.create=(e,t)=>new hg({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function RB(e,t={},n){return e?Gd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Gd.create()}const Uhe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Vhe=(e,t={message:`Input not instance of ${e.name}`})=>RB(n=>n instanceof e,t),DB=za.create,$B=Pl.create,Whe=rb.create,Hhe=kl.create,IB=ng.create,Khe=Yc.create,qhe=eb.create,Ghe=rg.create,Yhe=ig.create,Zhe=Gd.create,Xhe=Rc.create,Qhe=bu.create,Jhe=tb.create,epe=Ha.create,tpe=cr.create,npe=cr.strictCreate,rpe=og.create,ipe=tw.create,ope=ag.create,ape=Ts.create,spe=sg.create,upe=nb.create,lpe=Zc.create,cpe=Ad.create,fpe=ug.create,dpe=lg.create,hpe=Tl.create,ppe=cg.create,gpe=Yd.create,FR=Ya.create,mpe=Es.create,vpe=Ml.create,ype=Ya.createWithPreprocess,bpe=wm.create,xpe=()=>DB().optional(),wpe=()=>$B().optional(),_pe=()=>IB().optional(),Spe={string:e=>za.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>ng.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>Yc.create({...e,coerce:!0})},Cpe=Dt;var BYe=Object.freeze({__proto__:null,defaultErrorMap:qd,setErrorMap:yhe,getErrorMap:Xy,makeIssue:Qy,EMPTY_PATH:bhe,addIssueToContext:et,ParseStatus:$i,INVALID:Dt,DIRTY:gd,OK:Hi,isAborted:sE,isDirty:uE,isValid:Gc,isAsync:tg,get util(){return gn},get objectUtil(){return aE},ZodParsedType:rt,getParsedType:nu,ZodType:Jt,datetimeRegex:TB,ZodString:za,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:ng,ZodDate:Yc,ZodSymbol:eb,ZodUndefined:rg,ZodNull:ig,ZodAny:Gd,ZodUnknown:Rc,ZodNever:bu,ZodVoid:tb,ZodArray:Ha,ZodObject:cr,ZodUnion:og,ZodDiscriminatedUnion:tw,ZodIntersection:ag,ZodTuple:Ts,ZodRecord:sg,ZodMap:nb,ZodSet:Zc,ZodFunction:Ad,ZodLazy:ug,ZodLiteral:lg,ZodEnum:Tl,ZodNativeEnum:cg,ZodPromise:Yd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Ml,ZodDefault:fg,ZodCatch:dg,ZodNaN:rb,BRAND:zhe,ZodBranded:H5,ZodPipeline:wm,ZodReadonly:hg,custom:RB,Schema:Jt,ZodSchema:Jt,late:Uhe,get ZodFirstPartyTypeKind(){return Tt},coerce:Spe,any:Zhe,array:epe,bigint:Hhe,boolean:IB,date:Khe,discriminatedUnion:ipe,effect:FR,enum:hpe,function:cpe,instanceof:Vhe,intersection:ope,lazy:fpe,literal:dpe,map:upe,nan:Whe,nativeEnum:ppe,never:Qhe,null:Yhe,nullable:vpe,number:$B,object:tpe,oboolean:_pe,onumber:wpe,optional:mpe,ostring:xpe,pipeline:bpe,preprocess:ype,promise:gpe,record:spe,set:lpe,strictObject:npe,string:DB,symbol:qhe,transformer:FR,tuple:ape,undefined:Ghe,union:rpe,unknown:Xhe,void:Jhe,NEVER:Cpe,ZodIssueCode:Ue,quotelessJson:vhe,ZodError:Lo});const jR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ze(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},NB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?jR(r.ref,n,e):r.refs&&r.refs.forEach(i=>jR(i,n,e))}},Epe=(e,t)=>{t.shouldUseNativeValidation&&NB(e,t);const n={};for(const r in e){const i=Ze(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ope(t.names||Object.keys(e),r)){const a=Object.assign({},Ze(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Ope=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ape=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=bB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},zYe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&NB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:Epe(Ape(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},Ppe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=Ppe.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Al:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function LB(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}var kpe="Label",FB=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));FB.displayName=kpe;var UYe=FB,jB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(La,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],q=Z%100;return"["+Z+(G[(q-20)%10]||G[q]||G[0])+"]"}},S=function(Z,G,q){var W=String(Z);return!W||W.length>=G?Z:""+Array(G+1-W.length).join(q)+Z},O={s:S,z:function(Z){var G=-Z.utcOffset(),q=Math.abs(G),W=Math.floor(q/60),j=q%60;return(G<=0?"+":"-")+S(W,2,"0")+":"+S(j,2,"0")},m:function Z(G,q){if(G.date()1)return Z(Y[0])}else{var oe=G.name;C[oe]=G,j=oe}return!W&&j&&(E=j),j||!W&&E},U=function(Z,G){if(M(Z))return Z.clone();var q=typeof G=="object"?G:{};return q.date=Z,q.args=arguments,new V(q)},H=O;H.l=L,H.i=M,H.w=function(Z,G){return U(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var V=function(){function Z(q){this.$L=L(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[k]=!0}var G=Z.prototype;return G.parse=function(q){this.$d=function(W){var j=W.date,K=W.utc;if(j===null)return new Date(NaN);if(H.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var Y=j.match(b);if(Y){var oe=Y[2]-1||0,ae=(Y[7]||"0").substring(0,3);return K?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ae)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ae)}}return new Date(j)}(q),this.init()},G.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==v},G.isSame=function(q,W){var j=U(q);return this.startOf(W)<=j&&j<=this.endOf(W)},G.isAfter=function(q,W){return U(q){const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return I.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Rpe(i,...t)]}function Rpe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Dpe=globalThis?.document?y.useLayoutEffect:()=>{},$pe=P4.useId||(()=>{}),Ipe=0;function Fo(e){const[t,n]=y.useState($pe());return Dpe(()=>{e||n(r=>r??String(Ipe++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Npe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Vr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Npe({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Vr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Lpe(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Fpe(e,t=globalThis?.document){const n=Lpe(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var jpe="DismissableLayer",cE="dismissableLayer.update",Bpe="dismissableLayer.pointerDownOutside",zpe="dismissableLayer.focusOutside",BR,BB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(BB),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Gt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=Wpe(k=>{const M=k.target,L=[...l.branches].some(U=>U.contains(M));!O||L||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=Hpe(k=>{const M=k.target;[...l.branches].some(U=>U.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return Fpe(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(BR=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),zR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=BR)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),zR())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(cE,k),()=>document.removeEventListener(cE,k)},[]),I.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});Nh.displayName=jpe;var Upe="DismissableLayerBranch",Vpe=y.forwardRef((e,t)=>{const n=y.useContext(BB),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Vpe.displayName=Upe;function Wpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){zB(Bpe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&zB(zpe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zR(){const e=new CustomEvent(cE);document.dispatchEvent(e)}function zB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?LB(i,o):i.dispatchEvent(o)}var yS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",UR={bubbles:!1,cancelable:!0},Kpe="FocusScope",_m=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Vr(i),c=Vr(o),f=y.useRef(null),h=Gt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Gu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Gu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Gu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){WR.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(yS,UR);s.addEventListener(yS,l),s.dispatchEvent(w),w.defaultPrevented||(qpe(Qpe(UB(s)),{select:!0}),document.activeElement===v&&Gu(s))}return()=>{s.removeEventListener(yS,l),setTimeout(()=>{const w=new CustomEvent(bS,UR);s.addEventListener(bS,c),s.dispatchEvent(w),w.defaultPrevented||Gu(v??document.body,{select:!0}),s.removeEventListener(bS,c),WR.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=Gpe(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Gu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Gu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});_m.displayName=Kpe;function qpe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gu(r,{select:t}),document.activeElement!==n)return}function Gpe(e){const t=UB(e),n=VR(t,e),r=VR(t.reverse(),e);return[n,r]}function UB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VR(e,t){for(const n of e)if(!Ype(n,{upTo:t}))return n}function Ype(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zpe(e){return e instanceof HTMLInputElement&&"select"in e}function Gu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zpe(e)&&t&&e.select()}}var WR=Xpe();function Xpe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=HR(e,t),e.unshift(t)},remove(t){e=HR(e,t),e[0]?.resume()}}}function HR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qpe(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},Jpe="Portal",Lh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?jx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Lh.displayName=Jpe;function e0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=t0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Gt(r.ref,n0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function t0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=e0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=i1(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=i1(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=i1(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=i1(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function i1(e){return e?.animationName||"none"}function n0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xS=0;function nw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??KR()),document.body.insertAdjacentElement("beforeend",e[1]??KR()),xS++,()=>{xS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xS--}},[])}function KR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return m0e;var t=v0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},b0e=g0e(),Pd="data-scroll-locked",x0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` +`):" "+ZM(o[0]):"as no adapter specified";throw new qt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:WC};function fS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $h(null,e)}function XM(e){return fS(e),e.headers=ho.from(e.headers),e.data=cS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bj.getAdapter(e.adapter||bm.adapter)(e).then(function(r){return fS(e),r.data=cS.call(e,e.transformResponse,r),r.headers=ho.from(r.headers),r},function(r){return $j(r)||(fS(e),r&&r.response&&(r.response.data=cS.call(e,e.transformResponse,r.response),r.response.headers=ho.from(r.response.headers))),Promise.reject(r)})}const zj="1.7.9",Qx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const QM={};Qx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+zj+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new qt(i(a," has been removed"+(n?" in "+n:"")),qt.ERR_DEPRECATED);return n&&!QM[a]&&(QM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};Qx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function afe(e,t,n){if(typeof e!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new qt("option "+o+" must be "+u,qt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qt("Unknown option "+o,qt.ERR_BAD_OPTION)}}const Z1={assertOptions:afe,validators:Qx},ls=Z1.validators;class Tc{constructor(t){this.defaults=t,this.interceptors={request:new VM,response:new VM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Z1.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(xe.isFunction(i)?n.paramsSerializer={serialize:i}:Z1.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Z1.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&xe.merge(o.common,o[n.method]);o&&xe.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ho.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[XM.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $h(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $5(function(i){t=i}),cancel:t}}}function sfe(e){return function(n){return e.apply(null,n)}}function ufe(e){return xe.isObject(e)&&e.isAxiosError===!0}const HC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HC).forEach(([e,t])=>{HC[t]=e});function Uj(e){const t=new Tc(e),n=bj(Tc.prototype.request,t);return xe.extend(n,Tc.prototype,t,{allOwnKeys:!0}),xe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Uj(Hc(e,i))},n}const qr=Uj(bm);qr.Axios=Tc;qr.CanceledError=$h;qr.CancelToken=$5;qr.isCancel=$j;qr.VERSION=zj;qr.toFormData=Zx;qr.AxiosError=qt;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=sfe;qr.isAxiosError=ufe;qr.mergeConfig=Hc;qr.AxiosHeaders=ho;qr.formToJSON=e=>Dj(xe.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=Bj.getAdapter;qr.HttpStatusCode=HC;qr.default=qr;var lfe=e=>{switch(e){case"success":return dfe;case"info":return pfe;case"warning":return hfe;case"error":return gfe;default:return null}},cfe=Array(12).fill(0),ffe=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},cfe.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),pfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vfe=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},KC=1,yfe=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:KC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async u=>{if(o=["resolve",u],F.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(xfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||KC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Po=new yfe,bfe=(e,t)=>{let n=t?.id||KC++;return Po.addToast({title:e,...t,id:n}),n},xfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wfe=bfe,_fe=()=>Po.toasts,AYe=Object.assign(wfe,{success:Po.success,info:Po.info,warning:Po.warning,error:Po.error,custom:Po.custom,message:Po.message,promise:Po.promise,dismiss:Po.dismiss,loading:Po.loading},{getHistory:_fe});function Sfe(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Sfe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function t1(e){return e.label!==void 0}var Cfe=3,Efe="32px",JM=4e3,Ofe=356,Afe=14,Pfe=20,kfe=200;function Tfe(...e){return e.filter(Boolean).join(" ")}var Mfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:L,cancelButtonStyle:U,actionButtonStyle:H,className:V="",descriptionClassName:ne="",duration:Z,position:G,gap:q,loadingIcon:W,expandByDefault:j,classNames:K,icons:Y,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:ae,cn:ue}=e,[be,we]=F.useState(!1),[He,Ee]=F.useState(!1),[it,ke]=F.useState(!1),[Le,De]=F.useState(!1),[me,yt]=F.useState(!1),[lt,Nt]=F.useState(0),[yn,nn]=F.useState(0),te=F.useRef(p.duration||Z||JM),de=F.useRef(null),ge=F.useRef(null),ze=S===0,Fe=S+1<=w,Ae=p.type,tt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Kt=F.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=F.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);F.useMemo(()=>p.duration||Z||JM,[p.duration,Z]);let Ii=F.useRef(0),br=F.useRef(0),yi=F.useRef(0),sr=F.useRef(null),[si,bi]=G.split("-"),Rr=F.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Kt?_t:_t+hn.height,0),[x,Kt]),Xi=vfe(),yo=p.invert||h,xi=Ae==="loading";br.current=F.useMemo(()=>Kt*q+Rr,[Kt,Rr]),F.useEffect(()=>{we(!0)},[]),F.useEffect(()=>{let _t=ge.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(qn=>qn.toastId!==p.id))}},[b,p.id]),F.useLayoutEffect(()=>{if(!be)return;let _t=ge.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(qn=>qn.find(ur=>ur.toastId===p.id)?qn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...qn])},[be,p.title,p.description,b,p.id]);let Dr=F.useCallback(()=>{Ee(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},kfe)},[p,C,b,br]);F.useEffect(()=>{if(p.promise&&Ae==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||ae&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},te.current)),()=>clearTimeout(_t)},[E,v,p,Ae,ae,Xi,Dr]),F.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function _a(){var _t,hn,_n;return Y!=null&&Y.loading?F.createElement("div",{className:ue(K?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":Ae==="loading"},Y.loading):W?F.createElement("div",{className:ue(K?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":Ae==="loading"},W):F.createElement(ffe,{className:ue(K?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:Ae==="loading"})}return F.createElement("li",{tabIndex:0,ref:ge,className:ue(V,mt,K?.toast,(t=p?.classNames)==null?void 0:t.toast,K?.default,K?.[Ae],(n=p?.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":be,"data-promise":!!p.promise,"data-swiped":me,"data-removed":He,"data-visible":Fe,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":ze,"data-swiping":it,"data-dismissible":tt,"data-type":Ae,"data-invert":yo,"data-swipe-out":Le,"data-expanded":!!(E||j&&be),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${He?lt:br.current}px`,"--initial-height":j?"auto":`${yn}px`,...L,...p.style},onPointerDown:_t=>{xi||!tt||(de.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(ke(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,qn;if(Le||!tt)return;sr.current=null;let ur=Number(((_t=ge.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=de.current)==null?void 0:hn.getTime()),bo=Math.abs(ur)/Xr;if(Math.abs(ur)>=Pfe||bo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),De(!0),yt(!1);return}(qn=ge.current)==null||qn.style.setProperty("--swipe-amount","0px"),ke(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!tt)return;let qn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ge.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?F.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!tt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:ue(K?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:mfe):null,p.jsx||F.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,Ae||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:ue(K?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||_a():null,p.type!=="loading"?p.icon||Y?.[Ae]||lfe(Ae):null):null,F.createElement("div",{"data-content":"",className:ue(K?.content,(s=p?.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:ue(K?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:ue(ne,xn,K?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&t1(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||U,onClick:_t=>{var hn,_n;t1(p.cancel)&&tt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:ue(K?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&t1(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:_t=>{var hn,_n;t1(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:ue(K?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function eR(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var PYe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Cfe,toastOptions:m,dir:v=eR(),gap:b=Afe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Tfe}=e,[C,k]=F.useState([]),M=F.useMemo(()=>Array.from(new Set([r].concat(C.filter(ae=>ae.position).map(ae=>ae.position)))),[C,r]),[L,U]=F.useState([]),[H,V]=F.useState(!1),[ne,Z]=F.useState(!1),[G,q]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=F.useRef(null),Y=F.useRef(!1),oe=F.useCallback(ae=>{k(ue=>{var be;return(be=ue.find(we=>we.id===ae.id))!=null&&be.delete||Po.dismiss(ae.id),ue.filter(({id:we})=>we!==ae.id)})},[]);return F.useEffect(()=>Po.subscribe(ae=>{if(ae.dismiss){k(ue=>ue.map(be=>be.id===ae.id?{...be,delete:!0}:be));return}setTimeout(()=>{jx.flushSync(()=>{k(ue=>{let be=ue.findIndex(we=>we.id===ae.id);return be!==-1?[...ue.slice(0,be),{...ue[be],...ae},...ue.slice(be+1)]:[ae,...ue]})})})}),[]),F.useEffect(()=>{if(l!=="system"){q(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let ae=window.matchMedia("(prefers-color-scheme: dark)");try{ae.addEventListener("change",({matches:ue})=>{q(ue?"dark":"light")})}catch{ae.addListener(({matches:be})=>{try{q(be?"dark":"light")}catch(we){console.error(we)}})}},[l]),F.useEffect(()=>{C.length<=1&&V(!1)},[C]),F.useEffect(()=>{let ae=ue=>{var be,we;i.every(He=>ue[He]||ue.code===He)&&(V(!0),(be=W.current)==null||be.focus()),ue.code==="Escape"&&(document.activeElement===W.current||(we=W.current)!=null&&we.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[i]),F.useEffect(()=>{if(W.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,Y.current=!1)}},[W.current]),F.createElement("section",{"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((ae,ue)=>{var be;let[we,He]=ae.split("-");return C.length?F.createElement("ol",{key:ae,dir:v==="auto"?eR():v,tabIndex:-1,ref:W,className:s,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":we,"data-lifted":H&&C.length>1&&!o,"data-x-position":He,style:{"--front-toast-height":`${((be=L[0])==null?void 0:be.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Efe,"--width":`${Ofe}px`,"--gap":`${b}px`,...h},onBlur:Ee=>{Y.current&&!Ee.currentTarget.contains(Ee.relatedTarget)&&(Y.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,K.current=Ee.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{ne||V(!1)},onPointerDown:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(Ee=>!Ee.position&&ue===0||Ee.position===ae).map((Ee,it)=>{var ke,Le;return F.createElement(Mfe,{key:Ee.id,icons:x,index:it,toast:Ee,defaultRichColors:c,duration:(ke=m?.duration)!=null?ke:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:ae,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter(De=>De.position==Ee.position),heights:L.filter(De=>De.position==Ee.position),setHeights:U,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Ih=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kc=typeof window>"u"||"Deno"in globalThis;function oa(){}function Rfe(e,t){return typeof e=="function"?e(t):e}function qC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Od(e,t){return typeof e=="function"?e(t):e}function Na(e,t){return typeof e=="function"?e(t):e}function tR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==I5(a,t.options))return!1}else if(!eg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function nR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!eg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I5(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>GC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!eg(e[n],t[n])):!1}function Wj(e,t){if(e===t)return e;const n=rR(e)&&rR(t);if(n||GC(e)&&GC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function YC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wj(e,t):t}function $fe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ife(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var N5=Symbol();function Hj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===N5?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Nfe=class extends Ih{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},L5=new Nfe,Lfe=class extends Ih{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Vy=new Lfe;function ZC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Ffe(e){return Math.min(1e3*2**e,3e4)}function Kj(e){return(e??"online")==="online"?Vy.isOnline():!0}var qj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dS(e){return e instanceof qj}function Gj(e){let t=!1,n=0,r=!1,i;const o=ZC(),a=v=>{r||(h(new qj(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>L5.isFocused()&&(e.networkMode==="always"||Vy.isOnline())&&e.canRun(),c=()=>Kj(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??Ffe,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function jfe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=jfe(),Yj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Bfe=class extends Yj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=zfe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=YC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Na(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===N5||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Vj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=Hj(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{dS(s)&&s.silent||this.#i({type:"error",error:s}),dS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=Gj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Zj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return dS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Zj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zfe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ufe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??I5(r,t);let o=this.get(i);return o||(o=new Bfe({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vfe=class extends Yj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Xj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=Gj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Xj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Vfe({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=n1(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=n1(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(n1(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(n1(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>nR(t,n))}findAll(e={}){return this.getAll().filter(t=>nR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(oa))))}};function n1(e){return e.options.scope?.id??String(e.mutationId)}function oR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=Hj(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?Ife:$fe;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?Hfe:aR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:aR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function aR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Hfe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var kYe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new Ufe,this.#t=e.mutationCache||new Wfe,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=L5.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Vy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Od(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Rfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Od(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oa).catch(oa)}fetchInfiniteQuery(e){return e.behavior=oR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oa).catch(oa)}ensureInfiniteQueryData(e){return e.behavior=oR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vy.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{eg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{eg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=I5(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===N5&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Kfe=class extends Ih{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ZC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return XC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return XC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Na(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!Uy(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&uR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Na(this.options.enabled,this.#t)!==Na(n.enabled,this.#t)||Od(this.options.staleTime,this.#t)!==Od(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||Na(this.options.enabled,this.#t)!==Na(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Gfe(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(oa)),t}#m(){this.#x();const e=Od(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!qC(e))return;const n=Vj(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||Na(this.options.enabled,this.#t)===!1||!qC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||L5.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&sR(e,t),L=k&&uR(e,n,t,r);(M||L)&&(c={...c,...Zj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=YC(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=YC(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:F5(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},M=()=>{const U=this.#i=C.promise=ZC();k(U)},L=this.#i;switch(L.status){case"pending":e.queryHash===n.queryHash&&k(L);break;case"fulfilled":(C.status==="error"||C.data!==L.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==L.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),Uy(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function qfe(e,t){return Na(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sR(e,t){return qfe(e,t)||e.state.data!==void 0&&XC(e,t,t.refetchOnMount)}function XC(e,t,n){if(Na(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&F5(e,t)}return!1}function uR(e,t,n,r){return(e!==t||Na(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&F5(e,n)}function F5(e,t){return Na(t.enabled,e)!==!1&&e.isStaleByTime(Od(t.staleTime,e))}function Gfe(e,t){return!Uy(e.getCurrentResult(),t)}var Yfe=class extends Ih{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Uy(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&qc(n.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??Xj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},Qj=y.createContext(void 0),Jj=e=>{const t=y.useContext(Qj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MYe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(Qj.Provider,{value:e,children:t})),eB=y.createContext(!1),Zfe=()=>y.useContext(eB);eB.Provider;function Xfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qfe=y.createContext(Xfe()),Jfe=()=>y.useContext(Qfe);function tB(e,t){return typeof e=="function"?e(...t):!!e}function QC(){}var ede=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tde=e=>{y.useEffect(()=>{e.clearReset()},[e])},nde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tB(n,[e.error,r]),rde=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ide=(e,t)=>e.isLoading&&e.isFetching&&!t,ode=(e,t)=>e?.suspense&&t.isPending,lR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ade(e,t,n){const r=Jj(),i=Zfe(),o=Jfe(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",rde(a),ede(a,o),tde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?QC:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ode(a,l))throw lR(a,u,o);if(nde({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&ide(l,i)&&(s?lR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(QC).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function RYe(e,t){return ade(e,Kfe)}function DYe(e,t){const n=Jj(),[r]=y.useState(()=>new Yfe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(QC)},[r]);if(i.error&&tB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",$p=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},cR=e=>e==null?"":""+e,sde=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ude=/###/g,fR=e=>e&&e.indexOf("###")>-1?e.replace(ude,"."):e,dR=e=>!e||It(e),x0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=x0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=x0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=x0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},lde=(e,t,n,r)=>{const{obj:i,k:o}=x0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Wy=(e,t)=>{const{obj:n,k:r}=x0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},cde=(e,t,n)=>{const r=Wy(e,n);return r!==void 0?r:Wy(t,n)},nB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):nB(e[r],t[r],n):e[r]=t[r]);return e},Bf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var fde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const dde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>fde[t]):e;class hde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const pde=[" ",",","?","!",";"],gde=new hde(20),mde=(e,t,n)=>{t=t||"",n=n||"";const r=pde.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=gde.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},JC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),vde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let yde=class eE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||vde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=Wy(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:JC(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),hR(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=Wy(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?nB(u,r,o):u={...u,...r},hR(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var rB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const gR={};class Ky extends Jx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),sde(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!mde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=Ky.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",L=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",U=C&&!n.ordinal&&n.count===0,H=U&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${L}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=H),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&H!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?H:h),o){const j=this.resolve(a,{...n,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let j=0;j{const oe=k&&Y!==h?Y:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,K,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,u,K,oe,Z,n),this.emit("missingKey",j,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?G.forEach(j=>{const K=this.pluralResolver.getSuffixes(j,n);U&&n[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(Y=>{W([j],a+Y,n[`defaultValue${Y}`]||H)})}):W(G,a,H))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!gR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(gR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=Hy(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Hy(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const vR={zero:0,one:1,two:2,few:3,many:4,other:5},yR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Hy(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),yR;if(!t.match(/-|_/))return yR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>vR[i]-vR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const bR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=cde(e,t,n);return!o&&i&&It(n)&&(o=JC(e,n,r),o===void 0&&(o=JC(t,n,r))),o},hS=e=>e.replace(/\$/g,"$$$$");class xde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:dde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Bf(o):a||"{{",this.suffix=s?Bf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Bf(h):p||Bf("$t("),this.nestingSuffix=m?Bf(m):v||Bf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=bR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(bR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>hS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?hS(this.escape(p)):hS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=cR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=cR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const wde=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},zf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Hy(r),i),t[a]=s),s(n)}};class _de{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:zf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:zf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:zf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=wde(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Sde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Cde extends Jx{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{lde(u.loaded,[o],a),Sde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),wR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),r1=()=>{},Ede=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let iB=class tE extends Jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=wR(t),this.services={},this.logger=ms,this.modules={external:[]},Ede(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=xR();this.options={...i,...this.options,...wR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=_de;const f=new mR(this.options);this.store=new pR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new bde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new xde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Cde(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=r1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=$p(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r1;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=$p();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=r1),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$p();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=$p();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$p();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new mR(xR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new tE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r1;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new tE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new pR(s,i),o.services.resourceStore=o.store}return o.translator=new Ky(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Mc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_R={},nE=(e,t,n,r)=>{Mc(n)&&_R[n]||(Mc(n)&&(_R[n]=new Date),Ode(e,t,n,r))},oB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rE=(e,t,n)=>{e.loadNamespaces(t,oB(e,n))},SR=(e,t,n,r)=>{if(Mc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,oB(e,r))},Ade=(e,t,n={})=>!t.languages||!t.languages.length?(nE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Mc=e=>typeof e=="string",Pde=e=>typeof e=="object"&&e!==null,kde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Tde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Mde=e=>Tde[e],Rde=e=>e.replace(kde,Mde);let iE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rde};const Dde=(e={})=>{iE={...iE,...e}},$de=()=>iE;let aB;const Ide=e=>{aB=e},Nde=()=>aB,IYe={type:"3rdParty",init(e){Dde(e.options.react),Ide(e)}},Lde=y.createContext();class Fde{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const jde=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},sB=(e,t,n,r)=>e.getFixedT(t,n,r),Bde=(e,t,n,r)=>y.useCallback(sB(e,t,n,r),[e,t,n,r]),NYe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(Lde)||{},o=n||r||Nde();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Fde),!o){nE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Mc(k)?k:Pde(k)&&Mc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&nE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...$de(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Mc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Ade(O,o,a)),f=Bde(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>sB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=jde(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?SR(o,t.lng,l,()=>{x.current&&v(p)}):rE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?SR(o,t.lng,l,()=>O()):rE(o,l,()=>O())})},{slice:zde,forEach:Ude}=[];function Vde(e){return Ude.call(zde.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const CR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Wde=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!CR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!CR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},ER={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Wde(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Ip=null;const OR=()=>{if(Ip!==null)return Ip;try{Ip=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ip=!1}return Ip};var qde={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&OR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&OR()&&window.localStorage.setItem(n,e)}};let Np=null;const AR=()=>{if(Np!==null)return Np;try{Np=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Np=!1}return Np};var Gde={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&AR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&AR()&&window.sessionStorage.setItem(n,e)}},Yde={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},Zde={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Xde={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Qde={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let uB=!1;try{document.cookie,uB=!0}catch{}const lB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];uB||lB.splice(1,1);const Jde=()=>({order:lB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class ehe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Vde(n,this.options||{},Jde()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Hde),this.addDetector(Kde),this.addDetector(qde),this.addDetector(Gde),this.addDetector(Yde),this.addDetector(Zde),this.addDetector(Xde),this.addDetector(Qde)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}ehe.type="languageDetector";var xm=e=>e.type==="checkbox",_c=e=>e instanceof Date,zi=e=>e==null;const cB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&cB(e)&&!_c(e),fB=e=>Or(e)&&e.target?xm(e.target)?e.target.checked:e.target.value:e,the=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dB=(e,t)=>e.has(the(t)),nhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},j5=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(j5&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!nhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var e2=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Ze=(e,t,n)=>{if(!t||!Or(e))return n;const r=e2(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},aa=e=>typeof e=="boolean",B5=e=>/^\w*$/.test(e),hB=e=>e2(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=B5(t)?[t]:hB(t),o=i.length,a=o-1;for(;++rF.useContext(pB),LYe=e=>{const{children:t,...n}=e;return F.createElement(pB.Provider,{value:n},t)};var gB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,mB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},w0=e=>Array.isArray(e)?e:[e],vB=(e,t,n)=>!e||!t||e===t||w0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function U5(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function rhe(e){const t=z5(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=F.useState(n._formState),u=F.useRef(!0),l=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=F.useRef(i);return c.current=i,U5({disabled:r,next:f=>u.current&&vB(c.current,f.name,o)&&mB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),F.useMemo(()=>gB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",yB=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Ze(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Ze(n,o))):(r&&(t.watchAll=!0),n);function ihe(e){const t=z5(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=F.useRef(r);s.current=r,U5({disabled:o,subject:n._subjects.values,next:c=>{vB(s.current,c.name,a)&&l(no(yB(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=F.useState(n._getWatch(r,i));return F.useEffect(()=>n._removeUnmounted()),u}function ohe(e){const t=z5(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=dB(i._names.array,n),s=ihe({control:i,name:n,defaultValue:Ze(i._formValues,n,Ze(i._defaultValues,n,e.defaultValue)),exact:!0}),u=rhe({control:i,name:n,exact:!0}),l=F.useRef(i.register(n,{...e.rules,value:s,...aa(e.disabled)?{disabled:e.disabled}:{}})),c=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ze(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ze(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ze(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ze(u.validatingFields,n)},error:{enumerable:!0,get:()=>Ze(u.errors,n)}}),[u,n]),f=F.useMemo(()=>({name:n,value:s,...aa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:fB(h),name:n},type:qy.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Ze(i._formValues,n),name:n},type:qy.BLUR}),ref:h=>{const p=Ze(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return F.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Ze(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Ze(i._options.defaultValues,n));An(i._defaultValues,n,m),Sr(Ze(i._formValues,n))&&An(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),F.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),F.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const FYe=e=>e.render(ohe(e));var bB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},PR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),kR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Ze(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(_0(s,t))break}else if(Or(s)&&_0(s,t))break}}};var ahe=(e,t,n)=>{const r=w0(Ze(e,n));return An(r,"root",t[n]),An(e,n,r),e},V5=e=>e.type==="file",hs=e=>typeof e=="function",Gy=e=>{if(!j5)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},X1=e=>vs(e),W5=e=>e.type==="radio",Yy=e=>e instanceof RegExp;const TR={value:!1,isValid:!1},MR={value:!0,isValid:!0};var xB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?MR:{value:e[0].value,isValid:!0}:MR:TR}return TR};const RR={isValid:!1,value:null};var wB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,RR):RR;function DR(e,t,n="validate"){if(X1(e)||Array.isArray(e)&&e.every(X1)||aa(e)&&!e)return{type:n,message:X1(e)?e:"",ref:t}}var Uf=e=>Or(e)&&!Yy(e)?e:{value:e,message:""},$R=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Ze(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=V=>{i&&S.reportValidity&&(S.setCustomValidity(aa(V)?"":V||""),S.reportValidity())},E={},C=W5(a),k=xm(a),M=C||k,L=(b||V5(a))&&Sr(a.value)&&Sr(x)||Gy(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,U=bB.bind(null,v,r,E),H=(V,ne,Z,G=qs.maxLength,q=qs.minLength)=>{const W=V?ne:Z;E[v]={type:V?G:q,message:W,ref:a,...U(V?G:q,W)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(L||zi(x))||aa(x)&&!x||k&&!xB(s).isValid||C&&!wB(s).isValid)){const{value:V,message:ne}=X1(u)?{value:!!u,message:u}:Uf(u);if(V&&(E[v]={type:qs.required,message:ne,ref:S,...U(qs.required,ne)},!r))return O(ne),E}if(!L&&(!zi(f)||!zi(h))){let V,ne;const Z=Uf(h),G=Uf(f);if(!zi(x)&&!isNaN(x)){const q=a.valueAsNumber||x&&+x;zi(Z.value)||(V=q>Z.value),zi(G.value)||(ne=qnew Date(new Date().toDateString()+" "+Y),j=a.type=="time",K=a.type=="week";vs(Z.value)&&x&&(V=j?W(x)>W(Z.value):K?x>Z.value:q>new Date(Z.value)),vs(G.value)&&x&&(ne=j?W(x)+V.value,G=!zi(ne.value)&&x.length<+ne.value;if((Z||G)&&(H(Z,V.message,ne.message),!r))return O(E[v].message),E}if(p&&!L&&vs(x)){const{value:V,message:ne}=Uf(p);if(Yy(V)&&!x.match(V)&&(E[v]={type:qs.pattern,message:ne,ref:a,...U(qs.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const V=await m(x,n),ne=DR(V,S);if(ne&&(E[v]={...ne,...U(qs.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let V={};for(const ne in m){if(!io(V)&&!r)break;const Z=DR(await m[ne](x,n),S,ne);Z&&(V={...Z,...U(ne,Z.message)},O(Z.message),r&&(E[v]=V))}if(!io(V)&&(E[v]={ref:S,...V},!r))return E}}return O(!0),E};function she(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},oE=e=>zi(e)||!cB(e);function nl(e,t){if(oE(e)||oE(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(_c(o)&&_c(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!nl(o,a):o!==a)return!1}}return!0}var _B=e=>e.type==="select-multiple",lhe=e=>W5(e)||xm(e),gS=e=>Gy(e)&&e.isConnected,SB=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function Zy(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!SB(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Zy(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function CB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!SB(e[i])?Sr(t)||oE(n[i])?n[i]=Array.isArray(e[i])?Zy(e[i],[]):{...Zy(e[i])}:CB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!nl(e[i],t[i]);return n}var Lp=(e,t)=>CB(e,t,Zy(t)),EB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function mS(e){const t=e.ref;return V5(t)?t.files:W5(t)?wB(e.refs).value:_B(t)?[...t.selectedOptions].map(({value:n})=>n):xm(t)?xB(e.refs).value:EB(Sr(t.value)?e.ref.value:t.value,e)}var che=(e,t,n,r)=>{const i={};for(const o of e){const a=Ze(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fp=e=>Sr(e)?e:Yy(e)?e.source:Or(e)?Yy(e.value)?e.value.source:e.value:e;const IR="AsyncFunction";var fhe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===IR||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IR)),dhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function NR(e,t,n){const r=Ze(e,n);if(r||B5(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Ze(t,o),s=Ze(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var hhe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,phe=(e,t)=>!e2(Ze(e,t)).length&&Br(e,t);const ghe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function mhe(e={}){let t={...ghe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:pS(),array:pS(),state:pS()},h=PR(t.mode),p=PR(t.reValidateMode),m=t.criteriaMode===ja.all,v=te=>de=>{clearTimeout(l),l=setTimeout(te,de)},b=async te=>{if(!t.disabled&&(c.isValid||te)){const de=t.resolver?io((await M()).errors):await U(r,!0);de!==n.isValid&&f.state.next({isValid:de})}},w=(te,de)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((te||Array.from(s.mount)).forEach(ge=>{ge&&(de?An(n.validatingFields,ge,de):Br(n.validatingFields,ge))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(te,de=[],ge,ze,Fe=!0,Ae=!0)=>{if(ze&&ge&&!t.disabled){if(a.action=!0,Ae&&Array.isArray(Ze(r,te))){const tt=ge(Ze(r,te),ze.argA,ze.argB);Fe&&An(r,te,tt)}if(Ae&&Array.isArray(Ze(n.errors,te))){const tt=ge(Ze(n.errors,te),ze.argA,ze.argB);Fe&&An(n.errors,te,tt),phe(n.errors,te)}if(c.touchedFields&&Ae&&Array.isArray(Ze(n.touchedFields,te))){const tt=ge(Ze(n.touchedFields,te),ze.argA,ze.argB);Fe&&An(n.touchedFields,te,tt)}c.dirtyFields&&(n.dirtyFields=Lp(i,o)),f.state.next({name:te,isDirty:V(te,de),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,te,de)},S=(te,de)=>{An(n.errors,te,de),f.state.next({errors:n.errors})},O=te=>{n.errors=te,f.state.next({errors:n.errors,isValid:!1})},E=(te,de,ge,ze)=>{const Fe=Ze(r,te);if(Fe){const Ae=Ze(o,te,Sr(ge)?Ze(i,te):ge);Sr(Ae)||ze&&ze.defaultChecked||de?An(o,te,de?Ae:mS(Fe._f)):G(te,Ae),a.mount&&b()}},C=(te,de,ge,ze,Fe)=>{let Ae=!1,tt=!1;const mt={name:te};if(!t.disabled){const xn=!!(Ze(r,te)&&Ze(r,te)._f&&Ze(r,te)._f.disabled);if(!ge||ze){c.isDirty&&(tt=n.isDirty,n.isDirty=mt.isDirty=V(),Ae=tt!==mt.isDirty);const Kt=xn||nl(Ze(i,te),de);tt=!!(!xn&&Ze(n.dirtyFields,te)),Kt||xn?Br(n.dirtyFields,te):An(n.dirtyFields,te,!0),mt.dirtyFields=n.dirtyFields,Ae=Ae||c.dirtyFields&&tt!==!Kt}if(ge){const Kt=Ze(n.touchedFields,te);Kt||(An(n.touchedFields,te,ge),mt.touchedFields=n.touchedFields,Ae=Ae||c.touchedFields&&Kt!==ge)}Ae&&Fe&&f.state.next(mt)}return Ae?mt:{}},k=(te,de,ge,ze)=>{const Fe=Ze(n.errors,te),Ae=c.isValid&&aa(de)&&n.isValid!==de;if(t.delayError&&ge?(u=v(()=>S(te,ge)),u(t.delayError)):(clearTimeout(l),u=null,ge?An(n.errors,te,ge):Br(n.errors,te)),(ge?!nl(Fe,ge):Fe)||!io(ze)||Ae){const tt={...ze,...Ae&&aa(de)?{isValid:de}:{},errors:n.errors,name:te};n={...n,...tt},f.state.next(tt)}},M=async te=>{w(te,!0);const de=await t.resolver(o,t.context,che(te||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(te),de},L=async te=>{const{errors:de}=await M(te);if(te)for(const ge of te){const ze=Ze(de,ge);ze?An(n.errors,ge,ze):Br(n.errors,ge)}else n.errors=de;return de},U=async(te,de,ge={valid:!0})=>{for(const ze in te){const Fe=te[ze];if(Fe){const{_f:Ae,...tt}=Fe;if(Ae){const mt=s.array.has(Ae.name),xn=Fe._f&&fhe(Fe._f);xn&&c.validatingFields&&w([ze],!0);const Kt=await $R(Fe,s.disabled,o,m,t.shouldUseNativeValidation&&!de,mt);if(xn&&c.validatingFields&&w([ze]),Kt[Ae.name]&&(ge.valid=!1,de))break;!de&&(Ze(Kt,Ae.name)?mt?ahe(n.errors,Kt,Ae.name):An(n.errors,Ae.name,Kt[Ae.name]):Br(n.errors,Ae.name))}!io(tt)&&await U(tt,de,ge)}}return ge.valid},H=()=>{for(const te of s.unMount){const de=Ze(r,te);de&&(de._f.refs?de._f.refs.every(ge=>!gS(ge)):!gS(de._f.ref))&&He(te)}s.unMount=new Set},V=(te,de)=>!t.disabled&&(te&&de&&An(o,te,de),!nl(oe(),i)),ne=(te,de,ge)=>yB(te,s,{...a.mount?o:Sr(de)?i:vs(te)?{[te]:de}:de},ge,de),Z=te=>e2(Ze(a.mount?o:i,te,t.shouldUnregister?Ze(i,te,[]):[])),G=(te,de,ge={})=>{const ze=Ze(r,te);let Fe=de;if(ze){const Ae=ze._f;Ae&&(!Ae.disabled&&An(o,te,EB(de,Ae)),Fe=Gy(Ae.ref)&&zi(de)?"":de,_B(Ae.ref)?[...Ae.ref.options].forEach(tt=>tt.selected=Fe.includes(tt.value)):Ae.refs?xm(Ae.ref)?Ae.refs.length>1?Ae.refs.forEach(tt=>(!tt.defaultChecked||!tt.disabled)&&(tt.checked=Array.isArray(Fe)?!!Fe.find(mt=>mt===tt.value):Fe===tt.value)):Ae.refs[0]&&(Ae.refs[0].checked=!!Fe):Ae.refs.forEach(tt=>tt.checked=tt.value===Fe):V5(Ae.ref)?Ae.ref.value="":(Ae.ref.value=Fe,Ae.ref.type||f.values.next({name:te,values:{...o}})))}(ge.shouldDirty||ge.shouldTouch)&&C(te,Fe,ge.shouldTouch,ge.shouldDirty,!0),ge.shouldValidate&&Y(te)},q=(te,de,ge)=>{for(const ze in de){const Fe=de[ze],Ae=`${te}.${ze}`,tt=Ze(r,Ae);(s.array.has(te)||Or(Fe)||tt&&!tt._f)&&!_c(Fe)?q(Ae,Fe,ge):G(Ae,Fe,ge)}},W=(te,de,ge={})=>{const ze=Ze(r,te),Fe=s.array.has(te),Ae=no(de);An(o,te,Ae),Fe?(f.array.next({name:te,values:{...o}}),(c.isDirty||c.dirtyFields)&&ge.shouldDirty&&f.state.next({name:te,dirtyFields:Lp(i,o),isDirty:V(te,Ae)})):ze&&!ze._f&&!zi(Ae)?q(te,Ae,ge):G(te,Ae,ge),kR(te,s)&&f.state.next({...n}),f.values.next({name:a.mount?te:void 0,values:{...o}})},j=async te=>{a.mount=!0;const de=te.target;let ge=de.name,ze=!0;const Fe=Ze(r,ge),Ae=()=>de.type?mS(Fe._f):fB(te),tt=mt=>{ze=Number.isNaN(mt)||_c(mt)&&isNaN(mt.getTime())||nl(mt,Ze(o,ge,mt))};if(Fe){let mt,xn;const Kt=Ae(),wn=te.type===qy.BLUR||te.type===qy.FOCUS_OUT,Ii=!dhe(Fe._f)&&!t.resolver&&!Ze(n.errors,ge)&&!Fe._f.deps||hhe(wn,Ze(n.touchedFields,ge),n.isSubmitted,p,h),br=kR(ge,s,wn);An(o,ge,Kt),wn?(Fe._f.onBlur&&Fe._f.onBlur(te),u&&u(0)):Fe._f.onChange&&Fe._f.onChange(te);const yi=C(ge,Kt,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ge,type:te.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ge,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ge]);if(tt(Kt),ze){const bi=NR(n.errors,r,ge),Rr=NR(si,r,bi.name||ge);mt=Rr.error,ge=Rr.name,xn=io(si)}}else w([ge],!0),mt=(await $R(Fe,s.disabled,o,m,t.shouldUseNativeValidation))[ge],w([ge]),tt(Kt),ze&&(mt?xn=!1:c.isValid&&(xn=await U(r,!0)));ze&&(Fe._f.deps&&Y(Fe._f.deps),k(ge,xn,mt,yi))}},K=(te,de)=>{if(Ze(n.errors,de)&&te.focus)return te.focus(),1},Y=async(te,de={})=>{let ge,ze;const Fe=w0(te);if(t.resolver){const Ae=await L(Sr(te)?te:Fe);ge=io(Ae),ze=te?!Fe.some(tt=>Ze(Ae,tt)):ge}else te?(ze=(await Promise.all(Fe.map(async Ae=>{const tt=Ze(r,Ae);return await U(tt&&tt._f?{[Ae]:tt}:tt)}))).every(Boolean),!(!ze&&!n.isValid)&&b()):ze=ge=await U(r);return f.state.next({...!vs(te)||c.isValid&&ge!==n.isValid?{}:{name:te},...t.resolver||!te?{isValid:ge}:{},errors:n.errors}),de.shouldFocus&&!ze&&_0(r,K,te?Fe:s.mount),ze},oe=te=>{const de={...a.mount?o:i};return Sr(te)?de:vs(te)?Ze(de,te):te.map(ge=>Ze(de,ge))},ae=(te,de)=>({invalid:!!Ze((de||n).errors,te),isDirty:!!Ze((de||n).dirtyFields,te),error:Ze((de||n).errors,te),isValidating:!!Ze(n.validatingFields,te),isTouched:!!Ze((de||n).touchedFields,te)}),ue=te=>{te&&w0(te).forEach(de=>Br(n.errors,de)),f.state.next({errors:te?n.errors:{}})},be=(te,de,ge)=>{const ze=(Ze(r,te,{_f:{}})._f||{}).ref,Fe=Ze(n.errors,te)||{},{ref:Ae,message:tt,type:mt,...xn}=Fe;An(n.errors,te,{...xn,...de,ref:ze}),f.state.next({name:te,errors:n.errors,isValid:!1}),ge&&ge.shouldFocus&&ze&&ze.focus&&ze.focus()},we=(te,de)=>hs(te)?f.values.subscribe({next:ge=>te(ne(void 0,de),ge)}):ne(te,de,!0),He=(te,de={})=>{for(const ge of te?w0(te):s.mount)s.mount.delete(ge),s.array.delete(ge),de.keepValue||(Br(r,ge),Br(o,ge)),!de.keepError&&Br(n.errors,ge),!de.keepDirty&&Br(n.dirtyFields,ge),!de.keepTouched&&Br(n.touchedFields,ge),!de.keepIsValidating&&Br(n.validatingFields,ge),!t.shouldUnregister&&!de.keepDefaultValue&&Br(i,ge);f.values.next({values:{...o}}),f.state.next({...n,...de.keepDirty?{isDirty:V()}:{}}),!de.keepIsValid&&b()},Ee=({disabled:te,name:de,field:ge,fields:ze})=>{(aa(te)&&a.mount||te||s.disabled.has(de))&&(te?s.disabled.add(de):s.disabled.delete(de),C(de,mS(ge?ge._f:Ze(ze,de)._f),!1,!1,!0))},it=(te,de={})=>{let ge=Ze(r,te);const ze=aa(de.disabled)||aa(t.disabled);return An(r,te,{...ge||{},_f:{...ge&&ge._f?ge._f:{ref:{name:te}},name:te,mount:!0,...de}}),s.mount.add(te),ge?Ee({field:ge,disabled:aa(de.disabled)?de.disabled:t.disabled,name:te}):E(te,!0,de.value),{...ze?{disabled:de.disabled||t.disabled}:{},...t.progressive?{required:!!de.required,min:Fp(de.min),max:Fp(de.max),minLength:Fp(de.minLength),maxLength:Fp(de.maxLength),pattern:Fp(de.pattern)}:{},name:te,onChange:j,onBlur:j,ref:Fe=>{if(Fe){it(te,de),ge=Ze(r,te);const Ae=Sr(Fe.value)&&Fe.querySelectorAll&&Fe.querySelectorAll("input,select,textarea")[0]||Fe,tt=lhe(Ae),mt=ge._f.refs||[];if(tt?mt.find(xn=>xn===Ae):Ae===ge._f.ref)return;An(r,te,{_f:{...ge._f,...tt?{refs:[...mt.filter(gS),Ae,...Array.isArray(Ze(i,te))?[{}]:[]],ref:{type:Ae.type,name:te}}:{ref:Ae}}}),E(te,!1,void 0,Ae)}else ge=Ze(r,te,{}),ge._f&&(ge._f.mount=!1),(t.shouldUnregister||de.shouldUnregister)&&!(dB(s.array,te)&&a.action)&&s.unMount.add(te)}}},ke=()=>t.shouldFocusError&&_0(r,K,s.mount),Le=te=>{aa(te)&&(f.state.next({disabled:te}),_0(r,(de,ge)=>{const ze=Ze(r,ge);ze&&(de.disabled=ze._f.disabled||te,Array.isArray(ze._f.refs)&&ze._f.refs.forEach(Fe=>{Fe.disabled=ze._f.disabled||te}))},0,!1))},De=(te,de)=>async ge=>{let ze;ge&&(ge.preventDefault&&ge.preventDefault(),ge.persist&&ge.persist());let Fe=no(o);if(s.disabled.size)for(const Ae of s.disabled)An(Fe,Ae,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Ae,values:tt}=await M();n.errors=Ae,Fe=tt}else await U(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await te(Fe,ge)}catch(Ae){ze=Ae}}else de&&await de({...n.errors},ge),ke(),setTimeout(ke);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!ze,submitCount:n.submitCount+1,errors:n.errors}),ze)throw ze},me=(te,de={})=>{Ze(r,te)&&(Sr(de.defaultValue)?W(te,no(Ze(i,te))):(W(te,de.defaultValue),An(i,te,no(de.defaultValue))),de.keepTouched||Br(n.touchedFields,te),de.keepDirty||(Br(n.dirtyFields,te),n.isDirty=de.defaultValue?V(te,no(Ze(i,te))):V()),de.keepError||(Br(n.errors,te),c.isValid&&b()),f.state.next({...n}))},yt=(te,de={})=>{const ge=te?no(te):i,ze=no(ge),Fe=io(te),Ae=Fe?i:ze;if(de.keepDefaultValues||(i=ge),!de.keepValues){if(de.keepDirtyValues){const tt=new Set([...s.mount,...Object.keys(Lp(i,o))]);for(const mt of Array.from(tt))Ze(n.dirtyFields,mt)?An(Ae,mt,Ze(o,mt)):W(mt,Ze(Ae,mt))}else{if(j5&&Sr(te))for(const tt of s.mount){const mt=Ze(r,tt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(Gy(xn)){const Kt=xn.closest("form");if(Kt){Kt.reset();break}}}}r={}}o=t.shouldUnregister?de.keepDefaultValues?no(i):{}:no(Ae),f.array.next({values:{...Ae}}),f.values.next({values:{...Ae}})}s={mount:de.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!de.keepIsValid||!!de.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:de.keepSubmitCount?n.submitCount:0,isDirty:Fe?!1:de.keepDirty?n.isDirty:!!(de.keepDefaultValues&&!nl(te,i)),isSubmitted:de.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Fe?{}:de.keepDirtyValues?de.keepDefaultValues&&o?Lp(i,o):n.dirtyFields:de.keepDefaultValues&&te?Lp(i,te):de.keepDirty?n.dirtyFields:{},touchedFields:de.keepTouched?n.touchedFields:{},errors:de.keepErrors?n.errors:{},isSubmitSuccessful:de.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(te,de)=>yt(hs(te)?te(o):te,de);return{control:{register:it,unregister:He,getFieldState:ae,handleSubmit:De,setError:be,_executeSchema:M,_getWatch:ne,_getDirty:V,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:Ee,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(te=>{lt(te,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:te=>{n={...n,...te}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(te){a=te},get _defaultValues(){return i},get _names(){return s},set _names(te){s=te},get _formState(){return n},set _formState(te){n=te},get _options(){return t},set _options(te){t={...t,...te}}},trigger:Y,register:it,handleSubmit:De,watch:we,setValue:W,getValues:oe,reset:lt,resetField:me,clearErrors:ue,unregister:He,setError:be,setFocus:(te,de={})=>{const ge=Ze(r,te),ze=ge&&ge._f;if(ze){const Fe=ze.refs?ze.refs[0]:ze.ref;Fe.focus&&(Fe.focus(),de.shouldSelect&&hs(Fe.select)&&Fe.select())}},getFieldState:ae}}function jYe(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[r,i]=F.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...mhe(e),formState:r});const o=t.current.control;return o._options=e,U5({subject:o._subjects.state,next:a=>{mB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),F.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),F.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),F.useEffect(()=>{e.values&&!nl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),F.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),F.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=gB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var aE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aE||(aE={}));const rt=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return rt.undefined;case"string":return rt.string;case"number":return isNaN(e)?rt.nan:rt.number;case"boolean":return rt.boolean;case"function":return rt.function;case"bigint":return rt.bigint;case"symbol":return rt.symbol;case"object":return Array.isArray(e)?rt.array:e===null?rt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?rt.promise:typeof Map<"u"&&e instanceof Map?rt.map:typeof Set<"u"&&e instanceof Set?rt.set:typeof Date<"u"&&e instanceof Date?rt.date:rt.object;default:return rt.unknown}},Ue=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Lo.create=e=>new Lo(e);const qd=(e,t)=>{let n;switch(e.code){case Ue.invalid_type:e.received===rt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ue.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ue.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ue.invalid_union:n="Invalid input";break;case Ue.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ue.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ue.invalid_arguments:n="Invalid function arguments";break;case Ue.invalid_return_type:n="Invalid function return type";break;case Ue.invalid_date:n="Invalid date";break;case Ue.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ue.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ue.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ue.custom:n="Invalid input";break;case Ue.invalid_intersection_types:n="Intersection results could not be merged";break;case Ue.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ue.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let OB=qd;function yhe(e){OB=e}function Xy(){return OB}const Qy=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},bhe=[];function et(e,t){const n=Xy(),r=Qy({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qd?void 0:qd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),gd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),sE=e=>e.status==="aborted",uE=e=>e.status==="dirty",Gc=e=>e.status==="valid",tg=e=>typeof Promise<"u"&&e instanceof Promise;function Jy(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function AB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var o0,a0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const LR=(e,t)=>{if(Gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lo(e.common.issues);return this._error=n,this._error}}};function Gt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class en{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return LR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(tg(i)?i:Promise.resolve(i));return LR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:Ue.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ha.create(this)}promise(){return Yd.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return ag.create(this,t,this._def)}transform(t){return new Ya({...Gt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...Gt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new H5({typeName:Tt.ZodBranded,type:this,...Gt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dg({...Gt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return wm.create(this,t)}readonly(){return hg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xhe=/^c[^\s-]{8,}$/i,whe=/^[0-9a-z]+$/,_he=/^[0-9A-HJKMNP-TV-Z]{26}$/i,She=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Che=/^[a-z0-9_-]{21}$/i,Ehe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ohe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ahe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Phe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vS;const khe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,The=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Mhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Rhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dhe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$he=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ihe=new RegExp(`^${PB}$`);function kB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Nhe(e){return new RegExp(`^${kB(e)}$`)}function TB(e){let t=`${PB}T${kB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Lhe(e,t){return!!((t==="v4"||!t)&&khe.test(e)||(t==="v6"||!t)&&Mhe.test(e))}function Fhe(e,t){if(!Ehe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function jhe(e,t){return!!((t==="v4"||!t)&&The.test(e)||(t==="v6"||!t)&&Rhe.test(e))}class za extends en{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==rt.string){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),et(i,{code:Ue.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:Ue.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Gt(e)})};function Bhe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends en{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==rt.number){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Bhe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...Gt(e)});class kl extends en{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==rt.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),et(r,{code:Ue.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return et(n,{code:Ue.invalid_type,expected:rt.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Gt(e)})};class ng extends en{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==rt.boolean){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}ng.create=e=>new ng({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...Gt(e)});class Yc extends en{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==rt.date){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_type,expected:rt.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return et(o,{code:Ue.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),et(i,{code:Ue.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Yc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...Gt(e)});class eb extends en{_parse(t){if(this._getType(t)!==rt.symbol){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}eb.create=e=>new eb({typeName:Tt.ZodSymbol,...Gt(e)});class rg extends en{_parse(t){if(this._getType(t)!==rt.undefined){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}rg.create=e=>new rg({typeName:Tt.ZodUndefined,...Gt(e)});class ig extends en{_parse(t){if(this._getType(t)!==rt.null){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.null,received:r.parsedType}),Dt}return Hi(t.data)}}ig.create=e=>new ig({typeName:Tt.ZodNull,...Gt(e)});class Gd extends en{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}Gd.create=e=>new Gd({typeName:Tt.ZodAny,...Gt(e)});class Rc extends en{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Rc.create=e=>new Rc({typeName:Tt.ZodUnknown,...Gt(e)});class bu extends en{_parse(t){const n=this._getOrReturnCtx(t);return et(n,{code:Ue.invalid_type,expected:rt.never,received:n.parsedType}),Dt}}bu.create=e=>new bu({typeName:Tt.ZodNever,...Gt(e)});class tb extends en{_parse(t){if(this._getType(t)!==rt.undefined){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.void,received:r.parsedType}),Dt}return Hi(t.data)}}tb.create=e=>new tb({typeName:Tt.ZodVoid,...Gt(e)});class Ha extends en{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==rt.array)return et(n,{code:Ue.invalid_type,expected:rt.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(et(n,{code:Ue.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ha({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Ha({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Ha({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ha.create=(e,t)=>new Ha({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...Gt(t)});function ed(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(ed(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Ha?new Ha({...e._def,type:ed(e.element)}):e instanceof Es?Es.create(ed(e.unwrap())):e instanceof Ml?Ml.create(ed(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>ed(t))):e}class cr extends en{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==rt.object){const l=this._getOrReturnCtx(t);return et(l,{code:Ue.invalid_type,expected:rt.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof bu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof bu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(et(i,{code:Ue.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return ed(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return MB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...Gt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:bu.create(),typeName:Tt.ZodObject,...Gt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...Gt(t)});class og extends en{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Lo(s.ctx.common.issues));return et(n,{code:Ue.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Lo(u));return et(n,{code:Ue.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:Tt.ZodUnion,...Gt(t)});const Zs=e=>e instanceof ug?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof lg?[e.value]:e instanceof Tl?e.options:e instanceof cg?gn.objectValues(e.enum):e instanceof fg?Zs(e._def.innerType):e instanceof rg?[void 0]:e instanceof ig?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Ml?[null,...Zs(e.unwrap())]:e instanceof H5||e instanceof hg?Zs(e.unwrap()):e instanceof dg?Zs(e._def.innerType):[];class t2 extends en{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.object)return et(n,{code:Ue.invalid_type,expected:rt.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(et(n,{code:Ue.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t2({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Gt(r)})}}function lE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===rt.object&&r===rt.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=lE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===rt.array&&r===rt.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(sE(o)||sE(a))return Dt;const s=lE(o.value,a.value);return s.valid?((uE(o)||uE(a))&&n.dirty(),{status:n.value,value:s.data}):(et(r,{code:Ue.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ag.create=(e,t,n)=>new ag({left:e,right:t,typeName:Tt.ZodIntersection,...Gt(n)});class Ts extends en{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.array)return et(r,{code:Ue.invalid_type,expected:rt.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(et(r,{code:Ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...Gt(t)})};class sg extends en{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.object)return et(r,{code:Ue.invalid_type,expected:rt.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof en?new sg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...Gt(r)}):new sg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...Gt(n)})}}class nb extends en{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.map)return et(r,{code:Ue.invalid_type,expected:rt.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}nb.create=(e,t,n)=>new nb({valueType:t,keyType:e,typeName:Tt.ZodMap,...Gt(n)});class Zc extends en{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.set)return et(r,{code:Ue.invalid_type,expected:rt.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(et(r,{code:Ue.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Zc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Zc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...Gt(t)});class Ad extends en{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.function)return et(n,{code:Ue.invalid_type,expected:rt.function,received:n.parsedType}),Dt;function r(s,u){return Qy({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xy(),qd].filter(l=>!!l),issueData:{code:Ue.invalid_arguments,argumentsError:u}})}function i(s,u){return Qy({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xy(),qd].filter(l=>!!l),issueData:{code:Ue.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yd){const s=this;return Hi(async function(...u){const l=new Lo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Hi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Lo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Lo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ad({...this._def,args:Ts.create(t).rest(Rc.create())})}returns(t){return new Ad({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ad({args:t||Ts.create([]).rest(Rc.create()),returns:n||Rc.create(),typeName:Tt.ZodFunction,...Gt(r)})}}class ug extends en{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Tt.ZodLazy,...Gt(t)});class lg extends en{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return et(n,{received:n.data,code:Ue.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}lg.create=(e,t)=>new lg({value:e,typeName:Tt.ZodLiteral,...Gt(t)});function MB(e,t){return new Tl({values:e,typeName:Tt.ZodEnum,...Gt(t)})}class Tl extends en{constructor(){super(...arguments),o0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return et(n,{expected:gn.joinValues(r),received:n.parsedType,code:Ue.invalid_type}),Dt}if(Jy(this,o0)||AB(this,o0,new Set(this._def.values)),!Jy(this,o0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return et(n,{received:n.data,code:Ue.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Tl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}o0=new WeakMap;Tl.create=MB;class cg extends en{constructor(){super(...arguments),a0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==rt.string&&r.parsedType!==rt.number){const i=gn.objectValues(n);return et(r,{expected:gn.joinValues(i),received:r.parsedType,code:Ue.invalid_type}),Dt}if(Jy(this,a0)||AB(this,a0,new Set(gn.getValidEnumValues(this._def.values))),!Jy(this,a0).has(t.data)){const i=gn.objectValues(n);return et(r,{received:r.data,code:Ue.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}a0=new WeakMap;cg.create=(e,t)=>new cg({values:e,typeName:Tt.ZodNativeEnum,...Gt(t)});class Yd extends en{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.promise&&n.common.async===!1)return et(n,{code:Ue.invalid_type,expected:rt.promise,received:n.parsedType}),Dt;const r=n.parsedType===rt.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(e,t)=>new Yd({type:e,typeName:Tt.ZodPromise,...Gt(t)});class Ya extends en{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{et(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?gd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?gd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...Gt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...Gt(n)});class Es extends en{_parse(t){return this._getType(t)===rt.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...Gt(t)});class Ml extends en{_parse(t){return this._getType(t)===rt.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Tt.ZodNullable,...Gt(t)});class fg extends en{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===rt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Gt(t)});class dg extends en{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tg(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dg.create=(e,t)=>new dg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Gt(t)});class rb extends en{_parse(t){if(this._getType(t)!==rt.nan){const r=this._getOrReturnCtx(t);return et(r,{code:Ue.invalid_type,expected:rt.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}rb.create=e=>new rb({typeName:Tt.ZodNaN,...Gt(e)});const zhe=Symbol("zod_brand");class H5 extends en{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class wm extends en{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),gd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new wm({in:t,out:n,typeName:Tt.ZodPipeline})}}class hg extends en{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Gc(i)&&(i.value=Object.freeze(i.value)),i);return tg(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hg.create=(e,t)=>new hg({innerType:e,typeName:Tt.ZodReadonly,...Gt(t)});function RB(e,t={},n){return e?Gd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Gd.create()}const Uhe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Vhe=(e,t={message:`Input not instance of ${e.name}`})=>RB(n=>n instanceof e,t),DB=za.create,$B=Pl.create,Whe=rb.create,Hhe=kl.create,IB=ng.create,Khe=Yc.create,qhe=eb.create,Ghe=rg.create,Yhe=ig.create,Zhe=Gd.create,Xhe=Rc.create,Qhe=bu.create,Jhe=tb.create,epe=Ha.create,tpe=cr.create,npe=cr.strictCreate,rpe=og.create,ipe=t2.create,ope=ag.create,ape=Ts.create,spe=sg.create,upe=nb.create,lpe=Zc.create,cpe=Ad.create,fpe=ug.create,dpe=lg.create,hpe=Tl.create,ppe=cg.create,gpe=Yd.create,FR=Ya.create,mpe=Es.create,vpe=Ml.create,ype=Ya.createWithPreprocess,bpe=wm.create,xpe=()=>DB().optional(),wpe=()=>$B().optional(),_pe=()=>IB().optional(),Spe={string:e=>za.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>ng.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>Yc.create({...e,coerce:!0})},Cpe=Dt;var BYe=Object.freeze({__proto__:null,defaultErrorMap:qd,setErrorMap:yhe,getErrorMap:Xy,makeIssue:Qy,EMPTY_PATH:bhe,addIssueToContext:et,ParseStatus:$i,INVALID:Dt,DIRTY:gd,OK:Hi,isAborted:sE,isDirty:uE,isValid:Gc,isAsync:tg,get util(){return gn},get objectUtil(){return aE},ZodParsedType:rt,getParsedType:nu,ZodType:en,datetimeRegex:TB,ZodString:za,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:ng,ZodDate:Yc,ZodSymbol:eb,ZodUndefined:rg,ZodNull:ig,ZodAny:Gd,ZodUnknown:Rc,ZodNever:bu,ZodVoid:tb,ZodArray:Ha,ZodObject:cr,ZodUnion:og,ZodDiscriminatedUnion:t2,ZodIntersection:ag,ZodTuple:Ts,ZodRecord:sg,ZodMap:nb,ZodSet:Zc,ZodFunction:Ad,ZodLazy:ug,ZodLiteral:lg,ZodEnum:Tl,ZodNativeEnum:cg,ZodPromise:Yd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Ml,ZodDefault:fg,ZodCatch:dg,ZodNaN:rb,BRAND:zhe,ZodBranded:H5,ZodPipeline:wm,ZodReadonly:hg,custom:RB,Schema:en,ZodSchema:en,late:Uhe,get ZodFirstPartyTypeKind(){return Tt},coerce:Spe,any:Zhe,array:epe,bigint:Hhe,boolean:IB,date:Khe,discriminatedUnion:ipe,effect:FR,enum:hpe,function:cpe,instanceof:Vhe,intersection:ope,lazy:fpe,literal:dpe,map:upe,nan:Whe,nativeEnum:ppe,never:Qhe,null:Yhe,nullable:vpe,number:$B,object:tpe,oboolean:_pe,onumber:wpe,optional:mpe,ostring:xpe,pipeline:bpe,preprocess:ype,promise:gpe,record:spe,set:lpe,strictObject:npe,string:DB,symbol:qhe,transformer:FR,tuple:ape,undefined:Ghe,union:rpe,unknown:Xhe,void:Jhe,NEVER:Cpe,ZodIssueCode:Ue,quotelessJson:vhe,ZodError:Lo});const jR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ze(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},NB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?jR(r.ref,n,e):r.refs&&r.refs.forEach(i=>jR(i,n,e))}},Epe=(e,t)=>{t.shouldUseNativeValidation&&NB(e,t);const n={};for(const r in e){const i=Ze(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ope(t.names||Object.keys(e),r)){const a=Object.assign({},Ze(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Ope=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ape=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=bB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},zYe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&NB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:Epe(Ape(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},Ppe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=Ppe.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Al:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function LB(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}var kpe="Label",FB=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));FB.displayName=kpe;var UYe=FB,jB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(La,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],q=Z%100;return"["+Z+(G[(q-20)%10]||G[q]||G[0])+"]"}},S=function(Z,G,q){var W=String(Z);return!W||W.length>=G?Z:""+Array(G+1-W.length).join(q)+Z},O={s:S,z:function(Z){var G=-Z.utcOffset(),q=Math.abs(G),W=Math.floor(q/60),j=q%60;return(G<=0?"+":"-")+S(W,2,"0")+":"+S(j,2,"0")},m:function Z(G,q){if(G.date()1)return Z(Y[0])}else{var oe=G.name;C[oe]=G,j=oe}return!W&&j&&(E=j),j||!W&&E},U=function(Z,G){if(M(Z))return Z.clone();var q=typeof G=="object"?G:{};return q.date=Z,q.args=arguments,new V(q)},H=O;H.l=L,H.i=M,H.w=function(Z,G){return U(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var V=function(){function Z(q){this.$L=L(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[k]=!0}var G=Z.prototype;return G.parse=function(q){this.$d=function(W){var j=W.date,K=W.utc;if(j===null)return new Date(NaN);if(H.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var Y=j.match(b);if(Y){var oe=Y[2]-1||0,ae=(Y[7]||"0").substring(0,3);return K?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ae)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ae)}}return new Date(j)}(q),this.init()},G.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==v},G.isSame=function(q,W){var j=U(q);return this.startOf(W)<=j&&j<=this.endOf(W)},G.isAfter=function(q,W){return U(q){const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return I.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,Rpe(i,...t)]}function Rpe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Dpe=globalThis?.document?y.useLayoutEffect:()=>{},$pe=P4.useId||(()=>{}),Ipe=0;function Fo(e){const[t,n]=y.useState($pe());return Dpe(()=>{e||n(r=>r??String(Ipe++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Npe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Vr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Npe({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Vr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Lpe(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Fpe(e,t=globalThis?.document){const n=Lpe(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var jpe="DismissableLayer",cE="dismissableLayer.update",Bpe="dismissableLayer.pointerDownOutside",zpe="dismissableLayer.focusOutside",BR,BB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(BB),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Yt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=Wpe(k=>{const M=k.target,L=[...l.branches].some(U=>U.contains(M));!O||L||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=Hpe(k=>{const M=k.target;[...l.branches].some(U=>U.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return Fpe(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(BR=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),zR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=BR)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),zR())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(cE,k),()=>document.removeEventListener(cE,k)},[]),I.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});Nh.displayName=jpe;var Upe="DismissableLayerBranch",Vpe=y.forwardRef((e,t)=>{const n=y.useContext(BB),r=y.useRef(null),i=Yt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Vpe.displayName=Upe;function Wpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){zB(Bpe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&zB(zpe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zR(){const e=new CustomEvent(cE);document.dispatchEvent(e)}function zB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?LB(i,o):i.dispatchEvent(o)}var yS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",UR={bubbles:!1,cancelable:!0},Kpe="FocusScope",_m=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Vr(i),c=Vr(o),f=y.useRef(null),h=Yt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Gu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Gu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Gu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){WR.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(yS,UR);s.addEventListener(yS,l),s.dispatchEvent(w),w.defaultPrevented||(qpe(Qpe(UB(s)),{select:!0}),document.activeElement===v&&Gu(s))}return()=>{s.removeEventListener(yS,l),setTimeout(()=>{const w=new CustomEvent(bS,UR);s.addEventListener(bS,c),s.dispatchEvent(w),w.defaultPrevented||Gu(v??document.body,{select:!0}),s.removeEventListener(bS,c),WR.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=Gpe(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Gu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Gu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});_m.displayName=Kpe;function qpe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gu(r,{select:t}),document.activeElement!==n)return}function Gpe(e){const t=UB(e),n=VR(t,e),r=VR(t.reverse(),e);return[n,r]}function UB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VR(e,t){for(const n of e)if(!Ype(n,{upTo:t}))return n}function Ype(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zpe(e){return e instanceof HTMLInputElement&&"select"in e}function Gu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zpe(e)&&t&&e.select()}}var WR=Xpe();function Xpe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=HR(e,t),e.unshift(t)},remove(t){e=HR(e,t),e[0]?.resume()}}}function HR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qpe(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},Jpe="Portal",Lh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?jx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Lh.displayName=Jpe;function e0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=t0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Yt(r.ref,n0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function t0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=e0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=i1(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=i1(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=i1(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=i1(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function i1(e){return e?.animationName||"none"}function n0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xS=0;function n2(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??KR()),document.body.insertAdjacentElement("beforeend",e[1]??KR()),xS++,()=>{xS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xS--}},[])}function KR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return m0e;var t=v0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},b0e=g0e(),Pd="data-scroll-locked",x0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(r0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -119,12 +119,252 @@ Error generating stack: `+o.message+` `)},GR=function(){var e=parseInt(document.body.getAttribute(Pd)||"0",10);return isFinite(e)?e:0},w0e=function(){y.useEffect(function(){return document.body.setAttribute(Pd,(GR()+1).toString()),function(){var e=GR()-1;e<=0?document.body.removeAttribute(Pd):document.body.setAttribute(Pd,e.toString())}},[])},_0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;w0e();var o=y.useMemo(function(){return y0e(i)},[i]);return y.createElement(b0e,{styles:x0e(o,!t,i,n?"":"!important")})};function S0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GB();return t&&e.setAttribute("nonce",t),e}function C0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function E0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var O0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=S0e())&&(C0e(t,n),E0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A0e=function(){var e=O0e();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},q5=function(){var e=A0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},fE=!1;if(typeof window<"u")try{var o1=Object.defineProperty({},"passive",{get:function(){return fE=!0,!0}});window.addEventListener("test",o1,o1),window.removeEventListener("test",o1,o1)}catch{fE=!1}var Vf=fE?{passive:!1}:!1,P0e=function(e){return e.tagName==="TEXTAREA"},YB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!P0e(e)&&n[t]==="visible")},k0e=function(e){return YB(e,"overflowY")},T0e=function(e){return YB(e,"overflowX")},YR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ZB(e,r);if(i){var o=XB(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},R0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ZB=function(e,t){return e==="v"?k0e(t):T0e(t)},XB=function(e,t){return e==="v"?M0e(t):R0e(t)},D0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},$0e=function(e,t,n,r,i){var o=D0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=XB(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&ZB(e,s)&&(f+=w,h+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},a1=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ZR=function(e){return[e.deltaX,e.deltaY]},XR=function(e){return e&&"current"in e?e.current:e},I0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},N0e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},L0e=0,Wf=[];function F0e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(L0e++)[0],o=y.useState(q5)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(XR),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=a1(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=YR(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=YR(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var L=r.current||E;return $0e(L,b,v,L==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Wf.length||Wf[Wf.length-1]!==o)){var w="deltaY"in b?ZR(b):a1(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&I0e(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(XR).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:j0e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=a1(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,ZR(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,a1(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Wf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Vf),document.addEventListener("touchmove",u,Vf),document.addEventListener("touchstart",c,Vf),function(){Wf=Wf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Vf),document.removeEventListener("touchmove",u,Vf),document.removeEventListener("touchstart",c,Vf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:N0e(i)}):null,p?y.createElement(_0e,{gapMode:e.gapMode}):null)}function j0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const B0e=KB(qB,F0e);var Sm=y.forwardRef(function(e,t){return y.createElement(rw,Ri({},e,{ref:t,sideCar:B0e}))});Sm.classNames=rw.classNames;var z0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hf=new WeakMap,s1=new WeakMap,u1={},CS=0,QB=function(e){return e&&(e.host||QB(e.parentNode))},U0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},V0e=function(e,t,n,r){var i=U0e(t,Array.isArray(e)?e:[e]);u1[n]||(u1[n]=new WeakMap);var o=u1[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Hf.get(h)||0)+1,b=(o.get(h)||0)+1;Hf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&s1.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),CS++,function(){a.forEach(function(f){var h=Hf.get(f)-1,p=o.get(f)-1;Hf.set(f,h),o.set(f,p),h||(s1.has(f)||f.removeAttribute(r),s1.delete(f)),p||f.removeAttribute(n)}),CS--,CS||(Hf=new WeakMap,Hf=new WeakMap,s1=new WeakMap,u1={})}},Cm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=z0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),V0e(r,i,n,"aria-hidden")):function(){return null}},G5="Dialog",[JB,ez]=vi(G5),[W0e,ns]=JB(G5),tz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(W0e,{scope:t,triggerRef:s,contentRef:u,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};tz.displayName=G5;var nz="DialogTrigger",rz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(nz,n),o=Gt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":X5(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});rz.displayName=nz;var Y5="DialogPortal",[H0e,iz]=JB(Y5,{forceMount:void 0}),oz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(Y5,t);return I.jsx(H0e,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:a})}))})};oz.displayName=Y5;var ib="DialogOverlay",az=y.forwardRef((e,t)=>{const n=iz(ib,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(ib,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(K0e,{...i,ref:t})}):null});az.displayName=ib;var K0e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ib,n);return I.jsx(Sm,{as:Al,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":X5(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xc="DialogContent",sz=y.forwardRef((e,t)=>{const n=iz(Xc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Xc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(q0e,{...i,ref:t}):I.jsx(G0e,{...i,ref:t})})});sz.displayName=Xc;var q0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(null),i=Gt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),G0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Xc,n),u=y.useRef(null),l=Gt(t,u);return nw(),I.jsxs(I.Fragment,{children:[I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":X5(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Z0e,{titleId:s.titleId}),I.jsx(Q0e,{contentRef:u,descriptionId:s.descriptionId})]})]})}),Z5="DialogTitle",lz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(Z5,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});lz.displayName=Z5;var cz="DialogDescription",fz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(cz,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});fz.displayName=cz;var dz="DialogClose",hz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(dz,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});hz.displayName=dz;function X5(e){return e?"open":"closed"}var pz="DialogTitleWarning",[Y0e,gz]=Mpe(pz,{contentName:Xc,titleName:Z5,docsSlug:"dialog"}),Z0e=({titleId:e})=>{const t=gz(pz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},L0e=0,Wf=[];function F0e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(L0e++)[0],o=y.useState(q5)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(XR),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=a1(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=YR(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=YR(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var L=r.current||E;return $0e(L,b,v,L==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Wf.length||Wf[Wf.length-1]!==o)){var w="deltaY"in b?ZR(b):a1(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&I0e(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(XR).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:j0e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=a1(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,ZR(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,a1(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Wf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Vf),document.addEventListener("touchmove",u,Vf),document.addEventListener("touchstart",c,Vf),function(){Wf=Wf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Vf),document.removeEventListener("touchmove",u,Vf),document.removeEventListener("touchstart",c,Vf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:N0e(i)}):null,p?y.createElement(_0e,{gapMode:e.gapMode}):null)}function j0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const B0e=KB(qB,F0e);var Sm=y.forwardRef(function(e,t){return y.createElement(r2,Ri({},e,{ref:t,sideCar:B0e}))});Sm.classNames=r2.classNames;var z0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hf=new WeakMap,s1=new WeakMap,u1={},CS=0,QB=function(e){return e&&(e.host||QB(e.parentNode))},U0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},V0e=function(e,t,n,r){var i=U0e(t,Array.isArray(e)?e:[e]);u1[n]||(u1[n]=new WeakMap);var o=u1[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Hf.get(h)||0)+1,b=(o.get(h)||0)+1;Hf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&s1.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),CS++,function(){a.forEach(function(f){var h=Hf.get(f)-1,p=o.get(f)-1;Hf.set(f,h),o.set(f,p),h||(s1.has(f)||f.removeAttribute(r),s1.delete(f)),p||f.removeAttribute(n)}),CS--,CS||(Hf=new WeakMap,Hf=new WeakMap,s1=new WeakMap,u1={})}},Cm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=z0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),V0e(r,i,n,"aria-hidden")):function(){return null}},G5="Dialog",[JB,ez]=vi(G5),[W0e,ns]=JB(G5),tz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(W0e,{scope:t,triggerRef:s,contentRef:u,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};tz.displayName=G5;var nz="DialogTrigger",rz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(nz,n),o=Yt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":X5(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});rz.displayName=nz;var Y5="DialogPortal",[H0e,iz]=JB(Y5,{forceMount:void 0}),oz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(Y5,t);return I.jsx(H0e,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:a})}))})};oz.displayName=Y5;var ib="DialogOverlay",az=y.forwardRef((e,t)=>{const n=iz(ib,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(ib,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(K0e,{...i,ref:t})}):null});az.displayName=ib;var K0e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ib,n);return I.jsx(Sm,{as:Al,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":X5(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xc="DialogContent",sz=y.forwardRef((e,t)=>{const n=iz(Xc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Xc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(q0e,{...i,ref:t}):I.jsx(G0e,{...i,ref:t})})});sz.displayName=Xc;var q0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(null),i=Yt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),G0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Xc,n),u=y.useRef(null),l=Yt(t,u);return n2(),I.jsxs(I.Fragment,{children:[I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":X5(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Z0e,{titleId:s.titleId}),I.jsx(Q0e,{contentRef:u,descriptionId:s.descriptionId})]})]})}),Z5="DialogTitle",lz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(Z5,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});lz.displayName=Z5;var cz="DialogDescription",fz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(cz,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});fz.displayName=cz;var dz="DialogClose",hz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(dz,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});hz.displayName=dz;function X5(e){return e?"open":"closed"}var pz="DialogTitleWarning",[Y0e,gz]=Mpe(pz,{contentName:Xc,titleName:Z5,docsSlug:"dialog"}),Z0e=({titleId:e})=>{const t=gz(pz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},X0e="DialogDescriptionWarning",Q0e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gz(X0e).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},J0e=tz,ege=rz,tge=oz,nge=az,rge=sz,ige=lz,oge=fz,mz=hz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var age=["color"],WYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,age);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),sge=["color"],HYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),uge=["color"],KYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lge=["color"],qYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,lge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cge=["color"],GYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fge=["color"],YYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,fge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dge=["color"],ZYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,dge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hge=["color"],XYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pge=["color"],QYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,pge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gge=["color"],JYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),mge=["color"],eZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vge=["color"],tZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),yge=["color"],nZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bge=["color"],rZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xge=["color"],iZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wge=["color"],oZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_ge=["color"],aZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_ge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sge=["color"],sZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cge=["color"],uZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ege=["title"],Oge=["title"],Age=["title"];function pg(){return pg=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lZe=function(t){var n=t.title,r=Q5(t,Ege);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},cZe=function(t){var n=t.title,r=Q5(t,Oge);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("g",{fill:"#FFF"},F.createElement("path",{d:"M0 0h513v341.3H0V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),F.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),F.createElement("g",{fill:"#D80027"},F.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},fZe=function(t){var n=t.title,r=Q5(t,Age);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#FFF",d:"M0 0h900v600H0z"}),F.createElement("g",{transform:"rotate(-56.31)"},F.createElement("path",{d:"M-75 228.3H75m-150 37.5H75m-150 37.5H75m-150 475H75m-150 37.5H75m-150 37.5H75",stroke:"#000",strokeWidth:25}),F.createElement("path",{stroke:"#FFF",strokeWidth:12.5,d:"M0 753.3v125"}),F.createElement("circle",{fill:"#ca163a",cy:540.8,r:150}),F.createElement("path",{fill:"#0e4896",d:"M0 390.8c-41.4 0-75 33.6-75 75s33.6 75 75 75 75 33.6 75 75-33.6 75-75 75c-82.8 0-150-67.2-150-150s67.2-150 150-150z"})),F.createElement("path",{d:"m231.56 535.73-83.205-124.808M262.76 514.928l-83.205-124.807m114.407 104.006-83.205-124.808m478.43-138.675-83.205-124.807M720.39 209.843 637.184 85.036m114.407 104.006L668.386 64.234",stroke:"#000",strokeWidth:25}),F.createElement("path",{stroke:"#FFF",strokeWidth:12.5,d:"m205.6 462.897 31.202-20.8m389.981-259.989 36.444-24.296m31.202-20.801 31.202-20.801"}))};function J5(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=F.useRef(null),w=F.useRef(new Map).current;return I.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=F.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Gt(m,w.collectionRef);return I.jsx(Al,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=F.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=F.useRef(null),S=Gt(m,x),O=o(l,v);return F.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),I.jsx(Al,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return F.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var kge=y.createContext(void 0);function Em(e){const t=y.useContext(kge);return e||t||"ltr"}const Tge=["top","right","bottom","left"],Rl=Math.min,Ro=Math.max,ob=Math.round,l1=Math.floor,Dl=e=>({x:e,y:e}),Mge={left:"right",right:"left",bottom:"top",top:"bottom"},Rge={start:"end",end:"start"};function dE(e,t,n){return Ro(e,Rl(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function wu(e){return e.split("-")[0]}function Fh(e){return e.split("-")[1]}function eO(e){return e==="x"?"y":"x"}function tO(e){return e==="y"?"height":"width"}function jh(e){return["top","bottom"].includes(wu(e))?"y":"x"}function nO(e){return eO(jh(e))}function Dge(e,t,n){n===void 0&&(n=!1);const r=Fh(e),i=nO(e),o=tO(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ab(a)),[a,ab(a)]}function $ge(e){const t=ab(e);return[hE(e),t,hE(t)]}function hE(e){return e.replace(/start|end/g,t=>Rge[t])}function Ige(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function Nge(e,t,n,r){const i=Fh(e);let o=Ige(wu(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(hE)))),o}function ab(e){return e.replace(/left|right|bottom|top/g,t=>Mge[t])}function Lge(e){return{top:0,right:0,bottom:0,left:0,...e}}function vz(e){return typeof e!="number"?Lge(e):{top:e,right:e,bottom:e,left:e}}function sb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function QR(e,t,n){let{reference:r,floating:i}=e;const o=jh(t),a=nO(t),s=tO(a),u=wu(t),l=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Fh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const Fge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=QR(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=xu(e,t)||{};if(l==null)return{};const f=vz(c),h={x:n,y:r},p=nO(i),m=tO(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,L=k/2-v[m]/2-1,U=Rl(f[w],L),H=Rl(f[x],L),V=U,ne=k-v[m]-H,Z=k/2-v[m]/2+M,G=dE(V,Z,ne),q=!u.arrow&&Fh(i)!=null&&Z!==G&&o.reference[m]/2-(ZV<=0)){var L,U;const V=(((L=o.flip)==null?void 0:L.index)||0)+1,ne=E[V];if(ne)return{data:{index:V,overflows:M},reset:{placement:ne}};let Z=(U=M.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(p){case"bestFit":{var H;const G=(H=M.map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,j)=>W+j,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function JR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e9(e){return Tge.some(t=>e[t]>=0)}const zge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xu(e,t);switch(r){case"referenceHidden":{const o=await gg(t,{...i,elementContext:"reference"}),a=JR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:e9(a)}}}case"escaped":{const o=await gg(t,{...i,altBoundary:!0}),a=JR(o,n.floating);return{data:{escapedOffsets:a,escaped:e9(a)}}}default:return{}}}}};async function Uge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=wu(n),s=Fh(n),u=jh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=xu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Vge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Uge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},Wge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=xu(e,t),l={x:n,y:r},c=await gg(t,u),f=jh(wu(i)),h=eO(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=dE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=dE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Hge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=xu(e,t),c={x:n,y:r},f=jh(i),h=eO(f);let p=c[h],m=c[f];const v=xu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(wu(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Kge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xu(e,t),u=await gg(t,s),l=wu(n),c=Fh(n),f=jh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Rl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Rl(b,C):C}if(x&&!c){const C=Ro(u.left,0),k=Ro(u.right,0),M=Ro(u.top,0),L=Ro(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Ro(u.left,u.right)):S=p-2*(M!==0||L!==0?M+L:Ro(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function $l(e){return yz(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ku(e){var t;return(t=(yz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yz(e){return e instanceof Node||e instanceof jo(e).Node}function _u(e){return e instanceof Element||e instanceof jo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function t9(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot}function Om(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qge(e){return["table","td","th"].includes($l(e))}function rO(e){const t=iO(),n=ma(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Gge(e){let t=Zd(e);for(;Ms(t)&&!iw(t);){if(rO(t))return t;t=Zd(t)}return null}function iO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function iw(e){return["html","body","#document"].includes($l(e))}function ma(e){return jo(e).getComputedStyle(e)}function ow(e){return _u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zd(e){if($l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t9(e)&&e.host||ku(e);return t9(t)?t.host:t}function bz(e){const t=Zd(e);return iw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&Om(t)?t:bz(t)}function mg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=bz(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jo(i);return o?t.concat(a,a.visualViewport||[],Om(i)?i:[],a.frameElement&&n?mg(a.frameElement):[]):t.concat(i,mg(i,[],n))}function xz(e){const t=ma(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ob(n)!==o||ob(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function oO(e){return _u(e)?e:e.contextElement}function kd(e){const t=oO(e);if(!Ms(t))return Dl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=xz(t);let a=(o?ob(n.width):n.width)/r,s=(o?ob(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Yge=Dl(0);function wz(e){const t=jo(e);return!iO()||!t.visualViewport?Yge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jo(e)?!1:t}function Qc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=oO(e);let a=Dl(1);t&&(r?_u(r)&&(a=kd(r)):a=kd(e));const s=Zge(o,n,r)?wz(o):Dl(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=jo(o),p=r&&_u(r)?jo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=kd(v),w=v.getBoundingClientRect(),x=ma(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=jo(v),v=m.frameElement}}return sb({width:c,height:f,x:u,y:l})}const Xge=[":popover-open",":modal"];function _z(e){return Xge.some(t=>{try{return e.matches(t)}catch{return!1}})}function Qge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ku(r),s=t?_z(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Dl(1);const c=Dl(0),f=Ms(r);if((f||!f&&!o)&&(($l(r)!=="body"||Om(a))&&(u=ow(r)),Ms(r))){const h=Qc(r);l=kd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function Jge(e){return Array.from(e.getClientRects())}function Sz(e){return Qc(ku(e)).left+ow(e).scrollLeft}function eme(e){const t=ku(e),n=ow(e),r=e.ownerDocument.body,i=Ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sz(e);const s=-n.scrollTop;return ma(r).direction==="rtl"&&(a+=Ro(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function tme(e,t){const n=jo(e),r=ku(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=iO();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function nme(e,t){const n=Qc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?kd(e):Dl(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function n9(e,t,n){let r;if(t==="viewport")r=tme(e,n);else if(t==="document")r=eme(ku(e));else if(_u(t))r=nme(t,n);else{const i=wz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return sb(r)}function Cz(e,t){const n=Zd(e);return n===t||!_u(n)||iw(n)?!1:ma(n).position==="fixed"||Cz(n,t)}function rme(e,t){const n=t.get(e);if(n)return n;let r=mg(e,[],!1).filter(s=>_u(s)&&$l(s)!=="body"),i=null;const o=ma(e).position==="fixed";let a=o?Zd(e):e;for(;_u(a)&&!iw(a);){const s=ma(a),u=rO(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Om(a)&&!u&&Cz(e,a))?r=r.filter(c=>c!==a):i=s,a=Zd(a)}return t.set(e,r),r}function ime(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?rme(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=n9(t,c,i);return l.top=Ro(f.top,l.top),l.right=Rl(f.right,l.right),l.bottom=Rl(f.bottom,l.bottom),l.left=Ro(f.left,l.left),l},n9(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ome(e){const{width:t,height:n}=xz(e);return{width:t,height:n}}function ame(e,t,n){const r=Ms(t),i=ku(t),o=n==="fixed",a=Qc(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Dl(0);if(r||!r&&!o)if(($l(t)!=="body"||Om(i))&&(s=ow(t)),r){const f=Qc(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Sz(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function r9(e,t){return!Ms(e)||ma(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ez(e,t){const n=jo(e);if(!Ms(e)||_z(e))return n;let r=r9(e,t);for(;r&&qge(r)&&ma(r).position==="static";)r=r9(r,t);return r&&($l(r)==="html"||$l(r)==="body"&&ma(r).position==="static"&&!rO(r))?n:r||Gge(e)||n}const sme=async function(e){const t=this.getOffsetParent||Ez,n=this.getDimensions;return{reference:ame(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function ume(e){return ma(e).direction==="rtl"}const lme={convertOffsetParentRelativeRectToViewportRelativeRect:Qge,getDocumentElement:ku,getClippingRect:ime,getOffsetParent:Ez,getElementRects:sme,getClientRects:Jge,getDimensions:ome,getScale:kd,isElement:_u,isRTL:ume};function cme(e,t){let n=null,r;const i=ku(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=l1(c),m=l1(i.clientWidth-(l+f)),v=l1(i.clientHeight-(c+h)),b=l1(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ro(0,Rl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function fme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=oO(e),c=i||o?[...l?mg(l):[],...mg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?cme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Qc(e):null;u&&b();function b(){const w=Qc(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const dme=Wge,hme=Bge,pme=Kge,gme=zge,i9=jge,mme=Hge,vme=(e,t,n)=>{const r=new Map,i={platform:lme,...n},o={...i.platform,_c:r};return Fge(e,t,{...i,platform:o})},yme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?i9({element:r.current,padding:i}).fn(n):{}:r?i9({element:r,padding:i}).fn(n):{}}}};var ey=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ub(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ub(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ub(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Oz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function o9(e,t){const n=Oz(e);return Math.round(t*n)/n}function a9(e){const t=y.useRef(e);return ey(()=>{t.current=e}),t}function bme(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);ub(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(W=>{W!==C.current&&(C.current=W,v(W))},[]),S=y.useCallback(W=>{W!==k.current&&(k.current=W,w(W))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),L=u!=null,U=a9(u),H=a9(i),V=y.useCallback(()=>{if(!C.current||!k.current)return;const W={placement:t,strategy:n,middleware:h};H.current&&(W.platform=H.current),vme(C.current,k.current,W).then(j=>{const K={...j,isPositioned:!0};ne.current&&!ub(M.current,K)&&(M.current=K,Au.flushSync(()=>{f(K)}))})},[h,t,n,H]);ey(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const ne=y.useRef(!1);ey(()=>(ne.current=!0,()=>{ne.current=!1}),[]),ey(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(U.current)return U.current(O,E,V);V()}},[O,E,V,U,L]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:O,floating:E}),[O,E]),q=y.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const j=o9(G.floating,c.x),K=o9(G.floating,c.y);return s?{...W,transform:"translate("+j+"px, "+K+"px)",...Oz(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,s,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:V,refs:Z,elements:G,floatingStyles:q}),[c,V,Z,G,q])}var xme="Arrow",Az=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});Az.displayName=xme;var wme=Az;function aO(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sO="Popper",[Pz,zl]=vi(sO),[_me,kz]=Pz(sO),Tz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(_me,{scope:t,anchor:r,onAnchorChange:i,children:n})};Tz.displayName=sO;var Mz="PopperAnchor",Rz=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=kz(Mz,n),a=y.useRef(null),s=Gt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:s})});Rz.displayName=Mz;var uO="PopperContent",[Sme,Cme]=Pz(uO),Dz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=kz(uO,n),[w,x]=y.useState(null),S=Gt(t,Ee=>x(Ee)),[O,E]=y.useState(null),C=aO(O),k=C?.width??0,M=C?.height??0,L=r+(o!=="center"?"-"+o:""),U=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],V=H.length>0,ne={padding:U,boundary:H.filter(Ome),altBoundary:V},{refs:Z,floatingStyles:G,placement:q,isPositioned:W,middlewareData:j}=bme({strategy:"fixed",placement:L,whileElementsMounted:(...Ee)=>fme(...Ee,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Vge({mainAxis:i+M,alignmentAxis:a}),u&&dme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?mme():void 0,...ne}),u&&hme({...ne}),pme({...ne,apply:({elements:Ee,rects:it,availableWidth:ke,availableHeight:Le})=>{const{width:De,height:me}=it.reference,yt=Ee.floating.style;yt.setProperty("--radix-popper-available-width",`${ke}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${De}px`),yt.setProperty("--radix-popper-anchor-height",`${me}px`)}}),O&&yme({element:O,padding:s}),Ame({arrowWidth:k,arrowHeight:M}),h&&gme({strategy:"referenceHidden",...ne})]}),[K,Y]=Nz(q),oe=Vr(m);ii(()=>{W&&oe?.()},[W,oe]);const ae=j.arrow?.x,ue=j.arrow?.y,be=j.arrow?.centerOffset!==0,[we,He]=y.useState();return ii(()=>{w&&He(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(Sme,{scope:n,placedSide:K,onArrowChange:E,arrowX:ae,arrowY:ue,shouldHideArrow:be,children:I.jsx(pt.div,{"data-side":K,"data-align":Y,...v,ref:S,style:{...v.style,animation:W?void 0:"none"}})})})});Dz.displayName=uO;var $z="PopperArrow",Eme={top:"bottom",right:"left",bottom:"top",left:"right"},Iz=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Cme($z,r),a=Eme[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(wme,{...i,ref:n,style:{...i.style,display:"block"}})})});Iz.displayName=$z;function Ome(e){return e!==null}var Ame=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=Nz(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function Nz(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Tz,Am=Rz,sw=Dz,uw=Iz,ES="rovingFocusGroup.onEntryFocus",Pme={bubbles:!1,cancelable:!0},lw="RovingFocusGroup",[pE,Lz,kme]=J5(lw),[Tme,cw]=vi(lw,[kme]),[Mme,Rme]=Tme(lw),Fz=y.forwardRef((e,t)=>I.jsx(pE.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(pE.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(Dme,{...e,ref:t})})}));Fz.displayName=lw;var Dme=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Gt(t,h),m=Em(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Vr(l),O=Lz(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ES,S),()=>M.removeEventListener(ES,S)},[S]),I.jsx(Mme,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const L=!E.current;if(M.target===M.currentTarget&&L&&!w){const U=new CustomEvent(ES,Pme);if(M.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=O().filter(q=>q.focusable),V=H.find(q=>q.active),ne=H.find(q=>q.id===v),G=[V,ne,...H].filter(Boolean).map(q=>q.ref.current);zz(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),jz="RovingFocusGroupItem",Bz=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Fo(),u=o||s,l=Rme(jz,n),c=l.currentTabStopId===u,f=Lz(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),I.jsx(pE.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Nme(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?Lme(w,x+1):w.slice(x+1)}setTimeout(()=>zz(w))}})})})});Bz.displayName=jz;var $me={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ime(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nme(e,t,n){const r=Ime(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $me[r]}function zz(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Lme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Uz=Fz,Vz=Bz,gE=["Enter"," "],Fme=["ArrowDown","PageUp","Home"],Wz=["ArrowUp","PageDown","End"],jme=[...Fme,...Wz],Bme={ltr:[...gE,"ArrowRight"],rtl:[...gE,"ArrowLeft"]},zme={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pm="Menu",[vg,Ume,Vme]=J5(Pm),[hf,Hz]=vi(Pm,[Vme,zl,cw]),fw=zl(),Kz=cw(),[Wme,pf]=hf(Pm),[Hme,km]=hf(Pm),qz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=fw(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Vr(o),h=Em(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),I.jsx(aw,{...s,children:I.jsx(Wme,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:I.jsx(Hme,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};qz.displayName=Pm;var Kme="MenuAnchor",lO=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(Am,{...i,...r,ref:t})});lO.displayName=Kme;var cO="MenuPortal",[qme,Gz]=hf(cO,{forceMount:void 0}),Yz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=pf(cO,t);return I.jsx(qme,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};Yz.displayName=cO;var da="MenuContent",[Gme,fO]=hf(da),Zz=y.forwardRef((e,t)=>{const n=Gz(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(da,e.__scopeMenu),a=km(da,e.__scopeMenu);return I.jsx(vg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(vg.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(Yme,{...i,ref:t}):I.jsx(Zme,{...i,ref:t})})})})}),Yme=y.forwardRef((e,t)=>{const n=pf(da,e.__scopeMenu),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(dO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zme=y.forwardRef((e,t)=>{const n=pf(da,e.__scopeMenu);return I.jsx(dO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),dO=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=pf(da,n),w=km(da,n),x=fw(n),S=Kz(n),O=Ume(n),[E,C]=y.useState(null),k=y.useRef(null),M=Gt(t,k,b.onContentChange),L=y.useRef(0),U=y.useRef(""),H=y.useRef(0),V=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),G=m?Sm:y.Fragment,q=m?{as:Al,allowPinchZoom:!0}:void 0,W=K=>{const Y=U.current+K,oe=O().filter(Ee=>!Ee.disabled),ae=document.activeElement,ue=oe.find(Ee=>Ee.ref.current===ae)?.textValue,be=oe.map(Ee=>Ee.textValue),we=uve(be,Y,ue),He=oe.find(Ee=>Ee.textValue===we)?.ref.current;(function Ee(it){U.current=it,window.clearTimeout(L.current),it!==""&&(L.current=window.setTimeout(()=>Ee(""),1e3))})(Y),He&&setTimeout(()=>He.focus())};y.useEffect(()=>()=>window.clearTimeout(L.current),[]),nw();const j=y.useCallback(K=>ne.current===V.current?.side&&cve(K,V.current?.area),[]);return I.jsx(Gme,{scope:n,searchRef:U,onItemEnter:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),onItemLeave:y.useCallback(K=>{j(K)||(k.current?.focus(),C(null))},[j]),onTriggerLeave:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(K=>{V.current=K},[]),children:I.jsx(G,{...q,children:I.jsx(_m,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,K=>{K.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:I.jsx(Uz,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,K=>{w.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(sw,{role:"menu","aria-orientation":"vertical","data-state":dU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,K=>{const oe=K.target.closest("[data-radix-menu-content]")===K.currentTarget,ae=K.ctrlKey||K.altKey||K.metaKey,ue=K.key.length===1;oe&&(K.key==="Tab"&&K.preventDefault(),!ae&&ue&&W(K.key));const be=k.current;if(K.target!==be||!jme.includes(K.key))return;K.preventDefault();const He=O().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);Wz.includes(K.key)&&He.reverse(),ave(He)}),onBlur:Ye(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(L.current),U.current="")}),onPointerMove:Ye(e.onPointerMove,yg(K=>{const Y=K.target,oe=Z.current!==K.clientX;if(K.currentTarget.contains(Y)&&oe){const ae=K.clientX>Z.current?"right":"left";ne.current=ae,Z.current=K.clientX}}))})})})})})})});Zz.displayName=da;var Xme="MenuGroup",hO=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});hO.displayName=Xme;var Qme="MenuLabel",Xz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});Xz.displayName=Qme;var lb="MenuItem",s9="menu.itemSelect",dw=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=km(lb,e.__scopeMenu),s=fO(lb,e.__scopeMenu),u=Gt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(s9,{bubbles:!0,cancelable:!0});f.addEventListener(s9,p=>r?.(p),{once:!0}),LB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(Qz,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||gE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});dw.displayName=lb;var Qz=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=fO(lb,n),s=Kz(n),u=y.useRef(null),l=Gt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),I.jsx(vg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(Vz,{asChild:!0,...s,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,yg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,yg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),Jme="MenuCheckboxItem",Jz=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(iU,{scope:e.__scopeMenu,checked:n,children:I.jsx(dw,{role:"menuitemcheckbox","aria-checked":cb(n)?"mixed":n,...i,ref:t,"data-state":gO(n),onSelect:Ye(i.onSelect,()=>r?.(cb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jz.displayName=Jme;var eU="MenuRadioGroup",[eve,tve]=hf(eU,{value:void 0,onValueChange:()=>{}}),tU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Vr(r);return I.jsx(eve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(hO,{...i,ref:t})})});tU.displayName=eU;var nU="MenuRadioItem",rU=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=tve(nU,e.__scopeMenu),o=n===i.value;return I.jsx(iU,{scope:e.__scopeMenu,checked:o,children:I.jsx(dw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":gO(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});rU.displayName=nU;var pO="MenuItemIndicator",[iU,nve]=hf(pO,{checked:!1}),oU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=nve(pO,n);return I.jsx(Gr,{present:r||cb(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":gO(o.checked)})})});oU.displayName=pO;var rve="MenuSeparator",aU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});aU.displayName=rve;var ive="MenuArrow",sU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(uw,{...i,...r,ref:t})});sU.displayName=ive;var ove="MenuSub",[dZe,uU]=hf(ove),s0="MenuSubTrigger",lU=y.forwardRef((e,t)=>{const n=pf(s0,e.__scopeMenu),r=km(s0,e.__scopeMenu),i=uU(s0,e.__scopeMenu),o=fO(s0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),I.jsx(lO,{asChild:!0,...l,children:I.jsx(Qz,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":dU(n.open),...e,ref:Ux(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,yg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,yg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Bme[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});lU.displayName=s0;var cU="MenuSubContent",fU=y.forwardRef((e,t)=>{const n=Gz(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(da,e.__scopeMenu),a=km(da,e.__scopeMenu),s=uU(cU,e.__scopeMenu),u=y.useRef(null),l=Gt(t,u);return I.jsx(vg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(vg.Slot,{scope:e.__scopeMenu,children:I.jsx(dO,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=zme[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});fU.displayName=cU;function dU(e){return e?"open":"closed"}function cb(e){return e==="indeterminate"}function gO(e){return cb(e)?"indeterminate":e?"checked":"unchecked"}function ave(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=sve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function lve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function cve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lve(n,t)}function yg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var fve=qz,dve=lO,hve=Yz,pve=Zz,gve=hO,mve=Xz,vve=dw,yve=Jz,bve=tU,xve=rU,wve=oU,_ve=aU,Sve=sU,Cve=lU,Eve=fU,mO="DropdownMenu",[Ove,hZe]=vi(mO,[Hz]),Zi=Hz(),[Ave,hU]=Ove(mO),pU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return I.jsx(Ave,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:I.jsx(fve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};pU.displayName=mO;var gU="DropdownMenuTrigger",mU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=hU(gU,n),a=Zi(n);return I.jsx(dve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ux(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});mU.displayName=gU;var Pve="DropdownMenuPortal",vU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return I.jsx(hve,{...r,...n})};vU.displayName=Pve;var yU="DropdownMenuContent",bU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=hU(yU,n),o=Zi(n),a=y.useRef(!1);return I.jsx(pve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bU.displayName=yU;var kve="DropdownMenuGroup",xU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(gve,{...i,...r,ref:t})});xU.displayName=kve;var Tve="DropdownMenuLabel",wU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(mve,{...i,...r,ref:t})});wU.displayName=Tve;var Mve="DropdownMenuItem",_U=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(vve,{...i,...r,ref:t})});_U.displayName=Mve;var Rve="DropdownMenuCheckboxItem",SU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(yve,{...i,...r,ref:t})});SU.displayName=Rve;var Dve="DropdownMenuRadioGroup",$ve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(bve,{...i,...r,ref:t})});$ve.displayName=Dve;var Ive="DropdownMenuRadioItem",CU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(xve,{...i,...r,ref:t})});CU.displayName=Ive;var Nve="DropdownMenuItemIndicator",EU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(wve,{...i,...r,ref:t})});EU.displayName=Nve;var Lve="DropdownMenuSeparator",OU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(_ve,{...i,...r,ref:t})});OU.displayName=Lve;var Fve="DropdownMenuArrow",jve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Sve,{...i,...r,ref:t})});jve.displayName=Fve;var Bve="DropdownMenuSubTrigger",AU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Cve,{...i,...r,ref:t})});AU.displayName=Bve;var zve="DropdownMenuSubContent",PU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Eve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PU.displayName=zve;var pZe=pU,gZe=mU,mZe=vU,vZe=bU,yZe=xU,bZe=wU,xZe=_U,wZe=SU,_Ze=CU,SZe=EU,CZe=OU,EZe=AU,OZe=PU,vO="Collapsible",[Uve,AZe]=vi(vO),[Vve,yO]=Uve(vO),kU=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return I.jsx(Vve,{scope:n,disabled:o,contentId:Fo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":xO(u),"data-disabled":o?"":void 0,...s,ref:t})})});kU.displayName=vO;var TU="CollapsibleTrigger",Wve=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=yO(TU,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":xO(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});Wve.displayName=TU;var bO="CollapsibleContent",Hve=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=yO(bO,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Kve,{...r,ref:t,present:o})})});Hve.displayName=bO;var Kve=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=yO(bO,n),[s,u]=y.useState(r),l=y.useRef(null),c=Gt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":xO(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function xO(e){return e?"open":"closed"}var PZe=kU,qve="VisuallyHidden",wO=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wO.displayName=qve;var Gve=wO,[hw,kZe]=vi("Tooltip",[zl]),pw=zl(),MU="TooltipProvider",Yve=700,mE="tooltip.open",[Zve,_O]=hw(MU),RU=e=>{const{__scopeTooltip:t,delayDuration:n=Yve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(Zve,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};RU.displayName=MU;var gw="Tooltip",[Xve,Tm]=hw(gw),DU=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=_O(gw,e.__scopeTooltip),l=pw(t),[c,f]=y.useState(null),h=Fo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(mE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),I.jsx(aw,{...l,children:I.jsx(Xve,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};DU.displayName=gw;var vE="TooltipTrigger",$U=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Tm(vE,n),o=_O(vE,n),a=pw(n),s=y.useRef(null),u=Gt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),I.jsx(Am,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});$U.displayName=vE;var SO="TooltipPortal",[Qve,Jve]=hw(SO,{forceMount:void 0}),IU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Tm(SO,t);return I.jsx(Qve,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};IU.displayName=SO;var Xd="TooltipContent",NU=y.forwardRef((e,t)=>{const n=Jve(Xd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Tm(Xd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(LU,{side:i,...o,ref:t}):I.jsx(e1e,{side:i,...o,ref:t})})}),e1e=y.forwardRef((e,t)=>{const n=Tm(Xd,e.__scopeTooltip),r=_O(Xd,e.__scopeTooltip),i=y.useRef(null),o=Gt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=i1e(w,b.getBoundingClientRect()),S=o1e(w,x),O=a1e(v.getBoundingClientRect()),E=u1e([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!s1e(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),I.jsx(LU,{...e,ref:o})}),[t1e,n1e]=hw(gw,{isInside:!1}),LU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Tm(Xd,n),l=pw(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(mE,c),()=>document.removeEventListener(mE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:I.jsxs(sw,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(O5,{children:r}),I.jsx(t1e,{scope:n,isInside:!0,children:I.jsx(Gve,{id:u.contentId,role:"tooltip",children:i||r})})]})})});NU.displayName=Xd;var FU="TooltipArrow",r1e=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=pw(n);return n1e(FU,n).isInside?null:I.jsx(uw,{...i,...r,ref:t})});r1e.displayName=FU;function i1e(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function o1e(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function a1e(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function s1e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function u1e(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),l1e(t)}function l1e(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var TZe=RU,MZe=DU,RZe=$U,DZe=IU,$Ze=NU,u9=1,c1e=.9,f1e=.8,d1e=.17,OS=.1,AS=.999,h1e=.9999,p1e=.99,g1e=/[\\\/_+.#"@\[\(\{&]/,m1e=/[\\\/_+.#"@\[\(\{&]/g,v1e=/[\s-]/,jU=/[\s-]/g;function yE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?u9:p1e;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=yE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=u9:g1e.test(e.charAt(l-1))?(f*=f1e,p=e.slice(i,l-1).match(m1e),p&&i>0&&(f*=Math.pow(AS,p.length))):v1e.test(e.charAt(l-1))?(f*=c1e,m=e.slice(i,l-1).match(jU),m&&i>0&&(f*=Math.pow(AS,m.length))):(f*=d1e,i>0&&(f*=Math.pow(AS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=h1e)),(ff&&(f=h*OS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function l9(e){return e.toLowerCase().replace(jU," ")}function y1e(e,t){return yE(e,t,l9(e),l9(t),0,0,{})}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>b1e(n,t))}function Mm(...e){return y.useCallback(BU(...e),e)}function x1e(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,w1e(i,...t)]}function w1e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const _1e=globalThis?.document?y.useLayoutEffect:()=>{},S1e=P4.useId||(()=>{});let C1e=0;function PS(e){const[t,n]=y.useState(S1e());return _1e(()=>{e||n(r=>r??String(C1e++))},[e]),e||(t?`radix-${t}`:"")}function zU(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function E1e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=O1e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=zU(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function O1e({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=zU(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const CO=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(P1e);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(bE,Ki({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(bE,Ki({},r,{ref:t}),n)});CO.displayName="Slot";const bE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...k1e(r,n.props),ref:BU(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});bE.displayName="SlotClone";const A1e=({children:e})=>y.createElement(y.Fragment,null,e);function P1e(e){return y.isValidElement(e)&&e.type===A1e}function k1e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const T1e=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],mw=T1e.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?CO:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,Ki({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function M1e(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function EO(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function R1e(e){const t=EO(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const xE="dismissableLayer.update",D1e="dismissableLayer.pointerDownOutside",$1e="dismissableLayer.focusOutside";let c9;const I1e=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N1e=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(I1e),[c,f]=y.useState(null),[,h]=y.useState({}),p=Mm(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=L1e(C=>{const k=C.target,M=[...l.branches].some(L=>L.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=F1e(C=>{const k=C.target;[...l.branches].some(L=>L.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return R1e(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(c9=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),f9(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=c9)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),f9())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),y.createElement(mw.div,Ki({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Td(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Td(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Td(e.onPointerDownCapture,O.onPointerDownCapture)}))});function L1e(e){const t=EO(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){UU(D1e,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function F1e(e){const t=EO(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&UU($1e,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function f9(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function UU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?M1e(i,o):i.dispatchEvent(o)}function d9(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const kS="focusScope.autoFocusOnMount",TS="focusScope.autoFocusOnUnmount",h9={bubbles:!1,cancelable:!0},j1e=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=d9(i),c=d9(o),f=y.useRef(null),h=Mm(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:cc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||cc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){g9.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(kS,h9);s.addEventListener(kS,l),s.dispatchEvent(w),w.defaultPrevented||(B1e(H1e(VU(s)),{select:!0}),document.activeElement===v&&cc(s))}return()=>{s.removeEventListener(kS,l),setTimeout(()=>{const w=new CustomEvent(TS,h9);s.addEventListener(TS,c),s.dispatchEvent(w),w.defaultPrevented||cc(v??document.body,{select:!0}),s.removeEventListener(TS,c),g9.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=z1e(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&cc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&cc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(mw.div,Ki({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function B1e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function z1e(e){const t=VU(e),n=p9(t,e),r=p9(t.reverse(),e);return[n,r]}function VU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p9(e,t){for(const n of e)if(!U1e(n,{upTo:t}))return n}function U1e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function V1e(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&V1e(e)&&t&&e.select()}}const g9=W1e();function W1e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=m9(e,t),e.unshift(t)},remove(t){var n;e=m9(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function m9(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function H1e(e){return e.filter(t=>t.tagName!=="A")}const K1e=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?jx.createPortal(y.createElement(mw.div,Ki({},i,{ref:t})),r):null}),v9=globalThis?.document?y.useLayoutEffect:()=>{};function q1e(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vw=e=>{const{present:t,children:n}=e,r=G1e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Mm(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};vw.displayName="Presence";function G1e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=q1e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=c1(r.current);o.current=s==="mounted"?l:"none"},[s]),v9(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=c1(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),v9(()=>{if(t){const l=f=>{const p=c1(r.current).includes(f.animationName);f.target===t&&p&&Au.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=c1(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function c1(e){return e?.animationName||"none"}let MS=0;function Y1e(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:y9()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:y9()),MS++,()=>{MS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MS--}},[])}function y9(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ty="right-scroll-bar-position",ny="width-before-scroll-bar",Z1e="with-scroll-bars-hidden",X1e="--removed-body-scroll-bar-size";function RS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Q1e(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var J1e=typeof window<"u"?y.useLayoutEffect:y.useEffect,b9=new WeakMap;function eye(e,t){var n=Q1e(null,function(r){return e.forEach(function(i){return RS(i,r)})});return J1e(function(){var r=b9.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||RS(s,null)}),o.forEach(function(s){i.has(s)||RS(s,a)})}b9.set(n,e)},[e]),n}var WU=WB(),DS=function(){},yw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:DS,onWheelCapture:DS,onTouchMoveCapture:DS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=K5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=eye([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:WU,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});yw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yw.classNames={fullWidth:ny,zeroRight:ty};var tye={left:0,top:0,right:0,gap:0},$S=function(e){return parseInt(e||"",10)||0},nye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$S(n),$S(r),$S(i)]},rye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tye;var t=nye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iye=q5(),Md="data-scroll-locked",oye=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Z1e,` { +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},X0e="DialogDescriptionWarning",Q0e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gz(X0e).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},J0e=tz,ege=rz,tge=oz,nge=az,rge=sz,ige=lz,oge=fz,mz=hz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var age=["color"],WYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,age);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),sge=["color"],HYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),uge=["color"],KYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lge=["color"],qYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,lge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cge=["color"],GYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fge=["color"],YYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,fge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dge=["color"],ZYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,dge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hge=["color"],XYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pge=["color"],QYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,pge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gge=["color"],JYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),mge=["color"],eZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vge=["color"],tZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),yge=["color"],nZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bge=["color"],rZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xge=["color"],iZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wge=["color"],oZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_ge=["color"],aZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_ge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sge=["color"],sZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cge=["color"],uZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ege=["title"],Oge=["title"],Age=["title"];function pg(){return pg=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lZe=function(t){var n=t.title,r=Q5(t,Ege);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},cZe=function(t){var n=t.title,r=Q5(t,Oge);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("g",{fill:"#FFF"},F.createElement("path",{d:"M0 0h513v341.3H0V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),F.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),F.createElement("g",{fill:"#D80027"},F.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},fZe=function(t){var n=t.title,r=Q5(t,Age);return F.createElement("svg",pg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#FFF",d:"M0 0h900v600H0z"}),F.createElement("g",{transform:"rotate(-56.31)"},F.createElement("path",{d:"M-75 228.3H75m-150 37.5H75m-150 37.5H75m-150 475H75m-150 37.5H75m-150 37.5H75",stroke:"#000",strokeWidth:25}),F.createElement("path",{stroke:"#FFF",strokeWidth:12.5,d:"M0 753.3v125"}),F.createElement("circle",{fill:"#ca163a",cy:540.8,r:150}),F.createElement("path",{fill:"#0e4896",d:"M0 390.8c-41.4 0-75 33.6-75 75s33.6 75 75 75 75 33.6 75 75-33.6 75-75 75c-82.8 0-150-67.2-150-150s67.2-150 150-150z"})),F.createElement("path",{d:"m231.56 535.73-83.205-124.808M262.76 514.928l-83.205-124.807m114.407 104.006-83.205-124.808m478.43-138.675-83.205-124.807M720.39 209.843 637.184 85.036m114.407 104.006L668.386 64.234",stroke:"#000",strokeWidth:25}),F.createElement("path",{stroke:"#FFF",strokeWidth:12.5,d:"m205.6 462.897 31.202-20.8m389.981-259.989 36.444-24.296m31.202-20.801 31.202-20.801"}))};function J5(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=F.useRef(null),w=F.useRef(new Map).current;return I.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=F.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Yt(m,w.collectionRef);return I.jsx(Al,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=F.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=F.useRef(null),S=Yt(m,x),O=o(l,v);return F.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),I.jsx(Al,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return F.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var kge=y.createContext(void 0);function Em(e){const t=y.useContext(kge);return e||t||"ltr"}const Tge=["top","right","bottom","left"],Rl=Math.min,Ro=Math.max,ob=Math.round,l1=Math.floor,Dl=e=>({x:e,y:e}),Mge={left:"right",right:"left",bottom:"top",top:"bottom"},Rge={start:"end",end:"start"};function dE(e,t,n){return Ro(e,Rl(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function wu(e){return e.split("-")[0]}function Fh(e){return e.split("-")[1]}function eO(e){return e==="x"?"y":"x"}function tO(e){return e==="y"?"height":"width"}function jh(e){return["top","bottom"].includes(wu(e))?"y":"x"}function nO(e){return eO(jh(e))}function Dge(e,t,n){n===void 0&&(n=!1);const r=Fh(e),i=nO(e),o=tO(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ab(a)),[a,ab(a)]}function $ge(e){const t=ab(e);return[hE(e),t,hE(t)]}function hE(e){return e.replace(/start|end/g,t=>Rge[t])}function Ige(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function Nge(e,t,n,r){const i=Fh(e);let o=Ige(wu(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(hE)))),o}function ab(e){return e.replace(/left|right|bottom|top/g,t=>Mge[t])}function Lge(e){return{top:0,right:0,bottom:0,left:0,...e}}function vz(e){return typeof e!="number"?Lge(e):{top:e,right:e,bottom:e,left:e}}function sb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function QR(e,t,n){let{reference:r,floating:i}=e;const o=jh(t),a=nO(t),s=tO(a),u=wu(t),l=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Fh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const Fge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=QR(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=xu(e,t)||{};if(l==null)return{};const f=vz(c),h={x:n,y:r},p=nO(i),m=tO(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,L=k/2-v[m]/2-1,U=Rl(f[w],L),H=Rl(f[x],L),V=U,ne=k-v[m]-H,Z=k/2-v[m]/2+M,G=dE(V,Z,ne),q=!u.arrow&&Fh(i)!=null&&Z!==G&&o.reference[m]/2-(ZV<=0)){var L,U;const V=(((L=o.flip)==null?void 0:L.index)||0)+1,ne=E[V];if(ne)return{data:{index:V,overflows:M},reset:{placement:ne}};let Z=(U=M.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(p){case"bestFit":{var H;const G=(H=M.map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,j)=>W+j,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function JR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e9(e){return Tge.some(t=>e[t]>=0)}const zge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xu(e,t);switch(r){case"referenceHidden":{const o=await gg(t,{...i,elementContext:"reference"}),a=JR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:e9(a)}}}case"escaped":{const o=await gg(t,{...i,altBoundary:!0}),a=JR(o,n.floating);return{data:{escapedOffsets:a,escaped:e9(a)}}}default:return{}}}}};async function Uge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=wu(n),s=Fh(n),u=jh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=xu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Vge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Uge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},Wge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=xu(e,t),l={x:n,y:r},c=await gg(t,u),f=jh(wu(i)),h=eO(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=dE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=dE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Hge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=xu(e,t),c={x:n,y:r},f=jh(i),h=eO(f);let p=c[h],m=c[f];const v=xu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(wu(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Kge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xu(e,t),u=await gg(t,s),l=wu(n),c=Fh(n),f=jh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Rl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Rl(b,C):C}if(x&&!c){const C=Ro(u.left,0),k=Ro(u.right,0),M=Ro(u.top,0),L=Ro(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Ro(u.left,u.right)):S=p-2*(M!==0||L!==0?M+L:Ro(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function $l(e){return yz(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ku(e){var t;return(t=(yz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yz(e){return e instanceof Node||e instanceof jo(e).Node}function _u(e){return e instanceof Element||e instanceof jo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function t9(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot}function Om(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qge(e){return["table","td","th"].includes($l(e))}function rO(e){const t=iO(),n=ma(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Gge(e){let t=Zd(e);for(;Ms(t)&&!i2(t);){if(rO(t))return t;t=Zd(t)}return null}function iO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function i2(e){return["html","body","#document"].includes($l(e))}function ma(e){return jo(e).getComputedStyle(e)}function o2(e){return _u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zd(e){if($l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t9(e)&&e.host||ku(e);return t9(t)?t.host:t}function bz(e){const t=Zd(e);return i2(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&Om(t)?t:bz(t)}function mg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=bz(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jo(i);return o?t.concat(a,a.visualViewport||[],Om(i)?i:[],a.frameElement&&n?mg(a.frameElement):[]):t.concat(i,mg(i,[],n))}function xz(e){const t=ma(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ob(n)!==o||ob(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function oO(e){return _u(e)?e:e.contextElement}function kd(e){const t=oO(e);if(!Ms(t))return Dl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=xz(t);let a=(o?ob(n.width):n.width)/r,s=(o?ob(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Yge=Dl(0);function wz(e){const t=jo(e);return!iO()||!t.visualViewport?Yge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jo(e)?!1:t}function Qc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=oO(e);let a=Dl(1);t&&(r?_u(r)&&(a=kd(r)):a=kd(e));const s=Zge(o,n,r)?wz(o):Dl(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=jo(o),p=r&&_u(r)?jo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=kd(v),w=v.getBoundingClientRect(),x=ma(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=jo(v),v=m.frameElement}}return sb({width:c,height:f,x:u,y:l})}const Xge=[":popover-open",":modal"];function _z(e){return Xge.some(t=>{try{return e.matches(t)}catch{return!1}})}function Qge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ku(r),s=t?_z(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Dl(1);const c=Dl(0),f=Ms(r);if((f||!f&&!o)&&(($l(r)!=="body"||Om(a))&&(u=o2(r)),Ms(r))){const h=Qc(r);l=kd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function Jge(e){return Array.from(e.getClientRects())}function Sz(e){return Qc(ku(e)).left+o2(e).scrollLeft}function eme(e){const t=ku(e),n=o2(e),r=e.ownerDocument.body,i=Ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sz(e);const s=-n.scrollTop;return ma(r).direction==="rtl"&&(a+=Ro(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function tme(e,t){const n=jo(e),r=ku(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=iO();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function nme(e,t){const n=Qc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?kd(e):Dl(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function n9(e,t,n){let r;if(t==="viewport")r=tme(e,n);else if(t==="document")r=eme(ku(e));else if(_u(t))r=nme(t,n);else{const i=wz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return sb(r)}function Cz(e,t){const n=Zd(e);return n===t||!_u(n)||i2(n)?!1:ma(n).position==="fixed"||Cz(n,t)}function rme(e,t){const n=t.get(e);if(n)return n;let r=mg(e,[],!1).filter(s=>_u(s)&&$l(s)!=="body"),i=null;const o=ma(e).position==="fixed";let a=o?Zd(e):e;for(;_u(a)&&!i2(a);){const s=ma(a),u=rO(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Om(a)&&!u&&Cz(e,a))?r=r.filter(c=>c!==a):i=s,a=Zd(a)}return t.set(e,r),r}function ime(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?rme(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=n9(t,c,i);return l.top=Ro(f.top,l.top),l.right=Rl(f.right,l.right),l.bottom=Rl(f.bottom,l.bottom),l.left=Ro(f.left,l.left),l},n9(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ome(e){const{width:t,height:n}=xz(e);return{width:t,height:n}}function ame(e,t,n){const r=Ms(t),i=ku(t),o=n==="fixed",a=Qc(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Dl(0);if(r||!r&&!o)if(($l(t)!=="body"||Om(i))&&(s=o2(t)),r){const f=Qc(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Sz(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function r9(e,t){return!Ms(e)||ma(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ez(e,t){const n=jo(e);if(!Ms(e)||_z(e))return n;let r=r9(e,t);for(;r&&qge(r)&&ma(r).position==="static";)r=r9(r,t);return r&&($l(r)==="html"||$l(r)==="body"&&ma(r).position==="static"&&!rO(r))?n:r||Gge(e)||n}const sme=async function(e){const t=this.getOffsetParent||Ez,n=this.getDimensions;return{reference:ame(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function ume(e){return ma(e).direction==="rtl"}const lme={convertOffsetParentRelativeRectToViewportRelativeRect:Qge,getDocumentElement:ku,getClippingRect:ime,getOffsetParent:Ez,getElementRects:sme,getClientRects:Jge,getDimensions:ome,getScale:kd,isElement:_u,isRTL:ume};function cme(e,t){let n=null,r;const i=ku(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=l1(c),m=l1(i.clientWidth-(l+f)),v=l1(i.clientHeight-(c+h)),b=l1(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ro(0,Rl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function fme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=oO(e),c=i||o?[...l?mg(l):[],...mg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?cme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Qc(e):null;u&&b();function b(){const w=Qc(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const dme=Wge,hme=Bge,pme=Kge,gme=zge,i9=jge,mme=Hge,vme=(e,t,n)=>{const r=new Map,i={platform:lme,...n},o={...i.platform,_c:r};return Fge(e,t,{...i,platform:o})},yme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?i9({element:r.current,padding:i}).fn(n):{}:r?i9({element:r,padding:i}).fn(n):{}}}};var ey=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ub(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ub(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ub(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Oz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function o9(e,t){const n=Oz(e);return Math.round(t*n)/n}function a9(e){const t=y.useRef(e);return ey(()=>{t.current=e}),t}function bme(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);ub(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(W=>{W!==C.current&&(C.current=W,v(W))},[]),S=y.useCallback(W=>{W!==k.current&&(k.current=W,w(W))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),L=u!=null,U=a9(u),H=a9(i),V=y.useCallback(()=>{if(!C.current||!k.current)return;const W={placement:t,strategy:n,middleware:h};H.current&&(W.platform=H.current),vme(C.current,k.current,W).then(j=>{const K={...j,isPositioned:!0};ne.current&&!ub(M.current,K)&&(M.current=K,Au.flushSync(()=>{f(K)}))})},[h,t,n,H]);ey(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const ne=y.useRef(!1);ey(()=>(ne.current=!0,()=>{ne.current=!1}),[]),ey(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(U.current)return U.current(O,E,V);V()}},[O,E,V,U,L]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:O,floating:E}),[O,E]),q=y.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const j=o9(G.floating,c.x),K=o9(G.floating,c.y);return s?{...W,transform:"translate("+j+"px, "+K+"px)",...Oz(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,s,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:V,refs:Z,elements:G,floatingStyles:q}),[c,V,Z,G,q])}var xme="Arrow",Az=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});Az.displayName=xme;var wme=Az;function aO(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sO="Popper",[Pz,zl]=vi(sO),[_me,kz]=Pz(sO),Tz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(_me,{scope:t,anchor:r,onAnchorChange:i,children:n})};Tz.displayName=sO;var Mz="PopperAnchor",Rz=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=kz(Mz,n),a=y.useRef(null),s=Yt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:s})});Rz.displayName=Mz;var uO="PopperContent",[Sme,Cme]=Pz(uO),Dz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=kz(uO,n),[w,x]=y.useState(null),S=Yt(t,Ee=>x(Ee)),[O,E]=y.useState(null),C=aO(O),k=C?.width??0,M=C?.height??0,L=r+(o!=="center"?"-"+o:""),U=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],V=H.length>0,ne={padding:U,boundary:H.filter(Ome),altBoundary:V},{refs:Z,floatingStyles:G,placement:q,isPositioned:W,middlewareData:j}=bme({strategy:"fixed",placement:L,whileElementsMounted:(...Ee)=>fme(...Ee,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Vge({mainAxis:i+M,alignmentAxis:a}),u&&dme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?mme():void 0,...ne}),u&&hme({...ne}),pme({...ne,apply:({elements:Ee,rects:it,availableWidth:ke,availableHeight:Le})=>{const{width:De,height:me}=it.reference,yt=Ee.floating.style;yt.setProperty("--radix-popper-available-width",`${ke}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${De}px`),yt.setProperty("--radix-popper-anchor-height",`${me}px`)}}),O&&yme({element:O,padding:s}),Ame({arrowWidth:k,arrowHeight:M}),h&&gme({strategy:"referenceHidden",...ne})]}),[K,Y]=Nz(q),oe=Vr(m);ii(()=>{W&&oe?.()},[W,oe]);const ae=j.arrow?.x,ue=j.arrow?.y,be=j.arrow?.centerOffset!==0,[we,He]=y.useState();return ii(()=>{w&&He(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(Sme,{scope:n,placedSide:K,onArrowChange:E,arrowX:ae,arrowY:ue,shouldHideArrow:be,children:I.jsx(pt.div,{"data-side":K,"data-align":Y,...v,ref:S,style:{...v.style,animation:W?void 0:"none"}})})})});Dz.displayName=uO;var $z="PopperArrow",Eme={top:"bottom",right:"left",bottom:"top",left:"right"},Iz=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Cme($z,r),a=Eme[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(wme,{...i,ref:n,style:{...i.style,display:"block"}})})});Iz.displayName=$z;function Ome(e){return e!==null}var Ame=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=Nz(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function Nz(e){const[t,n="center"]=e.split("-");return[t,n]}var a2=Tz,Am=Rz,s2=Dz,u2=Iz,ES="rovingFocusGroup.onEntryFocus",Pme={bubbles:!1,cancelable:!0},l2="RovingFocusGroup",[pE,Lz,kme]=J5(l2),[Tme,c2]=vi(l2,[kme]),[Mme,Rme]=Tme(l2),Fz=y.forwardRef((e,t)=>I.jsx(pE.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(pE.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(Dme,{...e,ref:t})})}));Fz.displayName=l2;var Dme=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Yt(t,h),m=Em(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Vr(l),O=Lz(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ES,S),()=>M.removeEventListener(ES,S)},[S]),I.jsx(Mme,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const L=!E.current;if(M.target===M.currentTarget&&L&&!w){const U=new CustomEvent(ES,Pme);if(M.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=O().filter(q=>q.focusable),V=H.find(q=>q.active),ne=H.find(q=>q.id===v),G=[V,ne,...H].filter(Boolean).map(q=>q.ref.current);zz(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),jz="RovingFocusGroupItem",Bz=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Fo(),u=o||s,l=Rme(jz,n),c=l.currentTabStopId===u,f=Lz(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),I.jsx(pE.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Nme(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?Lme(w,x+1):w.slice(x+1)}setTimeout(()=>zz(w))}})})})});Bz.displayName=jz;var $me={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ime(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nme(e,t,n){const r=Ime(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $me[r]}function zz(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Lme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Uz=Fz,Vz=Bz,gE=["Enter"," "],Fme=["ArrowDown","PageUp","Home"],Wz=["ArrowUp","PageDown","End"],jme=[...Fme,...Wz],Bme={ltr:[...gE,"ArrowRight"],rtl:[...gE,"ArrowLeft"]},zme={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pm="Menu",[vg,Ume,Vme]=J5(Pm),[hf,Hz]=vi(Pm,[Vme,zl,c2]),f2=zl(),Kz=c2(),[Wme,pf]=hf(Pm),[Hme,km]=hf(Pm),qz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=f2(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Vr(o),h=Em(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),I.jsx(a2,{...s,children:I.jsx(Wme,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:I.jsx(Hme,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};qz.displayName=Pm;var Kme="MenuAnchor",lO=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=f2(n);return I.jsx(Am,{...i,...r,ref:t})});lO.displayName=Kme;var cO="MenuPortal",[qme,Gz]=hf(cO,{forceMount:void 0}),Yz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=pf(cO,t);return I.jsx(qme,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};Yz.displayName=cO;var da="MenuContent",[Gme,fO]=hf(da),Zz=y.forwardRef((e,t)=>{const n=Gz(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(da,e.__scopeMenu),a=km(da,e.__scopeMenu);return I.jsx(vg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(vg.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(Yme,{...i,ref:t}):I.jsx(Zme,{...i,ref:t})})})})}),Yme=y.forwardRef((e,t)=>{const n=pf(da,e.__scopeMenu),r=y.useRef(null),i=Yt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(dO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zme=y.forwardRef((e,t)=>{const n=pf(da,e.__scopeMenu);return I.jsx(dO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),dO=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=pf(da,n),w=km(da,n),x=f2(n),S=Kz(n),O=Ume(n),[E,C]=y.useState(null),k=y.useRef(null),M=Yt(t,k,b.onContentChange),L=y.useRef(0),U=y.useRef(""),H=y.useRef(0),V=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),G=m?Sm:y.Fragment,q=m?{as:Al,allowPinchZoom:!0}:void 0,W=K=>{const Y=U.current+K,oe=O().filter(Ee=>!Ee.disabled),ae=document.activeElement,ue=oe.find(Ee=>Ee.ref.current===ae)?.textValue,be=oe.map(Ee=>Ee.textValue),we=uve(be,Y,ue),He=oe.find(Ee=>Ee.textValue===we)?.ref.current;(function Ee(it){U.current=it,window.clearTimeout(L.current),it!==""&&(L.current=window.setTimeout(()=>Ee(""),1e3))})(Y),He&&setTimeout(()=>He.focus())};y.useEffect(()=>()=>window.clearTimeout(L.current),[]),n2();const j=y.useCallback(K=>ne.current===V.current?.side&&cve(K,V.current?.area),[]);return I.jsx(Gme,{scope:n,searchRef:U,onItemEnter:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),onItemLeave:y.useCallback(K=>{j(K)||(k.current?.focus(),C(null))},[j]),onTriggerLeave:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(K=>{V.current=K},[]),children:I.jsx(G,{...q,children:I.jsx(_m,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,K=>{K.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:I.jsx(Uz,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,K=>{w.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(s2,{role:"menu","aria-orientation":"vertical","data-state":dU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,K=>{const oe=K.target.closest("[data-radix-menu-content]")===K.currentTarget,ae=K.ctrlKey||K.altKey||K.metaKey,ue=K.key.length===1;oe&&(K.key==="Tab"&&K.preventDefault(),!ae&&ue&&W(K.key));const be=k.current;if(K.target!==be||!jme.includes(K.key))return;K.preventDefault();const He=O().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);Wz.includes(K.key)&&He.reverse(),ave(He)}),onBlur:Ye(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(L.current),U.current="")}),onPointerMove:Ye(e.onPointerMove,yg(K=>{const Y=K.target,oe=Z.current!==K.clientX;if(K.currentTarget.contains(Y)&&oe){const ae=K.clientX>Z.current?"right":"left";ne.current=ae,Z.current=K.clientX}}))})})})})})})});Zz.displayName=da;var Xme="MenuGroup",hO=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});hO.displayName=Xme;var Qme="MenuLabel",Xz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});Xz.displayName=Qme;var lb="MenuItem",s9="menu.itemSelect",d2=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=km(lb,e.__scopeMenu),s=fO(lb,e.__scopeMenu),u=Yt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(s9,{bubbles:!0,cancelable:!0});f.addEventListener(s9,p=>r?.(p),{once:!0}),LB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(Qz,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||gE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});d2.displayName=lb;var Qz=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=fO(lb,n),s=Kz(n),u=y.useRef(null),l=Yt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),I.jsx(vg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(Vz,{asChild:!0,...s,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,yg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,yg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),Jme="MenuCheckboxItem",Jz=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(iU,{scope:e.__scopeMenu,checked:n,children:I.jsx(d2,{role:"menuitemcheckbox","aria-checked":cb(n)?"mixed":n,...i,ref:t,"data-state":gO(n),onSelect:Ye(i.onSelect,()=>r?.(cb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jz.displayName=Jme;var eU="MenuRadioGroup",[eve,tve]=hf(eU,{value:void 0,onValueChange:()=>{}}),tU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Vr(r);return I.jsx(eve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(hO,{...i,ref:t})})});tU.displayName=eU;var nU="MenuRadioItem",rU=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=tve(nU,e.__scopeMenu),o=n===i.value;return I.jsx(iU,{scope:e.__scopeMenu,checked:o,children:I.jsx(d2,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":gO(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});rU.displayName=nU;var pO="MenuItemIndicator",[iU,nve]=hf(pO,{checked:!1}),oU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=nve(pO,n);return I.jsx(Gr,{present:r||cb(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":gO(o.checked)})})});oU.displayName=pO;var rve="MenuSeparator",aU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});aU.displayName=rve;var ive="MenuArrow",sU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=f2(n);return I.jsx(u2,{...i,...r,ref:t})});sU.displayName=ive;var ove="MenuSub",[dZe,uU]=hf(ove),s0="MenuSubTrigger",lU=y.forwardRef((e,t)=>{const n=pf(s0,e.__scopeMenu),r=km(s0,e.__scopeMenu),i=uU(s0,e.__scopeMenu),o=fO(s0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),I.jsx(lO,{asChild:!0,...l,children:I.jsx(Qz,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":dU(n.open),...e,ref:Ux(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,yg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,yg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Bme[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});lU.displayName=s0;var cU="MenuSubContent",fU=y.forwardRef((e,t)=>{const n=Gz(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(da,e.__scopeMenu),a=km(da,e.__scopeMenu),s=uU(cU,e.__scopeMenu),u=y.useRef(null),l=Yt(t,u);return I.jsx(vg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(vg.Slot,{scope:e.__scopeMenu,children:I.jsx(dO,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=zme[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});fU.displayName=cU;function dU(e){return e?"open":"closed"}function cb(e){return e==="indeterminate"}function gO(e){return cb(e)?"indeterminate":e?"checked":"unchecked"}function ave(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=sve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function lve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function cve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lve(n,t)}function yg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var fve=qz,dve=lO,hve=Yz,pve=Zz,gve=hO,mve=Xz,vve=d2,yve=Jz,bve=tU,xve=rU,wve=oU,_ve=aU,Sve=sU,Cve=lU,Eve=fU,mO="DropdownMenu",[Ove,hZe]=vi(mO,[Hz]),Zi=Hz(),[Ave,hU]=Ove(mO),pU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return I.jsx(Ave,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:I.jsx(fve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};pU.displayName=mO;var gU="DropdownMenuTrigger",mU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=hU(gU,n),a=Zi(n);return I.jsx(dve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ux(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});mU.displayName=gU;var Pve="DropdownMenuPortal",vU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return I.jsx(hve,{...r,...n})};vU.displayName=Pve;var yU="DropdownMenuContent",bU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=hU(yU,n),o=Zi(n),a=y.useRef(!1);return I.jsx(pve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bU.displayName=yU;var kve="DropdownMenuGroup",xU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(gve,{...i,...r,ref:t})});xU.displayName=kve;var Tve="DropdownMenuLabel",wU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(mve,{...i,...r,ref:t})});wU.displayName=Tve;var Mve="DropdownMenuItem",_U=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(vve,{...i,...r,ref:t})});_U.displayName=Mve;var Rve="DropdownMenuCheckboxItem",SU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(yve,{...i,...r,ref:t})});SU.displayName=Rve;var Dve="DropdownMenuRadioGroup",$ve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(bve,{...i,...r,ref:t})});$ve.displayName=Dve;var Ive="DropdownMenuRadioItem",CU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(xve,{...i,...r,ref:t})});CU.displayName=Ive;var Nve="DropdownMenuItemIndicator",EU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(wve,{...i,...r,ref:t})});EU.displayName=Nve;var Lve="DropdownMenuSeparator",OU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(_ve,{...i,...r,ref:t})});OU.displayName=Lve;var Fve="DropdownMenuArrow",jve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Sve,{...i,...r,ref:t})});jve.displayName=Fve;var Bve="DropdownMenuSubTrigger",AU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Cve,{...i,...r,ref:t})});AU.displayName=Bve;var zve="DropdownMenuSubContent",PU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Eve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PU.displayName=zve;var pZe=pU,gZe=mU,mZe=vU,vZe=bU,yZe=xU,bZe=wU,xZe=_U,wZe=SU,_Ze=CU,SZe=EU,CZe=OU,EZe=AU,OZe=PU,vO="Collapsible",[Uve,AZe]=vi(vO),[Vve,yO]=Uve(vO),kU=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return I.jsx(Vve,{scope:n,disabled:o,contentId:Fo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":xO(u),"data-disabled":o?"":void 0,...s,ref:t})})});kU.displayName=vO;var TU="CollapsibleTrigger",Wve=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=yO(TU,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":xO(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});Wve.displayName=TU;var bO="CollapsibleContent",Hve=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=yO(bO,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Kve,{...r,ref:t,present:o})})});Hve.displayName=bO;var Kve=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=yO(bO,n),[s,u]=y.useState(r),l=y.useRef(null),c=Yt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":xO(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function xO(e){return e?"open":"closed"}var PZe=kU,qve="VisuallyHidden",wO=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wO.displayName=qve;var Gve=wO,[h2,kZe]=vi("Tooltip",[zl]),p2=zl(),MU="TooltipProvider",Yve=700,mE="tooltip.open",[Zve,_O]=h2(MU),RU=e=>{const{__scopeTooltip:t,delayDuration:n=Yve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(Zve,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};RU.displayName=MU;var g2="Tooltip",[Xve,Tm]=h2(g2),DU=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=_O(g2,e.__scopeTooltip),l=p2(t),[c,f]=y.useState(null),h=Fo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(mE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),I.jsx(a2,{...l,children:I.jsx(Xve,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};DU.displayName=g2;var vE="TooltipTrigger",$U=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Tm(vE,n),o=_O(vE,n),a=p2(n),s=y.useRef(null),u=Yt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),I.jsx(Am,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});$U.displayName=vE;var SO="TooltipPortal",[Qve,Jve]=h2(SO,{forceMount:void 0}),IU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Tm(SO,t);return I.jsx(Qve,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};IU.displayName=SO;var Xd="TooltipContent",NU=y.forwardRef((e,t)=>{const n=Jve(Xd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Tm(Xd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(LU,{side:i,...o,ref:t}):I.jsx(e1e,{side:i,...o,ref:t})})}),e1e=y.forwardRef((e,t)=>{const n=Tm(Xd,e.__scopeTooltip),r=_O(Xd,e.__scopeTooltip),i=y.useRef(null),o=Yt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=i1e(w,b.getBoundingClientRect()),S=o1e(w,x),O=a1e(v.getBoundingClientRect()),E=u1e([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!s1e(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),I.jsx(LU,{...e,ref:o})}),[t1e,n1e]=h2(g2,{isInside:!1}),LU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Tm(Xd,n),l=p2(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(mE,c),()=>document.removeEventListener(mE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:I.jsxs(s2,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(O5,{children:r}),I.jsx(t1e,{scope:n,isInside:!0,children:I.jsx(Gve,{id:u.contentId,role:"tooltip",children:i||r})})]})})});NU.displayName=Xd;var FU="TooltipArrow",r1e=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=p2(n);return n1e(FU,n).isInside?null:I.jsx(u2,{...i,...r,ref:t})});r1e.displayName=FU;function i1e(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function o1e(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function a1e(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function s1e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function u1e(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),l1e(t)}function l1e(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var TZe=RU,MZe=DU,RZe=$U,DZe=IU,$Ze=NU;/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jU=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var f1e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d1e=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...f1e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jU("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vt=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(d1e,{ref:o,iconNode:t,className:jU(`lucide-${c1e(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IZe=Vt("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NZe=Vt("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LZe=Vt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FZe=Vt("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jZe=Vt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BZe=Vt("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zZe=Vt("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UZe=Vt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VZe=Vt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WZe=Vt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HZe=Vt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KZe=Vt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qZe=Vt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GZe=Vt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YZe=Vt("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZZe=Vt("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XZe=Vt("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QZe=Vt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JZe=Vt("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eXe=Vt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tXe=Vt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nXe=Vt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rXe=Vt("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iXe=Vt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oXe=Vt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aXe=Vt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sXe=Vt("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uXe=Vt("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lXe=Vt("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cXe=Vt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fXe=Vt("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dXe=Vt("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hXe=Vt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pXe=Vt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gXe=Vt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mXe=Vt("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vXe=Vt("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yXe=Vt("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bXe=Vt("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xXe=Vt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wXe=Vt("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _Xe=Vt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SXe=Vt("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.399.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CXe=Vt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var u9=1,h1e=.9,p1e=.8,g1e=.17,OS=.1,AS=.999,m1e=.9999,v1e=.99,y1e=/[\\\/_+.#"@\[\(\{&]/,b1e=/[\\\/_+.#"@\[\(\{&]/g,x1e=/[\s-]/,BU=/[\s-]/g;function yE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?u9:v1e;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=yE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=u9:y1e.test(e.charAt(l-1))?(f*=p1e,p=e.slice(i,l-1).match(b1e),p&&i>0&&(f*=Math.pow(AS,p.length))):x1e.test(e.charAt(l-1))?(f*=h1e,m=e.slice(i,l-1).match(BU),m&&i>0&&(f*=Math.pow(AS,m.length))):(f*=g1e,i>0&&(f*=Math.pow(AS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=m1e)),(ff&&(f=h*OS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function l9(e){return e.toLowerCase().replace(BU," ")}function w1e(e,t){return yE(e,t,l9(e),l9(t),0,0,{})}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>_1e(n,t))}function Mm(...e){return y.useCallback(zU(...e),e)}function S1e(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,C1e(i,...t)]}function C1e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const E1e=globalThis?.document?y.useLayoutEffect:()=>{},O1e=P4.useId||(()=>{});let A1e=0;function PS(e){const[t,n]=y.useState(O1e());return E1e(()=>{e||n(r=>r??String(A1e++))},[e]),e||(t?`radix-${t}`:"")}function UU(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function P1e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=k1e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=UU(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function k1e({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=UU(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const CO=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(M1e);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(bE,Ki({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(bE,Ki({},r,{ref:t}),n)});CO.displayName="Slot";const bE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...R1e(r,n.props),ref:zU(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});bE.displayName="SlotClone";const T1e=({children:e})=>y.createElement(y.Fragment,null,e);function M1e(e){return y.isValidElement(e)&&e.type===T1e}function R1e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const D1e=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],m2=D1e.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?CO:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,Ki({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $1e(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function EO(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function I1e(e){const t=EO(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const xE="dismissableLayer.update",N1e="dismissableLayer.pointerDownOutside",L1e="dismissableLayer.focusOutside";let c9;const F1e=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),j1e=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(F1e),[c,f]=y.useState(null),[,h]=y.useState({}),p=Mm(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=B1e(C=>{const k=C.target,M=[...l.branches].some(L=>L.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=z1e(C=>{const k=C.target;[...l.branches].some(L=>L.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return I1e(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(c9=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),f9(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=c9)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),f9())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),y.createElement(m2.div,Ki({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Td(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Td(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Td(e.onPointerDownCapture,O.onPointerDownCapture)}))});function B1e(e){const t=EO(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){VU(N1e,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function z1e(e){const t=EO(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&VU(L1e,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function f9(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function VU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$1e(i,o):i.dispatchEvent(o)}function d9(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const kS="focusScope.autoFocusOnMount",TS="focusScope.autoFocusOnUnmount",h9={bubbles:!1,cancelable:!0},U1e=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=d9(i),c=d9(o),f=y.useRef(null),h=Mm(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:cc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||cc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){g9.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(kS,h9);s.addEventListener(kS,l),s.dispatchEvent(w),w.defaultPrevented||(V1e(G1e(WU(s)),{select:!0}),document.activeElement===v&&cc(s))}return()=>{s.removeEventListener(kS,l),setTimeout(()=>{const w=new CustomEvent(TS,h9);s.addEventListener(TS,c),s.dispatchEvent(w),w.defaultPrevented||cc(v??document.body,{select:!0}),s.removeEventListener(TS,c),g9.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=W1e(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&cc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&cc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(m2.div,Ki({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function V1e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function W1e(e){const t=WU(e),n=p9(t,e),r=p9(t.reverse(),e);return[n,r]}function WU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p9(e,t){for(const n of e)if(!H1e(n,{upTo:t}))return n}function H1e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function K1e(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&K1e(e)&&t&&e.select()}}const g9=q1e();function q1e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=m9(e,t),e.unshift(t)},remove(t){var n;e=m9(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function m9(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function G1e(e){return e.filter(t=>t.tagName!=="A")}const Y1e=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?jx.createPortal(y.createElement(m2.div,Ki({},i,{ref:t})),r):null}),v9=globalThis?.document?y.useLayoutEffect:()=>{};function Z1e(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const v2=e=>{const{present:t,children:n}=e,r=X1e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Mm(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};v2.displayName="Presence";function X1e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Z1e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=c1(r.current);o.current=s==="mounted"?l:"none"},[s]),v9(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=c1(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),v9(()=>{if(t){const l=f=>{const p=c1(r.current).includes(f.animationName);f.target===t&&p&&Au.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=c1(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function c1(e){return e?.animationName||"none"}let MS=0;function Q1e(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:y9()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:y9()),MS++,()=>{MS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MS--}},[])}function y9(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ty="right-scroll-bar-position",ny="width-before-scroll-bar",J1e="with-scroll-bars-hidden",eye="--removed-body-scroll-bar-size";function RS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tye(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var nye=typeof window<"u"?y.useLayoutEffect:y.useEffect,b9=new WeakMap;function rye(e,t){var n=tye(null,function(r){return e.forEach(function(i){return RS(i,r)})});return nye(function(){var r=b9.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||RS(s,null)}),o.forEach(function(s){i.has(s)||RS(s,a)})}b9.set(n,e)},[e]),n}var HU=WB(),DS=function(){},y2=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:DS,onWheelCapture:DS,onTouchMoveCapture:DS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=K5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=rye([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:HU,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});y2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};y2.classNames={fullWidth:ny,zeroRight:ty};var iye={left:0,top:0,right:0,gap:0},$S=function(e){return parseInt(e||"",10)||0},oye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$S(n),$S(r),$S(i)]},aye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return iye;var t=oye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sye=q5(),Md="data-scroll-locked",uye=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(J1e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; } @@ -158,232 +398,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do } body[`).concat(Md,`] { - `).concat(X1e,": ").concat(s,`px; + `).concat(eye,": ").concat(s,`px; } -`)},x9=function(){var e=parseInt(document.body.getAttribute(Md)||"0",10);return isFinite(e)?e:0},aye=function(){y.useEffect(function(){return document.body.setAttribute(Md,(x9()+1).toString()),function(){var e=x9()-1;e<=0?document.body.removeAttribute(Md):document.body.setAttribute(Md,e.toString())}},[])},sye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;aye();var o=y.useMemo(function(){return rye(i)},[i]);return y.createElement(iye,{styles:oye(o,!t,i,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var f1=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",f1,f1),window.removeEventListener("test",f1,f1)}catch{wE=!1}var Kf=wE?{passive:!1}:!1,uye=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},lye=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},w9=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HU(e,n);if(r){var i=KU(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},cye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},HU=function(e,t){return e==="v"?uye(t):lye(t)},KU=function(e,t){return e==="v"?cye(t):fye(t)},dye=function(e,t){return e==="h"&&t==="rtl"?-1:1},hye=function(e,t,n,r,i){var o=dye(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=KU(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&HU(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},d1=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_9=function(e){return[e.deltaX,e.deltaY]},S9=function(e){return e&&"current"in e?e.current:e},pye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gye=function(e){return` +`)},x9=function(){var e=parseInt(document.body.getAttribute(Md)||"0",10);return isFinite(e)?e:0},lye=function(){y.useEffect(function(){return document.body.setAttribute(Md,(x9()+1).toString()),function(){var e=x9()-1;e<=0?document.body.removeAttribute(Md):document.body.setAttribute(Md,e.toString())}},[])},cye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;lye();var o=y.useMemo(function(){return aye(i)},[i]);return y.createElement(sye,{styles:uye(o,!t,i,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var f1=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",f1,f1),window.removeEventListener("test",f1,f1)}catch{wE=!1}var Kf=wE?{passive:!1}:!1,fye=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},dye=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},w9=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=KU(e,n);if(r){var i=qU(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},hye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KU=function(e,t){return e==="v"?fye(t):dye(t)},qU=function(e,t){return e==="v"?hye(t):pye(t)},gye=function(e,t){return e==="h"&&t==="rtl"?-1:1},mye=function(e,t,n,r,i){var o=gye(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=qU(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&KU(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},d1=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_9=function(e){return[e.deltaX,e.deltaY]},S9=function(e){return e&&"current"in e?e.current:e},vye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yye=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},mye=0,qf=[];function vye(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(mye++)[0],o=y.useState(function(){return q5()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(S9),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=d1(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=w9(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=w9(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var L=r.current||E;return hye(L,b,v,L==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?_9(b):d1(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&pye(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(S9).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=d1(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,_9(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,d1(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Kf),document.addEventListener("touchmove",u,Kf),document.addEventListener("touchstart",c,Kf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Kf),document.removeEventListener("touchmove",u,Kf),document.removeEventListener("touchstart",c,Kf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:gye(i)}):null,p?y.createElement(sye,{gapMode:"margin"}):null)}const yye=KB(WU,vye);var qU=y.forwardRef(function(e,t){return y.createElement(yw,Ri({},e,{ref:t,sideCar:yye}))});qU.classNames=yw.classNames;const GU="Dialog",[YU,IZe]=x1e(GU),[bye,gf]=YU(GU),xye=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=E1e({prop:r,defaultProp:i,onChange:o});return y.createElement(bye,{scope:t,triggerRef:s,contentRef:u,contentId:PS(),titleId:PS(),descriptionId:PS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},ZU="DialogPortal",[wye,XU]=YU(ZU,{forceMount:void 0}),_ye=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=gf(ZU,t);return y.createElement(wye,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(vw,{present:n||o.open},y.createElement(K1e,{asChild:!0,container:i},a))))},_E="DialogOverlay",Sye=y.forwardRef((e,t)=>{const n=XU(_E,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(_E,e.__scopeDialog);return o.modal?y.createElement(vw,{present:r||o.open},y.createElement(Cye,Ki({},i,{ref:t}))):null}),Cye=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gf(_E,n);return y.createElement(qU,{as:CO,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(mw.div,Ki({"data-state":JU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),bg="DialogContent",Eye=y.forwardRef((e,t)=>{const n=XU(bg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(bg,e.__scopeDialog);return y.createElement(vw,{present:r||o.open},o.modal?y.createElement(Oye,Ki({},i,{ref:t})):y.createElement(Aye,Ki({},i,{ref:t})))}),Oye=y.forwardRef((e,t)=>{const n=gf(bg,e.__scopeDialog),r=y.useRef(null),i=Mm(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),y.createElement(QU,Ki({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Td(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Td(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Td(e.onFocusOutside,o=>o.preventDefault())}))}),Aye=y.forwardRef((e,t)=>{const n=gf(bg,e.__scopeDialog),r=y.useRef(!1);return y.createElement(QU,Ki({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),QU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=gf(bg,n),u=y.useRef(null),l=Mm(t,u);return Y1e(),y.createElement(y.Fragment,null,y.createElement(j1e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(N1e,Ki({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":JU(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function JU(e){return e?"open":"closed"}const Pye=xye,kye=_ye,Tye=Sye,Mye=Eye;var Rye='[cmdk-list-sizer=""]',jp='[cmdk-group=""]',IS='[cmdk-group-items=""]',Dye='[cmdk-group-heading=""]',OO='[cmdk-item=""]',C9=`${OO}:not([aria-disabled="true"])`,SE="cmdk-item-select",Qs="data-value",$ye=(e,t)=>y1e(e,t),eV=y.createContext(void 0),Rm=()=>y.useContext(eV),tV=y.createContext(void 0),AO=()=>y.useContext(tV),nV=y.createContext(void 0),rV=y.forwardRef((e,t)=>{let n=y.useRef(null),r=td(()=>{var Y,oe,ae;return{search:"",value:(ae=(oe=e.value)!=null?oe:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?ae:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=td(()=>new Set),o=td(()=>new Map),a=td(()=>new Map),s=td(()=>new Set),u=iV(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=Hye();Bh(()=>{if(f!==void 0){let Y=f.trim().toLowerCase();r.current.value=Y,O(6,H),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:Y=>(s.current.add(Y),()=>s.current.delete(Y)),snapshot:()=>r.current,setState:(Y,oe,ae)=>{var ue,be,we;if(!Object.is(r.current[Y],oe)){if(r.current[Y]=oe,Y==="search")U(),M(),O(1,L);else if(Y==="value")if(((ue=u.current)==null?void 0:ue.value)!==void 0){let He=oe??"";(we=(be=u.current).onValueChange)==null||we.call(be,He);return}else ae||O(5,H);E.emit()}},emit:()=>{s.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,oe)=>{oe!==a.current.get(Y)&&(a.current.set(Y,oe),r.current.filtered.items.set(Y,k(oe)),O(2,()=>{M(),E.emit()}))},item:(Y,oe)=>(i.current.add(Y),oe&&(o.current.has(oe)?o.current.get(oe).add(Y):o.current.set(oe,new Set([Y]))),O(3,()=>{U(),M(),r.current.value||L(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let ae=V();O(4,()=>{U(),ae?.getAttribute("id")===Y&&L(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(Y){var oe,ae;let ue=(ae=(oe=u.current)==null?void 0:oe.filter)!=null?ae:$ye;return Y?ue(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Y=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(ue=>{let be=o.current.get(ue),we=0;be.forEach(He=>{let Ee=Y.get(He);we=Math.max(Ee,we)}),oe.push([ue,we])});let ae=n.current.querySelector(Rye);ne().sort((ue,be)=>{var we,He;let Ee=ue.getAttribute(Qs),it=be.getAttribute(Qs);return((we=Y.get(it))!=null?we:0)-((He=Y.get(Ee))!=null?He:0)}).forEach(ue=>{let be=ue.closest(IS);be?be.appendChild(ue.parentElement===be?ue:ue.closest(`${IS} > *`)):ae.appendChild(ue.parentElement===ae?ue:ue.closest(`${IS} > *`))}),oe.sort((ue,be)=>be[1]-ue[1]).forEach(ue=>{let be=n.current.querySelector(`${jp}[${Qs}="${ue[0]}"]`);be?.parentElement.appendChild(be)})}function L(){let Y=ne().find(ae=>!ae.ariaDisabled),oe=Y?.getAttribute(Qs);E.setState("value",oe||void 0)}function U(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let oe of i.current){let ae=a.current.get(oe),ue=k(ae);r.current.filtered.items.set(oe,ue),ue>0&&Y++}for(let[oe,ae]of o.current)for(let ue of ae)if(r.current.filtered.items.get(ue)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=Y}function H(){var Y,oe,ae;let ue=V();ue&&(((Y=ue.parentElement)==null?void 0:Y.firstChild)===ue&&((ae=(oe=ue.closest(jp))==null?void 0:oe.querySelector(Dye))==null||ae.scrollIntoView({block:"nearest"})),ue.scrollIntoView({block:"nearest"}))}function V(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${OO}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(C9))}function Z(Y){let oe=ne()[Y];oe&&E.setState("value",oe.getAttribute(Qs))}function G(Y){var oe;let ae=V(),ue=ne(),be=ue.findIndex(He=>He===ae),we=ue[be+Y];(oe=u.current)!=null&&oe.loop&&(we=be+Y<0?ue[ue.length-1]:be+Y===ue.length?ue[0]:ue[be+Y]),we&&E.setState("value",we.getAttribute(Qs))}function q(Y){let oe=V(),ae=oe?.closest(jp),ue;for(;ae&&!ue;)ae=Y>0?Vye(ae,jp):Wye(ae,jp),ue=ae?.querySelector(C9);ue?E.setState("value",ue.getAttribute(Qs)):G(Y)}let W=()=>Z(ne().length-1),j=Y=>{Y.preventDefault(),Y.metaKey?W():Y.altKey?q(1):G(1)},K=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?q(-1):G(-1)};return y.createElement("div",{ref:Dm([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{v&&Y.ctrlKey&&j(Y);break}case"ArrowDown":{j(Y);break}case"p":case"k":{v&&Y.ctrlKey&&K(Y);break}case"ArrowUp":{K(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),W();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let ae=V();if(ae){let ue=new Event(SE);ae.dispatchEvent(ue)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Kye},l),y.createElement(tV.Provider,{value:E},y.createElement(eV.Provider,{value:C},c)))}),Iye=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(nV),s=Rm(),u=iV(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Bh(()=>s.item(i,a?.id),[]);let c=oV(i,o,[e.value,e.children,o]),f=AO(),h=Jc(E=>E.value&&E.value===c.current),p=Jc(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(SE,m),()=>E.removeEventListener(SE,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Dm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),Nye=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Rm(),f=Jc(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Bh(()=>c.group(a),[]),oV(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(nV.Provider,{value:h},r);return y.createElement("div",{ref:Dm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),Lye=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Jc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),Fye=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=AO(),a=Jc(c=>c.search),s=Jc(c=>c.value),u=Rm(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${OO}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),jye=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Rm();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),Bye=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(Pye,{open:n,onOpenChange:r},y.createElement(kye,{container:a},y.createElement(Tye,{"cmdk-overlay":"",className:i}),y.createElement(Mye,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(rV,{ref:t,...s}))))}),zye=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Jc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Uye=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),NZe=Object.assign(rV,{List:jye,Item:Iye,Input:Fye,Group:Nye,Separator:Lye,Dialog:Bye,Empty:zye,Loading:Uye});function Vye(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Wye(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function iV(e){let t=y.useRef(e);return Bh(()=>{t.current=e}),t}var Bh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function td(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Dm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Jc(e){let t=AO(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function oV(e,t,n){let r=y.useRef(),i=Rm();return Bh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var Hye=()=>{let[e,t]=y.useState(),n=td(()=>new Map);return Bh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Kye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qye=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aV=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Gye={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yye=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...Gye,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:aV("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const en=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(Yye,{ref:o,iconNode:t,className:aV(`lucide-${qye(e)}`,r),...i}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LZe=en("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FZe=en("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jZe=en("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BZe=en("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zZe=en("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UZe=en("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VZe=en("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WZe=en("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HZe=en("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KZe=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qZe=en("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GZe=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YZe=en("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZZe=en("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XZe=en("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QZe=en("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JZe=en("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eXe=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tXe=en("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nXe=en("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rXe=en("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iXe=en("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oXe=en("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aXe=en("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sXe=en("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uXe=en("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lXe=en("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cXe=en("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fXe=en("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dXe=en("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hXe=en("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pXe=en("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gXe=en("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mXe=en("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vXe=en("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yXe=en("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bXe=en("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xXe=en("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wXe=en("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.399.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _Xe=en("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var PO="Avatar",[Zye,SXe]=vi(PO),[Xye,sV]=Zye(PO),uV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(Xye,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});uV.displayName=PO;var lV="AvatarImage",cV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=sV(lV,n),s=Qye(r,o.referrerPolicy),u=Vr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});cV.displayName=lV;var fV="AvatarFallback",dV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=sV(fV,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});dV.displayName=fV;function Qye(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var CXe=uV,EXe=cV,OXe=dV,Jye=Array.isArray,vo=Jye,ebe=typeof La=="object"&&La&&La.Object===Object&&La,hV=ebe,tbe=hV,nbe=typeof self=="object"&&self&&self.Object===Object&&self,rbe=tbe||nbe||Function("return this")(),Ds=rbe,ibe=Ds,obe=ibe.Symbol,$m=obe,E9=$m,pV=Object.prototype,abe=pV.hasOwnProperty,sbe=pV.toString,Bp=E9?E9.toStringTag:void 0;function ube(e){var t=abe.call(e,Bp),n=e[Bp];try{e[Bp]=void 0;var r=!0}catch{}var i=sbe.call(e);return r&&(t?e[Bp]=n:delete e[Bp]),i}var lbe=ube,cbe=Object.prototype,fbe=cbe.toString;function dbe(e){return fbe.call(e)}var hbe=dbe,O9=$m,pbe=lbe,gbe=hbe,mbe="[object Null]",vbe="[object Undefined]",A9=O9?O9.toStringTag:void 0;function ybe(e){return e==null?e===void 0?vbe:mbe:A9&&A9 in Object(e)?pbe(e):gbe(e)}var Tu=ybe;function bbe(e){return e!=null&&typeof e=="object"}var Mu=bbe,xbe=Tu,wbe=Mu,_be="[object Symbol]";function Sbe(e){return typeof e=="symbol"||wbe(e)&&xbe(e)==_be}var zh=Sbe,Cbe=vo,Ebe=zh,Obe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Abe=/^\w*$/;function Pbe(e,t){if(Cbe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ebe(e)?!0:Abe.test(e)||!Obe.test(e)||t!=null&&e in Object(t)}var kO=Pbe;function kbe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ul=kbe;const Uh=Dn(Ul);var Tbe=Tu,Mbe=Ul,Rbe="[object AsyncFunction]",Dbe="[object Function]",$be="[object GeneratorFunction]",Ibe="[object Proxy]";function Nbe(e){if(!Mbe(e))return!1;var t=Tbe(e);return t==Dbe||t==$be||t==Rbe||t==Ibe}var TO=Nbe;const Wt=Dn(TO);var Lbe=Ds,Fbe=Lbe["__core-js_shared__"],jbe=Fbe,NS=jbe,P9=function(){var e=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bbe(e){return!!P9&&P9 in e}var zbe=Bbe,Ube=Function.prototype,Vbe=Ube.toString;function Wbe(e){if(e!=null){try{return Vbe.call(e)}catch{}try{return e+""}catch{}}return""}var gV=Wbe,Hbe=TO,Kbe=zbe,qbe=Ul,Gbe=gV,Ybe=/[\\^$.*+?()[\]{}|]/g,Zbe=/^\[object .+?Constructor\]$/,Xbe=Function.prototype,Qbe=Object.prototype,Jbe=Xbe.toString,exe=Qbe.hasOwnProperty,txe=RegExp("^"+Jbe.call(exe).replace(Ybe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nxe(e){if(!qbe(e)||Kbe(e))return!1;var t=Hbe(e)?txe:Zbe;return t.test(Gbe(e))}var rxe=nxe;function ixe(e,t){return e?.[t]}var oxe=ixe,axe=rxe,sxe=oxe;function uxe(e,t){var n=sxe(e,t);return axe(n)?n:void 0}var mf=uxe,lxe=mf,cxe=lxe(Object,"create"),bw=cxe,k9=bw;function fxe(){this.__data__=k9?k9(null):{},this.size=0}var dxe=fxe;function hxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pxe=hxe,gxe=bw,mxe="__lodash_hash_undefined__",vxe=Object.prototype,yxe=vxe.hasOwnProperty;function bxe(e){var t=this.__data__;if(gxe){var n=t[e];return n===mxe?void 0:n}return yxe.call(t,e)?t[e]:void 0}var xxe=bxe,wxe=bw,_xe=Object.prototype,Sxe=_xe.hasOwnProperty;function Cxe(e){var t=this.__data__;return wxe?t[e]!==void 0:Sxe.call(t,e)}var Exe=Cxe,Oxe=bw,Axe="__lodash_hash_undefined__";function Pxe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oxe&&t===void 0?Axe:t,this}var kxe=Pxe,Txe=dxe,Mxe=pxe,Rxe=xxe,Dxe=Exe,$xe=kxe;function Vh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Xxe=Zxe,Qxe=xw;function Jxe(e,t){var n=this.__data__,r=Qxe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ewe=Jxe,twe=Lxe,nwe=Hxe,rwe=Gxe,iwe=Xxe,owe=ewe;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tMath.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=w9(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=w9(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var L=r.current||E;return mye(L,b,v,L==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?_9(b):d1(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&vye(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(S9).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=d1(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,_9(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,d1(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Kf),document.addEventListener("touchmove",u,Kf),document.addEventListener("touchstart",c,Kf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Kf),document.removeEventListener("touchmove",u,Kf),document.removeEventListener("touchstart",c,Kf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:yye(i)}):null,p?y.createElement(cye,{gapMode:"margin"}):null)}const wye=KB(HU,xye);var GU=y.forwardRef(function(e,t){return y.createElement(y2,Ri({},e,{ref:t,sideCar:wye}))});GU.classNames=y2.classNames;const YU="Dialog",[ZU,EXe]=S1e(YU),[_ye,gf]=ZU(YU),Sye=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=P1e({prop:r,defaultProp:i,onChange:o});return y.createElement(_ye,{scope:t,triggerRef:s,contentRef:u,contentId:PS(),titleId:PS(),descriptionId:PS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},XU="DialogPortal",[Cye,QU]=ZU(XU,{forceMount:void 0}),Eye=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=gf(XU,t);return y.createElement(Cye,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(v2,{present:n||o.open},y.createElement(Y1e,{asChild:!0,container:i},a))))},_E="DialogOverlay",Oye=y.forwardRef((e,t)=>{const n=QU(_E,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(_E,e.__scopeDialog);return o.modal?y.createElement(v2,{present:r||o.open},y.createElement(Aye,Ki({},i,{ref:t}))):null}),Aye=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gf(_E,n);return y.createElement(GU,{as:CO,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(m2.div,Ki({"data-state":eV(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),bg="DialogContent",Pye=y.forwardRef((e,t)=>{const n=QU(bg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(bg,e.__scopeDialog);return y.createElement(v2,{present:r||o.open},o.modal?y.createElement(kye,Ki({},i,{ref:t})):y.createElement(Tye,Ki({},i,{ref:t})))}),kye=y.forwardRef((e,t)=>{const n=gf(bg,e.__scopeDialog),r=y.useRef(null),i=Mm(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),y.createElement(JU,Ki({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Td(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Td(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Td(e.onFocusOutside,o=>o.preventDefault())}))}),Tye=y.forwardRef((e,t)=>{const n=gf(bg,e.__scopeDialog),r=y.useRef(!1);return y.createElement(JU,Ki({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),JU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=gf(bg,n),u=y.useRef(null),l=Mm(t,u);return Q1e(),y.createElement(y.Fragment,null,y.createElement(U1e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(j1e,Ki({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eV(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function eV(e){return e?"open":"closed"}const Mye=Sye,Rye=Eye,Dye=Oye,$ye=Pye;var Iye='[cmdk-list-sizer=""]',jp='[cmdk-group=""]',IS='[cmdk-group-items=""]',Nye='[cmdk-group-heading=""]',OO='[cmdk-item=""]',C9=`${OO}:not([aria-disabled="true"])`,SE="cmdk-item-select",Qs="data-value",Lye=(e,t)=>w1e(e,t),tV=y.createContext(void 0),Rm=()=>y.useContext(tV),nV=y.createContext(void 0),AO=()=>y.useContext(nV),rV=y.createContext(void 0),iV=y.forwardRef((e,t)=>{let n=y.useRef(null),r=td(()=>{var Y,oe,ae;return{search:"",value:(ae=(oe=e.value)!=null?oe:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?ae:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=td(()=>new Set),o=td(()=>new Map),a=td(()=>new Map),s=td(()=>new Set),u=oV(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=Gye();Bh(()=>{if(f!==void 0){let Y=f.trim().toLowerCase();r.current.value=Y,O(6,H),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:Y=>(s.current.add(Y),()=>s.current.delete(Y)),snapshot:()=>r.current,setState:(Y,oe,ae)=>{var ue,be,we;if(!Object.is(r.current[Y],oe)){if(r.current[Y]=oe,Y==="search")U(),M(),O(1,L);else if(Y==="value")if(((ue=u.current)==null?void 0:ue.value)!==void 0){let He=oe??"";(we=(be=u.current).onValueChange)==null||we.call(be,He);return}else ae||O(5,H);E.emit()}},emit:()=>{s.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,oe)=>{oe!==a.current.get(Y)&&(a.current.set(Y,oe),r.current.filtered.items.set(Y,k(oe)),O(2,()=>{M(),E.emit()}))},item:(Y,oe)=>(i.current.add(Y),oe&&(o.current.has(oe)?o.current.get(oe).add(Y):o.current.set(oe,new Set([Y]))),O(3,()=>{U(),M(),r.current.value||L(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let ae=V();O(4,()=>{U(),ae?.getAttribute("id")===Y&&L(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(Y){var oe,ae;let ue=(ae=(oe=u.current)==null?void 0:oe.filter)!=null?ae:Lye;return Y?ue(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Y=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(ue=>{let be=o.current.get(ue),we=0;be.forEach(He=>{let Ee=Y.get(He);we=Math.max(Ee,we)}),oe.push([ue,we])});let ae=n.current.querySelector(Iye);ne().sort((ue,be)=>{var we,He;let Ee=ue.getAttribute(Qs),it=be.getAttribute(Qs);return((we=Y.get(it))!=null?we:0)-((He=Y.get(Ee))!=null?He:0)}).forEach(ue=>{let be=ue.closest(IS);be?be.appendChild(ue.parentElement===be?ue:ue.closest(`${IS} > *`)):ae.appendChild(ue.parentElement===ae?ue:ue.closest(`${IS} > *`))}),oe.sort((ue,be)=>be[1]-ue[1]).forEach(ue=>{let be=n.current.querySelector(`${jp}[${Qs}="${ue[0]}"]`);be?.parentElement.appendChild(be)})}function L(){let Y=ne().find(ae=>!ae.ariaDisabled),oe=Y?.getAttribute(Qs);E.setState("value",oe||void 0)}function U(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let oe of i.current){let ae=a.current.get(oe),ue=k(ae);r.current.filtered.items.set(oe,ue),ue>0&&Y++}for(let[oe,ae]of o.current)for(let ue of ae)if(r.current.filtered.items.get(ue)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=Y}function H(){var Y,oe,ae;let ue=V();ue&&(((Y=ue.parentElement)==null?void 0:Y.firstChild)===ue&&((ae=(oe=ue.closest(jp))==null?void 0:oe.querySelector(Nye))==null||ae.scrollIntoView({block:"nearest"})),ue.scrollIntoView({block:"nearest"}))}function V(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${OO}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(C9))}function Z(Y){let oe=ne()[Y];oe&&E.setState("value",oe.getAttribute(Qs))}function G(Y){var oe;let ae=V(),ue=ne(),be=ue.findIndex(He=>He===ae),we=ue[be+Y];(oe=u.current)!=null&&oe.loop&&(we=be+Y<0?ue[ue.length-1]:be+Y===ue.length?ue[0]:ue[be+Y]),we&&E.setState("value",we.getAttribute(Qs))}function q(Y){let oe=V(),ae=oe?.closest(jp),ue;for(;ae&&!ue;)ae=Y>0?Kye(ae,jp):qye(ae,jp),ue=ae?.querySelector(C9);ue?E.setState("value",ue.getAttribute(Qs)):G(Y)}let W=()=>Z(ne().length-1),j=Y=>{Y.preventDefault(),Y.metaKey?W():Y.altKey?q(1):G(1)},K=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?q(-1):G(-1)};return y.createElement("div",{ref:Dm([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{v&&Y.ctrlKey&&j(Y);break}case"ArrowDown":{j(Y);break}case"p":case"k":{v&&Y.ctrlKey&&K(Y);break}case"ArrowUp":{K(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),W();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let ae=V();if(ae){let ue=new Event(SE);ae.dispatchEvent(ue)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Yye},l),y.createElement(nV.Provider,{value:E},y.createElement(tV.Provider,{value:C},c)))}),Fye=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(rV),s=Rm(),u=oV(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Bh(()=>s.item(i,a?.id),[]);let c=aV(i,o,[e.value,e.children,o]),f=AO(),h=Jc(E=>E.value&&E.value===c.current),p=Jc(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(SE,m),()=>E.removeEventListener(SE,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Dm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),jye=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Rm(),f=Jc(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Bh(()=>c.group(a),[]),aV(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(rV.Provider,{value:h},r);return y.createElement("div",{ref:Dm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),Bye=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Jc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),zye=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=AO(),a=Jc(c=>c.search),s=Jc(c=>c.value),u=Rm(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${OO}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),Uye=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Rm();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),Vye=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(Mye,{open:n,onOpenChange:r},y.createElement(Rye,{container:a},y.createElement(Dye,{"cmdk-overlay":"",className:i}),y.createElement($ye,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(iV,{ref:t,...s}))))}),Wye=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Jc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Hye=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),OXe=Object.assign(iV,{List:Uye,Item:Fye,Input:zye,Group:jye,Separator:Bye,Dialog:Vye,Empty:Wye,Loading:Hye});function Kye(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qye(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oV(e){let t=y.useRef(e);return Bh(()=>{t.current=e}),t}var Bh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function td(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Dm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Jc(e){let t=AO(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function aV(e,t,n){let r=y.useRef(),i=Rm();return Bh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var Gye=()=>{let[e,t]=y.useState(),n=td(()=>new Map);return Bh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Yye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},PO="Avatar",[Zye,AXe]=vi(PO),[Xye,sV]=Zye(PO),uV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(Xye,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});uV.displayName=PO;var lV="AvatarImage",cV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=sV(lV,n),s=Qye(r,o.referrerPolicy),u=Vr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});cV.displayName=lV;var fV="AvatarFallback",dV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=sV(fV,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});dV.displayName=fV;function Qye(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var PXe=uV,kXe=cV,TXe=dV,Jye=Array.isArray,vo=Jye,ebe=typeof La=="object"&&La&&La.Object===Object&&La,hV=ebe,tbe=hV,nbe=typeof self=="object"&&self&&self.Object===Object&&self,rbe=tbe||nbe||Function("return this")(),Ds=rbe,ibe=Ds,obe=ibe.Symbol,$m=obe,E9=$m,pV=Object.prototype,abe=pV.hasOwnProperty,sbe=pV.toString,Bp=E9?E9.toStringTag:void 0;function ube(e){var t=abe.call(e,Bp),n=e[Bp];try{e[Bp]=void 0;var r=!0}catch{}var i=sbe.call(e);return r&&(t?e[Bp]=n:delete e[Bp]),i}var lbe=ube,cbe=Object.prototype,fbe=cbe.toString;function dbe(e){return fbe.call(e)}var hbe=dbe,O9=$m,pbe=lbe,gbe=hbe,mbe="[object Null]",vbe="[object Undefined]",A9=O9?O9.toStringTag:void 0;function ybe(e){return e==null?e===void 0?vbe:mbe:A9&&A9 in Object(e)?pbe(e):gbe(e)}var Tu=ybe;function bbe(e){return e!=null&&typeof e=="object"}var Mu=bbe,xbe=Tu,wbe=Mu,_be="[object Symbol]";function Sbe(e){return typeof e=="symbol"||wbe(e)&&xbe(e)==_be}var zh=Sbe,Cbe=vo,Ebe=zh,Obe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Abe=/^\w*$/;function Pbe(e,t){if(Cbe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ebe(e)?!0:Abe.test(e)||!Obe.test(e)||t!=null&&e in Object(t)}var kO=Pbe;function kbe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ul=kbe;const Uh=Dn(Ul);var Tbe=Tu,Mbe=Ul,Rbe="[object AsyncFunction]",Dbe="[object Function]",$be="[object GeneratorFunction]",Ibe="[object Proxy]";function Nbe(e){if(!Mbe(e))return!1;var t=Tbe(e);return t==Dbe||t==$be||t==Rbe||t==Ibe}var TO=Nbe;const Ht=Dn(TO);var Lbe=Ds,Fbe=Lbe["__core-js_shared__"],jbe=Fbe,NS=jbe,P9=function(){var e=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bbe(e){return!!P9&&P9 in e}var zbe=Bbe,Ube=Function.prototype,Vbe=Ube.toString;function Wbe(e){if(e!=null){try{return Vbe.call(e)}catch{}try{return e+""}catch{}}return""}var gV=Wbe,Hbe=TO,Kbe=zbe,qbe=Ul,Gbe=gV,Ybe=/[\\^$.*+?()[\]{}|]/g,Zbe=/^\[object .+?Constructor\]$/,Xbe=Function.prototype,Qbe=Object.prototype,Jbe=Xbe.toString,exe=Qbe.hasOwnProperty,txe=RegExp("^"+Jbe.call(exe).replace(Ybe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nxe(e){if(!qbe(e)||Kbe(e))return!1;var t=Hbe(e)?txe:Zbe;return t.test(Gbe(e))}var rxe=nxe;function ixe(e,t){return e?.[t]}var oxe=ixe,axe=rxe,sxe=oxe;function uxe(e,t){var n=sxe(e,t);return axe(n)?n:void 0}var mf=uxe,lxe=mf,cxe=lxe(Object,"create"),b2=cxe,k9=b2;function fxe(){this.__data__=k9?k9(null):{},this.size=0}var dxe=fxe;function hxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pxe=hxe,gxe=b2,mxe="__lodash_hash_undefined__",vxe=Object.prototype,yxe=vxe.hasOwnProperty;function bxe(e){var t=this.__data__;if(gxe){var n=t[e];return n===mxe?void 0:n}return yxe.call(t,e)?t[e]:void 0}var xxe=bxe,wxe=b2,_xe=Object.prototype,Sxe=_xe.hasOwnProperty;function Cxe(e){var t=this.__data__;return wxe?t[e]!==void 0:Sxe.call(t,e)}var Exe=Cxe,Oxe=b2,Axe="__lodash_hash_undefined__";function Pxe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oxe&&t===void 0?Axe:t,this}var kxe=Pxe,Txe=dxe,Mxe=pxe,Rxe=xxe,Dxe=Exe,$xe=kxe;function Vh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Xxe=Zxe,Qxe=x2;function Jxe(e,t){var n=this.__data__,r=Qxe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var e2e=Jxe,t2e=Lxe,n2e=Hxe,r2e=Gxe,i2e=Xxe,o2e=e2e;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Sc=function(t){return Im(t)&&t.indexOf("%")===t.length-1},qe=function(t){return A2e(t)&&!Kh(t)},Hr=function(t){return qe(t)||Im(t)},M2e=0,vf=function(t){var n=++M2e;return"".concat(t||"").concat(n)},ef=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(t)&&!Im(t))return r;var o;if(Sc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Kh(o)&&(o=r),i&&o>n&&(o=n),o},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},R2e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EE(e)}var N9={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},L9=null,FS=null,BO=function e(t){if(t===L9&&Array.isArray(FS))return FS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(_2e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),FS=n,L9=t,n};function po(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fu(i)}):r=[fu(t)],BO(e).forEach(function(i){var o=ha(i,"type.displayName")||ha(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function To(e,t){var n=po(e,t);return n[0]}var F9=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},B2e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],z2e=function(t){return t&&t.type&&Im(t.type)&&B2e.indexOf(t.type)>=0},EV=function(t){return t&&EE(t)==="object"&&"clipDot"in t},U2e=function(t,n,r,i){var o,a=(o=LS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||I2e.includes(n))||r&&jO.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Uh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;U2e((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},OE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return j9(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=K2e(e,H2e),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return F.createElement("svg",AE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),F.createElement("title",null,s),F.createElement("desc",null,u),t)}var G2e=["children","className"];function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cn=F.forwardRef(function(e,t){var n=e.children,r=e.className,i=Y2e(e,G2e),o=dn("recharts-layer",r);return F.createElement("g",kE({className:o},zt(i,!0),{ref:t}),n)}),du=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:J2e(e,t,n)}var t_e=e_e,n_e="\\ud800-\\udfff",r_e="\\u0300-\\u036f",i_e="\\ufe20-\\ufe2f",o_e="\\u20d0-\\u20ff",a_e=r_e+i_e+o_e,s_e="\\ufe0e\\ufe0f",u_e="\\u200d",l_e=RegExp("["+u_e+n_e+a_e+s_e+"]");function c_e(e){return l_e.test(e)}var OV=c_e;function f_e(e){return e.split("")}var d_e=f_e,AV="\\ud800-\\udfff",h_e="\\u0300-\\u036f",p_e="\\ufe20-\\ufe2f",g_e="\\u20d0-\\u20ff",m_e=h_e+p_e+g_e,v_e="\\ufe0e\\ufe0f",y_e="["+AV+"]",TE="["+m_e+"]",ME="\\ud83c[\\udffb-\\udfff]",b_e="(?:"+TE+"|"+ME+")",PV="[^"+AV+"]",kV="(?:\\ud83c[\\udde6-\\uddff]){2}",TV="[\\ud800-\\udbff][\\udc00-\\udfff]",x_e="\\u200d",MV=b_e+"?",RV="["+v_e+"]?",w_e="(?:"+x_e+"(?:"+[PV,kV,TV].join("|")+")"+RV+MV+")*",__e=RV+MV+w_e,S_e="(?:"+[PV+TE+"?",TE,kV,TV,y_e].join("|")+")",C_e=RegExp(ME+"(?="+ME+")|"+S_e+__e,"g");function E_e(e){return e.match(C_e)||[]}var O_e=E_e,A_e=d_e,P_e=OV,k_e=O_e;function T_e(e){return P_e(e)?k_e(e):A_e(e)}var M_e=T_e,R_e=t_e,D_e=OV,$_e=M_e,I_e=bV;function N_e(e){return function(t){t=I_e(t);var n=D_e(t)?$_e(t):void 0,r=n?n[0]:t.charAt(0),i=n?R_e(n,1).join(""):t.slice(1);return r[e]()+i}}var L_e=N_e,F_e=L_e,j_e=F_e("toUpperCase"),B_e=j_e;const $w=Dn(B_e);function Vn(e){return function(){return e}}const DV=Math.cos,hb=Math.sin,rs=Math.sqrt,pb=Math.PI,Iw=2*pb,RE=Math.PI,DE=2*RE,fc=1e-6,z_e=DE-fc;function $V(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $V;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;ifc)if(!(Math.abs(f*u-l*c)>fc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((RE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>fc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>fc||Math.abs(this._y1-c)>fc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%DE+DE),h>z_e?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>fc&&this._append`A${r},${r},0,${+(h>=RE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function zO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new V_e(t)}function UO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function IV(e){this._context=e}IV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Nw(e){return new IV(e)}function NV(e){return e[0]}function LV(e){return e[1]}function FV(e,t){var n=Vn(!0),r=null,i=Nw,o=null,a=zO(s);e=typeof e=="function"?e:e===void 0?NV:Vn(e),t=typeof t=="function"?t:t===void 0?LV:Vn(t);function s(u){var l,c=(u=UO(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return FV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Vn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class jV{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function W_e(e){return new jV(e,!0)}function H_e(e){return new jV(e,!1)}const VO={draw(e,t){const n=rs(t/pb);e.moveTo(n,0),e.arc(0,0,n,0,Iw)}},K_e={draw(e,t){const n=rs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},BV=rs(1/3),q_e=BV*2,G_e={draw(e,t){const n=rs(t/q_e),r=n*BV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Y_e={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},Z_e=.8908130915292852,zV=hb(pb/10)/hb(7*pb/10),X_e=hb(Iw/10)*zV,Q_e=-DV(Iw/10)*zV,J_e={draw(e,t){const n=rs(t*Z_e),r=X_e*n,i=Q_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Iw*o/5,s=DV(a),u=hb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},jS=rs(3),eSe={draw(e,t){const n=-rs(t/(jS*3));e.moveTo(0,n*2),e.lineTo(-jS*n,-n),e.lineTo(jS*n,-n),e.closePath()}},ta=-.5,na=rs(3)/2,$E=1/rs(12),tSe=($E/2+1)*3,nSe={draw(e,t){const n=rs(t/tSe),r=n/2,i=n*$E,o=r,a=n*$E+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(ta*r-na*i,na*r+ta*i),e.lineTo(ta*o-na*a,na*o+ta*a),e.lineTo(ta*s-na*u,na*s+ta*u),e.lineTo(ta*r+na*i,ta*i-na*r),e.lineTo(ta*o+na*a,ta*a-na*o),e.lineTo(ta*s+na*u,ta*u-na*s),e.closePath()}};function rSe(e,t){let n=null,r=zO(i);e=typeof e=="function"?e:Vn(e||VO),t=typeof t=="function"?t:Vn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Vn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Vn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gb(){}function mb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function UV(e){this._context=e}UV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iSe(e){return new UV(e)}function VV(e){this._context=e}VV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oSe(e){return new VV(e)}function WV(e){this._context=e}WV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aSe(e){return new WV(e)}function HV(e){this._context=e}HV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function sSe(e){return new HV(e)}function z9(e){return e<0?-1:1}function U9(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z9(o)+z9(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function V9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function vb(e){this._context=e}vb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:BS(this,this._t0,V9(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BS(this,V9(this,n=U9(this,e,t)),n);break;default:BS(this,this._t0,n=U9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function KV(e){this._context=new qV(e)}(KV.prototype=Object.create(vb.prototype)).point=function(e,t){vb.prototype.point.call(this,t,e)};function qV(e){this._context=e}qV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function uSe(e){return new vb(e)}function lSe(e){return new KV(e)}function GV(e){this._context=e}GV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=W9(e),i=W9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function fSe(e){return new Lw(e,.5)}function dSe(e){return new Lw(e,0)}function hSe(e){return new Lw(e,1)}function Qd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function pSe(e,t){return e[t]}function gSe(e){const t=[];return t.key=e,t}function mSe(){var e=Vn([]),t=IE,n=Qd,r=pSe;function i(o){var a=Array.from(e.apply(this,arguments),gSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ESe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var YV={symbolCircle:VO,symbolCross:K_e,symbolDiamond:G_e,symbolSquare:Y_e,symbolStar:J_e,symbolTriangle:eSe,symbolWye:nSe},OSe=Math.PI/180,ASe=function(t){var n="symbol".concat($w(t));return YV[n]||VO},PSe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*OSe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},kSe=function(t,n){YV["symbol".concat($w(t))]=n},Fw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=CSe(t,xSe),l=K9(K9({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=ASe(r),w=rSe().type(b).size(PSe(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?F.createElement("path",NE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Fw.registerSymbol=kSe;function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},Sc=function(t){return Im(t)&&t.indexOf("%")===t.length-1},qe=function(t){return Awe(t)&&!Kh(t)},Hr=function(t){return qe(t)||Im(t)},Mwe=0,vf=function(t){var n=++Mwe;return"".concat(t||"").concat(n)},ef=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(t)&&!Im(t))return r;var o;if(Sc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Kh(o)&&(o=r),i&&o>n&&(o=n),o},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Rwe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EE(e)}var N9={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},L9=null,FS=null,BO=function e(t){if(t===L9&&Array.isArray(FS))return FS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(_we.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),FS=n,L9=t,n};function po(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fu(i)}):r=[fu(t)],BO(e).forEach(function(i){var o=ha(i,"type.displayName")||ha(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function To(e,t){var n=po(e,t);return n[0]}var F9=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},Bwe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zwe=function(t){return t&&t.type&&Im(t.type)&&Bwe.indexOf(t.type)>=0},EV=function(t){return t&&EE(t)==="object"&&"clipDot"in t},Uwe=function(t,n,r,i){var o,a=(o=LS?.[i])!==null&&o!==void 0?o:[];return!Ht(t)&&(i&&a.includes(n)||Iwe.includes(n))||r&&jO.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Uh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;Uwe((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},OE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return j9(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=Kwe(e,Hwe),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return F.createElement("svg",AE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),F.createElement("title",null,s),F.createElement("desc",null,u),t)}var Gwe=["children","className"];function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cn=F.forwardRef(function(e,t){var n=e.children,r=e.className,i=Ywe(e,Gwe),o=dn("recharts-layer",r);return F.createElement("g",kE({className:o},zt(i,!0),{ref:t}),n)}),du=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Jwe(e,t,n)}var t_e=e_e,n_e="\\ud800-\\udfff",r_e="\\u0300-\\u036f",i_e="\\ufe20-\\ufe2f",o_e="\\u20d0-\\u20ff",a_e=r_e+i_e+o_e,s_e="\\ufe0e\\ufe0f",u_e="\\u200d",l_e=RegExp("["+u_e+n_e+a_e+s_e+"]");function c_e(e){return l_e.test(e)}var OV=c_e;function f_e(e){return e.split("")}var d_e=f_e,AV="\\ud800-\\udfff",h_e="\\u0300-\\u036f",p_e="\\ufe20-\\ufe2f",g_e="\\u20d0-\\u20ff",m_e=h_e+p_e+g_e,v_e="\\ufe0e\\ufe0f",y_e="["+AV+"]",TE="["+m_e+"]",ME="\\ud83c[\\udffb-\\udfff]",b_e="(?:"+TE+"|"+ME+")",PV="[^"+AV+"]",kV="(?:\\ud83c[\\udde6-\\uddff]){2}",TV="[\\ud800-\\udbff][\\udc00-\\udfff]",x_e="\\u200d",MV=b_e+"?",RV="["+v_e+"]?",w_e="(?:"+x_e+"(?:"+[PV,kV,TV].join("|")+")"+RV+MV+")*",__e=RV+MV+w_e,S_e="(?:"+[PV+TE+"?",TE,kV,TV,y_e].join("|")+")",C_e=RegExp(ME+"(?="+ME+")|"+S_e+__e,"g");function E_e(e){return e.match(C_e)||[]}var O_e=E_e,A_e=d_e,P_e=OV,k_e=O_e;function T_e(e){return P_e(e)?k_e(e):A_e(e)}var M_e=T_e,R_e=t_e,D_e=OV,$_e=M_e,I_e=bV;function N_e(e){return function(t){t=I_e(t);var n=D_e(t)?$_e(t):void 0,r=n?n[0]:t.charAt(0),i=n?R_e(n,1).join(""):t.slice(1);return r[e]()+i}}var L_e=N_e,F_e=L_e,j_e=F_e("toUpperCase"),B_e=j_e;const $2=Dn(B_e);function Vn(e){return function(){return e}}const DV=Math.cos,hb=Math.sin,rs=Math.sqrt,pb=Math.PI,I2=2*pb,RE=Math.PI,DE=2*RE,fc=1e-6,z_e=DE-fc;function $V(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $V;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;ifc)if(!(Math.abs(f*u-l*c)>fc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((RE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>fc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>fc||Math.abs(this._y1-c)>fc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%DE+DE),h>z_e?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>fc&&this._append`A${r},${r},0,${+(h>=RE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function zO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new V_e(t)}function UO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function IV(e){this._context=e}IV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function N2(e){return new IV(e)}function NV(e){return e[0]}function LV(e){return e[1]}function FV(e,t){var n=Vn(!0),r=null,i=N2,o=null,a=zO(s);e=typeof e=="function"?e:e===void 0?NV:Vn(e),t=typeof t=="function"?t:t===void 0?LV:Vn(t);function s(u){var l,c=(u=UO(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return FV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Vn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class jV{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function W_e(e){return new jV(e,!0)}function H_e(e){return new jV(e,!1)}const VO={draw(e,t){const n=rs(t/pb);e.moveTo(n,0),e.arc(0,0,n,0,I2)}},K_e={draw(e,t){const n=rs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},BV=rs(1/3),q_e=BV*2,G_e={draw(e,t){const n=rs(t/q_e),r=n*BV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Y_e={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},Z_e=.8908130915292852,zV=hb(pb/10)/hb(7*pb/10),X_e=hb(I2/10)*zV,Q_e=-DV(I2/10)*zV,J_e={draw(e,t){const n=rs(t*Z_e),r=X_e*n,i=Q_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=I2*o/5,s=DV(a),u=hb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},jS=rs(3),eSe={draw(e,t){const n=-rs(t/(jS*3));e.moveTo(0,n*2),e.lineTo(-jS*n,-n),e.lineTo(jS*n,-n),e.closePath()}},ta=-.5,na=rs(3)/2,$E=1/rs(12),tSe=($E/2+1)*3,nSe={draw(e,t){const n=rs(t/tSe),r=n/2,i=n*$E,o=r,a=n*$E+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(ta*r-na*i,na*r+ta*i),e.lineTo(ta*o-na*a,na*o+ta*a),e.lineTo(ta*s-na*u,na*s+ta*u),e.lineTo(ta*r+na*i,ta*i-na*r),e.lineTo(ta*o+na*a,ta*a-na*o),e.lineTo(ta*s+na*u,ta*u-na*s),e.closePath()}};function rSe(e,t){let n=null,r=zO(i);e=typeof e=="function"?e:Vn(e||VO),t=typeof t=="function"?t:Vn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Vn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Vn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gb(){}function mb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function UV(e){this._context=e}UV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iSe(e){return new UV(e)}function VV(e){this._context=e}VV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oSe(e){return new VV(e)}function WV(e){this._context=e}WV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aSe(e){return new WV(e)}function HV(e){this._context=e}HV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function sSe(e){return new HV(e)}function z9(e){return e<0?-1:1}function U9(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z9(o)+z9(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function V9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function vb(e){this._context=e}vb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:BS(this,this._t0,V9(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BS(this,V9(this,n=U9(this,e,t)),n);break;default:BS(this,this._t0,n=U9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function KV(e){this._context=new qV(e)}(KV.prototype=Object.create(vb.prototype)).point=function(e,t){vb.prototype.point.call(this,t,e)};function qV(e){this._context=e}qV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function uSe(e){return new vb(e)}function lSe(e){return new KV(e)}function GV(e){this._context=e}GV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=W9(e),i=W9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function fSe(e){return new L2(e,.5)}function dSe(e){return new L2(e,0)}function hSe(e){return new L2(e,1)}function Qd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function pSe(e,t){return e[t]}function gSe(e){const t=[];return t.key=e,t}function mSe(){var e=Vn([]),t=IE,n=Qd,r=pSe;function i(o){var a=Array.from(e.apply(this,arguments),gSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ESe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var YV={symbolCircle:VO,symbolCross:K_e,symbolDiamond:G_e,symbolSquare:Y_e,symbolStar:J_e,symbolTriangle:eSe,symbolWye:nSe},OSe=Math.PI/180,ASe=function(t){var n="symbol".concat($2(t));return YV[n]||VO},PSe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*OSe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},kSe=function(t,n){YV["symbol".concat($2(t))]=n},F2=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=CSe(t,xSe),l=K9(K9({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=ASe(r),w=rSe().type(b).size(PSe(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?F.createElement("path",NE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};F2.registerSymbol=kSe;function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?l:p.color;return F.createElement("li",LE({className:b,style:f,key:"legend-item-".concat(m)},xg(r.props,p,m)),F.createElement(PE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);_g(WO,"displayName","Legend");_g(WO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jSe=ww;function BSe(){this.__data__=new jSe,this.size=0}var zSe=BSe;function USe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var VSe=USe;function WSe(e){return this.__data__.get(e)}var HSe=WSe;function KSe(e){return this.__data__.has(e)}var qSe=KSe,GSe=ww,YSe=RO,ZSe=DO,XSe=200;function QSe(e,t){var n=this.__data__;if(n instanceof GSe){var r=n.__data__;if(!YSe||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&x3e?new m3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=CCe}var GO=ECe,OCe=Tu,ACe=GO,PCe=Mu,kCe="[object Arguments]",TCe="[object Array]",MCe="[object Boolean]",RCe="[object Date]",DCe="[object Error]",$Ce="[object Function]",ICe="[object Map]",NCe="[object Number]",LCe="[object Object]",FCe="[object RegExp]",jCe="[object Set]",BCe="[object String]",zCe="[object WeakMap]",UCe="[object ArrayBuffer]",VCe="[object DataView]",WCe="[object Float32Array]",HCe="[object Float64Array]",KCe="[object Int8Array]",qCe="[object Int16Array]",GCe="[object Int32Array]",YCe="[object Uint8Array]",ZCe="[object Uint8ClampedArray]",XCe="[object Uint16Array]",QCe="[object Uint32Array]",er={};er[WCe]=er[HCe]=er[KCe]=er[qCe]=er[GCe]=er[YCe]=er[ZCe]=er[XCe]=er[QCe]=!0;er[kCe]=er[TCe]=er[UCe]=er[MCe]=er[VCe]=er[RCe]=er[DCe]=er[$Ce]=er[ICe]=er[NCe]=er[LCe]=er[FCe]=er[jCe]=er[BCe]=er[zCe]=!1;function JCe(e){return PCe(e)&&ACe(e.length)&&!!er[OCe(e)]}var eEe=JCe;function tEe(e){return function(t){return e(t)}}var aW=tEe,wb={exports:{}};wb.exports;(function(e,t){var n=hV,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(wb,wb.exports);var nEe=wb.exports,rEe=eEe,iEe=aW,J9=nEe,eD=J9&&J9.isTypedArray,oEe=eD?iEe(eD):rEe,sW=oEe,aEe=lCe,sEe=KO,uEe=vo,lEe=oW,cEe=qO,fEe=sW,dEe=Object.prototype,hEe=dEe.hasOwnProperty;function pEe(e,t){var n=uEe(e),r=!n&&sEe(e),i=!n&&!r&&lEe(e),o=!n&&!r&&!i&&fEe(e),a=n||r||i||o,s=a?aEe(e.length,String):[],u=s.length;for(var l in e)(t||hEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||cEe(l,u)))&&s.push(l);return s}var gEe=pEe,mEe=Object.prototype;function vEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mEe;return e===n}var yEe=vEe;function bEe(e,t){return function(n){return e(t(n))}}var uW=bEe,xEe=uW,wEe=xEe(Object.keys,Object),_Ee=wEe,SEe=yEe,CEe=_Ee,EEe=Object.prototype,OEe=EEe.hasOwnProperty;function AEe(e){if(!SEe(e))return CEe(e);var t=[];for(var n in Object(e))OEe.call(e,n)&&n!="constructor"&&t.push(n);return t}var PEe=AEe,kEe=TO,TEe=GO;function MEe(e){return e!=null&&TEe(e.length)&&!kEe(e)}var Nm=MEe,REe=gEe,DEe=PEe,$Ee=Nm;function IEe(e){return $Ee(e)?REe(e):DEe(e)}var jw=IEe,NEe=X3e,LEe=sCe,FEe=jw;function jEe(e){return NEe(e,FEe,LEe)}var BEe=jEe,tD=BEe,zEe=1,UEe=Object.prototype,VEe=UEe.hasOwnProperty;function WEe(e,t,n,r,i,o){var a=n&zEe,s=tD(e),u=s.length,l=tD(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:VEe.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var U4e=z4e;function V4e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=i5e){var l=t?null:n5e(e);if(l)return r5e(l);a=!1,i=t5e,u=new Q4e}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w5e(e){return e.value}function _5e(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=b5e(t,f5e);return F.createElement(WO,n)}var vD=1,Dd=function(e){function t(){var n;d5e(this,t);for(var r=arguments.length,i=new Array(r),o=0;ovD||Math.abs(i.height-this.lastBoundingBox.height)>vD)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return F.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},_5e(o,Gs(Gs({},this.props),{},{payload:gW(c,l,w5e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&qe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Bw(Dd,"displayName","Legend");Bw(Dd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yD=$m,S5e=KO,C5e=vo,bD=yD?yD.isConcatSpreadable:void 0;function E5e(e){return C5e(e)||S5e(e)||!!(bD&&e&&e[bD])}var O5e=E5e,A5e=rW,P5e=O5e;function yW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=P5e),i||(i=[]);++o0&&n(s)?t>1?yW(s,t-1,n,r,i):A5e(i,s):r||(i[i.length]=s)}return i}var bW=yW;function k5e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var T5e=k5e,M5e=T5e,R5e=M5e(),D5e=R5e,$5e=D5e,I5e=jw;function N5e(e,t){return e&&$5e(e,t,I5e)}var xW=N5e,L5e=Nm;function F5e(e,t){return function(n,r){if(n==null)return n;if(!L5e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var Q5e=X5e,WS=IO,J5e=NO,eOe=Vl,tOe=wW,nOe=q5e,rOe=aW,iOe=Q5e,oOe=Yh,aOe=vo;function sOe(e,t,n){t.length?t=WS(t,function(o){return aOe(o)?function(a){return J5e(a,o.length===1?o[0]:o)}:o}):t=[oOe];var r=-1;t=WS(t,rOe(eOe));var i=tOe(e,function(o,a,s){var u=WS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return nOe(i,function(o,a){return iOe(o,a,n)})}var uOe=sOe;function lOe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var cOe=lOe,fOe=cOe,wD=Math.max;function dOe(e,t,n){return t=wD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wD(r.length-t,0),a=Array(o);++i0){if(++t>=_Oe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OOe=EOe,AOe=wOe,POe=OOe,kOe=POe(AOe),TOe=kOe,MOe=Yh,ROe=hOe,DOe=TOe;function $Oe(e,t){return DOe(ROe(e,t,MOe),e+"")}var IOe=$Oe,NOe=MO,LOe=Nm,FOe=qO,jOe=Ul;function BOe(e,t,n){if(!jOe(n))return!1;var r=typeof t;return(r=="number"?LOe(n)&&FOe(t,n.length):r=="string"&&t in n)?NOe(n[t],e):!1}var zw=BOe,zOe=bW,UOe=uOe,VOe=IOe,SD=zw,WOe=VOe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SD(e,t[0],t[1])?t=[]:n>2&&SD(t[0],t[1],t[2])&&(t=[t[0]]),UOe(e,zOe(t,1),[])}),HOe=WOe;const XO=Dn(HOe);function Sg(e){"@babel/helpers - typeof";return Sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sg(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?l:p.color;return F.createElement("li",LE({className:b,style:f,key:"legend-item-".concat(m)},xg(r.props,p,m)),F.createElement(PE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);_g(WO,"displayName","Legend");_g(WO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jSe=w2;function BSe(){this.__data__=new jSe,this.size=0}var zSe=BSe;function USe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var VSe=USe;function WSe(e){return this.__data__.get(e)}var HSe=WSe;function KSe(e){return this.__data__.has(e)}var qSe=KSe,GSe=w2,YSe=RO,ZSe=DO,XSe=200;function QSe(e,t){var n=this.__data__;if(n instanceof GSe){var r=n.__data__;if(!YSe||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&x3e?new m3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=CCe}var GO=ECe,OCe=Tu,ACe=GO,PCe=Mu,kCe="[object Arguments]",TCe="[object Array]",MCe="[object Boolean]",RCe="[object Date]",DCe="[object Error]",$Ce="[object Function]",ICe="[object Map]",NCe="[object Number]",LCe="[object Object]",FCe="[object RegExp]",jCe="[object Set]",BCe="[object String]",zCe="[object WeakMap]",UCe="[object ArrayBuffer]",VCe="[object DataView]",WCe="[object Float32Array]",HCe="[object Float64Array]",KCe="[object Int8Array]",qCe="[object Int16Array]",GCe="[object Int32Array]",YCe="[object Uint8Array]",ZCe="[object Uint8ClampedArray]",XCe="[object Uint16Array]",QCe="[object Uint32Array]",er={};er[WCe]=er[HCe]=er[KCe]=er[qCe]=er[GCe]=er[YCe]=er[ZCe]=er[XCe]=er[QCe]=!0;er[kCe]=er[TCe]=er[UCe]=er[MCe]=er[VCe]=er[RCe]=er[DCe]=er[$Ce]=er[ICe]=er[NCe]=er[LCe]=er[FCe]=er[jCe]=er[BCe]=er[zCe]=!1;function JCe(e){return PCe(e)&&ACe(e.length)&&!!er[OCe(e)]}var eEe=JCe;function tEe(e){return function(t){return e(t)}}var aW=tEe,wb={exports:{}};wb.exports;(function(e,t){var n=hV,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(wb,wb.exports);var nEe=wb.exports,rEe=eEe,iEe=aW,J9=nEe,eD=J9&&J9.isTypedArray,oEe=eD?iEe(eD):rEe,sW=oEe,aEe=lCe,sEe=KO,uEe=vo,lEe=oW,cEe=qO,fEe=sW,dEe=Object.prototype,hEe=dEe.hasOwnProperty;function pEe(e,t){var n=uEe(e),r=!n&&sEe(e),i=!n&&!r&&lEe(e),o=!n&&!r&&!i&&fEe(e),a=n||r||i||o,s=a?aEe(e.length,String):[],u=s.length;for(var l in e)(t||hEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||cEe(l,u)))&&s.push(l);return s}var gEe=pEe,mEe=Object.prototype;function vEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mEe;return e===n}var yEe=vEe;function bEe(e,t){return function(n){return e(t(n))}}var uW=bEe,xEe=uW,wEe=xEe(Object.keys,Object),_Ee=wEe,SEe=yEe,CEe=_Ee,EEe=Object.prototype,OEe=EEe.hasOwnProperty;function AEe(e){if(!SEe(e))return CEe(e);var t=[];for(var n in Object(e))OEe.call(e,n)&&n!="constructor"&&t.push(n);return t}var PEe=AEe,kEe=TO,TEe=GO;function MEe(e){return e!=null&&TEe(e.length)&&!kEe(e)}var Nm=MEe,REe=gEe,DEe=PEe,$Ee=Nm;function IEe(e){return $Ee(e)?REe(e):DEe(e)}var j2=IEe,NEe=X3e,LEe=sCe,FEe=j2;function jEe(e){return NEe(e,FEe,LEe)}var BEe=jEe,tD=BEe,zEe=1,UEe=Object.prototype,VEe=UEe.hasOwnProperty;function WEe(e,t,n,r,i,o){var a=n&zEe,s=tD(e),u=s.length,l=tD(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:VEe.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var U4e=z4e;function V4e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=i5e){var l=t?null:n5e(e);if(l)return r5e(l);a=!1,i=t5e,u=new Q4e}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w5e(e){return e.value}function _5e(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=b5e(t,f5e);return F.createElement(WO,n)}var vD=1,Dd=function(e){function t(){var n;d5e(this,t);for(var r=arguments.length,i=new Array(r),o=0;ovD||Math.abs(i.height-this.lastBoundingBox.height)>vD)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return F.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},_5e(o,Gs(Gs({},this.props),{},{payload:gW(c,l,w5e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&qe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);B2(Dd,"displayName","Legend");B2(Dd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yD=$m,S5e=KO,C5e=vo,bD=yD?yD.isConcatSpreadable:void 0;function E5e(e){return C5e(e)||S5e(e)||!!(bD&&e&&e[bD])}var O5e=E5e,A5e=rW,P5e=O5e;function yW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=P5e),i||(i=[]);++o0&&n(s)?t>1?yW(s,t-1,n,r,i):A5e(i,s):r||(i[i.length]=s)}return i}var bW=yW;function k5e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var T5e=k5e,M5e=T5e,R5e=M5e(),D5e=R5e,$5e=D5e,I5e=j2;function N5e(e,t){return e&&$5e(e,t,I5e)}var xW=N5e,L5e=Nm;function F5e(e,t){return function(n,r){if(n==null)return n;if(!L5e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var Q5e=X5e,WS=IO,J5e=NO,eOe=Vl,tOe=wW,nOe=q5e,rOe=aW,iOe=Q5e,oOe=Yh,aOe=vo;function sOe(e,t,n){t.length?t=WS(t,function(o){return aOe(o)?function(a){return J5e(a,o.length===1?o[0]:o)}:o}):t=[oOe];var r=-1;t=WS(t,rOe(eOe));var i=tOe(e,function(o,a,s){var u=WS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return nOe(i,function(o,a){return iOe(o,a,n)})}var uOe=sOe;function lOe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var cOe=lOe,fOe=cOe,wD=Math.max;function dOe(e,t,n){return t=wD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wD(r.length-t,0),a=Array(o);++i0){if(++t>=_Oe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OOe=EOe,AOe=wOe,POe=OOe,kOe=POe(AOe),TOe=kOe,MOe=Yh,ROe=hOe,DOe=TOe;function $Oe(e,t){return DOe(ROe(e,t,MOe),e+"")}var IOe=$Oe,NOe=MO,LOe=Nm,FOe=qO,jOe=Ul;function BOe(e,t,n){if(!jOe(n))return!1;var r=typeof t;return(r=="number"?LOe(n)&&FOe(t,n.length):r=="string"&&t in n)?NOe(n[t],e):!1}var z2=BOe,zOe=bW,UOe=uOe,VOe=IOe,SD=z2,WOe=VOe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SD(e,t[0],t[1])?t=[]:n>2&&SD(t[0],t[1],t[2])&&(t=[t[0]]),UOe(e,zOe(t,1),[])}),HOe=WOe;const XO=Dn(HOe);function Sg(e){"@babel/helpers - typeof";return Sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sg(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(zp,"-left"),qe(n)&&t&&qe(t.x)&&n=t.y),"".concat(zp,"-top"),qe(r)&&t&&qe(t.y)&&rv?Math.max(c,u[r]):Math.max(f,u[r])}function aAe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function sAe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,l,c,f;return a.height>0&&a.width>0&&n?(c=OD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:u,viewBoxDimension:u.width}),f=OD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:u,viewBoxDimension:u.height}),l=aAe({translateX:c,translateY:f,useTranslate3d:s})):l=iAe,{cssProperties:l,cssClasses:oAe({translateX:c,translateY:f,coordinate:n})}}function th(e){"@babel/helpers - typeof";return th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(e)}function AD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PD(e){for(var t=1;tkD||Math.abs(r.height-this.state.lastBoundingBox.height)>kD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=sAe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),O=S.cssClasses,E=S.cssProperties,C=PD(PD({transition:h&&o?"transform ".concat(s,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return F.createElement("div",{tabIndex:-1,className:O,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),vAe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ka={isSsr:vAe(),get:function(t){return Ka[t]},set:function(t,n){if(typeof t=="string")Ka[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Ka[i]=t[i]})}}};function nh(e){"@babel/helpers - typeof";return nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(e)}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MD(e){for(var t=1;t0;return F.createElement(mAe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:u,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:p,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:O},AAe(l,MD(MD({},this.props),{},{payload:E})))}}])}(y.PureComponent);QO(Js,"displayName","Tooltip");QO(Js,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ka.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var PAe=Ds,kAe=function(){return PAe.Date.now()},TAe=kAe,MAe=/\s/;function RAe(e){for(var t=e.length;t--&&MAe.test(e.charAt(t)););return t}var DAe=RAe,$Ae=DAe,IAe=/^\s+/;function NAe(e){return e&&e.slice(0,$Ae(e)+1).replace(IAe,"")}var LAe=NAe,FAe=LAe,RD=Ul,jAe=zh,DD=NaN,BAe=/^[-+]0x[0-9a-f]+$/i,zAe=/^0b[01]+$/i,UAe=/^0o[0-7]+$/i,VAe=parseInt;function WAe(e){if(typeof e=="number")return e;if(jAe(e))return DD;if(RD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=RD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=FAe(e);var n=zAe.test(e);return n||UAe.test(e)?VAe(e.slice(2),n?2:8):BAe.test(e)?DD:+e}var AW=WAe,HAe=Ul,KS=TAe,$D=AW,KAe="Expected a function",qAe=Math.max,GAe=Math.min;function YAe(e,t,n){var r,i,o,a,s,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(KAe);t=$D(t)||0,HAe(n)&&(c=!!n.leading,f="maxWait"in n,o=f?qAe($D(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(C){var k=r,M=i;return r=i=void 0,l=C,a=e.apply(M,k),a}function m(C){return l=C,s=setTimeout(w,t),c?p(C):a}function v(C){var k=C-u,M=C-l,L=t-k;return f?GAe(L,o-M):L}function b(C){var k=C-u,M=C-l;return u===void 0||k>=t||k<0||f&&M>=o}function w(){var C=KS();if(b(C))return x(C);s=setTimeout(w,v(C))}function x(C){return s=void 0,h&&r?p(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?a:x(KS())}function E(){var C=KS(),k=b(C);if(r=arguments,i=this,u=C,k){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=S,E.flush=O,E}var ZAe=YAe,XAe=ZAe,QAe=Ul,JAe="Expected a function";function ePe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(JAe);return QAe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),XAe(e,t,{leading:r,maxWait:t,trailing:i})}var tPe=ePe;const PW=Dn(tPe);function Eg(e){"@babel/helpers - typeof";return Eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eg(e)}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m1(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=PW(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),G=E.current.getBoundingClientRect(),q=G.width,W=G.height;return H(q,W),Z.observe(E.current),function(){Z.disconnect()}},[H,v]);var V=y.useMemo(function(){var ne=L.containerWidth,Z=L.containerHeight;if(ne<0||Z<0)return null;du(Sc(a)||Sc(u),`The width(%s) and height(%s) are both fixed numbers, +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sPe(e,t){if(e){if(typeof e=="string")return ND(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ND(e,t)}}function ND(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=PW(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),G=E.current.getBoundingClientRect(),q=G.width,W=G.height;return H(q,W),Z.observe(E.current),function(){Z.disconnect()}},[H,v]);var V=y.useMemo(function(){var ne=L.containerWidth,Z=L.containerHeight;if(ne<0||Z<0)return null;du(Sc(a)||Sc(u),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,u),du(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=Sc(a)?ne:a,q=Sc(u)?Z:u;n&&n>0&&(G?q=G/n:q&&(G=q*n),h&&q>h&&(q=h)),du(G>0||q>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,G,q,a,u,c,f,n);var W=!Array.isArray(p)&&fu(p.type).endsWith("Chart");return F.Children.map(p,function(j){return F.isValidElement(j)?y.cloneElement(j,m1({width:G,height:q},W?{style:m1({height:"100%",width:"100%",maxHeight:q,maxWidth:G},j.props.style)}:{})):j})},[n,p,u,h,f,c,L,a]);return F.createElement("div",{id:b?"".concat(b):void 0,className:dn("recharts-responsive-container",w),style:m1(m1({},O),{},{width:a,height:u,minWidth:c,minHeight:f,maxHeight:h}),ref:E},V)}),JO=function(t){return null};JO.displayName="Cell";function Og(e){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Og(e)}function LD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ka.isSsr)return{width:0,height:0};var r=gPe(n),i=JSON.stringify({text:t,copyStyle:r});if(Gf.widthCache[i])return Gf.widthCache[i];try{var o=document.getElementById(FD);o||(o=document.createElement("span"),o.setAttribute("id",FD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=YE(YE({},pPe),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),u={width:s.width,height:s.height};return Gf.widthCache[i]=u,++Gf.cacheCount>hPe&&(Gf.cacheCount=0,Gf.widthCache={}),u}catch{return{width:0,height:0}}},mPe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ag(e){"@babel/helpers - typeof";return Ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ag(e)}function Eb(e,t){return xPe(e)||bPe(e,t)||yPe(e,t)||vPe()}function vPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yPe(e,t){if(e){if(typeof e=="string")return jD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jD(e,t)}}function jD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Pe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HD(e,t){return FPe(e)||LPe(e,t)||NPe(e,t)||IPe()}function IPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NPe(e,t){if(e){if(typeof e=="string")return KD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KD(e,t)}}function KD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(q,W){var j=W.word,K=W.width,Y=q[q.length-1];if(Y&&(i==null||o||Y.width+K+rW.width?q:W})};if(!c)return p;for(var v="…",b=function(G){var q=f.slice(0,G),W=RW({breakAll:l,style:u,children:q+v}).wordsWithComputedWidth,j=h(W),K=j.length>a||m(j).width>Number(i);return[K,j]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=HD(k,2),L=M[0],U=M[1],H=b(E),V=HD(H,1),ne=V[0];if(!L&&!ne&&(w=E+1),L&&ne&&(x=E-1),!L&&ne){O=U;break}S++}return O||p},qD=function(t){var n=Ut(t)?[]:t.toString().split(MW);return[{words:n}]},BPe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ka.isSsr){var u,l,c=RW({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return qD(i);return jPe({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return qD(i)},GD="#808080",Ob=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?GD:b,x=WD(t,RPe),S=y.useMemo(function(){return BPe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,L=WD(x,DPe);if(!Hr(r)||!Hr(o))return null;var U=r+(qe(O)?O:0),H=o+(qe(E)?E:0),V;switch(v){case"start":V=qS("calc(".concat(l,")"));break;case"middle":V=qS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:V=qS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,G=x.width;ne.push("scale(".concat((qe(G)?G/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(U,", ").concat(H,")")),ne.length&&(L.transform=ne.join(" ")),F.createElement("text",ZE({},zt(L,!0),{x:U,y:H,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?GD:w}),S.map(function(q,W){var j=q.words.join(M?"":" ");return F.createElement("tspan",{x:U,dy:W===0?V:s,key:"".concat(j,"-").concat(W)},j)}))};function _l(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function zPe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function eA(e){let t,n,r;e.length!==2?(t=_l,n=(s,u)=>_l(e(s),u),r=(s,u)=>e(s)-u):(t=e===_l||e===zPe?e:UPe,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function UPe(){return 0}function DW(e){return e===null?NaN:+e}function*VPe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const WPe=eA(_l),Lm=WPe.right;eA(DW).center;class YD extends Map{constructor(t,n=qPe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ZD(this,t))}has(t){return super.has(ZD(this,t))}set(t,n){return super.set(HPe(this,t),n)}delete(t){return super.delete(KPe(this,t))}}function ZD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function HPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function KPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qPe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function GPe(e=_l){if(e===_l)return $W;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function $W(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const YPe=Math.sqrt(50),ZPe=Math.sqrt(10),XPe=Math.sqrt(2);function Ab(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=YPe?10:o>=ZPe?5:o>=XPe?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function QD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function IW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?$W:GPe(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));IW(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Up(e,n,t),i(e[r],o)>0&&Up(e,n,r);a0;)--s}i(e[n],o)===0?Up(e,n,s):(++s,Up(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Up(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function QPe(e,t,n){if(e=Float64Array.from(VPe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QD(e);if(t>=1)return XD(e);var r,i=(r-1)*t,o=Math.floor(i),a=XD(IW(e,o).subarray(0,o+1)),s=QD(e.subarray(o+1));return a+(s-a)*(i-o)}}function JPe(e,t,n=DW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function e8e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?y1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?y1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=n8e.exec(e))?new so(t[1],t[2],t[3],1):(t=r8e.exec(e))?new so(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=i8e.exec(e))?y1(t[1],t[2],t[3],t[4]):(t=o8e.exec(e))?y1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,1):(t=s8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,t[4]):JD.hasOwnProperty(e)?n7(JD[e]):e==="transparent"?new so(NaN,NaN,NaN,0):null}function n7(e){return new so(e>>16&255,e>>8&255,e&255,1)}function y1(e,t,n,r){return r<=0&&(e=t=n=NaN),new so(e,t,n,r)}function c8e(e){return e instanceof Fm||(e=Mg(e)),e?(e=e.rgb(),new so(e.r,e.g,e.b,e.opacity)):new so}function t6(e,t,n,r){return arguments.length===1?c8e(e):new so(e,t,n,r??1)}function so(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}nA(so,t6,LW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new so(Dc(this.r),Dc(this.g),Dc(this.b),kb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:r7,formatHex:r7,formatHex8:f8e,formatRgb:i7,toString:i7}));function r7(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}`}function f8e(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}${Cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function i7(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cc(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function o7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function FW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Fm||(e=Mg(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function d8e(e,t,n,r){return arguments.length===1?FW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}nA(Ba,d8e,LW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new Ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new so(GS(e>=240?e-240:e+120,i,r),GS(e,i,r),GS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(a7(this.h),b1(this.s),b1(this.l),kb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${a7(this.h)}, ${b1(this.s)*100}%, ${b1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function a7(e){return e=(e||0)%360,e<0?e+360:e}function b1(e){return Math.max(0,Math.min(1,e||0))}function GS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const rA=e=>()=>e;function h8e(e,t){return function(n){return e+n*t}}function p8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function g8e(e){return(e=+e)==1?jW:function(t,n){return n-t?p8e(t,n,e):rA(isNaN(t)?n:t)}}function jW(e,t){var n=t-e;return n?h8e(e,n):rA(isNaN(e)?t:e)}const s7=function e(t){var n=g8e(t);function r(i,o){var a=n((i=t6(i)).r,(o=t6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=jW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function m8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tb(r,i)})),n=YS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function A8e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?P8e:A8e,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Tb)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Mb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=iA,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Vi,c()):a!==Vi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function oA(){return Uw()(Vi,Vi)}function k8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rh(e){return e=Rb(Math.abs(e)),e?e[1]:NaN}function T8e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function M8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var R8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rg(e){if(!(t=R8e.exec(e)))throw new Error("invalid format: "+e);var t;return new aA({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Rg.prototype=aA.prototype;function aA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}aA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function D8e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var BW;function $8e(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(BW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rb(e,Math.max(0,t+o-1))[0]}function l7(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const c7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:k8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l7(e*100,t),r:l7,s:$8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function f7(e){return e}var d7=Array.prototype.map,h7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function I8e(e){var t=e.grouping===void 0||e.thousands===void 0?f7:T8e(d7.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?f7:M8e(d7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Rg(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):c7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=c7[E],L=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function U(H){var V=C,ne=k,Z,G,q;if(E==="c")ne=M(H)+ne,H="";else{H=+H;var W=H<0||1/H<0;if(H=isNaN(H)?u:M(Math.abs(H),S),O&&(H=D8e(H)),W&&+H==0&&m!=="+"&&(W=!1),V=(W?m==="("?m:s:m==="-"||m==="("?"":m)+V,ne=(E==="s"?h7[8+BW/3]:"")+ne+(W&&m==="("?")":""),L){for(Z=-1,G=H.length;++Zq||q>57){ne=(q===46?i+H.slice(Z+1):H.slice(Z))+ne,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var j=V.length+H.length+ne.length,K=j>1)+V+H+ne+K.slice(j);break;default:H=K+V+H+ne;break}return o(H)}return U.toString=function(){return f+""},U}function c(f,h){var p=l((f=Rg(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(rh(h)/3)))*3,v=Math.pow(10,-m),b=h7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var x1,sA,zW;N8e({thousands:",",grouping:[3],currency:["$",""]});function N8e(e){return x1=I8e(e),sA=x1.format,zW=x1.formatPrefix,x1}function L8e(e){return Math.max(0,-rh(Math.abs(e)))}function F8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rh(t)/3)))*3-rh(Math.abs(e)))}function j8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rh(t)-rh(e))+1}function UW(e,t,n,r){var i=JE(e,t,n),o;switch(r=Rg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=F8e(i,a))&&(r.precision=o),zW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=j8e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=L8e(i))&&(r.precision=o-(r.type==="%")*2);break}}return sA(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return XE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return UW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=QE(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Db(){var e=oA();return e.copy=function(){return jm(e,Db())},xa.apply(e,arguments),Wl(e)}function VW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return VW(e).unknown(t)},e=arguments.length?Array.from(e,Mb):[0,1],Wl(n)}function WW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function W8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function m7(e){return(t,n)=>-e(-t,n)}function uA(e){const t=e(p7,g7),n=t.domain;let r=10,i,o;function a(){return i=W8e(r),o=V8e(r),n()[0]<0?(i=m7(i),o=m7(o),e(B8e,z8e)):e(p7,g7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Rg(u)).precision==null&&(u.trim=!0),u=sA(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(WW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function HW(){const e=uA(Uw()).domain([1,10]);return e.copy=()=>jm(e,HW()).base(e.base()),xa.apply(e,arguments),e}function v7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function y7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function lA(e){var t=1,n=e(v7(t),y7(t));return n.constant=function(r){return arguments.length?e(v7(t=+r),y7(t)):t},Wl(n)}function KW(){var e=lA(Uw());return e.copy=function(){return jm(e,KW()).constant(e.constant())},xa.apply(e,arguments)}function b7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function H8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function K8e(e){return e<0?-e*e:e*e}function cA(e){var t=e(Vi,Vi),n=1;function r(){return n===1?e(Vi,Vi):n===.5?e(H8e,K8e):e(b7(n),b7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function fA(){var e=cA(Uw());return e.copy=function(){return jm(e,fA()).exponent(e.exponent())},xa.apply(e,arguments),e}function q8e(){return fA.apply(null,arguments).exponent(.5)}function x7(e){return Math.sign(e)*e*e}function G8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qW(){var e=oA(),t=[0,1],n=!1,r;function i(o){var a=G8e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(x7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mb)).map(x7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return qW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},xa.apply(i,arguments),Wl(i)}function GW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return YW().domain([e,t]).range(i).unknown(o)},xa.apply(Wl(a),arguments)}function ZW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Lm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ZW().domain(e).range(t).unknown(n)},xa.apply(i,arguments)}const ZS=new Date,XS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ZS.setTime(+o),XS.setTime(+a),e(ZS),e(XS),Math.floor(n(ZS,XS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const $b=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$b.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$b);$b.range;const ou=1e3,ca=ou*60,au=ca*60,Su=au*24,dA=Su*7,w7=Su*30,QS=Su*365,Ec=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Ec.range;const hA=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getMinutes());hA.range;const pA=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getUTCMinutes());pA.range;const gA=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*ca)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());gA.range;const mA=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());mA.range;const Bm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ca)/Su,e=>e.getDate()-1);Bm.range;const Vw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>e.getUTCDate()-1);Vw.range;const XW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>Math.floor(e/Su));XW.range;function yf(e){return Zr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ca)/dA)}const Ww=yf(0),Ib=yf(1),Y8e=yf(2),Z8e=yf(3),ih=yf(4),X8e=yf(5),Q8e=yf(6);Ww.range;Ib.range;Y8e.range;Z8e.range;ih.range;X8e.range;Q8e.range;function bf(e){return Zr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/dA)}const Hw=bf(0),Nb=bf(1),J8e=bf(2),eke=bf(3),oh=bf(4),tke=bf(5),nke=bf(6);Hw.range;Nb.range;J8e.range;eke.range;oh.range;tke.range;nke.range;const vA=Zr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());vA.range;const yA=Zr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());yA.range;const Cu=Zr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Cu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Cu.range;const Eu=Zr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Eu.range;function QW(e,t,n,r,i,o){const a=[[Ec,1,ou],[Ec,5,5*ou],[Ec,15,15*ou],[Ec,30,30*ou],[o,1,ca],[o,5,5*ca],[o,15,15*ca],[o,30,30*ca],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Su],[r,2,2*Su],[n,1,dA],[t,1,w7],[t,3,3*w7],[e,1,QS]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(JE(l/QS,c/QS,f));if(p===0)return $b.every(Math.max(JE(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in me||(me.w=1),"Z"in me?(lt=e3(Vp(me.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?Nb.ceil(lt):Nb(lt),lt=Vw.offset(lt,(me.V-1)*7),me.y=lt.getUTCFullYear(),me.m=lt.getUTCMonth(),me.d=lt.getUTCDate()+(me.w+6)%7):(lt=JS(Vp(me.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Ib.ceil(lt):Ib(lt),lt=Bm.offset(lt,(me.V-1)*7),me.y=lt.getFullYear(),me.m=lt.getMonth(),me.d=lt.getDate()+(me.w+6)%7)}else("W"in me||"U"in me)&&("w"in me||(me.w="u"in me?me.u%7:"W"in me?1:0),Nt="Z"in me?e3(Vp(me.y,0,1)).getUTCDay():JS(Vp(me.y,0,1)).getDay(),me.m=0,me.d="W"in me?(me.w+6)%7+me.W*7-(Nt+5)%7:me.w+me.U*7-(Nt+6)%7);return"Z"in me?(me.H+=me.Z/100|0,me.M+=me.Z%100,e3(me)):JS(me)}}function M(ke,Le,De,me){for(var yt=0,lt=Le.length,Nt=De.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in _7?Le.charAt(yt++):yn],!nn||(me=nn(ke,De,me))<0)return-1}else if(yn!=De.charCodeAt(me++))return-1}return me}function L(ke,Le,De){var me=l.exec(Le.slice(De));return me?(ke.p=c.get(me[0].toLowerCase()),De+me[0].length):-1}function U(ke,Le,De){var me=p.exec(Le.slice(De));return me?(ke.w=m.get(me[0].toLowerCase()),De+me[0].length):-1}function H(ke,Le,De){var me=f.exec(Le.slice(De));return me?(ke.w=h.get(me[0].toLowerCase()),De+me[0].length):-1}function V(ke,Le,De){var me=w.exec(Le.slice(De));return me?(ke.m=x.get(me[0].toLowerCase()),De+me[0].length):-1}function ne(ke,Le,De){var me=v.exec(Le.slice(De));return me?(ke.m=b.get(me[0].toLowerCase()),De+me[0].length):-1}function Z(ke,Le,De){return M(ke,t,Le,De)}function G(ke,Le,De){return M(ke,n,Le,De)}function q(ke,Le,De){return M(ke,r,Le,De)}function W(ke){return a[ke.getDay()]}function j(ke){return o[ke.getDay()]}function K(ke){return u[ke.getMonth()]}function Y(ke){return s[ke.getMonth()]}function oe(ke){return i[+(ke.getHours()>=12)]}function ae(ke){return 1+~~(ke.getMonth()/3)}function ue(ke){return a[ke.getUTCDay()]}function be(ke){return o[ke.getUTCDay()]}function we(ke){return u[ke.getUTCMonth()]}function He(ke){return s[ke.getUTCMonth()]}function Ee(ke){return i[+(ke.getUTCHours()>=12)]}function it(ke){return 1+~~(ke.getUTCMonth()/3)}return{format:function(ke){var Le=C(ke+="",S);return Le.toString=function(){return ke},Le},parse:function(ke){var Le=k(ke+="",!1);return Le.toString=function(){return ke},Le},utcFormat:function(ke){var Le=C(ke+="",O);return Le.toString=function(){return ke},Le},utcParse:function(ke){var Le=k(ke+="",!0);return Le.toString=function(){return ke},Le}}}var _7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,uke=/^%/,lke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function fke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function hke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function pke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function yke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function E7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function O7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function wke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _ke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cke(e,t,n){var r=uke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Eke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Oke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function A7(e,t){return bn(e.getDate(),t,2)}function Ake(e,t){return bn(e.getHours(),t,2)}function Pke(e,t){return bn(e.getHours()%12||12,t,2)}function kke(e,t){return bn(1+Bm.count(Cu(e),e),t,3)}function JW(e,t){return bn(e.getMilliseconds(),t,3)}function Tke(e,t){return JW(e,t)+"000"}function Mke(e,t){return bn(e.getMonth()+1,t,2)}function Rke(e,t){return bn(e.getMinutes(),t,2)}function Dke(e,t){return bn(e.getSeconds(),t,2)}function $ke(e){var t=e.getDay();return t===0?7:t}function Ike(e,t){return bn(Ww.count(Cu(e)-1,e),t,2)}function eH(e){var t=e.getDay();return t>=4||t===0?ih(e):ih.ceil(e)}function Nke(e,t){return e=eH(e),bn(ih.count(Cu(e),e)+(Cu(e).getDay()===4),t,2)}function Lke(e){return e.getDay()}function Fke(e,t){return bn(Ib.count(Cu(e)-1,e),t,2)}function jke(e,t){return bn(e.getFullYear()%100,t,2)}function Bke(e,t){return e=eH(e),bn(e.getFullYear()%100,t,2)}function zke(e,t){return bn(e.getFullYear()%1e4,t,4)}function Uke(e,t){var n=e.getDay();return e=n>=4||n===0?ih(e):ih.ceil(e),bn(e.getFullYear()%1e4,t,4)}function Vke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function P7(e,t){return bn(e.getUTCDate(),t,2)}function Wke(e,t){return bn(e.getUTCHours(),t,2)}function Hke(e,t){return bn(e.getUTCHours()%12||12,t,2)}function Kke(e,t){return bn(1+Vw.count(Eu(e),e),t,3)}function tH(e,t){return bn(e.getUTCMilliseconds(),t,3)}function qke(e,t){return tH(e,t)+"000"}function Gke(e,t){return bn(e.getUTCMonth()+1,t,2)}function Yke(e,t){return bn(e.getUTCMinutes(),t,2)}function Zke(e,t){return bn(e.getUTCSeconds(),t,2)}function Xke(e){var t=e.getUTCDay();return t===0?7:t}function Qke(e,t){return bn(Hw.count(Eu(e)-1,e),t,2)}function nH(e){var t=e.getUTCDay();return t>=4||t===0?oh(e):oh.ceil(e)}function Jke(e,t){return e=nH(e),bn(oh.count(Eu(e),e)+(Eu(e).getUTCDay()===4),t,2)}function eTe(e){return e.getUTCDay()}function tTe(e,t){return bn(Nb.count(Eu(e)-1,e),t,2)}function nTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function rTe(e,t){return e=nH(e),bn(e.getUTCFullYear()%100,t,2)}function iTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function oTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oh(e):oh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function aTe(){return"+0000"}function k7(){return"%"}function T7(e){return+e}function M7(e){return Math.floor(+e/1e3)}var Yf,rH,iH;sTe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sTe(e){return Yf=ske(e),rH=Yf.format,Yf.parse,iH=Yf.utcFormat,Yf.utcParse,Yf}function uTe(e){return new Date(e)}function lTe(e){return e instanceof Date?+e:+new Date(+e)}function bA(e,t,n,r,i,o,a,s,u,l){var c=oA(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>QPe(e,o/r))},n.copy=function(){return uH(t).domain(e)},Ru.apply(n,arguments)}function qw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Vi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var vTe=mTe,yTe=dH,bTe=vTe,xTe=Yh;function wTe(e){return e&&e.length?yTe(e,xTe,bTe):void 0}var _Te=wTe;const ul=Dn(_Te);function STe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return hu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(hu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Do))throw Error(va+"NaN");if(n.s<1)throw Error(va+(n.s?"NaN":"-Infinity"));return n.eq(Do)?new r(0):(ar=!1,t=hu(Dg(n,o),Dg(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mH(t,e):pH(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(va+"NaN");return n.s?(ar=!1,t=hu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return gH(this)};st.naturalLogarithm=st.ln=function(){return Dg(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pH(t,e):mH(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(va+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Qh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(hu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,Xh),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=nf(r,!0):(Rs(e,0,Xh),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=nf(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?nf(i):(Rs(e,0,Xh),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=nf(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(Do);if(s=new u(s),!s.s){if(e.s<1)throw Error(va+"Infinity");return s}if(s.eq(Do))return s;if(r=u.precision,e.eq(Do))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=hH){for(i=new u(Do),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),$7(i.d,t)),n=Qh(n/2),n!==0;)s=s.times(s),$7(s.d,t);return ar=!0,e.s<0?new u(Do).div(i):zn(i,r)}}else if(o<0)throw Error(va+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Dg(s,r+l)),ar=!0,i=gH(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=nf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,Xh),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=nf(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,Xh),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return nf(e,t<=n.toExpNeg||t>=n.toExpPos)};function pH(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error($c+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,L=r.constructor,U=r.s==i.s?1:-1,H=r.d,V=i.d;if(!r.s)return new L(r);if(!i.s)throw Error(va+"Division by zero");for(u=r.e-i.e,k=V.length,E=H.length,p=new L(U),m=p.d=[],l=0;V[l]==(H[l]||0);)++l;if(V[l]>(H[l]||0)&&--u,o==null?x=o=L.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new L(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,V=V[0],x++;(l1&&(V=e(V,c),H=e(H,c),k=V.length,E=H.length),O=k,v=H.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(V,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(V,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(_A+Mr(e));if(!e.s)return new c(Do);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(hc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c(Do),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(hu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function t3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(va+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Qu(e){for(var t="";e--;)t+="0";return t}function Dg(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(va+(p.s?"NaN":"-Infinity"));if(p.eq(Do))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),t3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=t3(v,l+2,b).times(o+""),p=Dg(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=hu(p.minus(Do),p.plus(Do),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(hu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(t3(v,l+2,b).times(o+""))),s=hu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function D7(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Qh(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rLb||e.e<-Lb))throw Error(_A+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=hc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/hc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=hc(10,(tr-t%tr)%tr),e.e=Qh(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=hc(10,tr-r),f[c]=i>0?(l/hc(10,a-i)%hc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Lb||e.e<-Lb))throw Error(_A+Mr(e));return e}function mH(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Qu(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Qu(-i-1)+o,n&&(r=n-a)>0&&(o+=Qu(r))):i>=a?(o+=Qu(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Qu(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Qu(r))),e.s<0?"-"+o:o}function $7(e,t){if(e.length>t)return e.length=t,!0}function vH(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($c+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return D7(a,o.toString())}else if(typeof o!="string")throw Error($c+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,HTe.test(o))D7(a,o);else throw Error($c+o)}if(i.prototype=st,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=vH,i.config=i.set=KTe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var SA=vH(WTe);Do=new SA(1);const Nn=SA;function qTe(e){return XTe(e)||ZTe(e)||YTe(e)||GTe()}function GTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YTe(e,t){if(e){if(typeof e=="string")return i6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i6(e,t)}}function ZTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function XTe(e){if(Array.isArray(e))return i6(e)}function i6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,I7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(q,W){var j=W.word,K=W.width,Y=q[q.length-1];if(Y&&(i==null||o||Y.width+K+rW.width?q:W})};if(!c)return p;for(var v="…",b=function(G){var q=f.slice(0,G),W=RW({breakAll:l,style:u,children:q+v}).wordsWithComputedWidth,j=h(W),K=j.length>a||m(j).width>Number(i);return[K,j]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=HD(k,2),L=M[0],U=M[1],H=b(E),V=HD(H,1),ne=V[0];if(!L&&!ne&&(w=E+1),L&&ne&&(x=E-1),!L&&ne){O=U;break}S++}return O||p},qD=function(t){var n=Ut(t)?[]:t.toString().split(MW);return[{words:n}]},BPe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ka.isSsr){var u,l,c=RW({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return qD(i);return jPe({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return qD(i)},GD="#808080",Ob=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?GD:b,x=WD(t,RPe),S=y.useMemo(function(){return BPe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,L=WD(x,DPe);if(!Hr(r)||!Hr(o))return null;var U=r+(qe(O)?O:0),H=o+(qe(E)?E:0),V;switch(v){case"start":V=qS("calc(".concat(l,")"));break;case"middle":V=qS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:V=qS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,G=x.width;ne.push("scale(".concat((qe(G)?G/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(U,", ").concat(H,")")),ne.length&&(L.transform=ne.join(" ")),F.createElement("text",ZE({},zt(L,!0),{x:U,y:H,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?GD:w}),S.map(function(q,W){var j=q.words.join(M?"":" ");return F.createElement("tspan",{x:U,dy:W===0?V:s,key:"".concat(j,"-").concat(W)},j)}))};function _l(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function zPe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function eA(e){let t,n,r;e.length!==2?(t=_l,n=(s,u)=>_l(e(s),u),r=(s,u)=>e(s)-u):(t=e===_l||e===zPe?e:UPe,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function UPe(){return 0}function DW(e){return e===null?NaN:+e}function*VPe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const WPe=eA(_l),Lm=WPe.right;eA(DW).center;class YD extends Map{constructor(t,n=qPe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ZD(this,t))}has(t){return super.has(ZD(this,t))}set(t,n){return super.set(HPe(this,t),n)}delete(t){return super.delete(KPe(this,t))}}function ZD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function HPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function KPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qPe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function GPe(e=_l){if(e===_l)return $W;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function $W(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const YPe=Math.sqrt(50),ZPe=Math.sqrt(10),XPe=Math.sqrt(2);function Ab(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=YPe?10:o>=ZPe?5:o>=XPe?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function QD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function IW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?$W:GPe(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));IW(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Up(e,n,t),i(e[r],o)>0&&Up(e,n,r);a0;)--s}i(e[n],o)===0?Up(e,n,s):(++s,Up(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Up(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function QPe(e,t,n){if(e=Float64Array.from(VPe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QD(e);if(t>=1)return XD(e);var r,i=(r-1)*t,o=Math.floor(i),a=XD(IW(e,o).subarray(0,o+1)),s=QD(e.subarray(o+1));return a+(s-a)*(i-o)}}function JPe(e,t,n=DW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function e8e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?y1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?y1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=n8e.exec(e))?new so(t[1],t[2],t[3],1):(t=r8e.exec(e))?new so(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=i8e.exec(e))?y1(t[1],t[2],t[3],t[4]):(t=o8e.exec(e))?y1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,1):(t=s8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,t[4]):JD.hasOwnProperty(e)?n7(JD[e]):e==="transparent"?new so(NaN,NaN,NaN,0):null}function n7(e){return new so(e>>16&255,e>>8&255,e&255,1)}function y1(e,t,n,r){return r<=0&&(e=t=n=NaN),new so(e,t,n,r)}function c8e(e){return e instanceof Fm||(e=Mg(e)),e?(e=e.rgb(),new so(e.r,e.g,e.b,e.opacity)):new so}function t6(e,t,n,r){return arguments.length===1?c8e(e):new so(e,t,n,r??1)}function so(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}nA(so,t6,LW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new so(Dc(this.r),Dc(this.g),Dc(this.b),kb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:r7,formatHex:r7,formatHex8:f8e,formatRgb:i7,toString:i7}));function r7(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}`}function f8e(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}${Cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function i7(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cc(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function o7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function FW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Fm||(e=Mg(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function d8e(e,t,n,r){return arguments.length===1?FW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}nA(Ba,d8e,LW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new Ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new so(GS(e>=240?e-240:e+120,i,r),GS(e,i,r),GS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(a7(this.h),b1(this.s),b1(this.l),kb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${a7(this.h)}, ${b1(this.s)*100}%, ${b1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function a7(e){return e=(e||0)%360,e<0?e+360:e}function b1(e){return Math.max(0,Math.min(1,e||0))}function GS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const rA=e=>()=>e;function h8e(e,t){return function(n){return e+n*t}}function p8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function g8e(e){return(e=+e)==1?jW:function(t,n){return n-t?p8e(t,n,e):rA(isNaN(t)?n:t)}}function jW(e,t){var n=t-e;return n?h8e(e,n):rA(isNaN(e)?t:e)}const s7=function e(t){var n=g8e(t);function r(i,o){var a=n((i=t6(i)).r,(o=t6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=jW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function m8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tb(r,i)})),n=YS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function A8e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?P8e:A8e,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Tb)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Mb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=iA,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Vi,c()):a!==Vi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function oA(){return U2()(Vi,Vi)}function k8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rh(e){return e=Rb(Math.abs(e)),e?e[1]:NaN}function T8e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function M8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var R8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rg(e){if(!(t=R8e.exec(e)))throw new Error("invalid format: "+e);var t;return new aA({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Rg.prototype=aA.prototype;function aA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}aA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function D8e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var BW;function $8e(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(BW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rb(e,Math.max(0,t+o-1))[0]}function l7(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const c7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:k8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l7(e*100,t),r:l7,s:$8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function f7(e){return e}var d7=Array.prototype.map,h7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function I8e(e){var t=e.grouping===void 0||e.thousands===void 0?f7:T8e(d7.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?f7:M8e(d7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Rg(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):c7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=c7[E],L=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function U(H){var V=C,ne=k,Z,G,q;if(E==="c")ne=M(H)+ne,H="";else{H=+H;var W=H<0||1/H<0;if(H=isNaN(H)?u:M(Math.abs(H),S),O&&(H=D8e(H)),W&&+H==0&&m!=="+"&&(W=!1),V=(W?m==="("?m:s:m==="-"||m==="("?"":m)+V,ne=(E==="s"?h7[8+BW/3]:"")+ne+(W&&m==="("?")":""),L){for(Z=-1,G=H.length;++Zq||q>57){ne=(q===46?i+H.slice(Z+1):H.slice(Z))+ne,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var j=V.length+H.length+ne.length,K=j>1)+V+H+ne+K.slice(j);break;default:H=K+V+H+ne;break}return o(H)}return U.toString=function(){return f+""},U}function c(f,h){var p=l((f=Rg(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(rh(h)/3)))*3,v=Math.pow(10,-m),b=h7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var x1,sA,zW;N8e({thousands:",",grouping:[3],currency:["$",""]});function N8e(e){return x1=I8e(e),sA=x1.format,zW=x1.formatPrefix,x1}function L8e(e){return Math.max(0,-rh(Math.abs(e)))}function F8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rh(t)/3)))*3-rh(Math.abs(e)))}function j8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rh(t)-rh(e))+1}function UW(e,t,n,r){var i=JE(e,t,n),o;switch(r=Rg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=F8e(i,a))&&(r.precision=o),zW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=j8e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=L8e(i))&&(r.precision=o-(r.type==="%")*2);break}}return sA(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return XE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return UW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=QE(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Db(){var e=oA();return e.copy=function(){return jm(e,Db())},xa.apply(e,arguments),Wl(e)}function VW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return VW(e).unknown(t)},e=arguments.length?Array.from(e,Mb):[0,1],Wl(n)}function WW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function W8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function m7(e){return(t,n)=>-e(-t,n)}function uA(e){const t=e(p7,g7),n=t.domain;let r=10,i,o;function a(){return i=W8e(r),o=V8e(r),n()[0]<0?(i=m7(i),o=m7(o),e(B8e,z8e)):e(p7,g7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Rg(u)).precision==null&&(u.trim=!0),u=sA(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(WW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function HW(){const e=uA(U2()).domain([1,10]);return e.copy=()=>jm(e,HW()).base(e.base()),xa.apply(e,arguments),e}function v7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function y7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function lA(e){var t=1,n=e(v7(t),y7(t));return n.constant=function(r){return arguments.length?e(v7(t=+r),y7(t)):t},Wl(n)}function KW(){var e=lA(U2());return e.copy=function(){return jm(e,KW()).constant(e.constant())},xa.apply(e,arguments)}function b7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function H8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function K8e(e){return e<0?-e*e:e*e}function cA(e){var t=e(Vi,Vi),n=1;function r(){return n===1?e(Vi,Vi):n===.5?e(H8e,K8e):e(b7(n),b7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function fA(){var e=cA(U2());return e.copy=function(){return jm(e,fA()).exponent(e.exponent())},xa.apply(e,arguments),e}function q8e(){return fA.apply(null,arguments).exponent(.5)}function x7(e){return Math.sign(e)*e*e}function G8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qW(){var e=oA(),t=[0,1],n=!1,r;function i(o){var a=G8e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(x7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mb)).map(x7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return qW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},xa.apply(i,arguments),Wl(i)}function GW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return YW().domain([e,t]).range(i).unknown(o)},xa.apply(Wl(a),arguments)}function ZW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Lm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ZW().domain(e).range(t).unknown(n)},xa.apply(i,arguments)}const ZS=new Date,XS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ZS.setTime(+o),XS.setTime(+a),e(ZS),e(XS),Math.floor(n(ZS,XS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const $b=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$b.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$b);$b.range;const ou=1e3,ca=ou*60,au=ca*60,Su=au*24,dA=Su*7,w7=Su*30,QS=Su*365,Ec=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Ec.range;const hA=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getMinutes());hA.range;const pA=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getUTCMinutes());pA.range;const gA=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*ca)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());gA.range;const mA=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());mA.range;const Bm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ca)/Su,e=>e.getDate()-1);Bm.range;const V2=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>e.getUTCDate()-1);V2.range;const XW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>Math.floor(e/Su));XW.range;function yf(e){return Zr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ca)/dA)}const W2=yf(0),Ib=yf(1),Y8e=yf(2),Z8e=yf(3),ih=yf(4),X8e=yf(5),Q8e=yf(6);W2.range;Ib.range;Y8e.range;Z8e.range;ih.range;X8e.range;Q8e.range;function bf(e){return Zr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/dA)}const H2=bf(0),Nb=bf(1),J8e=bf(2),eke=bf(3),oh=bf(4),tke=bf(5),nke=bf(6);H2.range;Nb.range;J8e.range;eke.range;oh.range;tke.range;nke.range;const vA=Zr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());vA.range;const yA=Zr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());yA.range;const Cu=Zr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Cu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Cu.range;const Eu=Zr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Eu.range;function QW(e,t,n,r,i,o){const a=[[Ec,1,ou],[Ec,5,5*ou],[Ec,15,15*ou],[Ec,30,30*ou],[o,1,ca],[o,5,5*ca],[o,15,15*ca],[o,30,30*ca],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Su],[r,2,2*Su],[n,1,dA],[t,1,w7],[t,3,3*w7],[e,1,QS]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(JE(l/QS,c/QS,f));if(p===0)return $b.every(Math.max(JE(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in me||(me.w=1),"Z"in me?(lt=e3(Vp(me.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?Nb.ceil(lt):Nb(lt),lt=V2.offset(lt,(me.V-1)*7),me.y=lt.getUTCFullYear(),me.m=lt.getUTCMonth(),me.d=lt.getUTCDate()+(me.w+6)%7):(lt=JS(Vp(me.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Ib.ceil(lt):Ib(lt),lt=Bm.offset(lt,(me.V-1)*7),me.y=lt.getFullYear(),me.m=lt.getMonth(),me.d=lt.getDate()+(me.w+6)%7)}else("W"in me||"U"in me)&&("w"in me||(me.w="u"in me?me.u%7:"W"in me?1:0),Nt="Z"in me?e3(Vp(me.y,0,1)).getUTCDay():JS(Vp(me.y,0,1)).getDay(),me.m=0,me.d="W"in me?(me.w+6)%7+me.W*7-(Nt+5)%7:me.w+me.U*7-(Nt+6)%7);return"Z"in me?(me.H+=me.Z/100|0,me.M+=me.Z%100,e3(me)):JS(me)}}function M(ke,Le,De,me){for(var yt=0,lt=Le.length,Nt=De.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in _7?Le.charAt(yt++):yn],!nn||(me=nn(ke,De,me))<0)return-1}else if(yn!=De.charCodeAt(me++))return-1}return me}function L(ke,Le,De){var me=l.exec(Le.slice(De));return me?(ke.p=c.get(me[0].toLowerCase()),De+me[0].length):-1}function U(ke,Le,De){var me=p.exec(Le.slice(De));return me?(ke.w=m.get(me[0].toLowerCase()),De+me[0].length):-1}function H(ke,Le,De){var me=f.exec(Le.slice(De));return me?(ke.w=h.get(me[0].toLowerCase()),De+me[0].length):-1}function V(ke,Le,De){var me=w.exec(Le.slice(De));return me?(ke.m=x.get(me[0].toLowerCase()),De+me[0].length):-1}function ne(ke,Le,De){var me=v.exec(Le.slice(De));return me?(ke.m=b.get(me[0].toLowerCase()),De+me[0].length):-1}function Z(ke,Le,De){return M(ke,t,Le,De)}function G(ke,Le,De){return M(ke,n,Le,De)}function q(ke,Le,De){return M(ke,r,Le,De)}function W(ke){return a[ke.getDay()]}function j(ke){return o[ke.getDay()]}function K(ke){return u[ke.getMonth()]}function Y(ke){return s[ke.getMonth()]}function oe(ke){return i[+(ke.getHours()>=12)]}function ae(ke){return 1+~~(ke.getMonth()/3)}function ue(ke){return a[ke.getUTCDay()]}function be(ke){return o[ke.getUTCDay()]}function we(ke){return u[ke.getUTCMonth()]}function He(ke){return s[ke.getUTCMonth()]}function Ee(ke){return i[+(ke.getUTCHours()>=12)]}function it(ke){return 1+~~(ke.getUTCMonth()/3)}return{format:function(ke){var Le=C(ke+="",S);return Le.toString=function(){return ke},Le},parse:function(ke){var Le=k(ke+="",!1);return Le.toString=function(){return ke},Le},utcFormat:function(ke){var Le=C(ke+="",O);return Le.toString=function(){return ke},Le},utcParse:function(ke){var Le=k(ke+="",!0);return Le.toString=function(){return ke},Le}}}var _7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,uke=/^%/,lke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function fke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function hke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function pke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function yke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function E7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function O7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function wke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _ke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cke(e,t,n){var r=uke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Eke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Oke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function A7(e,t){return bn(e.getDate(),t,2)}function Ake(e,t){return bn(e.getHours(),t,2)}function Pke(e,t){return bn(e.getHours()%12||12,t,2)}function kke(e,t){return bn(1+Bm.count(Cu(e),e),t,3)}function JW(e,t){return bn(e.getMilliseconds(),t,3)}function Tke(e,t){return JW(e,t)+"000"}function Mke(e,t){return bn(e.getMonth()+1,t,2)}function Rke(e,t){return bn(e.getMinutes(),t,2)}function Dke(e,t){return bn(e.getSeconds(),t,2)}function $ke(e){var t=e.getDay();return t===0?7:t}function Ike(e,t){return bn(W2.count(Cu(e)-1,e),t,2)}function eH(e){var t=e.getDay();return t>=4||t===0?ih(e):ih.ceil(e)}function Nke(e,t){return e=eH(e),bn(ih.count(Cu(e),e)+(Cu(e).getDay()===4),t,2)}function Lke(e){return e.getDay()}function Fke(e,t){return bn(Ib.count(Cu(e)-1,e),t,2)}function jke(e,t){return bn(e.getFullYear()%100,t,2)}function Bke(e,t){return e=eH(e),bn(e.getFullYear()%100,t,2)}function zke(e,t){return bn(e.getFullYear()%1e4,t,4)}function Uke(e,t){var n=e.getDay();return e=n>=4||n===0?ih(e):ih.ceil(e),bn(e.getFullYear()%1e4,t,4)}function Vke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function P7(e,t){return bn(e.getUTCDate(),t,2)}function Wke(e,t){return bn(e.getUTCHours(),t,2)}function Hke(e,t){return bn(e.getUTCHours()%12||12,t,2)}function Kke(e,t){return bn(1+V2.count(Eu(e),e),t,3)}function tH(e,t){return bn(e.getUTCMilliseconds(),t,3)}function qke(e,t){return tH(e,t)+"000"}function Gke(e,t){return bn(e.getUTCMonth()+1,t,2)}function Yke(e,t){return bn(e.getUTCMinutes(),t,2)}function Zke(e,t){return bn(e.getUTCSeconds(),t,2)}function Xke(e){var t=e.getUTCDay();return t===0?7:t}function Qke(e,t){return bn(H2.count(Eu(e)-1,e),t,2)}function nH(e){var t=e.getUTCDay();return t>=4||t===0?oh(e):oh.ceil(e)}function Jke(e,t){return e=nH(e),bn(oh.count(Eu(e),e)+(Eu(e).getUTCDay()===4),t,2)}function eTe(e){return e.getUTCDay()}function tTe(e,t){return bn(Nb.count(Eu(e)-1,e),t,2)}function nTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function rTe(e,t){return e=nH(e),bn(e.getUTCFullYear()%100,t,2)}function iTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function oTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oh(e):oh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function aTe(){return"+0000"}function k7(){return"%"}function T7(e){return+e}function M7(e){return Math.floor(+e/1e3)}var Yf,rH,iH;sTe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sTe(e){return Yf=ske(e),rH=Yf.format,Yf.parse,iH=Yf.utcFormat,Yf.utcParse,Yf}function uTe(e){return new Date(e)}function lTe(e){return e instanceof Date?+e:+new Date(+e)}function bA(e,t,n,r,i,o,a,s,u,l){var c=oA(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>QPe(e,o/r))},n.copy=function(){return uH(t).domain(e)},Ru.apply(n,arguments)}function q2(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Vi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var vTe=mTe,yTe=dH,bTe=vTe,xTe=Yh;function wTe(e){return e&&e.length?yTe(e,xTe,bTe):void 0}var _Te=wTe;const ul=Dn(_Te);function STe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return hu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(hu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Do))throw Error(va+"NaN");if(n.s<1)throw Error(va+(n.s?"NaN":"-Infinity"));return n.eq(Do)?new r(0):(ar=!1,t=hu(Dg(n,o),Dg(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mH(t,e):pH(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(va+"NaN");return n.s?(ar=!1,t=hu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return gH(this)};st.naturalLogarithm=st.ln=function(){return Dg(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pH(t,e):mH(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(va+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Qh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(hu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,Xh),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=nf(r,!0):(Rs(e,0,Xh),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=nf(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?nf(i):(Rs(e,0,Xh),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=nf(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(Do);if(s=new u(s),!s.s){if(e.s<1)throw Error(va+"Infinity");return s}if(s.eq(Do))return s;if(r=u.precision,e.eq(Do))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=hH){for(i=new u(Do),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),$7(i.d,t)),n=Qh(n/2),n!==0;)s=s.times(s),$7(s.d,t);return ar=!0,e.s<0?new u(Do).div(i):zn(i,r)}}else if(o<0)throw Error(va+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Dg(s,r+l)),ar=!0,i=gH(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=nf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,Xh),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=nf(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,Xh),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return nf(e,t<=n.toExpNeg||t>=n.toExpPos)};function pH(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error($c+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,L=r.constructor,U=r.s==i.s?1:-1,H=r.d,V=i.d;if(!r.s)return new L(r);if(!i.s)throw Error(va+"Division by zero");for(u=r.e-i.e,k=V.length,E=H.length,p=new L(U),m=p.d=[],l=0;V[l]==(H[l]||0);)++l;if(V[l]>(H[l]||0)&&--u,o==null?x=o=L.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new L(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,V=V[0],x++;(l1&&(V=e(V,c),H=e(H,c),k=V.length,E=H.length),O=k,v=H.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(V,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(V,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(_A+Mr(e));if(!e.s)return new c(Do);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(hc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c(Do),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(hu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function t3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(va+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Qu(e){for(var t="";e--;)t+="0";return t}function Dg(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(va+(p.s?"NaN":"-Infinity"));if(p.eq(Do))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),t3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=t3(v,l+2,b).times(o+""),p=Dg(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=hu(p.minus(Do),p.plus(Do),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(hu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(t3(v,l+2,b).times(o+""))),s=hu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function D7(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Qh(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rLb||e.e<-Lb))throw Error(_A+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=hc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/hc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=hc(10,(tr-t%tr)%tr),e.e=Qh(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=hc(10,tr-r),f[c]=i>0?(l/hc(10,a-i)%hc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Lb||e.e<-Lb))throw Error(_A+Mr(e));return e}function mH(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Qu(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Qu(-i-1)+o,n&&(r=n-a)>0&&(o+=Qu(r))):i>=a?(o+=Qu(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Qu(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Qu(r))),e.s<0?"-"+o:o}function $7(e,t){if(e.length>t)return e.length=t,!0}function vH(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($c+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return D7(a,o.toString())}else if(typeof o!="string")throw Error($c+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,HTe.test(o))D7(a,o);else throw Error($c+o)}if(i.prototype=st,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=vH,i.config=i.set=KTe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var SA=vH(WTe);Do=new SA(1);const Nn=SA;function qTe(e){return XTe(e)||ZTe(e)||YTe(e)||GTe()}function GTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YTe(e,t){if(e){if(typeof e=="string")return i6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i6(e,t)}}function ZTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function XTe(e){if(Array.isArray(e))return i6(e)}function i6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,I7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function dMe(e){if(Array.isArray(e))return e}function _H(e){var t=$g(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function SH(e,t,n){if(e.lte(0))return new Nn(0);var r=Zw.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function hMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(Zw.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=tMe(eMe(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),o6);return s(0,t)}function CH(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=SH(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?CH(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function pMe(e){var t=$g(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=_H([n,r]),u=$g(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(s6(o6(0,i-1).map(function(){return 1/0}))):[].concat(s6(o6(0,i-1).map(function(){return-1/0})),[c]);return n>r?a6(f):f}if(l===c)return hMe(l,i,o);var h=CH(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=Zw.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?a6(b):b}function gMe(e,t){var n=$g(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=_H([r,i]),s=$g(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=SH(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(s6(Zw.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?a6(h):h}var mMe=xH(pMe),vMe=xH(gMe),yMe="Invariant failed";function rf(e,t){throw new Error(yMe)}var bMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ah(e){"@babel/helpers - typeof";return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ah(e)}function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function dMe(e){if(Array.isArray(e))return e}function _H(e){var t=$g(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function SH(e,t,n){if(e.lte(0))return new Nn(0);var r=Z2.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function hMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(Z2.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=tMe(eMe(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),o6);return s(0,t)}function CH(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=SH(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?CH(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function pMe(e){var t=$g(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=_H([n,r]),u=$g(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(s6(o6(0,i-1).map(function(){return 1/0}))):[].concat(s6(o6(0,i-1).map(function(){return-1/0})),[c]);return n>r?a6(f):f}if(l===c)return hMe(l,i,o);var h=CH(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=Z2.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?a6(b):b}function gMe(e,t){var n=$g(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=_H([r,i]),s=$g(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=SH(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(s6(Z2.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?a6(h):h}var mMe=xH(pMe),vMe=xH(gMe),yMe="Invariant failed";function rf(e,t){throw new Error(yMe)}var bMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ah(e){"@babel/helpers - typeof";return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ah(e)}function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function AMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PMe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},CA=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},HMe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:ef(C,r,0)})}}return a},KMe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=ef(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(F7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=ef(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(F7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},qMe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=PH({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&qe(t[p]))return mr(mr({},t),{},Id({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&qe(t[m]))return mr(mr({},t),{},Id({},m,t[m]+(h||0)))}return t},GMe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},kH=function(t,n,r,i,o){var a=n.props.children,s=po(a,Jh).filter(function(l){return GMe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=Kr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[Gw(f),ul(f)]:[f,f],p=u.reduce(function(m,v){var b=Kr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},YMe=function(t,n,r,i,o){var a=n.map(function(s){return kH(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},TH=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&kH(t,u,l,i)||E0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Kh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},n3=new WeakMap,w1=function(t,n){if(typeof n!="function")return t;n3.has(t)||n3.set(t,new WeakMap);var r=n3.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},ZMe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Pg(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Db(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:C0(),realScaleType:"point"}:o==="category"?{scale:Pg(),realScaleType:"band"}:{scale:Db(),realScaleType:"linear"};if(Im(i)){var u="scale".concat($w(i));return{scale:(R7[u]||C0)(),realScaleType:R7[u]?u:"point"}}return Wt(i)?{scale:i}:{scale:C0(),realScaleType:"point"}},B7=1e-4,XMe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-B7,a=Math.max(i[0],i[1])+B7,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},QMe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},tRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},nRe={sign:eRe,expand:vSe,none:Qd,silhouette:ySe,wiggle:bSe,positive:tRe},rRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=nRe[r],a=mSe().keys(i).value(function(s,u){return+Kr(s,u,0)}).order(IE).offset(o);return a(t)},iRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Hr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[vf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Id({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Id({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:rRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Id({},h,p))},c)},oRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=mMe(l,o,s);return t.domain([Gw(c),ul(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=vMe(f,o,s);return{niceTicks:h}}return null};function sh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=fb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=Kr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var z7=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=Kr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},aRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},sRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},uRe=function(t){return t.reduce(function(n,r){return[Gw(r.concat([n[0]]).filter(qe)),ul(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},DH=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=uRe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},U7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,V7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f6=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(U7.test(t[0])){var o=+U7.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(V7.test(t[1])){var a=+V7.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=XO(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:dRe(l),angleInRadian:l}},gRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},mRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},q7=function(t,n){var r=t.x,i=t.y,o=pRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=gRe(n),f=c.startAngle,h=c.endAngle,p=s,m;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return m?K7(K7({},n),{},{radius:a,angle:mRe(p,n)}):null};function Fg(e){"@babel/helpers - typeof";return Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fg(e)}var vRe=["offset"];function yRe(e){return _Re(e)||wRe(e)||xRe(e)||bRe()}function bRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xRe(e,t){if(e){if(typeof e=="string")return d6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d6(e,t)}}function wRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Re(e){if(Array.isArray(e))return d6(e)}function d6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jMe(e,t){if(e){if(typeof e=="string")return c6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c6(e,t)}}function BMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zMe(e){if(Array.isArray(e))return c6(e)}function c6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},CA=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},HMe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:ef(C,r,0)})}}return a},KMe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=ef(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(F7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=ef(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(F7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},qMe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=PH({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&qe(t[p]))return mr(mr({},t),{},Id({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&qe(t[m]))return mr(mr({},t),{},Id({},m,t[m]+(h||0)))}return t},GMe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},kH=function(t,n,r,i,o){var a=n.props.children,s=po(a,Jh).filter(function(l){return GMe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=Kr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[G2(f),ul(f)]:[f,f],p=u.reduce(function(m,v){var b=Kr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},YMe=function(t,n,r,i,o){var a=n.map(function(s){return kH(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},TH=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&kH(t,u,l,i)||E0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Kh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},n3=new WeakMap,w1=function(t,n){if(typeof n!="function")return t;n3.has(t)||n3.set(t,new WeakMap);var r=n3.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},ZMe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Pg(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Db(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:C0(),realScaleType:"point"}:o==="category"?{scale:Pg(),realScaleType:"band"}:{scale:Db(),realScaleType:"linear"};if(Im(i)){var u="scale".concat($2(i));return{scale:(R7[u]||C0)(),realScaleType:R7[u]?u:"point"}}return Ht(i)?{scale:i}:{scale:C0(),realScaleType:"point"}},B7=1e-4,XMe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-B7,a=Math.max(i[0],i[1])+B7,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},QMe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},tRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},nRe={sign:eRe,expand:vSe,none:Qd,silhouette:ySe,wiggle:bSe,positive:tRe},rRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=nRe[r],a=mSe().keys(i).value(function(s,u){return+Kr(s,u,0)}).order(IE).offset(o);return a(t)},iRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Hr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[vf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Id({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Id({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:rRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Id({},h,p))},c)},oRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=mMe(l,o,s);return t.domain([G2(c),ul(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=vMe(f,o,s);return{niceTicks:h}}return null};function sh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=fb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=Kr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var z7=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=Kr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},aRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},sRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},uRe=function(t){return t.reduce(function(n,r){return[G2(r.concat([n[0]]).filter(qe)),ul(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},DH=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=uRe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},U7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,V7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f6=function(t,n,r){if(Ht(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(U7.test(t[0])){var o=+U7.exec(t[0])[1];i[0]=n[0]-o}else Ht(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(V7.test(t[1])){var a=+V7.exec(t[1])[1];i[1]=n[1]+a}else Ht(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=XO(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:dRe(l),angleInRadian:l}},gRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},mRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},q7=function(t,n){var r=t.x,i=t.y,o=pRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=gRe(n),f=c.startAngle,h=c.endAngle,p=s,m;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return m?K7(K7({},n),{},{radius:a,angle:mRe(p,n)}):null};function Fg(e){"@babel/helpers - typeof";return Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fg(e)}var vRe=["offset"];function yRe(e){return _Re(e)||wRe(e)||xRe(e)||bRe()}function bRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xRe(e,t){if(e){if(typeof e=="string")return d6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d6(e,t)}}function wRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Re(e){if(Array.isArray(e))return d6(e)}function d6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` A`).concat(b,",").concat(b,",0,1,").concat(O?0:1,`, - `).concat(C.x,",").concat(C.y),M=Ut(t.id)?vf("recharts-radial-line-"):t.id;return F.createElement("text",jg({},r,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",s)}),F.createElement("defs",null,F.createElement("path",{id:M,d:k})),F.createElement("textPath",{xlinkHref:"#".concat(M)},n))},MRe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,u=o.innerRadius,l=o.outerRadius,c=o.startAngle,f=o.endAngle,h=(c+f)/2;if(i==="outside"){var p=pi(a,s,l+r,h),m=p.x,v=p.y;return{x:m,y:v,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},RRe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Uh(o)&&(qe(o.x)||Sc(o.x))&&(qe(o.y)||Sc(o.y))?jr({x:s+ef(o.x,l),y:u+ef(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},DRe=function(t){return"cx"in t&&qe(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=SRe(e,vRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Wt(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=PRe(i);var m=DRe(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return TRe(i,p,v);var b=m?MRe(i):RRe(i);return F.createElement(Ob,jg({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var IH=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(qe(v)&&qe(b)){if(qe(f)&&qe(h))return{x:f,y:h,width:v,height:b};if(qe(p)&&qe(m))return{x:p,y:m,width:v,height:b}}return qe(f)&&qe(h)?{x:f,y:h,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},$Re=function(t,n){return t?t===!0?F.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?F.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Uh(t)?F.createElement(ki,jg({viewBox:n},t,{key:"label-implicit"})):null:null},IRe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=IH(t),a=po(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=$Re(t.label,n||o);return[s].concat(yRe(a))};ki.parseViewBox=IH;ki.renderCallByParent=IRe;function NRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var LRe=NRe;const FRe=Dn(LRe);function Bg(e){"@babel/helpers - typeof";return Bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bg(e)}var jRe=["valueAccessor"],BRe=["data","dataKey","clockWise","id","textBreakAll"];function zRe(e){return HRe(e)||WRe(e)||VRe(e)||URe()}function URe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VRe(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function WRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HRe(e){if(Array.isArray(e))return h6(e)}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZRe=function(t){return Array.isArray(t.value)?FRe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?ZRe:t,r=X7(e,jRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=X7(r,BRe);return!i||!i.length?null:F.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):Kr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return F.createElement(ki,Ub({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:Z7(Z7({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function XRe(e,t){return e?e===!0?F.createElement(As,{key:"labelList-implicit",data:t}):F.isValidElement(e)||Wt(e)?F.createElement(As,{key:"labelList-implicit",data:t,content:e}):Uh(e)?F.createElement(As,Ub({data:t},e,{key:"labelList-implicit"})):null:null}function QRe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=po(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=XRe(e.label,t);return[o].concat(zRe(i))}As.renderCallByParent=QRe;function zg(e){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zg(e)}function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},RRe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Uh(o)&&(qe(o.x)||Sc(o.x))&&(qe(o.y)||Sc(o.y))?jr({x:s+ef(o.x,l),y:u+ef(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},DRe=function(t){return"cx"in t&&qe(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=SRe(e,vRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Ht(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Ht(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=PRe(i);var m=DRe(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return TRe(i,p,v);var b=m?MRe(i):RRe(i);return F.createElement(Ob,jg({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var IH=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(qe(v)&&qe(b)){if(qe(f)&&qe(h))return{x:f,y:h,width:v,height:b};if(qe(p)&&qe(m))return{x:p,y:m,width:v,height:b}}return qe(f)&&qe(h)?{x:f,y:h,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},$Re=function(t,n){return t?t===!0?F.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?F.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Ht(t)?F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Uh(t)?F.createElement(ki,jg({viewBox:n},t,{key:"label-implicit"})):null:null},IRe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=IH(t),a=po(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=$Re(t.label,n||o);return[s].concat(yRe(a))};ki.parseViewBox=IH;ki.renderCallByParent=IRe;function NRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var LRe=NRe;const FRe=Dn(LRe);function Bg(e){"@babel/helpers - typeof";return Bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bg(e)}var jRe=["valueAccessor"],BRe=["data","dataKey","clockWise","id","textBreakAll"];function zRe(e){return HRe(e)||WRe(e)||VRe(e)||URe()}function URe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VRe(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function WRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HRe(e){if(Array.isArray(e))return h6(e)}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZRe=function(t){return Array.isArray(t.value)?FRe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?ZRe:t,r=X7(e,jRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=X7(r,BRe);return!i||!i.length?null:F.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):Kr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return F.createElement(ki,Ub({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:Z7(Z7({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function XRe(e,t){return e?e===!0?F.createElement(As,{key:"labelList-implicit",data:t}):F.isValidElement(e)||Ht(e)?F.createElement(As,{key:"labelList-implicit",data:t,content:e}):Uh(e)?F.createElement(As,Ub({data:t},e,{key:"labelList-implicit"})):null:null}function QRe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=po(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=XRe(e.label,t);return[o].concat(zRe(i))}As.renderCallByParent=QRe;function zg(e){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zg(e)}function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>l),`, `).concat(f.x,",").concat(f.y,` @@ -428,7 +448,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);if(i>0){var C=_1({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),k=C.circleTangency,M=C.lineTangency,L=C.theta,U=_1({cx:n,cy:r,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),H=U.circleTangency,V=U.lineTangency,ne=U.theta,Z=u?Math.abs(l-c):Math.abs(l-c)-L-ne;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(V.x,",").concat(V.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(H.x,",").concat(H.y,` A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},i9e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},LH=function(t){var n=J7(J7({},i9e),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=r9e({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=NH({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),F.createElement("path",p6({},zt(n,!0),{className:p,d:b,role:"img"}))};function Ug(e){"@babel/helpers - typeof";return Ug=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ug(e)}function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function p9e(e,t){return ep(e.getTime(),t.getTime())}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function g9e(e,t,n){var r=a$(e),i=r.length;if(a$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===jH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Gp(e,t,n){var r=i$(e),i=r.length;if(i$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===jH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=o$(e,o),s=o$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function m9e(e,t){return ep(e.valueOf(),t.valueOf())}function v9e(e,t){return e.source===t.source&&e.flags===t.flags}function u$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function y9e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var b9e="[object Arguments]",x9e="[object Boolean]",w9e="[object Date]",_9e="[object Map]",S9e="[object Number]",C9e="[object Object]",E9e="[object RegExp]",O9e="[object Set]",A9e="[object String]",P9e=Array.isArray,l$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,c$=Object.assign,k9e=Object.prototype.toString.call.bind(Object.prototype.toString);function T9e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(P9e(c))return t(c,f,h);if(l$!=null&&l$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=k9e(c);return m===w9e?n(c,f,h):m===E9e?a(c,f,h):m===_9e?r(c,f,h):m===O9e?s(c,f,h):m===C9e?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===b9e?i(c,f,h):m===x9e||m===S9e||m===A9e?o(c,f,h):!1}}function M9e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Gp:h9e,areDatesEqual:p9e,areMapsEqual:r?r$(s$,Gp):s$,areObjectsEqual:r?Gp:g9e,arePrimitiveWrappersEqual:m9e,areRegExpsEqual:v9e,areSetsEqual:r?r$(u$,Gp):u$,areTypedArraysEqual:r?Gp:y9e};if(n&&(i=c$({},i,n(i))),t){var o=C1(i.areArraysEqual),a=C1(i.areMapsEqual),s=C1(i.areObjectsEqual),u=C1(i.areSetsEqual);i=c$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function R9e(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function D9e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var $9e=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return ep}});Kl({strict:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=M9e(e),u=T9e(s),l=r?r(u):R9e(u);return D9e({circular:n,comparator:u,createState:i,equals:l,strict:a})}function I9e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function f$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):I9e(i)};requestAnimationFrame(r)}function m6(e){"@babel/helpers - typeof";return m6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m6(e)}function N9e(e){return B9e(e)||j9e(e)||F9e(e)||L9e()}function L9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. + A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},i9e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},LH=function(t){var n=J7(J7({},i9e),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=r9e({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=NH({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),F.createElement("path",p6({},zt(n,!0),{className:p,d:b,role:"img"}))};function Ug(e){"@babel/helpers - typeof";return Ug=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ug(e)}function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function p9e(e,t){return ep(e.getTime(),t.getTime())}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function g9e(e,t,n){var r=a$(e),i=r.length;if(a$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===jH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Gp(e,t,n){var r=i$(e),i=r.length;if(i$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===jH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=o$(e,o),s=o$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function m9e(e,t){return ep(e.valueOf(),t.valueOf())}function v9e(e,t){return e.source===t.source&&e.flags===t.flags}function u$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function y9e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var b9e="[object Arguments]",x9e="[object Boolean]",w9e="[object Date]",_9e="[object Map]",S9e="[object Number]",C9e="[object Object]",E9e="[object RegExp]",O9e="[object Set]",A9e="[object String]",P9e=Array.isArray,l$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,c$=Object.assign,k9e=Object.prototype.toString.call.bind(Object.prototype.toString);function T9e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(P9e(c))return t(c,f,h);if(l$!=null&&l$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=k9e(c);return m===w9e?n(c,f,h):m===E9e?a(c,f,h):m===_9e?r(c,f,h):m===O9e?s(c,f,h):m===C9e?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===b9e?i(c,f,h):m===x9e||m===S9e||m===A9e?o(c,f,h):!1}}function M9e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Gp:h9e,areDatesEqual:p9e,areMapsEqual:r?r$(s$,Gp):s$,areObjectsEqual:r?Gp:g9e,arePrimitiveWrappersEqual:m9e,areRegExpsEqual:v9e,areSetsEqual:r?r$(u$,Gp):u$,areTypedArraysEqual:r?Gp:y9e};if(n&&(i=c$({},i,n(i))),t){var o=C1(i.areArraysEqual),a=C1(i.areMapsEqual),s=C1(i.areObjectsEqual),u=C1(i.areSetsEqual);i=c$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function R9e(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function D9e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var $9e=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return ep}});Kl({strict:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=M9e(e),u=T9e(s),l=r?r(u):R9e(u);return D9e({circular:n,comparator:u,createState:i,equals:l,strict:a})}function I9e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function f$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):I9e(i)};requestAnimationFrame(r)}function m6(e){"@babel/helpers - typeof";return m6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m6(e)}function N9e(e){return B9e(e)||j9e(e)||F9e(e)||L9e()}function L9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F9e(e,t){if(e){if(typeof e=="string")return d$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d$(e,t)}}function d$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},v=function(w){for(var x=w>1?1:w,S=x,O=0;O<8;++O){var E=f(S)-x,C=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,u=function(c,f,h){var p=-(c-f)*r,m=h*o,v=h+(p-m)*s/1e3,b=h*s/1e3+c;return Math.abs(b-f)0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},FDe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EA=function(t){var n=S$(S$({},FDe),t),r=y.useRef(),i=y.useState(-1),o=kDe(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?F.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(k,M,E,C,h),ref:r})))}):F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(u,l,c,f,h)}))};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KDe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},qDe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=WDe(t,jDe),b=BDe({x:r,y:o,top:s,left:l,width:f,height:p},v);return!qe(r)||!qe(o)||!qe(f)||!qe(p)||!qe(s)||!qe(l)?null:F.createElement("path",O6({},zt(b,!0),{className:dn("recharts-cross",m),d:KDe(r,o,f,p,s,l)}))},GDe=uW,YDe=GDe(Object.getPrototypeOf,Object),ZDe=YDe,XDe=Tu,QDe=ZDe,JDe=Mu,e7e="[object Object]",t7e=Function.prototype,n7e=Object.prototype,KH=t7e.toString,r7e=n7e.hasOwnProperty,i7e=KH.call(Object);function o7e(e){if(!JDe(e)||XDe(e)!=e7e)return!1;var t=QDe(e);if(t===null)return!0;var n=r7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&KH.call(n)==i7e}var a7e=o7e;const s7e=Dn(a7e);var u7e=Tu,l7e=Mu,c7e="[object Boolean]";function f7e(e){return e===!0||e===!1||l7e(e)&&u7e(e)==c7e}var d7e=f7e;const h7e=Dn(d7e);function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(k,M,O,E,C),ref:r})))}):F.createElement("g",null,F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(u,l,c,f,h)})))},C7e=["option","shapeType","propTransformer","activeClassName","isActive"];function Gg(e){"@babel/helpers - typeof";return Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gg(e)}function E7e(e,t){if(e==null)return{};var n=O7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Ao(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Ao(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ao(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ao(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ao(r,"handleSlideDragStart",function(i){var o=L$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return l$e(t,e),o$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=Kr(o[r],s,r);return Wt(a)?a(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=L$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Ao(Ao({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Ao({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return F.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?F.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=o3(o3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return F.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return F.createElement(Cn,{className:"recharts-brush-texts"},F.createElement(Ob,Zb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),F.createElement(Ob,Zb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!qe(s)||!qe(u)||!qe(l)||!qe(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=F.Children.count(a)===1,E=r$e("userSelect","none");return F.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),F.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return F.isValidElement(r)?o=F.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return o3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?f$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Ao(ch,"displayName","Brush");Ao(ch,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var d$e=ZO;function h$e(e,t){var n;return d$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var p$e=h$e,g$e=eW,m$e=Vl,v$e=p$e,y$e=vo,b$e=zw;function x$e(e,t,n){var r=y$e(e)?g$e:v$e;return n&&b$e(e,t,n)&&(t=void 0),r(e,m$e(t))}var w$e=x$e;const _$e=Dn(w$e);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},F$=_W;function S$e(e,t,n){t=="__proto__"&&F$?F$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C$e=S$e,E$e=C$e,O$e=xW,A$e=Vl;function P$e(e,t){var n={};return t=A$e(t),O$e(e,function(r,i,o){E$e(n,i,t(r,i,o))}),n}var k$e=P$e;const T$e=Dn(k$e);function M$e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y$e(e,t){var n=e.x,r=e.y,i=q$e(e,V$e),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Yp(Yp(Yp(Yp(Yp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function B$(e){return F.createElement(A6,k6({shapeType:"rectangle",propTransformer:Y$e,activeClassName:"recharts-active-bar"},e))}var Z$e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||rf(),n)}},X$e=["value","background"],QH;function fh(e){"@babel/helpers - typeof";return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function Q$e(e,t){if(e==null)return{};var n=J$e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function J$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ne=Math.min((be||0)-(Z[we-1]||0),ne))}),Number.isFinite(ne)){var G=ne/V,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=G*q/2),v.padding==="no-gap"){var W=ef(t.barCategoryGap,G*q),j=G*q/2;k=j-W-(j-W)/q*W}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var K=ZMe(v,o,h),Y=K.scale,oe=K.realScaleType;Y.domain(w).range(M),XMe(Y);var ae=oRe(Y,Da(Da({},v),{},{realScaleType:oe}));i==="xAxis"?(H=b==="top"&&!O||b==="bottom"&&O,L=r.left,U=f[C]-H*v.height):i==="yAxis"&&(H=b==="left"&&!O||b==="right"&&O,L=f[C]-H*v.width,U=r.top);var ue=Da(Da(Da({},v),ae),{},{realScaleType:oe,x:L,y:U,scale:Y,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return ue.bandSize=Bb(ue,ae),!v.hide&&i==="xAxis"?f[C]+=(H?-1:1)*ue.height:v.hide||(f[C]+=(H?-1:1)*ue.width),Da(Da({},p),{},e2({},m,ue))},{})},nK=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},fIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return nK({x:n,y:r},{x:i,y:o})},rK=function(){function e(t){sIe(this,e),this.scale=t}return uIe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();e2(rK,"EPS",1e-4);var OA=function(t){var n=Object.keys(t).reduce(function(r,i){return Da(Da({},r),{},e2({},i,rK.create(t[i])))},{});return Da(Da({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return T$e(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return XH(i,function(o,a){return n[a].isInRange(o)})}})};function dIe(e){return(e%180+180)%180}var hIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=dIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var yIe=vIe,bIe=qH;function xIe(e){var t=bIe(e),n=t%1;return t===t?n?t-n:t:0}var wIe=xIe,_Ie=pW,SIe=Vl,CIe=wIe,EIe=Math.max;function OIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:CIe(n);return i<0&&(i=EIe(r+i,0)),_Ie(e,SIe(t),i)}var AIe=OIe,PIe=yIe,kIe=AIe,TIe=PIe(kIe),MIe=TIe;const RIe=Dn(MIe);var DIe=Iwe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),AA=y.createContext(void 0),PA=y.createContext(void 0),iK=y.createContext(void 0),oK=y.createContext({}),aK=y.createContext(void 0),sK=y.createContext(0),uK=y.createContext(0),H$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=DIe(o);return F.createElement(AA.Provider,{value:r},F.createElement(PA.Provider,{value:i},F.createElement(oK.Provider,{value:o},F.createElement(iK.Provider,{value:c},F.createElement(aK.Provider,{value:a},F.createElement(sK.Provider,{value:l},F.createElement(uK.Provider,{value:u},s)))))))},$Ie=function(){return y.useContext(aK)},lK=function(t){var n=y.useContext(AA);n==null&&rf();var r=n[t];return r==null&&rf(),r},IIe=function(){var t=y.useContext(AA);return rl(t)},NIe=function(){var t=y.useContext(PA),n=RIe(t,function(r){return XH(r.domain,Number.isFinite)});return n||rl(t)},cK=function(t){var n=y.useContext(PA);n==null&&rf();var r=n[t];return r==null&&rf(),r},LIe=function(){var t=y.useContext(iK);return t},FIe=function(){return y.useContext(oK)},kA=function(){return y.useContext(uK)},TA=function(){return y.useContext(sK)};function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function jIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BIe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function wNe(e,t){return vK(e,t+1)}function _Ne(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:vK(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||rx(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function Jg(e){"@babel/helpers - typeof";return Jg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(e)}function J$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=rx(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function ANe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=rx(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=rx(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=xNe(o,b,p);return u==="equidistantPreserveStart"?_Ne(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=ANe(b,w,v,i,a,u==="preserveStartEnd"):h=ONe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var PNe=["viewBox"],kNe=["viewBox"],TNe=["ticks"];function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function RNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:F.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return F.isValidElement(r)?a=F.cloneElement(r,i):Wt(r)?a=r(i):a=F.createElement(Ob,vd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);$A(np,"displayName","CartesianAxis");$A(np,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var jNe=["x1","y1","x2","y2","key"],BNe=["offset"];function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function nI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var HNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return F.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function xK(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=rI(t,jNe),l=zt(u,!1);l.offset;var c=rI(l,BNe);n=F.createElement("line",Oc({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function KNe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return xK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function qNe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return xK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function GNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return F.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function YNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return F.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var ZNe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return RH(DA(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},XNe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return RH(DA(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function QNe(e){var t,n,r,i,o,a,s=kA(),u=TA(),l=FIe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zf.verticalFill,x:qe(e.x)?e.x:l.left,y:qe(e.y)?e.y:l.top,width:qe(e.width)?e.width:l.width,height:qe(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=IIe(),S=NIe();if(!qe(p)||p<=0||!qe(m)||m<=0||!qe(f)||f!==+f||!qe(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||ZNe,E=c.horizontalCoordinatesGenerator||XNe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,L=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);du(Array.isArray(L),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(L),"]")),Array.isArray(L)&&(C=L)}if((!k||!k.length)&&Wt(O)){var U=w&&w.length,H=O({xAxis:x?Ti(Ti({},x),{},{ticks:U?w:x.ticks}):void 0,width:s,height:u,offset:l},U?!0:v);du(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(H),"]")),Array.isArray(H)&&(k=H)}return F.createElement("g",{className:"recharts-cartesian-grid"},F.createElement(HNe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),F.createElement(KNe,Oc({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),F.createElement(qNe,Oc({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),F.createElement(GNe,Oc({},c,{horizontalPoints:C})),F.createElement(YNe,Oc({},c,{verticalPoints:k})))}QNe.displayName="CartesianGrid";var JNe=["type","layout","connectNulls","ref"],eLe=["key"];function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}function iI(e,t){if(e==null)return{};var n=tLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(Xf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Xf(t.repeat(u,c)),Xf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),$a(n,"id",vf("recharts-line-")),$a(n,"pathRef",function(a){n.mainCurve=a}),$a(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),$a(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return fLe(t,e),sLe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=po(c,Jh);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return F.createElement(Cn,p,f.map(function(m){return F.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Oo(Oo(Oo({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return F.createElement(Cn,A0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=iI(s,JNe),h=Oo(Oo(Oo({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return F.createElement(Ic,A0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return F.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(V,ne){var Z=Math.floor(ne*C);if(x[Z]){var G=x[Z],q=Er(G.x,V.x),W=Er(G.y,V.y);return Oo(Oo({},V),{},{x:q(E),y:W(E)})}if(m){var j=Er(v*2,V.x),K=Er(b/2,V.y);return Oo(Oo({},V),{},{x:j(E),y:K(E)})}return Oo(Oo({},V),{},{x:V.x,y:V.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),L=M(E),U;if(u){var H="".concat(u).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});U=o.getStrokeDasharray(L,S,H)}else U=o.generateSimpleStrokeDasharray(S,L);return o.renderCurveStatically(s,r,i,{strokeDasharray:U})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!tf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=M.r,U=L===void 0?3:L,H=M.strokeWidth,V=H===void 0?2:H,ne=EV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=U*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:h-q/2,y:f-q/2,width:p+q,height:m+q}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Xf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!tf(c,a)||!tf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=M.r,U=L===void 0?3:L,H=M.strokeWidth,V=H===void 0?2:H,ne=EV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=U*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:c-q/2,y:l-q/2,width:p+q,height:m+q}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);SK=xf;bs(xf,"displayName","Area");bs(xf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ka.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(xf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(qe(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(xf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=SK.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=Kr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&Kr(O,u)==null;return b?{x:sh({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:sh({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Yu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(xf,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=CK(t,pLe);n=F.createElement(Xw,Ac({},o,{key:i,className:r}))}return n});function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function SLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CLe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Le(e){var t=e.option,n=e.isActive,r=RLe(e,MLe);return typeof t=="string"?F.createElement(A6,P0({option:F.createElement(Fw,P0({type:t},r)),isActive:n,shapeType:"symbols"},r)):F.createElement(A6,P0({option:t,isActive:n,shapeType:"symbols"},r))}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},FDe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EA=function(t){var n=S$(S$({},FDe),t),r=y.useRef(),i=y.useState(-1),o=kDe(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?F.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(k,M,E,C,h),ref:r})))}):F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(u,l,c,f,h)}))};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KDe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},qDe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=WDe(t,jDe),b=BDe({x:r,y:o,top:s,left:l,width:f,height:p},v);return!qe(r)||!qe(o)||!qe(f)||!qe(p)||!qe(s)||!qe(l)?null:F.createElement("path",O6({},zt(b,!0),{className:dn("recharts-cross",m),d:KDe(r,o,f,p,s,l)}))},GDe=uW,YDe=GDe(Object.getPrototypeOf,Object),ZDe=YDe,XDe=Tu,QDe=ZDe,JDe=Mu,e7e="[object Object]",t7e=Function.prototype,n7e=Object.prototype,KH=t7e.toString,r7e=n7e.hasOwnProperty,i7e=KH.call(Object);function o7e(e){if(!JDe(e)||XDe(e)!=e7e)return!1;var t=QDe(e);if(t===null)return!0;var n=r7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&KH.call(n)==i7e}var a7e=o7e;const s7e=Dn(a7e);var u7e=Tu,l7e=Mu,c7e="[object Boolean]";function f7e(e){return e===!0||e===!1||l7e(e)&&u7e(e)==c7e}var d7e=f7e;const h7e=Dn(d7e);function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(k,M,O,E,C),ref:r})))}):F.createElement("g",null,F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(u,l,c,f,h)})))},C7e=["option","shapeType","propTransformer","activeClassName","isActive"];function Gg(e){"@babel/helpers - typeof";return Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gg(e)}function E7e(e,t){if(e==null)return{};var n=O7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Ao(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Ao(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ao(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ao(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ao(r,"handleSlideDragStart",function(i){var o=L$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return l$e(t,e),o$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=Kr(o[r],s,r);return Ht(a)?a(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=L$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Ao(Ao({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Ao({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return F.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?F.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=o3(o3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return F.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return F.createElement(Cn,{className:"recharts-brush-texts"},F.createElement(Ob,Zb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),F.createElement(Ob,Zb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!qe(s)||!qe(u)||!qe(l)||!qe(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=F.Children.count(a)===1,E=r$e("userSelect","none");return F.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),F.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return F.isValidElement(r)?o=F.cloneElement(r,i):Ht(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return o3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?f$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Ao(ch,"displayName","Brush");Ao(ch,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var d$e=ZO;function h$e(e,t){var n;return d$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var p$e=h$e,g$e=eW,m$e=Vl,v$e=p$e,y$e=vo,b$e=z2;function x$e(e,t,n){var r=y$e(e)?g$e:v$e;return n&&b$e(e,t,n)&&(t=void 0),r(e,m$e(t))}var w$e=x$e;const _$e=Dn(w$e);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},F$=_W;function S$e(e,t,n){t=="__proto__"&&F$?F$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C$e=S$e,E$e=C$e,O$e=xW,A$e=Vl;function P$e(e,t){var n={};return t=A$e(t),O$e(e,function(r,i,o){E$e(n,i,t(r,i,o))}),n}var k$e=P$e;const T$e=Dn(k$e);function M$e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y$e(e,t){var n=e.x,r=e.y,i=q$e(e,V$e),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Yp(Yp(Yp(Yp(Yp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function B$(e){return F.createElement(A6,k6({shapeType:"rectangle",propTransformer:Y$e,activeClassName:"recharts-active-bar"},e))}var Z$e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||rf(),n)}},X$e=["value","background"],QH;function fh(e){"@babel/helpers - typeof";return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function Q$e(e,t){if(e==null)return{};var n=J$e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function J$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ne=Math.min((be||0)-(Z[we-1]||0),ne))}),Number.isFinite(ne)){var G=ne/V,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=G*q/2),v.padding==="no-gap"){var W=ef(t.barCategoryGap,G*q),j=G*q/2;k=j-W-(j-W)/q*W}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var K=ZMe(v,o,h),Y=K.scale,oe=K.realScaleType;Y.domain(w).range(M),XMe(Y);var ae=oRe(Y,Da(Da({},v),{},{realScaleType:oe}));i==="xAxis"?(H=b==="top"&&!O||b==="bottom"&&O,L=r.left,U=f[C]-H*v.height):i==="yAxis"&&(H=b==="left"&&!O||b==="right"&&O,L=f[C]-H*v.width,U=r.top);var ue=Da(Da(Da({},v),ae),{},{realScaleType:oe,x:L,y:U,scale:Y,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return ue.bandSize=Bb(ue,ae),!v.hide&&i==="xAxis"?f[C]+=(H?-1:1)*ue.height:v.hide||(f[C]+=(H?-1:1)*ue.width),Da(Da({},p),{},ew({},m,ue))},{})},nK=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},fIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return nK({x:n,y:r},{x:i,y:o})},rK=function(){function e(t){sIe(this,e),this.scale=t}return uIe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();ew(rK,"EPS",1e-4);var OA=function(t){var n=Object.keys(t).reduce(function(r,i){return Da(Da({},r),{},ew({},i,rK.create(t[i])))},{});return Da(Da({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return T$e(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return XH(i,function(o,a){return n[a].isInRange(o)})}})};function dIe(e){return(e%180+180)%180}var hIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=dIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var yIe=vIe,bIe=qH;function xIe(e){var t=bIe(e),n=t%1;return t===t?n?t-n:t:0}var wIe=xIe,_Ie=pW,SIe=Vl,CIe=wIe,EIe=Math.max;function OIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:CIe(n);return i<0&&(i=EIe(r+i,0)),_Ie(e,SIe(t),i)}var AIe=OIe,PIe=yIe,kIe=AIe,TIe=PIe(kIe),MIe=TIe;const RIe=Dn(MIe);var DIe=I2e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),AA=y.createContext(void 0),PA=y.createContext(void 0),iK=y.createContext(void 0),oK=y.createContext({}),aK=y.createContext(void 0),sK=y.createContext(0),uK=y.createContext(0),H$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=DIe(o);return F.createElement(AA.Provider,{value:r},F.createElement(PA.Provider,{value:i},F.createElement(oK.Provider,{value:o},F.createElement(iK.Provider,{value:c},F.createElement(aK.Provider,{value:a},F.createElement(sK.Provider,{value:l},F.createElement(uK.Provider,{value:u},s)))))))},$Ie=function(){return y.useContext(aK)},lK=function(t){var n=y.useContext(AA);n==null&&rf();var r=n[t];return r==null&&rf(),r},IIe=function(){var t=y.useContext(AA);return rl(t)},NIe=function(){var t=y.useContext(PA),n=RIe(t,function(r){return XH(r.domain,Number.isFinite)});return n||rl(t)},cK=function(t){var n=y.useContext(PA);n==null&&rf();var r=n[t];return r==null&&rf(),r},LIe=function(){var t=y.useContext(iK);return t},FIe=function(){return y.useContext(oK)},kA=function(){return y.useContext(uK)},TA=function(){return y.useContext(sK)};function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function jIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BIe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function wNe(e,t){return vK(e,t+1)}function _Ne(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:vK(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||rx(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function Jg(e){"@babel/helpers - typeof";return Jg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(e)}function J$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=rx(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function ANe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=rx(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=rx(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=xNe(o,b,p);return u==="equidistantPreserveStart"?_Ne(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=ANe(b,w,v,i,a,u==="preserveStartEnd"):h=ONe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var PNe=["viewBox"],kNe=["viewBox"],TNe=["ticks"];function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function RNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:F.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return F.isValidElement(r)?a=F.cloneElement(r,i):Ht(r)?a=r(i):a=F.createElement(Ob,vd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);$A(np,"displayName","CartesianAxis");$A(np,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var jNe=["x1","y1","x2","y2","key"],BNe=["offset"];function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function nI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var HNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return F.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function xK(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=rI(t,jNe),l=zt(u,!1);l.offset;var c=rI(l,BNe);n=F.createElement("line",Oc({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function KNe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return xK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function qNe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return xK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function GNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return F.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function YNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return F.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var ZNe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return RH(DA(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},XNe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return RH(DA(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function QNe(e){var t,n,r,i,o,a,s=kA(),u=TA(),l=FIe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zf.verticalFill,x:qe(e.x)?e.x:l.left,y:qe(e.y)?e.y:l.top,width:qe(e.width)?e.width:l.width,height:qe(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=IIe(),S=NIe();if(!qe(p)||p<=0||!qe(m)||m<=0||!qe(f)||f!==+f||!qe(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||ZNe,E=c.horizontalCoordinatesGenerator||XNe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Ht(E)){var M=b&&b.length,L=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);du(Array.isArray(L),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(L),"]")),Array.isArray(L)&&(C=L)}if((!k||!k.length)&&Ht(O)){var U=w&&w.length,H=O({xAxis:x?Ti(Ti({},x),{},{ticks:U?w:x.ticks}):void 0,width:s,height:u,offset:l},U?!0:v);du(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(H),"]")),Array.isArray(H)&&(k=H)}return F.createElement("g",{className:"recharts-cartesian-grid"},F.createElement(HNe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),F.createElement(KNe,Oc({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),F.createElement(qNe,Oc({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),F.createElement(GNe,Oc({},c,{horizontalPoints:C})),F.createElement(YNe,Oc({},c,{verticalPoints:k})))}QNe.displayName="CartesianGrid";var JNe=["type","layout","connectNulls","ref"],eLe=["key"];function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}function iI(e,t){if(e==null)return{};var n=tLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(Xf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Xf(t.repeat(u,c)),Xf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),$a(n,"id",vf("recharts-line-")),$a(n,"pathRef",function(a){n.mainCurve=a}),$a(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),$a(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return fLe(t,e),sLe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=po(c,Jh);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return F.createElement(Cn,p,f.map(function(m){return F.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Oo(Oo(Oo({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return F.createElement(Cn,A0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=iI(s,JNe),h=Oo(Oo(Oo({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return F.createElement(Ic,A0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return F.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(V,ne){var Z=Math.floor(ne*C);if(x[Z]){var G=x[Z],q=Er(G.x,V.x),W=Er(G.y,V.y);return Oo(Oo({},V),{},{x:q(E),y:W(E)})}if(m){var j=Er(v*2,V.x),K=Er(b/2,V.y);return Oo(Oo({},V),{},{x:j(E),y:K(E)})}return Oo(Oo({},V),{},{x:V.x,y:V.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),L=M(E),U;if(u){var H="".concat(u).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});U=o.getStrokeDasharray(L,S,H)}else U=o.generateSimpleStrokeDasharray(S,L);return o.renderCurveStatically(s,r,i,{strokeDasharray:U})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!tf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=M.r,U=L===void 0?3:L,H=M.strokeWidth,V=H===void 0?2:H,ne=EV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=U*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:h-q/2,y:f-q/2,width:p+q,height:m+q}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Xf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!tf(c,a)||!tf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=M.r,U=L===void 0?3:L,H=M.strokeWidth,V=H===void 0?2:H,ne=EV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=U*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:c-q/2,y:l-q/2,width:p+q,height:m+q}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);SK=xf;bs(xf,"displayName","Area");bs(xf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ka.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(xf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(qe(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(xf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=SK.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=Kr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&Kr(O,u)==null;return b?{x:sh({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:sh({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Yu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(xf,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=CK(t,pLe);n=F.createElement(X2,Ac({},o,{key:i,className:r}))}return n});function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function SLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CLe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Le(e){var t=e.option,n=e.isActive,r=RLe(e,MLe);return typeof t=="string"?F.createElement(A6,P0({option:F.createElement(F2,P0({type:t},r)),isActive:n,shapeType:"symbols"},r)):F.createElement(A6,P0({option:t,isActive:n,shapeType:"symbols"},r))}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TFe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&qe(i)&&qe(o)?t.slice(i,o+1):[]};function KK(e){return e==="number"?[0,"auto"]:void 0}var X6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=u2(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=fb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Sh(u),[$H(l,h)]):u},[])},mI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=UFe(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=WMe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=X6(t,n,c,f),p=VFe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},WFe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=MH(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Se(Se({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,L=w[a];if(m[L])return m;var U=u2(t.data,{graphicalItems:i.filter(function(ae){var ue,be=a in ae.props?ae.props[a]:(ue=ae.type.defaultProps)===null||ue===void 0?void 0:ue[a];return be===L}),dataStartIndex:u,dataEndIndex:l}),H=U.length,V,ne,Z;mFe(w.domain,O,x)&&(V=f6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=E0(U,S,"category")));var G=KK(x);if(!V||V.length===0){var q,W=(q=w.domain)!==null&&q!==void 0?q:G;if(S){if(V=E0(U,S,x),x==="category"&&p){var j=R2e(V);E&&j?(ne=V,V=Yb(0,H)):E||(V=W7(W,V,v).reduce(function(ae,ue){return ae.indexOf(ue)>=0?ae:[].concat(Sh(ae),[ue])},[]))}else if(x==="category")E?V=V.filter(function(ae){return ae!==""&&!Ut(ae)}):V=W7(W,V,v).reduce(function(ae,ue){return ae.indexOf(ue)>=0||ue===""||Ut(ue)?ae:[].concat(Sh(ae),[ue])},[]);else if(x==="number"){var K=YMe(U,i.filter(function(ae){var ue,be,we=a in ae.props?ae.props[a]:(ue=ae.type.defaultProps)===null||ue===void 0?void 0:ue[a],He="hide"in ae.props?ae.props.hide:(be=ae.type.defaultProps)===null||be===void 0?void 0:be.hide;return we===L&&(M||!He)}),S,o,c);K&&(V=K)}p&&(x==="number"||C!=="auto")&&(Z=E0(U,S,"category"))}else p?V=Yb(0,H):s&&s[L]&&s[L].hasStack&&x==="number"?V=h==="expand"?[0,1]:DH(s[L].stackGroups,u,l):V=TH(U,i.filter(function(ae){var ue=a in ae.props?ae.props[a]:ae.type.defaultProps[a],be="hide"in ae.props?ae.props.hide:ae.type.defaultProps.hide;return ue===L&&(M||!be)}),x,c,!0);if(x==="number")V=G6(f,V,L,o,k),W&&(V=f6(W,V,O));else if(x==="category"&&W){var Y=W,oe=V.every(function(ae){return Y.indexOf(ae)>=0});oe&&(V=Y)}}return Se(Se({},m),{},kt({},L,Se(Se({},w),{},{axisType:o,domain:V,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:p,layout:c})))},{})},HFe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=u2(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=MH(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Se(Se({},w.type.defaultProps),w.props):w.props,S=x[a],O=KK("number");if(!b[S]){v++;var E;return m?E=Yb(0,p):s&&s[S]&&s[S].hasStack?(E=DH(s[S].stackGroups,u,l),E=G6(f,E,S,o)):(E=f6(O,TH(h,r.filter(function(C){var k,M,L=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],U="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return L===S&&!U}),"number",c),i.defaultProps.allowDataOverflow),E=G6(f,E,S,o)),Se(Se({},b),{},kt({},S,Se(Se({axisType:o},i.defaultProps),{},{hide:!0,orientation:ha(BFe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},KFe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=po(c,o),p={};return h.length?p=WFe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=HFe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},qFe=function(t){var n=rl(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:XO(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bb(n,r)}},vI=function(t){var n=t.children,r=t.defaultShowTooltip,i=To(n,ch),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},GFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fu(n&&n.type);return r&&r.indexOf("Bar")>=0})},yI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},YFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=To(f,ch),m=To(f,Dd),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Se(Se({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Se(Se({},E),{},kt({},M,ha(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Se(Se({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||ch.defaultProps.height),m&&n&&(w=qMe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Se(Se({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},ZFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},XFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,L=w.barSize,U=w.layout,H=w.barGap,V=w.barCategoryGap,ne=w.maxBarSize,Z=yI(U),G=Z.numericAxisName,q=Z.cateAxisName,W=GFe(S),j=[];return S.forEach(function(K,Y){var oe=u2(w.data,{graphicalItems:[K],dataStartIndex:k,dataEndIndex:M}),ae=K.type.defaultProps!==void 0?Se(Se({},K.type.defaultProps),K.props):K.props,ue=ae.dataKey,be=ae.maxBarSize,we=ae["".concat(G,"Id")],He=ae["".concat(q,"Id")],Ee={},it=u.reduce(function(ze,Fe){var Ae=x["".concat(Fe.axisType,"Map")],tt=ae["".concat(Fe.axisType,"Id")];Ae&&Ae[tt]||Fe.axisType==="zAxis"||rf();var mt=Ae[tt];return Se(Se({},ze),{},kt(kt({},Fe.axisType,mt),"".concat(Fe.axisType,"Ticks"),su(mt)))},Ee),ke=it[q],Le=it["".concat(q,"Ticks")],De=O&&O[we]&&O[we].hasStack&&sRe(K,O[we].stackGroups),me=fu(K.type).indexOf("Bar")>=0,yt=Bb(ke,Le),lt=[],Nt=W&&HMe({barSize:L,stackGroups:O,totalSize:ZFe(it,q)});if(me){var yn,nn,te=Ut(be)?ne:be,de=(yn=(nn=Bb(ke,Le,!0))!==null&&nn!==void 0?nn:te)!==null&&yn!==void 0?yn:0;lt=KMe({barGap:H,barCategoryGap:V,bandSize:de!==yt?de:yt,sizeList:Nt[He],maxBarSize:te}),de!==yt&&(lt=lt.map(function(ze){return Se(Se({},ze),{},{position:Se(Se({},ze.position),{},{offset:ze.position.offset-de/2})})}))}var ge=K&&K.type&&K.type.getComposedData;ge&&j.push({props:Se(Se({},ge(Se(Se({},it),{},{displayedData:oe,props:w,dataKey:ue,item:K,bandSize:yt,barPosition:lt,offset:E,stackedData:De,layout:U,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:K.key||"item-".concat(Y)},G,it[G]),q,it[q]),"animationId",C)),childIndex:W2e(K,w.children),item:K})}),j},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!F9({props:S}))return null;var k=S.children,M=S.layout,L=S.stackOffset,U=S.data,H=S.reverseStackOrder,V=yI(M),ne=V.numericAxisName,Z=V.cateAxisName,G=po(k,r),q=iRe(U,G,"".concat(ne,"Id"),"".concat(Z,"Id"),L,H),W=u.reduce(function(ae,ue){var be="".concat(ue.axisType,"Map");return Se(Se({},ae),{},kt({},be,KFe(S,Se(Se({},ue),{},{graphicalItems:G,stackGroups:ue.axisType===ne&&q,dataStartIndex:O,dataEndIndex:E}))))},{}),j=YFe(Se(Se({},W),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(W).forEach(function(ae){W[ae]=c(S,W[ae],j,ae.replace("Map",""),n)});var K=W["".concat(Z,"Map")],Y=qFe(K),oe=h(S,Se(Se({},W),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:q,offset:j}));return Se(Se({formattedGraphicalItems:oe,graphicalItems:G,offset:j,stackGroups:q},Y),W)},m=function(b){function w(x){var S,O,E;return kFe(this,w),E=RFe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new gFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,L=k.dataEndIndex,U=k.updateId;E.setState(Se({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:L,updateId:U},Se(Se({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var L=E.state.updateId;E.setState(function(){return Se({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:L},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Se(Se({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var L=E.props.onMouseEnter;Wt(L)&&L(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Se(Se({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var L=E.props.onMouseMove;Wt(L)&&L(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Wt(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=V2e(C),M=ha(E.props,"".concat(k));if(k&&Wt(M)){var L,U;/.*touch.*/i.test(k)?U=E.getMouseInfo(C.changedTouches[0]):U=E.getMouseInfo(C),M((L=U)!==null&&L!==void 0?L:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Se(Se({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var L=E.props.onClick;Wt(L)&&L(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&s3.emit(u3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,L=k.syncMethod,U=E.state.updateId,H=C.dataStartIndex,V=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Se({dataStartIndex:H,dataEndIndex:V},p({props:E.props,dataStartIndex:H,dataEndIndex:V,updateId:U},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,q=E.state,W=q.offset,j=q.tooltipTicks;if(!W)return;if(typeof L=="function")G=L(j,C);else if(L==="value"){G=-1;for(var K=0;K=0){var De,me;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());De=fb(K,yt,G),me=Y&&oe&&fb(oe,yt,G)}else De=K?.[Z],me=Y&&oe&&oe[Z];if(He||we){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Se(Se(Se({},L.props),it),{},{activeIndex:lt})),null,null]}if(!Ut(De))return[ke].concat(Sh(E.renderActivePoints({item:L,activePoint:De,basePoint:me,childIndex:Z,isRange:Y})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:ke},nn=yn.graphicalItem,te=nn.item,de=te===void 0?C:te,ge=nn.childIndex,ze=Se(Se(Se({},L.props),it),{},{activeIndex:ge});return[y.cloneElement(de,ze),null,null]}return Y?[ke,null,null]:[ke,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Se(Se({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:O1,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:O1},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:O1},YAxis:{handler:O1},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:vf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=PW(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return IFe(w,b),MFe(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=To(O,Js);if(M){var L=M.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,H=X6(this.state,E,L,U),V=this.state.tooltipTicks[L].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",G=Z?{x:V,y:ne}:{y:V,x:ne},q=this.state.formattedGraphicalItems.find(function(j){var K=j.item;return K.type.name==="Scatter"});q&&(G=Se(Se({},G),q.props.points[L].tooltipPosition),H=q.props.points[L].tooltipPayload);var W={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:U,activePayload:H,activeCoordinate:G};this.setState(W),this.renderCursor(M),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){OE([To(S.children,Js)],[To(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=To(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=mPe(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,L=this.inRange(k.chartX,k.chartY,M);if(!L)return null;var U=this.state,H=U.xAxisMap,V=U.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&H&&V){var Z=rl(H).scale,G=rl(V).scale,q=Z&&Z.invert?Z.invert(k.chartX):null,W=G&&G.invert?G.invert(k.chartY):null;return Se(Se({},k),{},{xValue:q,yValue:W})}var j=mI(this.state,this.props.data,this.props.layout,L);return j?Se(Se({},k),j):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var L=this.state.offset,U=k>=L.left&&k<=L.left+L.width&&M>=L.top&&M<=L.top+L.height;return U?{x:k,y:M}:null}var H=this.state,V=H.angleAxisMap,ne=H.radiusAxisMap;if(V&&ne){var Z=rl(V);return q7({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=To(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=db(this.props,this.handleOuterEvent);return Se(Se({},k),C)}},{key:"addListener",value:function(){s3.on(u3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s3.removeListener(u3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Em(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return I.jsx(JFe,{scope:n,baseId:Fo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});GK.displayName=LA;var YK="TabsList",ZK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=FA(YK,n),a=qK(n);return I.jsx(Uz,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});ZK.displayName=YK;var XK="TabsTrigger",QK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=FA(XK,n),s=qK(n),u=tq(a.baseId,r),l=nq(a.baseId,r),c=r===a.value;return I.jsx(Vz,{asChild:!0,...s,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});QK.displayName=XK;var JK="TabsContent",eq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=FA(JK,n),u=tq(s.baseId,r),l=nq(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});eq.displayName=JK;function tq(e,t){return`${e}-trigger-${t}`}function nq(e,t){return`${e}-content-${t}`}var TXe=GK,MXe=ZK,RXe=QK,DXe=eq;function Q6(e,[t,n]){return Math.min(n,Math.max(t,e))}function jA(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var eje=[" ","Enter","ArrowUp","ArrowDown"],tje=[" ","Enter"],zm="Select",[l2,c2,nje]=J5(zm),[rp,$Xe]=vi(zm,[nje,zl]),f2=zl(),[rje,ql]=rp(zm),[ije,oje]=rp(zm),rq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=f2(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Em(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[L,U]=Za({prop:a,defaultProp:s,onChange:u}),H=y.useRef(null),V=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),G=Array.from(ne).map(q=>q.props.value).join(";");return I.jsx(aw,{...v,children:I.jsxs(rje,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:Fo(),value:L,onValueChange:U,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(l2.Provider,{scope:t,children:I.jsx(ije,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(q=>{Z(W=>new Set(W).add(q))},[]),onNativeOptionRemove:y.useCallback(q=>{Z(W=>{const j=new Set(W);return j.delete(q),j})},[]),children:n})}),V?I.jsxs(kq,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:L,onChange:q=>U(q.target.value),disabled:h,form:m,children:[L===void 0?I.jsx("option",{value:""}):null,Array.from(ne)]},G):null]})})};rq.displayName=zm;var iq="SelectTrigger",oq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=f2(n),a=ql(iq,n),s=a.disabled||r,u=Gt(t,a.onTriggerChange),l=c2(n),c=y.useRef("touch"),[f,h,p]=Tq(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Mq(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return I.jsx(Am,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Pq(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&eje.includes(v.key)&&(m(),v.preventDefault())})})})});oq.displayName=iq;var aq="SelectValue",sq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=ql(aq,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Gt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:Pq(u.value)?I.jsx(I.Fragment,{children:a}):o})});sq.displayName=aq;var aje="SelectIcon",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});uq.displayName=aje;var sje="SelectPortal",lq=e=>I.jsx(Lh,{asChild:!0,...e});lq.displayName=sje;var af="SelectContent",cq=y.forwardRef((e,t)=>{const n=ql(af,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Au.createPortal(I.jsx(fq,{scope:e.__scopeSelect,children:I.jsx(l2.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(dq,{...e,ref:t})});cq.displayName=af;var ka=10,[fq,Gl]=rp(af),uje="SelectContentImpl",dq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=ql(af,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Gt(t,Ee=>O(Ee)),[M,L]=y.useState(null),[U,H]=y.useState(null),V=c2(n),[ne,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return Cm(S)},[S]),nw();const q=y.useCallback(Ee=>{const[it,...ke]=V().map(me=>me.ref.current),[Le]=ke.slice(-1),De=document.activeElement;for(const me of Ee)if(me===De||(me?.scrollIntoView({block:"nearest"}),me===it&&E&&(E.scrollTop=0),me===Le&&E&&(E.scrollTop=E.scrollHeight),me?.focus(),document.activeElement!==De))return},[V,E]),W=y.useCallback(()=>q([M,S]),[q,M,S]);y.useEffect(()=>{ne&&W()},[ne,W]);const{onOpenChange:j,triggerPointerDownPosRef:K}=x;y.useEffect(()=>{if(S){let Ee={x:0,y:0};const it=Le=>{Ee={x:Math.abs(Math.round(Le.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(K.current?.y??0))}},ke=Le=>{Ee.x<=10&&Ee.y<=10?Le.preventDefault():S.contains(Le.target)||j(!1),document.removeEventListener("pointermove",it),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",it),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",it),document.removeEventListener("pointerup",ke,{capture:!0})}}},[S,j,K]),y.useEffect(()=>{const Ee=()=>j(!1);return window.addEventListener("blur",Ee),window.addEventListener("resize",Ee),()=>{window.removeEventListener("blur",Ee),window.removeEventListener("resize",Ee)}},[j]);const[Y,oe]=Tq(Ee=>{const it=V().filter(De=>!De.disabled),ke=it.find(De=>De.ref.current===document.activeElement),Le=Mq(it,Ee,ke);Le&&setTimeout(()=>Le.ref.current.focus())}),ae=y.useCallback((Ee,it,ke)=>{const Le=!G.current&&!ke;(x.value!==void 0&&x.value===it||Le)&&(L(Ee),Le&&(G.current=!0))},[x.value]),ue=y.useCallback(()=>S?.focus(),[S]),be=y.useCallback((Ee,it,ke)=>{const Le=!G.current&&!ke;(x.value!==void 0&&x.value===it||Le)&&H(Ee)},[x.value]),we=r==="popper"?J6:hq,He=we===J6?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return I.jsx(fq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:ae,selectedItem:M,onItemLeave:ue,itemTextRefCallback:be,focusSelectedItem:W,selectedItemText:U,position:r,isPositioned:ne,searchRef:Y,children:I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(_m,{asChild:!0,trapped:x.open,onMountAutoFocus:Ee=>{Ee.preventDefault()},onUnmountAutoFocus:Ye(i,Ee=>{x.trigger?.focus({preventScroll:!0}),Ee.preventDefault()}),children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:Ee=>Ee.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(we,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:Ee=>Ee.preventDefault(),...w,...He,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,Ee=>{const it=Ee.ctrlKey||Ee.altKey||Ee.metaKey;if(Ee.key==="Tab"&&Ee.preventDefault(),!it&&Ee.key.length===1&&oe(Ee.key),["ArrowUp","ArrowDown","Home","End"].includes(Ee.key)){let Le=V().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(Ee.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(Ee.key)){const De=Ee.target,me=Le.indexOf(De);Le=Le.slice(me+1)}setTimeout(()=>q(Le)),Ee.preventDefault()}})})})})})})});dq.displayName=uje;var lje="SelectItemAlignedPosition",hq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ql(af,n),a=Gl(af,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Gt(t,k=>c(k)),h=c2(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const De=U.left-M.left,me=L.left-De,yt=k.left-me,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-ka,nn=Q6(me,[ka,Math.max(ka,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const De=M.right-U.right,me=window.innerWidth-L.right-De,yt=window.innerWidth-k.right-me,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-ka,nn=Q6(me,[ka,Math.max(ka,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const H=h(),V=window.innerHeight-ka*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),q=parseInt(Z.paddingTop,10),W=parseInt(Z.borderBottomWidth,10),j=parseInt(Z.paddingBottom,10),K=G+q+ne+j+W,Y=Math.min(b.offsetHeight*5,K),oe=window.getComputedStyle(v),ae=parseInt(oe.paddingTop,10),ue=parseInt(oe.paddingBottom,10),be=k.top+k.height/2-ka,we=V-be,He=b.offsetHeight/2,Ee=b.offsetTop+He,it=G+q+Ee,ke=K-it;if(it<=be){const De=H.length>0&&b===H[H.length-1].ref.current;s.style.bottom="0px";const me=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(we,He+(De?ue:0)+me+W),lt=it+yt;s.style.height=lt+"px"}else{const De=H.length>0&&b===H[0].ref.current;s.style.top="0px";const yt=Math.max(be,G+v.offsetTop+(De?ae:0)+He)+ke;s.style.height=yt+"px",v.scrollTop=it-be+v.offsetTop}s.style.margin=`${ka}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return I.jsx(fje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:I.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:I.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});hq.displayName=lje;var cje="SelectPopperPosition",J6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ka,...o}=e,a=f2(n);return I.jsx(sw,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J6.displayName=cje;var[fje,BA]=rp(af,{}),e4="SelectViewport",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Gl(e4,n),a=BA(e4,n),s=Gt(t,o.onViewportChange),u=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(l2.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-ka*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});pq.displayName=e4;var gq="SelectGroup",[dje,hje]=rp(gq),mq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Fo();return I.jsx(dje,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});mq.displayName=gq;var vq="SelectLabel",yq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hje(vq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});yq.displayName=vq;var dx="SelectItem",[pje,bq]=rp(dx),xq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=ql(dx,n),u=Gl(dx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Gt(t,x=>u.itemRefCallback?.(x,r,i)),v=Fo(),b=y.useRef("touch"),w=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(pje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(l2.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(tje.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});xq.displayName=dx;var l0="SelectItemText",wq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=ql(l0,n),s=Gl(l0,n),u=bq(l0,n),l=oje(l0,n),[c,f]=y.useState(null),h=Gt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>I.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Au.createPortal(o.children,a.valueNode):null]})});wq.displayName=l0;var _q="SelectItemIndicator",Sq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return bq(_q,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Sq.displayName=_q;var t4="SelectScrollUpButton",Cq=y.forwardRef((e,t)=>{const n=Gl(t4,e.__scopeSelect),r=BA(t4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Oq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});Cq.displayName=t4;var n4="SelectScrollDownButton",Eq=y.forwardRef((e,t)=>{const n=Gl(n4,e.__scopeSelect),r=BA(n4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Oq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});Eq.displayName=n4;var Oq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Gl("SelectScrollButton",n),a=y.useRef(null),s=c2(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),gje="SelectSeparator",Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Aq.displayName=gje;var r4="SelectArrow",mje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=f2(n),o=ql(r4,n),a=Gl(r4,n);return o.open&&a.position==="popper"?I.jsx(uw,{...i,...r,ref:t}):null});mje.displayName=r4;function Pq(e){return e===""||e===void 0}var kq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Gt(t,i),a=jA(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),I.jsx(wO,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});kq.displayName="BubbleSelect";function Tq(e){const t=Vr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Mq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=vje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function vje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IXe=rq,NXe=oq,LXe=sq,FXe=uq,jXe=lq,BXe=cq,zXe=pq,UXe=mq,VXe=yq,WXe=xq,HXe=wq,KXe=Sq,qXe=Cq,GXe=Eq,YXe=Aq;const zA=6048e5,yje=864e5,bI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&bI in e?e[bI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Rn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Rn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let bje={};function Um(){return bje}function ya(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hx(e){const t=Rn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function uf(e,t){const n=Rn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=wf(n?.in,e,t),o=uf(r),a=uf(i),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/yje)}function xje(e,t){const n=Rq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sf(r)}function i4(e,t,n){return Ui(e,t*7,n)}function wje(e,t,n){return Qa(e,t*12,n)}function _je(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function uo(e,t,n){const[r,i]=wf(n?.in,e,t);return+uf(r)==+uf(i)}function UA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Cje(e){return!(!UA(e)&&typeof e!="number"||isNaN(+Rn(e)))}function nm(e,t,n){const[r,i]=wf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Eje(e,t,n){const[r,i]=wf(n?.in,e,t),o=ya(r,n),a=ya(i,n),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/zA)}function VA(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function go(e,t){const n=Rn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Dq(e,t){const n=Rn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function WA(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o{let r;const i=Oje[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Nd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Pje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mje={date:Nd({formats:Pje,defaultWidth:"full"}),time:Nd({formats:kje,defaultWidth:"full"}),dateTime:Nd({formats:Tje,defaultWidth:"full"})},Rje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dje=(e,t,n,r)=>Rje[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const $je={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ije={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nje={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lje={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Fje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},jje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Bje=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},zje={ordinalNumber:Bje,era:ps({values:$je,defaultWidth:"wide"}),quarter:ps({values:Ije,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:Nje,defaultWidth:"wide"}),day:ps({values:Lje,defaultWidth:"wide"}),dayPeriod:ps({values:Fje,defaultWidth:"wide",formattingValues:jje,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Vje(s,f=>f.test(a)):Uje(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function Uje(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Vje(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Wje=/^(\d+)(th|st|nd|rd)?/i,Hje=/\d+/i,Kje={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qje={any:[/^b/i,/^(a|c)/i]},Gje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yje={any:[/1/i,/2/i,/3/i,/4/i]},Zje={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xje={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qje={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Jje={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nBe={ordinalNumber:Iq({matchPattern:Wje,parsePattern:Hje,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:Kje,defaultMatchWidth:"wide",parsePatterns:qje,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Gje,defaultMatchWidth:"wide",parsePatterns:Yje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Zje,defaultMatchWidth:"wide",parsePatterns:Xje,defaultParseWidth:"any"}),day:gs({matchPatterns:Qje,defaultMatchWidth:"wide",parsePatterns:Jje,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:eBe,defaultMatchWidth:"any",parsePatterns:tBe,defaultParseWidth:"any"})},Nq={code:"en-US",formatDistance:Aje,formatLong:Mje,formatRelative:Dje,localize:zje,match:nBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rBe(e,t){const n=Rn(e,t?.in);return xs(n,Dq(n))+1}function Lq(e,t){const n=Rn(e,t?.in),r=+sf(n)-+xje(n);return Math.round(r/zA)+1}function Fq(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=Um(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ya(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ya(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function iBe(e,t){const n=Um(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Fq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ya(o,t)}function jq(e,t){const n=Rn(e,t?.in),r=+ya(n,t)-+iBe(n,t);return Math.round(r/zA)+1}function Tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tn(n+1,2)},d(e,t){return Tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tn(e.getHours()%12||12,t.length)},H(e,t){return Tn(e.getHours(),t.length)},m(e,t){return Tn(e.getMinutes(),t.length)},s(e,t){return Tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tn(i,t.length)}},Qf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=Fq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Tn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Tn(o,t.length)},R:function(e,t){const n=Rq(e);return Tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=jq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tn(i,t.length)},I:function(e,t,n){const r=Lq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=rBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Tn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Tn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qf.noon:r===0?i=Qf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qf.evening:r>=12?i=Qf.afternoon:r>=4?i=Qf.morning:i=Qf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _I(r);case"XXXX":case"XX":return pc(r);case"XXXXX":case"XXX":default:return pc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _I(r);case"xxxx":case"xx":return pc(r);case"xxxxx":case"xxx":default:return pc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wI(r,":");case"OOOO":default:return"GMT"+pc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wI(r,":");case"zzzz":default:return"GMT"+pc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tn(r,t.length)},T:function(e,t,n){return Tn(+e,t.length)}};function wI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Tn(o,2)}function _I(e,t){return e%60===0?(e>0?"-":"+")+Tn(Math.abs(e)/60,2):pc(e,t)}function pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tn(Math.trunc(r/60),2),o=Tn(r%60,2);return n+i+t+o}const SI=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Bq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},oBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return SI(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",SI(r,t)).replace("{{time}}",Bq(i,t))},aBe={p:Bq,P:oBe},sBe=/^D+$/,uBe=/^Y+$/,lBe=["D","DD","YY","YYYY"];function cBe(e){return sBe.test(e)}function fBe(e){return uBe.test(e)}function dBe(e,t,n){const r=hBe(e,t,n);if(console.warn(r),lBe.includes(e))throw new RangeError(r)}function hBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const pBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mBe=/^'([^]*?)'?$/,vBe=/''/g,yBe=/[a-zA-Z]/;function _f(e,t,n){const r=Um(),i=n?.locale??r.locale??Nq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Rn(e,n?.in);if(!Cje(s))throw new RangeError("Invalid time value");let u=t.match(gBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=aBe[f];return h(c,i.formatLong)}return c}).join("").match(pBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:bBe(c)};if(xI[f])return{isToken:!0,value:c};if(f.match(yBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&fBe(f)||!n?.useAdditionalDayOfYearTokens&&cBe(f))&&dBe(f,t,String(e));const h=xI[f[0]];return h(s,f,i.localize,l)}).join("")}function bBe(e){const t=e.match(mBe);return t?t[1].replace(vBe,"'"):e}function xBe(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function wBe(e){return Math.trunc(+Rn(e)/1e3)}function _Be(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Rn(n,t?.in)}function SBe(e,t){const n=Rn(e,t?.in);return Eje(_Be(n,t),go(n,t),t)+1}function o4(e,t){return+Rn(e)>+Rn(t)}function zq(e,t){return+Rn(e)<+Rn(t)}function CBe(e,t,n){const[r,i]=wf(n?.in,e,t);return+ya(r,n)==+ya(i,n)}function HA(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function EBe(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function c3(e,t,n){return Ui(e,-t,n)}function f3(e,t,n){const r=Rn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=xBe(a);return r.setMonth(t,Math.min(o,s)),r}function CI(e,t,n){const r=Rn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function ZXe(e){return uf(Date.now(),e)}const OBe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},ABe=(e,t,n)=>{let r;const i=OBe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},PBe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},kBe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},TBe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},MBe={date:Nd({formats:PBe,defaultWidth:"full"}),time:Nd({formats:kBe,defaultWidth:"full"}),dateTime:Nd({formats:TBe,defaultWidth:"full"})};function EI(e,t,n){const r="eeee p";return CBe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const RBe={lastWeek:EI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:EI,other:"PP p"},DBe=(e,t,n,r)=>{const i=RBe[e];return typeof i=="function"?i(t,n,r):i},$Be={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},IBe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},NBe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},LBe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},FBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},jBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},BBe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},zBe={ordinalNumber:BBe,era:ps({values:$Be,defaultWidth:"wide"}),quarter:ps({values:IBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:NBe,defaultWidth:"wide"}),day:ps({values:LBe,defaultWidth:"wide"}),dayPeriod:ps({values:FBe,defaultWidth:"wide",formattingValues:jBe,defaultFormattingWidth:"wide"})},UBe=/^(第\s*)?\d+(日|时|分|秒)?/i,VBe=/\d+/i,WBe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},HBe={any:[/^(前)/i,/^(公元)/i]},KBe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},qBe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},GBe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},YBe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},ZBe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},XBe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},QBe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},JBe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},eze={ordinalNumber:Iq({matchPattern:UBe,parsePattern:VBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:WBe,defaultMatchWidth:"wide",parsePatterns:HBe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:KBe,defaultMatchWidth:"wide",parsePatterns:qBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:GBe,defaultMatchWidth:"wide",parsePatterns:YBe,defaultParseWidth:"any"}),day:gs({matchPatterns:ZBe,defaultMatchWidth:"wide",parsePatterns:XBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:QBe,defaultMatchWidth:"any",parsePatterns:JBe,defaultParseWidth:"any"})},XXe={code:"zh-CN",formatDistance:ABe,formatLong:MBe,formatRelative:DBe,localize:zBe,match:eze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return I.jsx(Dze,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function $ze(e){var t,n=Kn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Wq,l;return i?l=I.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(OI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(OI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(AI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(AI,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Ize(e){var t=Kn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Nze(e,t,n){for(var r=n?sf(new Date):ya(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Lze(){var e=Kn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=Nze(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function Fze(){var e,t=Kn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Lze;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function jze(e){var t=Kn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var KA=y.createContext(void 0);function Bze(e){if(!Vm(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(KA.Provider,{value:t,children:e.children})}return I.jsx(zze,{initialProps:e.initialProps,children:e.children})}function zze(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?Uq([],r):[];if(c.selected){var w=b.findIndex(function(x){return uo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return uo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return I.jsx(KA.Provider,{value:u,children:n})}function qA(){var e=y.useContext(KA);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Uze(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?uo(i,e)&&uo(r,e)?void 0:uo(i,e)?{from:i,to:void 0}:uo(r,e)?void 0:o4(r,e)?{from:e,to:i}:{from:r,to:e}:i?o4(e,i)?{from:i,to:e}:{from:e,to:i}:r?zq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var GA=y.createContext(void 0);function Vze(e){if(!Wm(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(GA.Provider,{value:t,children:e.children})}return I.jsx(Wze,{initialProps:e.initialProps,children:e.children})}function Wze(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=Uze(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],uo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:c3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:c3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:c3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return I.jsx(GA.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function YA(){var e=y.useContext(GA);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function ry(e){return Array.isArray(e)?Uq([],e):e!==void 0?[e]:[]}function Hze(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=ry(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var Kze=Ja.Selected,Ys=Ja.Disabled,qze=Ja.Hidden,Gze=Ja.Today,d3=Ja.RangeEnd,h3=Ja.RangeMiddle,p3=Ja.RangeStart,Yze=Ja.Outside;function Zze(e,t,n){var r,i=(r={},r[Kze]=ry(e.selected),r[Ys]=ry(e.disabled),r[qze]=ry(e.hidden),r[Gze]=[e.today],r[d3]=[],r[h3]=[],r[p3]=[],r[Yze]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),Vm(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Wm(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[p3]=n.modifiers[p3],i[h3]=n.modifiers[h3],i[d3]=n.modifiers[d3]),i}var qq=y.createContext(void 0);function Xze(e){var t=Kn(),n=qA(),r=YA(),i=Zze(t,n,r),o=Hze(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(qq.Provider,{value:a,children:e.children})}function Gq(){var e=y.useContext(qq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Qze(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Jze(e){return!!(e&&typeof e=="object"&&"from"in e)}function eUe(e){return!!(e&&typeof e=="object"&&"after"in e)}function tUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function nUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function rUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?uo(i,e):r?uo(r,e):!1}function iUe(e){return UA(e)}function oUe(e){return Array.isArray(e)&&e.every(UA)}function aUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(iUe(n))return uo(e,n);if(oUe(n))return n.includes(e);if(Jze(n))return rUe(e,n);if(nUe(n))return n.dayOfWeek.includes(e.getDay());if(Qze(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=o4(n.before,n.after);return s?a&&o:o||a}return eUe(n)?xs(e,n.after)>0:tUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function ZA(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return aUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!HA(e,n)&&(i.outside=!0),i}function sUe(e,t){for(var n=go(e[0]),r=VA(e[e.length-1]),i,o,a=n;a<=r;){var s=ZA(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var uUe=365;function Yq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:i4,month:Qa,year:wje,startOfWeek:function(b){return i.ISOWeek?sf(b):ya(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?$q(b):WA(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=_je([l,p]):r==="after"&&c&&(p=Sje([c,p]));var m=!0;if(o){var v=ZA(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>uUe?s.lastFocused:Yq(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var Zq=y.createContext(void 0);function lUe(e){var t=Hm(),n=Gq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=sUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=Kn(),m=function(b,w){if(i){var x=Yq(i,{moveBy:b,direction:w,context:p,modifiers:n});uo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return I.jsx(Zq.Provider,{value:v,children:e.children})}function XA(){var e=y.useContext(Zq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function cUe(e,t){var n=Gq(),r=ZA(e,n,t);return r}var QA=y.createContext(void 0);function fUe(e){if(!d2(e.initialProps)){var t={selected:void 0};return I.jsx(QA.Provider,{value:t,children:e.children})}return I.jsx(dUe,{initialProps:e.initialProps,children:e.children})}function dUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return I.jsx(QA.Provider,{value:i,children:n})}function Xq(){var e=y.useContext(QA);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hUe(e,t){var n=Kn(),r=Xq(),i=qA(),o=YA(),a=XA(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(W){var j,K,Y,oe;d2(n)?(j=r.onDayClick)===null||j===void 0||j.call(r,e,t,W):Vm(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,W):Wm(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,W):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,W)},O=function(W){var j;h(e),(j=n.onDayFocus)===null||j===void 0||j.call(n,e,t,W)},E=function(W){var j;f(),(j=n.onDayBlur)===null||j===void 0||j.call(n,e,t,W)},C=function(W){var j;(j=n.onDayMouseEnter)===null||j===void 0||j.call(n,e,t,W)},k=function(W){var j;(j=n.onDayMouseLeave)===null||j===void 0||j.call(n,e,t,W)},M=function(W){var j;(j=n.onDayPointerEnter)===null||j===void 0||j.call(n,e,t,W)},L=function(W){var j;(j=n.onDayPointerLeave)===null||j===void 0||j.call(n,e,t,W)},U=function(W){var j;(j=n.onDayTouchCancel)===null||j===void 0||j.call(n,e,t,W)},H=function(W){var j;(j=n.onDayTouchEnd)===null||j===void 0||j.call(n,e,t,W)},V=function(W){var j;(j=n.onDayTouchMove)===null||j===void 0||j.call(n,e,t,W)},ne=function(W){var j;(j=n.onDayTouchStart)===null||j===void 0||j.call(n,e,t,W)},Z=function(W){var j;(j=n.onDayKeyUp)===null||j===void 0||j.call(n,e,t,W)},G=function(W){var j;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),l();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),c();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():p();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?b():m();break;case"Home":W.preventDefault(),W.stopPropagation(),w();break;case"End":W.preventDefault(),W.stopPropagation(),x();break}(j=n.onDayKeyDown)===null||j===void 0||j.call(n,e,t,W)},q={onClick:S,onFocus:O,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:L,onTouchCancel:U,onTouchEnd:H,onTouchMove:V,onTouchStart:ne};return q}function pUe(){var e=Kn(),t=Xq(),n=qA(),r=YA(),i=d2(e)?t.selected:Vm(e)?n.selected:Wm(e)?r.selected:void 0;return i}function gUe(e){return Object.values(Ja).includes(e)}function mUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(gUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function vUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function yUe(e,t,n){var r,i,o,a=Kn(),s=XA(),u=cUe(e,t),l=hUe(e,u),c=pUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&uo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=mUe(a,u).join(" "),p=vUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:jze,b=I.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&uo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&uo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function bUe(e){var t=y.useRef(null),n=yUe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(px,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function xUe(e){var t=e.number,n=e.dates,r=Kn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return I.jsx(px,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function wUe(e){var t,n,r=Kn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:bUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:xUe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(u,{displayMonth:e.displayMonth,date:f})},wBe(f))})]})}function PI(e,t,n){for(var r=n?.ISOWeek?$q(t):WA(t,n),i=n?.ISOWeek?sf(e):ya(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?Lq(c):jq(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function _Ue(e,t){var n=PI(go(e),VA(e),t);if(t?.useFixedWeeks){var r=SBe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=i4(o,6-r),s=PI(i4(o,1),a,t);n.push.apply(n,s)}}return n}function SUe(e){var t,n,r,i=Kn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=_Ue(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:Fze,b=(n=c?.Row)!==null&&n!==void 0?n:wUe,w=(r=c?.Footer)!==null&&r!==void 0?r:Ize;return I.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&I.jsx(v,{}),I.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function CUe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var EUe=CUe()?y.useLayoutEffect:y.useEffect,g3=!1,OUe=0;function kI(){return"react-day-picker-".concat(++OUe)}function AUe(e){var t,n=e??(g3?kI():null),r=y.useState(n),i=r[0],o=r[1];return EUe(function(){i===null&&o(kI())},[]),y.useEffect(function(){g3===!1&&(g3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function PUe(e){var t,n,r=Kn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Hm().displayMonths,l=AUe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:$ze;return I.jsxs("div",{className:f.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(SUe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function kUe(e){var t=Kn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function TUe(e){var t,n,r=e.initialProps,i=Kn(),o=XA(),a=Hm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:kUe;return I.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(p,{children:a.displayMonths.map(function(m,v){return I.jsx(PUe,{displayIndex:v,displayMonth:m},v)})})}))}function MUe(e){var t=e.children,n=tze(e,["children"]);return I.jsx(xze,{initialProps:n,children:I.jsx(Tze,{children:I.jsx(fUe,{initialProps:n,children:I.jsx(Bze,{initialProps:n,children:I.jsx(Vze,{initialProps:n,children:I.jsx(Xze,{children:I.jsx(lUe,{children:t})})})})})})})}function QXe(e){return I.jsx(MUe,Rt({},e,{children:I.jsx(TUe,{initialProps:e})}))}var JA="Popover",[Qq,JXe]=vi(JA,[zl]),Km=zl(),[RUe,Yl]=Qq(JA),Jq=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Km(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(aw,{...s,children:I.jsx(RUe,{scope:t,contentId:Fo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};Jq.displayName=JA;var eG="PopoverAnchor",DUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(eG,n),o=Km(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),I.jsx(Am,{...o,...r,ref:t})});DUe.displayName=eG;var tG="PopoverTrigger",nG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(tG,n),o=Km(n),a=Gt(t,i.triggerRef),s=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:I.jsx(Am,{asChild:!0,...o,children:s})});nG.displayName=tG;var eP="PopoverPortal",[$Ue,IUe]=Qq(eP,{forceMount:void 0}),rG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Yl(eP,t);return I.jsx($Ue,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};rG.displayName=eP;var Ch="PopoverContent",iG=y.forwardRef((e,t)=>{const n=IUe(Ch,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Yl(Ch,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(NUe,{...i,ref:t}):I.jsx(LUe,{...i,ref:t})})});iG.displayName=Ch;var NUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(null),i=Gt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Cm(a)},[]),I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(oG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),LUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(oG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),oG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Yl(Ch,n),p=Km(n);return nw(),I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(sw,{"data-state":sG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),aG="PopoverClose",FUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(aG,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});FUe.displayName=aG;var jUe="PopoverArrow",BUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Km(n);return I.jsx(uw,{...i,...r,ref:t})});BUe.displayName=jUe;function sG(e){return e?"open":"closed"}var eQe=Jq,tQe=nG,nQe=rG,rQe=iG,gx={exports:{}};/** +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VK(e,t){if(e){if(typeof e=="string")return Z6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z6(e,t)}}function LFe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FFe(e){if(Array.isArray(e))return Z6(e)}function Z6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&qe(i)&&qe(o)?t.slice(i,o+1):[]};function KK(e){return e==="number"?[0,"auto"]:void 0}var X6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=uw(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=fb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Sh(u),[$H(l,h)]):u},[])},mI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=UFe(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=WMe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=X6(t,n,c,f),p=VFe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},WFe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=MH(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Se(Se({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,L=w[a];if(m[L])return m;var U=uw(t.data,{graphicalItems:i.filter(function(ae){var ue,be=a in ae.props?ae.props[a]:(ue=ae.type.defaultProps)===null||ue===void 0?void 0:ue[a];return be===L}),dataStartIndex:u,dataEndIndex:l}),H=U.length,V,ne,Z;mFe(w.domain,O,x)&&(V=f6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=E0(U,S,"category")));var G=KK(x);if(!V||V.length===0){var q,W=(q=w.domain)!==null&&q!==void 0?q:G;if(S){if(V=E0(U,S,x),x==="category"&&p){var j=Rwe(V);E&&j?(ne=V,V=Yb(0,H)):E||(V=W7(W,V,v).reduce(function(ae,ue){return ae.indexOf(ue)>=0?ae:[].concat(Sh(ae),[ue])},[]))}else if(x==="category")E?V=V.filter(function(ae){return ae!==""&&!Ut(ae)}):V=W7(W,V,v).reduce(function(ae,ue){return ae.indexOf(ue)>=0||ue===""||Ut(ue)?ae:[].concat(Sh(ae),[ue])},[]);else if(x==="number"){var K=YMe(U,i.filter(function(ae){var ue,be,we=a in ae.props?ae.props[a]:(ue=ae.type.defaultProps)===null||ue===void 0?void 0:ue[a],He="hide"in ae.props?ae.props.hide:(be=ae.type.defaultProps)===null||be===void 0?void 0:be.hide;return we===L&&(M||!He)}),S,o,c);K&&(V=K)}p&&(x==="number"||C!=="auto")&&(Z=E0(U,S,"category"))}else p?V=Yb(0,H):s&&s[L]&&s[L].hasStack&&x==="number"?V=h==="expand"?[0,1]:DH(s[L].stackGroups,u,l):V=TH(U,i.filter(function(ae){var ue=a in ae.props?ae.props[a]:ae.type.defaultProps[a],be="hide"in ae.props?ae.props.hide:ae.type.defaultProps.hide;return ue===L&&(M||!be)}),x,c,!0);if(x==="number")V=G6(f,V,L,o,k),W&&(V=f6(W,V,O));else if(x==="category"&&W){var Y=W,oe=V.every(function(ae){return Y.indexOf(ae)>=0});oe&&(V=Y)}}return Se(Se({},m),{},kt({},L,Se(Se({},w),{},{axisType:o,domain:V,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:p,layout:c})))},{})},HFe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=uw(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=MH(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Se(Se({},w.type.defaultProps),w.props):w.props,S=x[a],O=KK("number");if(!b[S]){v++;var E;return m?E=Yb(0,p):s&&s[S]&&s[S].hasStack?(E=DH(s[S].stackGroups,u,l),E=G6(f,E,S,o)):(E=f6(O,TH(h,r.filter(function(C){var k,M,L=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],U="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return L===S&&!U}),"number",c),i.defaultProps.allowDataOverflow),E=G6(f,E,S,o)),Se(Se({},b),{},kt({},S,Se(Se({axisType:o},i.defaultProps),{},{hide:!0,orientation:ha(BFe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},KFe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=po(c,o),p={};return h.length?p=WFe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=HFe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},qFe=function(t){var n=rl(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:XO(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bb(n,r)}},vI=function(t){var n=t.children,r=t.defaultShowTooltip,i=To(n,ch),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},GFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fu(n&&n.type);return r&&r.indexOf("Bar")>=0})},yI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},YFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=To(f,ch),m=To(f,Dd),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Se(Se({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Se(Se({},E),{},kt({},M,ha(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Se(Se({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||ch.defaultProps.height),m&&n&&(w=qMe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Se(Se({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},ZFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},XFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,L=w.barSize,U=w.layout,H=w.barGap,V=w.barCategoryGap,ne=w.maxBarSize,Z=yI(U),G=Z.numericAxisName,q=Z.cateAxisName,W=GFe(S),j=[];return S.forEach(function(K,Y){var oe=uw(w.data,{graphicalItems:[K],dataStartIndex:k,dataEndIndex:M}),ae=K.type.defaultProps!==void 0?Se(Se({},K.type.defaultProps),K.props):K.props,ue=ae.dataKey,be=ae.maxBarSize,we=ae["".concat(G,"Id")],He=ae["".concat(q,"Id")],Ee={},it=u.reduce(function(ze,Fe){var Ae=x["".concat(Fe.axisType,"Map")],tt=ae["".concat(Fe.axisType,"Id")];Ae&&Ae[tt]||Fe.axisType==="zAxis"||rf();var mt=Ae[tt];return Se(Se({},ze),{},kt(kt({},Fe.axisType,mt),"".concat(Fe.axisType,"Ticks"),su(mt)))},Ee),ke=it[q],Le=it["".concat(q,"Ticks")],De=O&&O[we]&&O[we].hasStack&&sRe(K,O[we].stackGroups),me=fu(K.type).indexOf("Bar")>=0,yt=Bb(ke,Le),lt=[],Nt=W&&HMe({barSize:L,stackGroups:O,totalSize:ZFe(it,q)});if(me){var yn,nn,te=Ut(be)?ne:be,de=(yn=(nn=Bb(ke,Le,!0))!==null&&nn!==void 0?nn:te)!==null&&yn!==void 0?yn:0;lt=KMe({barGap:H,barCategoryGap:V,bandSize:de!==yt?de:yt,sizeList:Nt[He],maxBarSize:te}),de!==yt&&(lt=lt.map(function(ze){return Se(Se({},ze),{},{position:Se(Se({},ze.position),{},{offset:ze.position.offset-de/2})})}))}var ge=K&&K.type&&K.type.getComposedData;ge&&j.push({props:Se(Se({},ge(Se(Se({},it),{},{displayedData:oe,props:w,dataKey:ue,item:K,bandSize:yt,barPosition:lt,offset:E,stackedData:De,layout:U,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:K.key||"item-".concat(Y)},G,it[G]),q,it[q]),"animationId",C)),childIndex:Wwe(K,w.children),item:K})}),j},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!F9({props:S}))return null;var k=S.children,M=S.layout,L=S.stackOffset,U=S.data,H=S.reverseStackOrder,V=yI(M),ne=V.numericAxisName,Z=V.cateAxisName,G=po(k,r),q=iRe(U,G,"".concat(ne,"Id"),"".concat(Z,"Id"),L,H),W=u.reduce(function(ae,ue){var be="".concat(ue.axisType,"Map");return Se(Se({},ae),{},kt({},be,KFe(S,Se(Se({},ue),{},{graphicalItems:G,stackGroups:ue.axisType===ne&&q,dataStartIndex:O,dataEndIndex:E}))))},{}),j=YFe(Se(Se({},W),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(W).forEach(function(ae){W[ae]=c(S,W[ae],j,ae.replace("Map",""),n)});var K=W["".concat(Z,"Map")],Y=qFe(K),oe=h(S,Se(Se({},W),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:q,offset:j}));return Se(Se({formattedGraphicalItems:oe,graphicalItems:G,offset:j,stackGroups:q},Y),W)},m=function(b){function w(x){var S,O,E;return kFe(this,w),E=RFe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new gFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,L=k.dataEndIndex,U=k.updateId;E.setState(Se({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:L,updateId:U},Se(Se({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var L=E.state.updateId;E.setState(function(){return Se({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:L},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Se(Se({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var L=E.props.onMouseEnter;Ht(L)&&L(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Se(Se({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var L=E.props.onMouseMove;Ht(L)&&L(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Ht(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=Vwe(C),M=ha(E.props,"".concat(k));if(k&&Ht(M)){var L,U;/.*touch.*/i.test(k)?U=E.getMouseInfo(C.changedTouches[0]):U=E.getMouseInfo(C),M((L=U)!==null&&L!==void 0?L:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Se(Se({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var L=E.props.onClick;Ht(L)&&L(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Ht(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Ht(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Ht(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Ht(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&s3.emit(u3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,L=k.syncMethod,U=E.state.updateId,H=C.dataStartIndex,V=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Se({dataStartIndex:H,dataEndIndex:V},p({props:E.props,dataStartIndex:H,dataEndIndex:V,updateId:U},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,q=E.state,W=q.offset,j=q.tooltipTicks;if(!W)return;if(typeof L=="function")G=L(j,C);else if(L==="value"){G=-1;for(var K=0;K=0){var De,me;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());De=fb(K,yt,G),me=Y&&oe&&fb(oe,yt,G)}else De=K?.[Z],me=Y&&oe&&oe[Z];if(He||we){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Se(Se(Se({},L.props),it),{},{activeIndex:lt})),null,null]}if(!Ut(De))return[ke].concat(Sh(E.renderActivePoints({item:L,activePoint:De,basePoint:me,childIndex:Z,isRange:Y})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:ke},nn=yn.graphicalItem,te=nn.item,de=te===void 0?C:te,ge=nn.childIndex,ze=Se(Se(Se({},L.props),it),{},{activeIndex:ge});return[y.cloneElement(de,ze),null,null]}return Y?[ke,null,null]:[ke,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Se(Se({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:O1,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:O1},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:O1},YAxis:{handler:O1},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:vf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=PW(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return IFe(w,b),MFe(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=To(O,Js);if(M){var L=M.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,H=X6(this.state,E,L,U),V=this.state.tooltipTicks[L].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",G=Z?{x:V,y:ne}:{y:V,x:ne},q=this.state.formattedGraphicalItems.find(function(j){var K=j.item;return K.type.name==="Scatter"});q&&(G=Se(Se({},G),q.props.points[L].tooltipPosition),H=q.props.points[L].tooltipPayload);var W={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:U,activePayload:H,activeCoordinate:G};this.setState(W),this.renderCursor(M),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){OE([To(S.children,Js)],[To(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=To(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=mPe(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,L=this.inRange(k.chartX,k.chartY,M);if(!L)return null;var U=this.state,H=U.xAxisMap,V=U.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&H&&V){var Z=rl(H).scale,G=rl(V).scale,q=Z&&Z.invert?Z.invert(k.chartX):null,W=G&&G.invert?G.invert(k.chartY):null;return Se(Se({},k),{},{xValue:q,yValue:W})}var j=mI(this.state,this.props.data,this.props.layout,L);return j?Se(Se({},k),j):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var L=this.state.offset,U=k>=L.left&&k<=L.left+L.width&&M>=L.top&&M<=L.top+L.height;return U?{x:k,y:M}:null}var H=this.state,V=H.angleAxisMap,ne=H.radiusAxisMap;if(V&&ne){var Z=rl(V);return q7({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=To(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=db(this.props,this.handleOuterEvent);return Se(Se({},k),C)}},{key:"addListener",value:function(){s3.on(u3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s3.removeListener(u3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Em(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return I.jsx(JFe,{scope:n,baseId:Fo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});GK.displayName=LA;var YK="TabsList",ZK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=FA(YK,n),a=qK(n);return I.jsx(Uz,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});ZK.displayName=YK;var XK="TabsTrigger",QK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=FA(XK,n),s=qK(n),u=tq(a.baseId,r),l=nq(a.baseId,r),c=r===a.value;return I.jsx(Vz,{asChild:!0,...s,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});QK.displayName=XK;var JK="TabsContent",eq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=FA(JK,n),u=tq(s.baseId,r),l=nq(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});eq.displayName=JK;function tq(e,t){return`${e}-trigger-${t}`}function nq(e,t){return`${e}-content-${t}`}var $Xe=GK,IXe=ZK,NXe=QK,LXe=eq;function Q6(e,[t,n]){return Math.min(n,Math.max(t,e))}function jA(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var eje=[" ","Enter","ArrowUp","ArrowDown"],tje=[" ","Enter"],zm="Select",[lw,cw,nje]=J5(zm),[rp,FXe]=vi(zm,[nje,zl]),fw=zl(),[rje,ql]=rp(zm),[ije,oje]=rp(zm),rq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=fw(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Em(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[L,U]=Za({prop:a,defaultProp:s,onChange:u}),H=y.useRef(null),V=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),G=Array.from(ne).map(q=>q.props.value).join(";");return I.jsx(a2,{...v,children:I.jsxs(rje,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:Fo(),value:L,onValueChange:U,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(lw.Provider,{scope:t,children:I.jsx(ije,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(q=>{Z(W=>new Set(W).add(q))},[]),onNativeOptionRemove:y.useCallback(q=>{Z(W=>{const j=new Set(W);return j.delete(q),j})},[]),children:n})}),V?I.jsxs(kq,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:L,onChange:q=>U(q.target.value),disabled:h,form:m,children:[L===void 0?I.jsx("option",{value:""}):null,Array.from(ne)]},G):null]})})};rq.displayName=zm;var iq="SelectTrigger",oq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=fw(n),a=ql(iq,n),s=a.disabled||r,u=Yt(t,a.onTriggerChange),l=cw(n),c=y.useRef("touch"),[f,h,p]=Tq(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Mq(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return I.jsx(Am,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Pq(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&eje.includes(v.key)&&(m(),v.preventDefault())})})})});oq.displayName=iq;var aq="SelectValue",sq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=ql(aq,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Yt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:Pq(u.value)?I.jsx(I.Fragment,{children:a}):o})});sq.displayName=aq;var aje="SelectIcon",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});uq.displayName=aje;var sje="SelectPortal",lq=e=>I.jsx(Lh,{asChild:!0,...e});lq.displayName=sje;var af="SelectContent",cq=y.forwardRef((e,t)=>{const n=ql(af,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Au.createPortal(I.jsx(fq,{scope:e.__scopeSelect,children:I.jsx(lw.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(dq,{...e,ref:t})});cq.displayName=af;var ka=10,[fq,Gl]=rp(af),uje="SelectContentImpl",dq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=ql(af,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Yt(t,Ee=>O(Ee)),[M,L]=y.useState(null),[U,H]=y.useState(null),V=cw(n),[ne,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return Cm(S)},[S]),n2();const q=y.useCallback(Ee=>{const[it,...ke]=V().map(me=>me.ref.current),[Le]=ke.slice(-1),De=document.activeElement;for(const me of Ee)if(me===De||(me?.scrollIntoView({block:"nearest"}),me===it&&E&&(E.scrollTop=0),me===Le&&E&&(E.scrollTop=E.scrollHeight),me?.focus(),document.activeElement!==De))return},[V,E]),W=y.useCallback(()=>q([M,S]),[q,M,S]);y.useEffect(()=>{ne&&W()},[ne,W]);const{onOpenChange:j,triggerPointerDownPosRef:K}=x;y.useEffect(()=>{if(S){let Ee={x:0,y:0};const it=Le=>{Ee={x:Math.abs(Math.round(Le.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(K.current?.y??0))}},ke=Le=>{Ee.x<=10&&Ee.y<=10?Le.preventDefault():S.contains(Le.target)||j(!1),document.removeEventListener("pointermove",it),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",it),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",it),document.removeEventListener("pointerup",ke,{capture:!0})}}},[S,j,K]),y.useEffect(()=>{const Ee=()=>j(!1);return window.addEventListener("blur",Ee),window.addEventListener("resize",Ee),()=>{window.removeEventListener("blur",Ee),window.removeEventListener("resize",Ee)}},[j]);const[Y,oe]=Tq(Ee=>{const it=V().filter(De=>!De.disabled),ke=it.find(De=>De.ref.current===document.activeElement),Le=Mq(it,Ee,ke);Le&&setTimeout(()=>Le.ref.current.focus())}),ae=y.useCallback((Ee,it,ke)=>{const Le=!G.current&&!ke;(x.value!==void 0&&x.value===it||Le)&&(L(Ee),Le&&(G.current=!0))},[x.value]),ue=y.useCallback(()=>S?.focus(),[S]),be=y.useCallback((Ee,it,ke)=>{const Le=!G.current&&!ke;(x.value!==void 0&&x.value===it||Le)&&H(Ee)},[x.value]),we=r==="popper"?J6:hq,He=we===J6?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return I.jsx(fq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:ae,selectedItem:M,onItemLeave:ue,itemTextRefCallback:be,focusSelectedItem:W,selectedItemText:U,position:r,isPositioned:ne,searchRef:Y,children:I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(_m,{asChild:!0,trapped:x.open,onMountAutoFocus:Ee=>{Ee.preventDefault()},onUnmountAutoFocus:Ye(i,Ee=>{x.trigger?.focus({preventScroll:!0}),Ee.preventDefault()}),children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:Ee=>Ee.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(we,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:Ee=>Ee.preventDefault(),...w,...He,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,Ee=>{const it=Ee.ctrlKey||Ee.altKey||Ee.metaKey;if(Ee.key==="Tab"&&Ee.preventDefault(),!it&&Ee.key.length===1&&oe(Ee.key),["ArrowUp","ArrowDown","Home","End"].includes(Ee.key)){let Le=V().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(Ee.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(Ee.key)){const De=Ee.target,me=Le.indexOf(De);Le=Le.slice(me+1)}setTimeout(()=>q(Le)),Ee.preventDefault()}})})})})})})});dq.displayName=uje;var lje="SelectItemAlignedPosition",hq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ql(af,n),a=Gl(af,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Yt(t,k=>c(k)),h=cw(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const De=U.left-M.left,me=L.left-De,yt=k.left-me,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-ka,nn=Q6(me,[ka,Math.max(ka,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const De=M.right-U.right,me=window.innerWidth-L.right-De,yt=window.innerWidth-k.right-me,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-ka,nn=Q6(me,[ka,Math.max(ka,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const H=h(),V=window.innerHeight-ka*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),q=parseInt(Z.paddingTop,10),W=parseInt(Z.borderBottomWidth,10),j=parseInt(Z.paddingBottom,10),K=G+q+ne+j+W,Y=Math.min(b.offsetHeight*5,K),oe=window.getComputedStyle(v),ae=parseInt(oe.paddingTop,10),ue=parseInt(oe.paddingBottom,10),be=k.top+k.height/2-ka,we=V-be,He=b.offsetHeight/2,Ee=b.offsetTop+He,it=G+q+Ee,ke=K-it;if(it<=be){const De=H.length>0&&b===H[H.length-1].ref.current;s.style.bottom="0px";const me=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(we,He+(De?ue:0)+me+W),lt=it+yt;s.style.height=lt+"px"}else{const De=H.length>0&&b===H[0].ref.current;s.style.top="0px";const yt=Math.max(be,G+v.offsetTop+(De?ae:0)+He)+ke;s.style.height=yt+"px",v.scrollTop=it-be+v.offsetTop}s.style.margin=`${ka}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return I.jsx(fje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:I.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:I.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});hq.displayName=lje;var cje="SelectPopperPosition",J6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ka,...o}=e,a=fw(n);return I.jsx(s2,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J6.displayName=cje;var[fje,BA]=rp(af,{}),e4="SelectViewport",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Gl(e4,n),a=BA(e4,n),s=Yt(t,o.onViewportChange),u=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(lw.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-ka*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});pq.displayName=e4;var gq="SelectGroup",[dje,hje]=rp(gq),mq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Fo();return I.jsx(dje,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});mq.displayName=gq;var vq="SelectLabel",yq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hje(vq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});yq.displayName=vq;var dx="SelectItem",[pje,bq]=rp(dx),xq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=ql(dx,n),u=Gl(dx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Yt(t,x=>u.itemRefCallback?.(x,r,i)),v=Fo(),b=y.useRef("touch"),w=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(pje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(lw.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(tje.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});xq.displayName=dx;var l0="SelectItemText",wq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=ql(l0,n),s=Gl(l0,n),u=bq(l0,n),l=oje(l0,n),[c,f]=y.useState(null),h=Yt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>I.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Au.createPortal(o.children,a.valueNode):null]})});wq.displayName=l0;var _q="SelectItemIndicator",Sq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return bq(_q,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Sq.displayName=_q;var t4="SelectScrollUpButton",Cq=y.forwardRef((e,t)=>{const n=Gl(t4,e.__scopeSelect),r=BA(t4,e.__scopeSelect),[i,o]=y.useState(!1),a=Yt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Oq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});Cq.displayName=t4;var n4="SelectScrollDownButton",Eq=y.forwardRef((e,t)=>{const n=Gl(n4,e.__scopeSelect),r=BA(n4,e.__scopeSelect),[i,o]=y.useState(!1),a=Yt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Oq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});Eq.displayName=n4;var Oq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Gl("SelectScrollButton",n),a=y.useRef(null),s=cw(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),gje="SelectSeparator",Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Aq.displayName=gje;var r4="SelectArrow",mje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fw(n),o=ql(r4,n),a=Gl(r4,n);return o.open&&a.position==="popper"?I.jsx(u2,{...i,...r,ref:t}):null});mje.displayName=r4;function Pq(e){return e===""||e===void 0}var kq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Yt(t,i),a=jA(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),I.jsx(wO,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});kq.displayName="BubbleSelect";function Tq(e){const t=Vr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Mq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=vje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function vje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jXe=rq,BXe=oq,zXe=sq,UXe=uq,VXe=lq,WXe=cq,HXe=pq,KXe=mq,qXe=yq,GXe=xq,YXe=wq,ZXe=Sq,XXe=Cq,QXe=Eq,JXe=Aq;const zA=6048e5,yje=864e5,bI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&bI in e?e[bI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Rn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Rn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let bje={};function Um(){return bje}function ya(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hx(e){const t=Rn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function uf(e,t){const n=Rn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=wf(n?.in,e,t),o=uf(r),a=uf(i),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/yje)}function xje(e,t){const n=Rq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sf(r)}function i4(e,t,n){return Ui(e,t*7,n)}function wje(e,t,n){return Qa(e,t*12,n)}function _je(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function uo(e,t,n){const[r,i]=wf(n?.in,e,t);return+uf(r)==+uf(i)}function UA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Cje(e){return!(!UA(e)&&typeof e!="number"||isNaN(+Rn(e)))}function nm(e,t,n){const[r,i]=wf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Eje(e,t,n){const[r,i]=wf(n?.in,e,t),o=ya(r,n),a=ya(i,n),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/zA)}function VA(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function go(e,t){const n=Rn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Dq(e,t){const n=Rn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function WA(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o{let r;const i=Oje[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Nd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Pje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mje={date:Nd({formats:Pje,defaultWidth:"full"}),time:Nd({formats:kje,defaultWidth:"full"}),dateTime:Nd({formats:Tje,defaultWidth:"full"})},Rje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dje=(e,t,n,r)=>Rje[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const $je={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ije={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nje={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lje={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Fje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},jje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Bje=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},zje={ordinalNumber:Bje,era:ps({values:$je,defaultWidth:"wide"}),quarter:ps({values:Ije,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:Nje,defaultWidth:"wide"}),day:ps({values:Lje,defaultWidth:"wide"}),dayPeriod:ps({values:Fje,defaultWidth:"wide",formattingValues:jje,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Vje(s,f=>f.test(a)):Uje(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function Uje(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Vje(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Wje=/^(\d+)(th|st|nd|rd)?/i,Hje=/\d+/i,Kje={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qje={any:[/^b/i,/^(a|c)/i]},Gje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yje={any:[/1/i,/2/i,/3/i,/4/i]},Zje={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xje={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qje={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Jje={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nBe={ordinalNumber:Iq({matchPattern:Wje,parsePattern:Hje,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:Kje,defaultMatchWidth:"wide",parsePatterns:qje,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Gje,defaultMatchWidth:"wide",parsePatterns:Yje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Zje,defaultMatchWidth:"wide",parsePatterns:Xje,defaultParseWidth:"any"}),day:gs({matchPatterns:Qje,defaultMatchWidth:"wide",parsePatterns:Jje,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:eBe,defaultMatchWidth:"any",parsePatterns:tBe,defaultParseWidth:"any"})},Nq={code:"en-US",formatDistance:Aje,formatLong:Mje,formatRelative:Dje,localize:zje,match:nBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rBe(e,t){const n=Rn(e,t?.in);return xs(n,Dq(n))+1}function Lq(e,t){const n=Rn(e,t?.in),r=+sf(n)-+xje(n);return Math.round(r/zA)+1}function Fq(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=Um(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ya(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ya(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function iBe(e,t){const n=Um(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Fq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ya(o,t)}function jq(e,t){const n=Rn(e,t?.in),r=+ya(n,t)-+iBe(n,t);return Math.round(r/zA)+1}function Tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tn(n+1,2)},d(e,t){return Tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tn(e.getHours()%12||12,t.length)},H(e,t){return Tn(e.getHours(),t.length)},m(e,t){return Tn(e.getMinutes(),t.length)},s(e,t){return Tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tn(i,t.length)}},Qf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=Fq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Tn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Tn(o,t.length)},R:function(e,t){const n=Rq(e);return Tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=jq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tn(i,t.length)},I:function(e,t,n){const r=Lq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=rBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Tn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Tn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qf.noon:r===0?i=Qf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qf.evening:r>=12?i=Qf.afternoon:r>=4?i=Qf.morning:i=Qf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _I(r);case"XXXX":case"XX":return pc(r);case"XXXXX":case"XXX":default:return pc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _I(r);case"xxxx":case"xx":return pc(r);case"xxxxx":case"xxx":default:return pc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wI(r,":");case"OOOO":default:return"GMT"+pc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wI(r,":");case"zzzz":default:return"GMT"+pc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tn(r,t.length)},T:function(e,t,n){return Tn(+e,t.length)}};function wI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Tn(o,2)}function _I(e,t){return e%60===0?(e>0?"-":"+")+Tn(Math.abs(e)/60,2):pc(e,t)}function pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tn(Math.trunc(r/60),2),o=Tn(r%60,2);return n+i+t+o}const SI=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Bq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},oBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return SI(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",SI(r,t)).replace("{{time}}",Bq(i,t))},aBe={p:Bq,P:oBe},sBe=/^D+$/,uBe=/^Y+$/,lBe=["D","DD","YY","YYYY"];function cBe(e){return sBe.test(e)}function fBe(e){return uBe.test(e)}function dBe(e,t,n){const r=hBe(e,t,n);if(console.warn(r),lBe.includes(e))throw new RangeError(r)}function hBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const pBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mBe=/^'([^]*?)'?$/,vBe=/''/g,yBe=/[a-zA-Z]/;function _f(e,t,n){const r=Um(),i=n?.locale??r.locale??Nq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Rn(e,n?.in);if(!Cje(s))throw new RangeError("Invalid time value");let u=t.match(gBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=aBe[f];return h(c,i.formatLong)}return c}).join("").match(pBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:bBe(c)};if(xI[f])return{isToken:!0,value:c};if(f.match(yBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&fBe(f)||!n?.useAdditionalDayOfYearTokens&&cBe(f))&&dBe(f,t,String(e));const h=xI[f[0]];return h(s,f,i.localize,l)}).join("")}function bBe(e){const t=e.match(mBe);return t?t[1].replace(vBe,"'"):e}function xBe(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function wBe(e){return Math.trunc(+Rn(e)/1e3)}function _Be(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Rn(n,t?.in)}function SBe(e,t){const n=Rn(e,t?.in);return Eje(_Be(n,t),go(n,t),t)+1}function o4(e,t){return+Rn(e)>+Rn(t)}function zq(e,t){return+Rn(e)<+Rn(t)}function CBe(e,t,n){const[r,i]=wf(n?.in,e,t);return+ya(r,n)==+ya(i,n)}function HA(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function EBe(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function c3(e,t,n){return Ui(e,-t,n)}function f3(e,t,n){const r=Rn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=xBe(a);return r.setMonth(t,Math.min(o,s)),r}function CI(e,t,n){const r=Rn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function eQe(e){return uf(Date.now(),e)}const OBe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},ABe=(e,t,n)=>{let r;const i=OBe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},PBe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},kBe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},TBe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},MBe={date:Nd({formats:PBe,defaultWidth:"full"}),time:Nd({formats:kBe,defaultWidth:"full"}),dateTime:Nd({formats:TBe,defaultWidth:"full"})};function EI(e,t,n){const r="eeee p";return CBe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const RBe={lastWeek:EI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:EI,other:"PP p"},DBe=(e,t,n,r)=>{const i=RBe[e];return typeof i=="function"?i(t,n,r):i},$Be={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},IBe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},NBe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},LBe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},FBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},jBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},BBe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},zBe={ordinalNumber:BBe,era:ps({values:$Be,defaultWidth:"wide"}),quarter:ps({values:IBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:NBe,defaultWidth:"wide"}),day:ps({values:LBe,defaultWidth:"wide"}),dayPeriod:ps({values:FBe,defaultWidth:"wide",formattingValues:jBe,defaultFormattingWidth:"wide"})},UBe=/^(第\s*)?\d+(日|时|分|秒)?/i,VBe=/\d+/i,WBe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},HBe={any:[/^(前)/i,/^(公元)/i]},KBe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},qBe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},GBe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},YBe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},ZBe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},XBe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},QBe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},JBe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},eze={ordinalNumber:Iq({matchPattern:UBe,parsePattern:VBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:WBe,defaultMatchWidth:"wide",parsePatterns:HBe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:KBe,defaultMatchWidth:"wide",parsePatterns:qBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:GBe,defaultMatchWidth:"wide",parsePatterns:YBe,defaultParseWidth:"any"}),day:gs({matchPatterns:ZBe,defaultMatchWidth:"wide",parsePatterns:XBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:QBe,defaultMatchWidth:"any",parsePatterns:JBe,defaultParseWidth:"any"})},tQe={code:"zh-CN",formatDistance:ABe,formatLong:MBe,formatRelative:DBe,localize:zBe,match:eze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return I.jsx(Dze,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function $ze(e){var t,n=Kn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Wq,l;return i?l=I.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(OI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(OI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(AI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(AI,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Ize(e){var t=Kn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Nze(e,t,n){for(var r=n?sf(new Date):ya(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Lze(){var e=Kn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=Nze(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function Fze(){var e,t=Kn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Lze;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function jze(e){var t=Kn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var KA=y.createContext(void 0);function Bze(e){if(!Vm(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(KA.Provider,{value:t,children:e.children})}return I.jsx(zze,{initialProps:e.initialProps,children:e.children})}function zze(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?Uq([],r):[];if(c.selected){var w=b.findIndex(function(x){return uo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return uo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return I.jsx(KA.Provider,{value:u,children:n})}function qA(){var e=y.useContext(KA);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Uze(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?uo(i,e)&&uo(r,e)?void 0:uo(i,e)?{from:i,to:void 0}:uo(r,e)?void 0:o4(r,e)?{from:e,to:i}:{from:r,to:e}:i?o4(e,i)?{from:i,to:e}:{from:e,to:i}:r?zq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var GA=y.createContext(void 0);function Vze(e){if(!Wm(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(GA.Provider,{value:t,children:e.children})}return I.jsx(Wze,{initialProps:e.initialProps,children:e.children})}function Wze(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=Uze(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],uo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:c3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:c3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:c3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return I.jsx(GA.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function YA(){var e=y.useContext(GA);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function ry(e){return Array.isArray(e)?Uq([],e):e!==void 0?[e]:[]}function Hze(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=ry(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var Kze=Ja.Selected,Ys=Ja.Disabled,qze=Ja.Hidden,Gze=Ja.Today,d3=Ja.RangeEnd,h3=Ja.RangeMiddle,p3=Ja.RangeStart,Yze=Ja.Outside;function Zze(e,t,n){var r,i=(r={},r[Kze]=ry(e.selected),r[Ys]=ry(e.disabled),r[qze]=ry(e.hidden),r[Gze]=[e.today],r[d3]=[],r[h3]=[],r[p3]=[],r[Yze]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),Vm(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Wm(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[p3]=n.modifiers[p3],i[h3]=n.modifiers[h3],i[d3]=n.modifiers[d3]),i}var qq=y.createContext(void 0);function Xze(e){var t=Kn(),n=qA(),r=YA(),i=Zze(t,n,r),o=Hze(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(qq.Provider,{value:a,children:e.children})}function Gq(){var e=y.useContext(qq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Qze(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Jze(e){return!!(e&&typeof e=="object"&&"from"in e)}function eUe(e){return!!(e&&typeof e=="object"&&"after"in e)}function tUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function nUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function rUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?uo(i,e):r?uo(r,e):!1}function iUe(e){return UA(e)}function oUe(e){return Array.isArray(e)&&e.every(UA)}function aUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(iUe(n))return uo(e,n);if(oUe(n))return n.includes(e);if(Jze(n))return rUe(e,n);if(nUe(n))return n.dayOfWeek.includes(e.getDay());if(Qze(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=o4(n.before,n.after);return s?a&&o:o||a}return eUe(n)?xs(e,n.after)>0:tUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function ZA(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return aUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!HA(e,n)&&(i.outside=!0),i}function sUe(e,t){for(var n=go(e[0]),r=VA(e[e.length-1]),i,o,a=n;a<=r;){var s=ZA(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var uUe=365;function Yq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:i4,month:Qa,year:wje,startOfWeek:function(b){return i.ISOWeek?sf(b):ya(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?$q(b):WA(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=_je([l,p]):r==="after"&&c&&(p=Sje([c,p]));var m=!0;if(o){var v=ZA(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>uUe?s.lastFocused:Yq(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var Zq=y.createContext(void 0);function lUe(e){var t=Hm(),n=Gq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=sUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=Kn(),m=function(b,w){if(i){var x=Yq(i,{moveBy:b,direction:w,context:p,modifiers:n});uo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return I.jsx(Zq.Provider,{value:v,children:e.children})}function XA(){var e=y.useContext(Zq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function cUe(e,t){var n=Gq(),r=ZA(e,n,t);return r}var QA=y.createContext(void 0);function fUe(e){if(!dw(e.initialProps)){var t={selected:void 0};return I.jsx(QA.Provider,{value:t,children:e.children})}return I.jsx(dUe,{initialProps:e.initialProps,children:e.children})}function dUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return I.jsx(QA.Provider,{value:i,children:n})}function Xq(){var e=y.useContext(QA);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hUe(e,t){var n=Kn(),r=Xq(),i=qA(),o=YA(),a=XA(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(W){var j,K,Y,oe;dw(n)?(j=r.onDayClick)===null||j===void 0||j.call(r,e,t,W):Vm(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,W):Wm(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,W):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,W)},O=function(W){var j;h(e),(j=n.onDayFocus)===null||j===void 0||j.call(n,e,t,W)},E=function(W){var j;f(),(j=n.onDayBlur)===null||j===void 0||j.call(n,e,t,W)},C=function(W){var j;(j=n.onDayMouseEnter)===null||j===void 0||j.call(n,e,t,W)},k=function(W){var j;(j=n.onDayMouseLeave)===null||j===void 0||j.call(n,e,t,W)},M=function(W){var j;(j=n.onDayPointerEnter)===null||j===void 0||j.call(n,e,t,W)},L=function(W){var j;(j=n.onDayPointerLeave)===null||j===void 0||j.call(n,e,t,W)},U=function(W){var j;(j=n.onDayTouchCancel)===null||j===void 0||j.call(n,e,t,W)},H=function(W){var j;(j=n.onDayTouchEnd)===null||j===void 0||j.call(n,e,t,W)},V=function(W){var j;(j=n.onDayTouchMove)===null||j===void 0||j.call(n,e,t,W)},ne=function(W){var j;(j=n.onDayTouchStart)===null||j===void 0||j.call(n,e,t,W)},Z=function(W){var j;(j=n.onDayKeyUp)===null||j===void 0||j.call(n,e,t,W)},G=function(W){var j;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),l();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),c();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():p();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?b():m();break;case"Home":W.preventDefault(),W.stopPropagation(),w();break;case"End":W.preventDefault(),W.stopPropagation(),x();break}(j=n.onDayKeyDown)===null||j===void 0||j.call(n,e,t,W)},q={onClick:S,onFocus:O,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:L,onTouchCancel:U,onTouchEnd:H,onTouchMove:V,onTouchStart:ne};return q}function pUe(){var e=Kn(),t=Xq(),n=qA(),r=YA(),i=dw(e)?t.selected:Vm(e)?n.selected:Wm(e)?r.selected:void 0;return i}function gUe(e){return Object.values(Ja).includes(e)}function mUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(gUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function vUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function yUe(e,t,n){var r,i,o,a=Kn(),s=XA(),u=cUe(e,t),l=hUe(e,u),c=pUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&uo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=mUe(a,u).join(" "),p=vUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:jze,b=I.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&uo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&uo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function bUe(e){var t=y.useRef(null),n=yUe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(px,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function xUe(e){var t=e.number,n=e.dates,r=Kn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return I.jsx(px,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function wUe(e){var t,n,r=Kn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:bUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:xUe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(u,{displayMonth:e.displayMonth,date:f})},wBe(f))})]})}function PI(e,t,n){for(var r=n?.ISOWeek?$q(t):WA(t,n),i=n?.ISOWeek?sf(e):ya(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?Lq(c):jq(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function _Ue(e,t){var n=PI(go(e),VA(e),t);if(t?.useFixedWeeks){var r=SBe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=i4(o,6-r),s=PI(i4(o,1),a,t);n.push.apply(n,s)}}return n}function SUe(e){var t,n,r,i=Kn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=_Ue(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:Fze,b=(n=c?.Row)!==null&&n!==void 0?n:wUe,w=(r=c?.Footer)!==null&&r!==void 0?r:Ize;return I.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&I.jsx(v,{}),I.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function CUe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var EUe=CUe()?y.useLayoutEffect:y.useEffect,g3=!1,OUe=0;function kI(){return"react-day-picker-".concat(++OUe)}function AUe(e){var t,n=e??(g3?kI():null),r=y.useState(n),i=r[0],o=r[1];return EUe(function(){i===null&&o(kI())},[]),y.useEffect(function(){g3===!1&&(g3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function PUe(e){var t,n,r=Kn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Hm().displayMonths,l=AUe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:$ze;return I.jsxs("div",{className:f.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(SUe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function kUe(e){var t=Kn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function TUe(e){var t,n,r=e.initialProps,i=Kn(),o=XA(),a=Hm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:kUe;return I.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(p,{children:a.displayMonths.map(function(m,v){return I.jsx(PUe,{displayIndex:v,displayMonth:m},v)})})}))}function MUe(e){var t=e.children,n=tze(e,["children"]);return I.jsx(xze,{initialProps:n,children:I.jsx(Tze,{children:I.jsx(fUe,{initialProps:n,children:I.jsx(Bze,{initialProps:n,children:I.jsx(Vze,{initialProps:n,children:I.jsx(Xze,{children:I.jsx(lUe,{children:t})})})})})})})}function nQe(e){return I.jsx(MUe,Rt({},e,{children:I.jsx(TUe,{initialProps:e})}))}var JA="Popover",[Qq,rQe]=vi(JA,[zl]),Km=zl(),[RUe,Yl]=Qq(JA),Jq=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Km(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(a2,{...s,children:I.jsx(RUe,{scope:t,contentId:Fo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};Jq.displayName=JA;var eG="PopoverAnchor",DUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(eG,n),o=Km(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),I.jsx(Am,{...o,...r,ref:t})});DUe.displayName=eG;var tG="PopoverTrigger",nG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(tG,n),o=Km(n),a=Yt(t,i.triggerRef),s=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:I.jsx(Am,{asChild:!0,...o,children:s})});nG.displayName=tG;var eP="PopoverPortal",[$Ue,IUe]=Qq(eP,{forceMount:void 0}),rG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Yl(eP,t);return I.jsx($Ue,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};rG.displayName=eP;var Ch="PopoverContent",iG=y.forwardRef((e,t)=>{const n=IUe(Ch,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Yl(Ch,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(NUe,{...i,ref:t}):I.jsx(LUe,{...i,ref:t})})});iG.displayName=Ch;var NUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(null),i=Yt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Cm(a)},[]),I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(oG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),LUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(oG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),oG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Yl(Ch,n),p=Km(n);return n2(),I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(s2,{"data-state":sG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),aG="PopoverClose",FUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(aG,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});FUe.displayName=aG;var jUe="PopoverArrow",BUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Km(n);return I.jsx(u2,{...i,...r,ref:t})});BUe.displayName=jUe;function sG(e){return e?"open":"closed"}var iQe=Jq,oQe=nG,aQe=rG,sQe=iG,gx={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */gx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,L=512,U=30,H="...",V=800,ne=16,Z=1,G=2,q=3,W=1/0,j=9007199254740991,K=17976931348623157e292,Y=NaN,oe=4294967295,ae=oe-1,ue=oe>>>1,be=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",L],["partial",E],["partialRight",C],["rearg",M]],we="[object Arguments]",He="[object Array]",Ee="[object AsyncFunction]",it="[object Boolean]",ke="[object Date]",Le="[object DOMException]",De="[object Error]",me="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",te="[object Promise]",de="[object Proxy]",ge="[object RegExp]",ze="[object Set]",Fe="[object String]",Ae="[object Symbol]",tt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Ht="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",yo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,_a=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),qn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,bo=/<%=([\s\S]+?)%>/g,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sf=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,se=/[\\^$.*+?()[\]{}|]/g,ve=RegExp(se.source),T=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,N=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,_e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,je=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ie=/^\[object .+?Constructor\]$/,nt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Xe=wt+Qe+ut,Ne="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",pe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",he="\\u2000-\\u206f",Re=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Be=Ge+pe+he+Re,vt="['’]",Lt="["+xt+"]",Ft="["+Be+"]",$t="["+Xe+"]",J="\\d+",Yt="["+Ne+"]",sn="["+Ke+"]",un="[^"+xt+Be+J+Ne+Ke+Oe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+Oe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+Pn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",MP="["+Pe+"]?",hZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+MP+Nr+")*",pZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gZ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RP=MP+Nr+hZ,mZ="(?:"+[Yt,Gn,mn].join("|")+")"+RP,vZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",yZ=RegExp(vt,"g"),bZ=RegExp($t,"g"),_2=RegExp(jt+"(?="+jt+")|"+vZ+RP,"g"),xZ=RegExp([Pn+"?"+sn+"+"+$r+"(?="+[Ft,Pn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,Pn+Zn,"$"].join("|")+")",Pn+"?"+Zn+"+"+$r,Pn+"+"+Ir,gZ,pZ,J,mZ].join("|"),"g"),wZ=RegExp("["+Yn+xt+Xe+Pe+"]"),_Z=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],CZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[yo]=!0,Xn[we]=Xn[He]=Xn[Ht]=Xn[it]=Xn[wn]=Xn[ke]=Xn[De]=Xn[me]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ge]=Xn[ze]=Xn[Fe]=Xn[mt]=!1;var Un={};Un[we]=Un[He]=Un[Ht]=Un[wn]=Un[it]=Un[ke]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ge]=Un[ze]=Un[Fe]=Un[Ae]=Un[bi]=Un[Rr]=Un[Xi]=Un[yo]=!0,Un[De]=Un[me]=Un[mt]=!1;var EZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OZ={"&":"&","<":"<",">":">",'"':""","'":"'"},AZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},PZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kZ=parseFloat,TZ=parseInt,DP=typeof La=="object"&&La&&La.Object===Object&&La,MZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=DP||MZ||Function("return this")(),S2=t&&!t.nodeType&&t,Xl=S2&&!0&&e&&!e.nodeType&&e,$P=Xl&&Xl.exports===S2,C2=$P&&DP.process,qo=function(){try{var le=Xl&&Xl.require&&Xl.require("util").types;return le||C2&&C2.binding&&C2.binding("util")}catch{}}(),IP=qo&&qo.isArrayBuffer,NP=qo&&qo.isDate,LP=qo&&qo.isMap,FP=qo&&qo.isRegExp,jP=qo&&qo.isSet,BP=qo&&qo.isTypedArray;function xo(le,Ce,ye){switch(ye.length){case 0:return le.call(Ce);case 1:return le.call(Ce,ye[0]);case 2:return le.call(Ce,ye[0],ye[1]);case 3:return le.call(Ce,ye[0],ye[1],ye[2])}return le.apply(Ce,ye)}function RZ(le,Ce,ye,ot){for(var Bt=-1,Sn=le==null?0:le.length;++Bt-1}function E2(le,Ce,ye){for(var ot=-1,Bt=le==null?0:le.length;++ot-1;);return ye}function GP(le,Ce){for(var ye=le.length;ye--&&Cf(Ce,le[ye],0)>-1;);return ye}function zZ(le,Ce){for(var ye=le.length,ot=0;ye--;)le[ye]===Ce&&++ot;return ot}var UZ=k2(EZ),VZ=k2(OZ);function WZ(le){return"\\"+PZ[le]}function HZ(le,Ce){return le==null?n:le[Ce]}function Ef(le){return wZ.test(le)}function KZ(le){return _Z.test(le)}function qZ(le){for(var Ce,ye=[];!(Ce=le.next()).done;)ye.push(Ce.value);return ye}function D2(le){var Ce=-1,ye=Array(le.size);return le.forEach(function(ot,Bt){ye[++Ce]=[Bt,ot]}),ye}function YP(le,Ce){return function(ye){return le(Ce(ye))}}function Nu(le,Ce){for(var ye=-1,ot=le.length,Bt=0,Sn=[];++ye-1}function $X(d,g){var _=this.__data__,P=hv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=TX,Ls.prototype.delete=MX,Ls.prototype.get=RX,Ls.prototype.has=DX,Ls.prototype.set=$X;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function IX(){this.size=0,this.__data__={hash:new Jl,map:new(sp||Ls),string:new Jl}}function NX(d){var g=Ev(this,d).delete(d);return this.size-=g?1:0,g}function LX(d){return Ev(this,d).get(d)}function FX(d){return Ev(this,d).has(d)}function jX(d,g){var _=Ev(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=IX,Fs.prototype.delete=NX,Fs.prototype.get=LX,Fs.prototype.has=FX,Fs.prototype.set=jX;function ec(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function BX(d){return this.__data__.set(d,u),this}function zX(d){return this.__data__.has(d)}ec.prototype.add=ec.prototype.push=BX,ec.prototype.has=zX;function Ca(d){var g=this.__data__=new Ls(d);this.size=g.size}function UX(){this.__data__=new Ls,this.size=0}function VX(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function WX(d){return this.__data__.get(d)}function HX(d){return this.__data__.has(d)}function KX(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!sp||P.length=g?d:g)),d}function Xo(d,g,_,P,R,z){var X,ie=g&f,ce=g&h,Te=g&p;if(_&&(X=R?_(d,P,R,z):_(d)),X!==n)return X;if(!lr(d))return d;var Me=Vt(d);if(Me){if(X=FQ(d),!ie)return Qi(d,X)}else{var $e=_i(d),Je=$e==me||$e==yt;if(Uu(d))return M8(d,ie);if($e==nn||$e==we||Je&&!R){if(X=ce||Je?{}:Z8(d),!ie)return ce?AQ(d,ZX(X,d)):OQ(d,s8(X,d))}else{if(!Un[$e])return R?d:{};X=jQ(d,$e,ie)}}z||(z=new Ca);var ft=z.get(d);if(ft)return ft;z.set(d,X),Ek(d)?d.forEach(function(Pt){X.add(Xo(Pt,g,_,Pt,d,z))}):Sk(d)&&d.forEach(function(Pt,on){X.set(on,Xo(Pt,g,_,on,d,z))});var At=Te?ce?o_:i_:ce?eo:Qr,Qt=Me?n:At(d);return Go(Qt||d,function(Pt,on){Qt&&(on=Pt,Pt=d[on]),fp(X,on,Xo(Pt,g,_,on,d,z))}),X}function XX(d){var g=Qr(d);return function(_){return u8(_,d,g)}}function u8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var R=_[P],z=g[R],X=d[R];if(X===n&&!(R in d)||!z(X))return!1}return!0}function l8(d,g,_){if(typeof d!="function")throw new Yo(a);return yp(function(){d.apply(n,_)},g)}function dp(d,g,_,P){var R=-1,z=Zm,X=!0,ie=d.length,ce=[],Te=g.length;if(!ie)return ce;_&&(g=rr(g,wo(_))),P?(z=E2,X=!1):g.length>=i&&(z=op,X=!1,g=new ec(g));e:for(;++RR?0:R+_),P=P===n||P>R?R:Zt(P),P<0&&(P+=R),P=_>P?0:Ak(P);_0&&_(ie)?g>1?li(ie,g-1,_,P,R):Iu(R,ie):P||(R[R.length]=ie)}return R}var B2=L8(),d8=L8(!0);function os(d,g){return d&&B2(d,g,Qr)}function z2(d,g){return d&&d8(d,g,Qr)}function gv(d,g){return $u(g,function(_){return Vs(d[_])})}function nc(d,g){g=Bu(g,d);for(var _=0,P=g.length;d!=null&&_g}function eQ(d,g){return d!=null&&kn.call(d,g)}function tQ(d,g){return d!=null&&g in jn(d)}function nQ(d,g,_){return d>=wi(g,_)&&d=120&&Me.length>=120)?new ec(X&&Me):n}Me=d[0];var $e=-1,Je=ie[0];e:for(;++$e-1;)ie!==d&&av.call(ie,ce,1),av.call(d,ce,1);return d}function S8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var R=g[_];if(_==P||R!==z){var z=R;Us(R)?av.call(d,R,1):X2(d,R)}}return d}function G2(d,g){return d+lv(r8()*(g-d+1))}function gQ(d,g,_,P){for(var R=-1,z=Fr(uv((g-d)/(_||1)),0),X=ye(z);z--;)X[P?z:++R]=d,d+=_;return X}function Y2(d,g){var _="";if(!d||g<1||g>j)return _;do g%2&&(_+=d),g=lv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return d_(J8(d,g,to),d+"")}function mQ(d){return a8(Nf(d))}function vQ(d,g){var _=Nf(d);return Ov(_,tc(g,0,_.length))}function gp(d,g,_,P){if(!lr(d))return d;g=Bu(g,d);for(var R=-1,z=g.length,X=z-1,ie=d;ie!=null&&++RR?0:R+g),_=_>R?R:_,_<0&&(_+=R),R=g>_?0:_-g>>>0,g>>>=0;for(var z=ye(R);++P>>1,X=d[z];X!==null&&!So(X)&&(_?X<=g:X=i){var Te=g?null:MQ(d);if(Te)return Qm(Te);X=!1,R=op,ce=new ec}else ce=g?[]:ie;e:for(;++P=P?d:Qo(d,g,_)}var T8=uX||function(d){return ui.clearTimeout(d)};function M8(d,g){if(g)return d.slice();var _=d.length,P=QP?QP(_):new d.constructor(_);return d.copy(P),P}function t_(d){var g=new d.constructor(d.byteLength);return new iv(g).set(new iv(d)),g}function _Q(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function SQ(d){var g=new d.constructor(d.source,je.exec(d));return g.lastIndex=d.lastIndex,g}function CQ(d){return cp?jn(cp.call(d)):{}}function R8(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function D8(d,g){if(d!==g){var _=d!==n,P=d===null,R=d===d,z=So(d),X=g!==n,ie=g===null,ce=g===g,Te=So(g);if(!ie&&!Te&&!z&&d>g||z&&X&&ce&&!ie&&!Te||P&&X&&ce||!_&&ce||!R)return 1;if(!P&&!z&&!Te&&d=ie)return ce;var Te=_[P];return ce*(Te=="desc"?-1:1)}}return d.index-g.index}function $8(d,g,_,P){for(var R=-1,z=d.length,X=_.length,ie=-1,ce=g.length,Te=Fr(z-X,0),Me=ye(ce+Te),$e=!P;++ie1?_[R-1]:n,X=R>2?_[2]:n;for(z=d.length>3&&typeof z=="function"?(R--,z):n,X&&Li(_[0],_[1],X)&&(z=R<3?n:z,R=1),g=jn(g);++P-1?R[z?g[X]:X]:n}}function B8(d){return zs(function(g){var _=g.length,P=_,R=Zo.prototype.thru;for(d&&g.reverse();P--;){var z=g[P];if(typeof z!="function")throw new Yo(a);if(R&&!X&&Cv(z)=="wrapper")var X=new Zo([],!0)}for(P=X?P:_;++P<_;){z=g[P];var ie=Cv(z),ce=ie=="wrapper"?a_(z):n;ce&&c_(ce[0])&&ce[1]==(k|S|E|M)&&!ce[4].length&&ce[9]==1?X=X[Cv(ce[0])].apply(X,ce[3]):X=z.length==1&&c_(z)?X[ie]():X.thru(z)}return function(){var Te=arguments,Me=Te[0];if(X&&Te.length==1&&Vt(Me))return X.plant(Me).value();for(var $e=0,Je=_?g[$e].apply(this,Te):Me;++$e<_;)Je=g[$e].call(this,Je);return Je}})}function xv(d,g,_,P,R,z,X,ie,ce,Te){var Me=g&k,$e=g&b,Je=g&w,ft=g&(S|O),At=g&L,Qt=Je?n:mp(d);function Pt(){for(var on=arguments.length,pn=ye(on),Co=on;Co--;)pn[Co]=arguments[Co];if(ft)var Fi=$f(Pt),Eo=zZ(pn,Fi);if(P&&(pn=$8(pn,P,R,ft)),z&&(pn=I8(pn,z,X,ft)),on-=Eo,ft&&on1&&pn.reverse(),Me&&ceie))return!1;var Te=z.get(d),Me=z.get(g);if(Te&&Me)return Te==g&&Me==d;var $e=-1,Je=!0,ft=_&v?new ec:n;for(z.set(d,g),z.set(g,d);++$e1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace($,`{ + */gx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,L=512,U=30,H="...",V=800,ne=16,Z=1,G=2,q=3,W=1/0,j=9007199254740991,K=17976931348623157e292,Y=NaN,oe=4294967295,ae=oe-1,ue=oe>>>1,be=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",L],["partial",E],["partialRight",C],["rearg",M]],we="[object Arguments]",He="[object Array]",Ee="[object AsyncFunction]",it="[object Boolean]",ke="[object Date]",Le="[object DOMException]",De="[object Error]",me="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",te="[object Promise]",de="[object Proxy]",ge="[object RegExp]",ze="[object Set]",Fe="[object String]",Ae="[object Symbol]",tt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Kt="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",yo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,_a=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),qn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,bo=/<%=([\s\S]+?)%>/g,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sf=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,se=/[\\^$.*+?()[\]{}|]/g,ve=RegExp(se.source),T=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,N=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,_e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,je=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ie=/^\[object .+?Constructor\]$/,nt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Xe=wt+Qe+ut,Ne="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",pe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",he="\\u2000-\\u206f",Re=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Be=Ge+pe+he+Re,vt="['’]",Lt="["+xt+"]",Ft="["+Be+"]",$t="["+Xe+"]",J="\\d+",Zt="["+Ne+"]",sn="["+Ke+"]",un="[^"+xt+Be+J+Ne+Ke+Oe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+Oe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+Pn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",MP="["+Pe+"]?",hZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+MP+Nr+")*",pZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gZ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RP=MP+Nr+hZ,mZ="(?:"+[Zt,Gn,mn].join("|")+")"+RP,vZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",yZ=RegExp(vt,"g"),bZ=RegExp($t,"g"),_w=RegExp(jt+"(?="+jt+")|"+vZ+RP,"g"),xZ=RegExp([Pn+"?"+sn+"+"+$r+"(?="+[Ft,Pn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,Pn+Zn,"$"].join("|")+")",Pn+"?"+Zn+"+"+$r,Pn+"+"+Ir,gZ,pZ,J,mZ].join("|"),"g"),wZ=RegExp("["+Yn+xt+Xe+Pe+"]"),_Z=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],CZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[yo]=!0,Xn[we]=Xn[He]=Xn[Kt]=Xn[it]=Xn[wn]=Xn[ke]=Xn[De]=Xn[me]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ge]=Xn[ze]=Xn[Fe]=Xn[mt]=!1;var Un={};Un[we]=Un[He]=Un[Kt]=Un[wn]=Un[it]=Un[ke]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ge]=Un[ze]=Un[Fe]=Un[Ae]=Un[bi]=Un[Rr]=Un[Xi]=Un[yo]=!0,Un[De]=Un[me]=Un[mt]=!1;var EZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OZ={"&":"&","<":"<",">":">",'"':""","'":"'"},AZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},PZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kZ=parseFloat,TZ=parseInt,DP=typeof La=="object"&&La&&La.Object===Object&&La,MZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=DP||MZ||Function("return this")(),Sw=t&&!t.nodeType&&t,Xl=Sw&&!0&&e&&!e.nodeType&&e,$P=Xl&&Xl.exports===Sw,Cw=$P&&DP.process,qo=function(){try{var le=Xl&&Xl.require&&Xl.require("util").types;return le||Cw&&Cw.binding&&Cw.binding("util")}catch{}}(),IP=qo&&qo.isArrayBuffer,NP=qo&&qo.isDate,LP=qo&&qo.isMap,FP=qo&&qo.isRegExp,jP=qo&&qo.isSet,BP=qo&&qo.isTypedArray;function xo(le,Ce,ye){switch(ye.length){case 0:return le.call(Ce);case 1:return le.call(Ce,ye[0]);case 2:return le.call(Ce,ye[0],ye[1]);case 3:return le.call(Ce,ye[0],ye[1],ye[2])}return le.apply(Ce,ye)}function RZ(le,Ce,ye,ot){for(var Bt=-1,Sn=le==null?0:le.length;++Bt-1}function Ew(le,Ce,ye){for(var ot=-1,Bt=le==null?0:le.length;++ot-1;);return ye}function GP(le,Ce){for(var ye=le.length;ye--&&Cf(Ce,le[ye],0)>-1;);return ye}function zZ(le,Ce){for(var ye=le.length,ot=0;ye--;)le[ye]===Ce&&++ot;return ot}var UZ=kw(EZ),VZ=kw(OZ);function WZ(le){return"\\"+PZ[le]}function HZ(le,Ce){return le==null?n:le[Ce]}function Ef(le){return wZ.test(le)}function KZ(le){return _Z.test(le)}function qZ(le){for(var Ce,ye=[];!(Ce=le.next()).done;)ye.push(Ce.value);return ye}function Dw(le){var Ce=-1,ye=Array(le.size);return le.forEach(function(ot,Bt){ye[++Ce]=[Bt,ot]}),ye}function YP(le,Ce){return function(ye){return le(Ce(ye))}}function Nu(le,Ce){for(var ye=-1,ot=le.length,Bt=0,Sn=[];++ye-1}function $X(d,g){var _=this.__data__,P=hv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=TX,Ls.prototype.delete=MX,Ls.prototype.get=RX,Ls.prototype.has=DX,Ls.prototype.set=$X;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function IX(){this.size=0,this.__data__={hash:new Jl,map:new(sp||Ls),string:new Jl}}function NX(d){var g=Ev(this,d).delete(d);return this.size-=g?1:0,g}function LX(d){return Ev(this,d).get(d)}function FX(d){return Ev(this,d).has(d)}function jX(d,g){var _=Ev(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=IX,Fs.prototype.delete=NX,Fs.prototype.get=LX,Fs.prototype.has=FX,Fs.prototype.set=jX;function ec(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function BX(d){return this.__data__.set(d,u),this}function zX(d){return this.__data__.has(d)}ec.prototype.add=ec.prototype.push=BX,ec.prototype.has=zX;function Ca(d){var g=this.__data__=new Ls(d);this.size=g.size}function UX(){this.__data__=new Ls,this.size=0}function VX(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function WX(d){return this.__data__.get(d)}function HX(d){return this.__data__.has(d)}function KX(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!sp||P.length=g?d:g)),d}function Xo(d,g,_,P,R,z){var X,ie=g&f,ce=g&h,Te=g&p;if(_&&(X=R?_(d,P,R,z):_(d)),X!==n)return X;if(!lr(d))return d;var Me=Wt(d);if(Me){if(X=FQ(d),!ie)return Qi(d,X)}else{var $e=_i(d),Je=$e==me||$e==yt;if(Uu(d))return M8(d,ie);if($e==nn||$e==we||Je&&!R){if(X=ce||Je?{}:Z8(d),!ie)return ce?AQ(d,ZX(X,d)):OQ(d,s8(X,d))}else{if(!Un[$e])return R?d:{};X=jQ(d,$e,ie)}}z||(z=new Ca);var ft=z.get(d);if(ft)return ft;z.set(d,X),Ek(d)?d.forEach(function(Pt){X.add(Xo(Pt,g,_,Pt,d,z))}):Sk(d)&&d.forEach(function(Pt,on){X.set(on,Xo(Pt,g,_,on,d,z))});var At=Te?ce?o_:i_:ce?eo:Qr,Jt=Me?n:At(d);return Go(Jt||d,function(Pt,on){Jt&&(on=Pt,Pt=d[on]),fp(X,on,Xo(Pt,g,_,on,d,z))}),X}function XX(d){var g=Qr(d);return function(_){return u8(_,d,g)}}function u8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var R=_[P],z=g[R],X=d[R];if(X===n&&!(R in d)||!z(X))return!1}return!0}function l8(d,g,_){if(typeof d!="function")throw new Yo(a);return yp(function(){d.apply(n,_)},g)}function dp(d,g,_,P){var R=-1,z=Zm,X=!0,ie=d.length,ce=[],Te=g.length;if(!ie)return ce;_&&(g=rr(g,wo(_))),P?(z=Ew,X=!1):g.length>=i&&(z=op,X=!1,g=new ec(g));e:for(;++RR?0:R+_),P=P===n||P>R?R:Xt(P),P<0&&(P+=R),P=_>P?0:Ak(P);_0&&_(ie)?g>1?li(ie,g-1,_,P,R):Iu(R,ie):P||(R[R.length]=ie)}return R}var Bw=L8(),d8=L8(!0);function os(d,g){return d&&Bw(d,g,Qr)}function zw(d,g){return d&&d8(d,g,Qr)}function gv(d,g){return $u(g,function(_){return Vs(d[_])})}function nc(d,g){g=Bu(g,d);for(var _=0,P=g.length;d!=null&&_g}function eQ(d,g){return d!=null&&kn.call(d,g)}function tQ(d,g){return d!=null&&g in jn(d)}function nQ(d,g,_){return d>=wi(g,_)&&d=120&&Me.length>=120)?new ec(X&&Me):n}Me=d[0];var $e=-1,Je=ie[0];e:for(;++$e-1;)ie!==d&&av.call(ie,ce,1),av.call(d,ce,1);return d}function S8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var R=g[_];if(_==P||R!==z){var z=R;Us(R)?av.call(d,R,1):Xw(d,R)}}return d}function Gw(d,g){return d+lv(r8()*(g-d+1))}function gQ(d,g,_,P){for(var R=-1,z=Fr(uv((g-d)/(_||1)),0),X=ye(z);z--;)X[P?z:++R]=d,d+=_;return X}function Yw(d,g){var _="";if(!d||g<1||g>j)return _;do g%2&&(_+=d),g=lv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return d_(J8(d,g,to),d+"")}function mQ(d){return a8(Nf(d))}function vQ(d,g){var _=Nf(d);return Ov(_,tc(g,0,_.length))}function gp(d,g,_,P){if(!lr(d))return d;g=Bu(g,d);for(var R=-1,z=g.length,X=z-1,ie=d;ie!=null&&++RR?0:R+g),_=_>R?R:_,_<0&&(_+=R),R=g>_?0:_-g>>>0,g>>>=0;for(var z=ye(R);++P>>1,X=d[z];X!==null&&!So(X)&&(_?X<=g:X=i){var Te=g?null:MQ(d);if(Te)return Qm(Te);X=!1,R=op,ce=new ec}else ce=g?[]:ie;e:for(;++P=P?d:Qo(d,g,_)}var T8=uX||function(d){return ui.clearTimeout(d)};function M8(d,g){if(g)return d.slice();var _=d.length,P=QP?QP(_):new d.constructor(_);return d.copy(P),P}function t_(d){var g=new d.constructor(d.byteLength);return new iv(g).set(new iv(d)),g}function _Q(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function SQ(d){var g=new d.constructor(d.source,je.exec(d));return g.lastIndex=d.lastIndex,g}function CQ(d){return cp?jn(cp.call(d)):{}}function R8(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function D8(d,g){if(d!==g){var _=d!==n,P=d===null,R=d===d,z=So(d),X=g!==n,ie=g===null,ce=g===g,Te=So(g);if(!ie&&!Te&&!z&&d>g||z&&X&&ce&&!ie&&!Te||P&&X&&ce||!_&&ce||!R)return 1;if(!P&&!z&&!Te&&d=ie)return ce;var Te=_[P];return ce*(Te=="desc"?-1:1)}}return d.index-g.index}function $8(d,g,_,P){for(var R=-1,z=d.length,X=_.length,ie=-1,ce=g.length,Te=Fr(z-X,0),Me=ye(ce+Te),$e=!P;++ie1?_[R-1]:n,X=R>2?_[2]:n;for(z=d.length>3&&typeof z=="function"?(R--,z):n,X&&Li(_[0],_[1],X)&&(z=R<3?n:z,R=1),g=jn(g);++P-1?R[z?g[X]:X]:n}}function B8(d){return zs(function(g){var _=g.length,P=_,R=Zo.prototype.thru;for(d&&g.reverse();P--;){var z=g[P];if(typeof z!="function")throw new Yo(a);if(R&&!X&&Cv(z)=="wrapper")var X=new Zo([],!0)}for(P=X?P:_;++P<_;){z=g[P];var ie=Cv(z),ce=ie=="wrapper"?a_(z):n;ce&&c_(ce[0])&&ce[1]==(k|S|E|M)&&!ce[4].length&&ce[9]==1?X=X[Cv(ce[0])].apply(X,ce[3]):X=z.length==1&&c_(z)?X[ie]():X.thru(z)}return function(){var Te=arguments,Me=Te[0];if(X&&Te.length==1&&Wt(Me))return X.plant(Me).value();for(var $e=0,Je=_?g[$e].apply(this,Te):Me;++$e<_;)Je=g[$e].call(this,Je);return Je}})}function xv(d,g,_,P,R,z,X,ie,ce,Te){var Me=g&k,$e=g&b,Je=g&w,ft=g&(S|O),At=g&L,Jt=Je?n:mp(d);function Pt(){for(var on=arguments.length,pn=ye(on),Co=on;Co--;)pn[Co]=arguments[Co];if(ft)var Fi=$f(Pt),Eo=zZ(pn,Fi);if(P&&(pn=$8(pn,P,R,ft)),z&&(pn=I8(pn,z,X,ft)),on-=Eo,ft&&on1&&pn.reverse(),Me&&ceie))return!1;var Te=z.get(d),Me=z.get(g);if(Te&&Me)return Te==g&&Me==d;var $e=-1,Je=!0,ft=_&v?new ec:n;for(z.set(d,g),z.set(g,d);++$e1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace($,`{ /* [wrapped with `+g+`] */ -`)}function zQ(d){return Vt(d)||oc(d)||!!(t8&&d&&d[t8])}function Us(d,g){var _=typeof d;return g=g??j,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=V)return arguments[0]}else g=0;return d.apply(n,arguments)}}function Ov(d,g){var _=-1,P=d.length,R=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,fk(d,_)});function dk(d){var g=B(d);return g.__chain__=!0,g}function QJ(d,g){return g(d),d}function Av(d,g){return g(d)}var JJ=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,R=function(z){return j2(z,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(R):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Av,args:[R],thisArg:n}),new Zo(P,this.__chain__).thru(function(z){return g&&!z.length&&z.push(n),z}))});function eee(){return dk(this)}function tee(){return new Zo(this.value(),this.__chain__)}function nee(){this.__values__===n&&(this.__values__=Ok(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function ree(){return this}function iee(d){for(var g,_=this;_ instanceof dv;){var P=ok(_);P.__index__=0,P.__values__=n,g?R.__wrapped__=P:g=P;var R=P;_=_.__wrapped__}return R.__wrapped__=d,g}function oee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Av,args:[h_],thisArg:n}),new Zo(g,this.__chain__)}return this.thru(h_)}function aee(){return P8(this.__wrapped__,this.__actions__)}var see=bv(function(d,g,_){kn.call(d,_)?++d[_]:js(d,_,1)});function uee(d,g,_){var P=Vt(d)?zP:QX;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function lee(d,g){var _=Vt(d)?$u:f8;return _(d,Et(g,3))}var cee=j8(ak),fee=j8(sk);function dee(d,g){return li(Pv(d,g),1)}function hee(d,g){return li(Pv(d,g),W)}function pee(d,g,_){return _=_===n?1:Zt(_),li(Pv(d,g),_)}function hk(d,g){var _=Vt(d)?Go:Fu;return _(d,Et(g,3))}function pk(d,g){var _=Vt(d)?DZ:c8;return _(d,Et(g,3))}var gee=bv(function(d,g,_){kn.call(d,_)?d[_].push(g):js(d,_,[g])});function mee(d,g,_,P){d=Ji(d)?d:Nf(d),_=_&&!P?Zt(_):0;var R=d.length;return _<0&&(_=Fr(R+_,0)),Dv(d)?_<=R&&d.indexOf(g,_)>-1:!!R&&Cf(d,g,_)>-1}var vee=tn(function(d,g,_){var P=-1,R=typeof g=="function",z=Ji(d)?ye(d.length):[];return Fu(d,function(X){z[++P]=R?xo(g,X,_):hp(X,g,_)}),z}),yee=bv(function(d,g,_){js(d,_,g)});function Pv(d,g){var _=Vt(d)?rr:v8;return _(d,Et(g,3))}function bee(d,g,_,P){return d==null?[]:(Vt(g)||(g=g==null?[]:[g]),_=P?n:_,Vt(_)||(_=_==null?[]:[_]),w8(d,g,_))}var xee=bv(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function wee(d,g,_){var P=Vt(d)?O2:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,Fu)}function _ee(d,g,_){var P=Vt(d)?$Z:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,c8)}function See(d,g){var _=Vt(d)?$u:f8;return _(d,Mv(Et(g,3)))}function Cee(d){var g=Vt(d)?a8:mQ;return g(d)}function Eee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Zt(g);var P=Vt(d)?qX:vQ;return P(d,g)}function Oee(d){var g=Vt(d)?GX:bQ;return g(d)}function Aee(d){if(d==null)return 0;if(Ji(d))return Dv(d)?Of(d):d.length;var g=_i(d);return g==lt||g==ze?d.size:H2(d).length}function Pee(d,g,_){var P=Vt(d)?A2:xQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var kee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),w8(d,li(g,1),[])}),kv=lX||function(){return ui.Date.now()};function Tee(d,g){if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){if(--d<1)return g.apply(this,arguments)}}function gk(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function mk(d,g){var _;if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var g_=tn(function(d,g,_){var P=b;if(_.length){var R=Nu(_,$f(g_));P|=E}return Bs(d,P,g,_,R)}),vk=tn(function(d,g,_){var P=b|w;if(_.length){var R=Nu(_,$f(vk));P|=E}return Bs(g,P,d,_,R)});function yk(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=yk.placeholder,P}function bk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=bk.placeholder,P}function xk(d,g,_){var P,R,z,X,ie,ce,Te=0,Me=!1,$e=!1,Je=!0;if(typeof d!="function")throw new Yo(a);g=ea(g)||0,lr(_)&&(Me=!!_.leading,$e="maxWait"in _,z=$e?Fr(ea(_.maxWait)||0,g):z,Je="trailing"in _?!!_.trailing:Je);function ft(_r){var Oa=P,Hs=R;return P=R=n,Te=_r,X=d.apply(Hs,Oa),X}function At(_r){return Te=_r,ie=yp(on,g),Me?ft(_r):X}function Qt(_r){var Oa=_r-ce,Hs=_r-Te,jk=g-Oa;return $e?wi(jk,z-Hs):jk}function Pt(_r){var Oa=_r-ce,Hs=_r-Te;return ce===n||Oa>=g||Oa<0||$e&&Hs>=z}function on(){var _r=kv();if(Pt(_r))return pn(_r);ie=yp(on,Qt(_r))}function pn(_r){return ie=n,Je&&P?ft(_r):(P=R=n,X)}function Co(){ie!==n&&T8(ie),Te=0,P=ce=R=ie=n}function Fi(){return ie===n?X:pn(kv())}function Eo(){var _r=kv(),Oa=Pt(_r);if(P=arguments,R=this,ce=_r,Oa){if(ie===n)return At(ce);if($e)return T8(ie),ie=yp(on,g),ft(ce)}return ie===n&&(ie=yp(on,g)),X}return Eo.cancel=Co,Eo.flush=Fi,Eo}var Mee=tn(function(d,g){return l8(d,1,g)}),Ree=tn(function(d,g,_){return l8(d,ea(g)||0,_)});function Dee(d){return Bs(d,L)}function Tv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Yo(a);var _=function(){var P=arguments,R=g?g.apply(this,P):P[0],z=_.cache;if(z.has(R))return z.get(R);var X=d.apply(this,P);return _.cache=z.set(R,X)||z,X};return _.cache=new(Tv.Cache||Fs),_}Tv.Cache=Fs;function Mv(d){if(typeof d!="function")throw new Yo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function $ee(d){return mk(2,d)}var Iee=wQ(function(d,g){g=g.length==1&&Vt(g[0])?rr(g[0],wo(Et())):rr(li(g,1),wo(Et()));var _=g.length;return tn(function(P){for(var R=-1,z=wi(P.length,_);++R=g}),oc=p8(function(){return arguments}())?p8:function(d){return pr(d)&&kn.call(d,"callee")&&!e8.call(d,"callee")},Vt=ye.isArray,Zee=IP?wo(IP):iQ;function Ji(d){return d!=null&&Rv(d.length)&&!Vs(d)}function wr(d){return pr(d)&&Ji(d)}function Xee(d){return d===!0||d===!1||pr(d)&&Ni(d)==it}var Uu=fX||A_,Qee=NP?wo(NP):oQ;function Jee(d){return pr(d)&&d.nodeType===1&&!bp(d)}function ete(d){if(d==null)return!0;if(Ji(d)&&(Vt(d)||typeof d=="string"||typeof d.splice=="function"||Uu(d)||If(d)||oc(d)))return!d.length;var g=_i(d);if(g==lt||g==ze)return!d.size;if(vp(d))return!H2(d).length;for(var _ in d)if(kn.call(d,_))return!1;return!0}function tte(d,g){return pp(d,g)}function nte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?pp(d,g,n,_):!!P}function v_(d){if(!pr(d))return!1;var g=Ni(d);return g==De||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!bp(d)}function rte(d){return typeof d=="number"&&n8(d)}function Vs(d){if(!lr(d))return!1;var g=Ni(d);return g==me||g==yt||g==Ee||g==de}function _k(d){return typeof d=="number"&&d==Zt(d)}function Rv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=j}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var Sk=LP?wo(LP):sQ;function ite(d,g){return d===g||W2(d,g,s_(g))}function ote(d,g,_){return _=typeof _=="function"?_:n,W2(d,g,s_(g),_)}function ate(d){return Ck(d)&&d!=+d}function ste(d){if(WQ(d))throw new Bt(o);return g8(d)}function ute(d){return d===null}function lte(d){return d==null}function Ck(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function bp(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=ov(d);if(g===null)return!0;var _=kn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&tv.call(_)==oX}var y_=FP?wo(FP):uQ;function cte(d){return _k(d)&&d>=-j&&d<=j}var Ek=jP?wo(jP):lQ;function Dv(d){return typeof d=="string"||!Vt(d)&&pr(d)&&Ni(d)==Fe}function So(d){return typeof d=="symbol"||pr(d)&&Ni(d)==Ae}var If=BP?wo(BP):cQ;function fte(d){return d===n}function dte(d){return pr(d)&&_i(d)==mt}function hte(d){return pr(d)&&Ni(d)==xn}var pte=Sv(K2),gte=Sv(function(d,g){return d<=g});function Ok(d){if(!d)return[];if(Ji(d))return Dv(d)?Sa(d):Qi(d);if(ap&&d[ap])return qZ(d[ap]());var g=_i(d),_=g==lt?D2:g==ze?Qm:Nf;return _(d)}function Ws(d){if(!d)return d===0?d:0;if(d=ea(d),d===W||d===-W){var g=d<0?-1:1;return g*K}return d===d?d:0}function Zt(d){var g=Ws(d),_=g%1;return g===g?_?g-_:g:0}function Ak(d){return d?tc(Zt(d),0,oe):0}function ea(d){if(typeof d=="number")return d;if(So(d))return Y;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=KP(d);var _=ct.test(d);return _||nt.test(d)?TZ(d.slice(2),_?2:8):We.test(d)?Y:+d}function Pk(d){return as(d,eo(d))}function mte(d){return d?tc(Zt(d),-j,j):d===0?d:0}function On(d){return d==null?"":_o(d)}var vte=Rf(function(d,g){if(vp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)kn.call(g,_)&&fp(d,_,g[_])}),kk=Rf(function(d,g){as(g,eo(g),d)}),$v=Rf(function(d,g,_,P){as(g,eo(g),d,P)}),yte=Rf(function(d,g,_,P){as(g,Qr(g),d,P)}),bte=zs(j2);function xte(d,g){var _=Mf(d);return g==null?_:s8(_,g)}var wte=tn(function(d,g){d=jn(d);var _=-1,P=g.length,R=P>2?g[2]:n;for(R&&Li(g[0],g[1],R)&&(P=1);++_1),z}),as(d,o_(d),_),P&&(_=Xo(_,f|h|p,RQ));for(var R=g.length;R--;)X2(_,g[R]);return _});function jte(d,g){return Mk(d,Mv(Et(g)))}var Bte=zs(function(d,g){return d==null?{}:hQ(d,g)});function Mk(d,g){if(d==null)return{};var _=rr(o_(d),function(P){return[P]});return g=Et(g),_8(d,_,function(P,R){return g(P,R[0])})}function zte(d,g,_){g=Bu(g,d);var P=-1,R=g.length;for(R||(R=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var R=r8();return wi(d+R*(g-d+kZ("1e-"+((R+"").length-1))),g)}return G2(d,g)}var Qte=Df(function(d,g,_){return g=g.toLowerCase(),d+(_?$k(g):g)});function $k(d){return w_(On(d).toLowerCase())}function Ik(d){return d=On(d),d&&d.replace(Ot,UZ).replace(bZ,"")}function Jte(d,g,_){d=On(d),g=_o(g);var P=d.length;_=_===n?P:tc(Zt(_),0,P);var R=_;return _-=g.length,_>=0&&d.slice(_,R)==g}function ene(d){return d=On(d),d&&qn.test(d)?d.replace(hn,VZ):d}function tne(d){return d=On(d),d&&ve.test(d)?d.replace(se,"\\$&"):d}var nne=Df(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),rne=Df(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),ine=F8("toLowerCase");function one(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;if(!g||P>=g)return d;var R=(g-P)/2;return _v(lv(R),_)+d+_v(uv(R),_)}function ane(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;return g&&P>>0,_?(d=On(d),d&&(typeof g=="string"||g!=null&&!y_(g))&&(g=_o(g),!g&&Ef(d))?zu(Sa(d),0,_):d.split(g,_)):[]}var hne=Df(function(d,g,_){return d+(_?" ":"")+w_(g)});function pne(d,g,_){return d=On(d),_=_==null?0:tc(Zt(_),0,d.length),g=_o(g),d.slice(_,_+g.length)==g}function gne(d,g,_){var P=B.templateSettings;_&&Li(d,g,_)&&(g=n),d=On(d),g=$v({},g,P,H8);var R=$v({},g.imports,P.imports,H8),z=Qr(R),X=R2(R,z),ie,ce,Te=0,Me=g.interpolate||gt,$e="__p += '",Je=$2((g.escape||gt).source+"|"+Me.source+"|"+(Me===bo?_e:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(kn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++CZ+"]")+` +`)}function zQ(d){return Wt(d)||oc(d)||!!(t8&&d&&d[t8])}function Us(d,g){var _=typeof d;return g=g??j,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=V)return arguments[0]}else g=0;return d.apply(n,arguments)}}function Ov(d,g){var _=-1,P=d.length,R=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,fk(d,_)});function dk(d){var g=B(d);return g.__chain__=!0,g}function QJ(d,g){return g(d),d}function Av(d,g){return g(d)}var JJ=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,R=function(z){return jw(z,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(R):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Av,args:[R],thisArg:n}),new Zo(P,this.__chain__).thru(function(z){return g&&!z.length&&z.push(n),z}))});function eee(){return dk(this)}function tee(){return new Zo(this.value(),this.__chain__)}function nee(){this.__values__===n&&(this.__values__=Ok(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function ree(){return this}function iee(d){for(var g,_=this;_ instanceof dv;){var P=ok(_);P.__index__=0,P.__values__=n,g?R.__wrapped__=P:g=P;var R=P;_=_.__wrapped__}return R.__wrapped__=d,g}function oee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Av,args:[h_],thisArg:n}),new Zo(g,this.__chain__)}return this.thru(h_)}function aee(){return P8(this.__wrapped__,this.__actions__)}var see=bv(function(d,g,_){kn.call(d,_)?++d[_]:js(d,_,1)});function uee(d,g,_){var P=Wt(d)?zP:QX;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function lee(d,g){var _=Wt(d)?$u:f8;return _(d,Et(g,3))}var cee=j8(ak),fee=j8(sk);function dee(d,g){return li(Pv(d,g),1)}function hee(d,g){return li(Pv(d,g),W)}function pee(d,g,_){return _=_===n?1:Xt(_),li(Pv(d,g),_)}function hk(d,g){var _=Wt(d)?Go:Fu;return _(d,Et(g,3))}function pk(d,g){var _=Wt(d)?DZ:c8;return _(d,Et(g,3))}var gee=bv(function(d,g,_){kn.call(d,_)?d[_].push(g):js(d,_,[g])});function mee(d,g,_,P){d=Ji(d)?d:Nf(d),_=_&&!P?Xt(_):0;var R=d.length;return _<0&&(_=Fr(R+_,0)),Dv(d)?_<=R&&d.indexOf(g,_)>-1:!!R&&Cf(d,g,_)>-1}var vee=tn(function(d,g,_){var P=-1,R=typeof g=="function",z=Ji(d)?ye(d.length):[];return Fu(d,function(X){z[++P]=R?xo(g,X,_):hp(X,g,_)}),z}),yee=bv(function(d,g,_){js(d,_,g)});function Pv(d,g){var _=Wt(d)?rr:v8;return _(d,Et(g,3))}function bee(d,g,_,P){return d==null?[]:(Wt(g)||(g=g==null?[]:[g]),_=P?n:_,Wt(_)||(_=_==null?[]:[_]),w8(d,g,_))}var xee=bv(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function wee(d,g,_){var P=Wt(d)?Ow:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,Fu)}function _ee(d,g,_){var P=Wt(d)?$Z:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,c8)}function See(d,g){var _=Wt(d)?$u:f8;return _(d,Mv(Et(g,3)))}function Cee(d){var g=Wt(d)?a8:mQ;return g(d)}function Eee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Xt(g);var P=Wt(d)?qX:vQ;return P(d,g)}function Oee(d){var g=Wt(d)?GX:bQ;return g(d)}function Aee(d){if(d==null)return 0;if(Ji(d))return Dv(d)?Of(d):d.length;var g=_i(d);return g==lt||g==ze?d.size:Hw(d).length}function Pee(d,g,_){var P=Wt(d)?Aw:xQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var kee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),w8(d,li(g,1),[])}),kv=lX||function(){return ui.Date.now()};function Tee(d,g){if(typeof g!="function")throw new Yo(a);return d=Xt(d),function(){if(--d<1)return g.apply(this,arguments)}}function gk(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function mk(d,g){var _;if(typeof g!="function")throw new Yo(a);return d=Xt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var g_=tn(function(d,g,_){var P=b;if(_.length){var R=Nu(_,$f(g_));P|=E}return Bs(d,P,g,_,R)}),vk=tn(function(d,g,_){var P=b|w;if(_.length){var R=Nu(_,$f(vk));P|=E}return Bs(g,P,d,_,R)});function yk(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=yk.placeholder,P}function bk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=bk.placeholder,P}function xk(d,g,_){var P,R,z,X,ie,ce,Te=0,Me=!1,$e=!1,Je=!0;if(typeof d!="function")throw new Yo(a);g=ea(g)||0,lr(_)&&(Me=!!_.leading,$e="maxWait"in _,z=$e?Fr(ea(_.maxWait)||0,g):z,Je="trailing"in _?!!_.trailing:Je);function ft(_r){var Oa=P,Hs=R;return P=R=n,Te=_r,X=d.apply(Hs,Oa),X}function At(_r){return Te=_r,ie=yp(on,g),Me?ft(_r):X}function Jt(_r){var Oa=_r-ce,Hs=_r-Te,jk=g-Oa;return $e?wi(jk,z-Hs):jk}function Pt(_r){var Oa=_r-ce,Hs=_r-Te;return ce===n||Oa>=g||Oa<0||$e&&Hs>=z}function on(){var _r=kv();if(Pt(_r))return pn(_r);ie=yp(on,Jt(_r))}function pn(_r){return ie=n,Je&&P?ft(_r):(P=R=n,X)}function Co(){ie!==n&&T8(ie),Te=0,P=ce=R=ie=n}function Fi(){return ie===n?X:pn(kv())}function Eo(){var _r=kv(),Oa=Pt(_r);if(P=arguments,R=this,ce=_r,Oa){if(ie===n)return At(ce);if($e)return T8(ie),ie=yp(on,g),ft(ce)}return ie===n&&(ie=yp(on,g)),X}return Eo.cancel=Co,Eo.flush=Fi,Eo}var Mee=tn(function(d,g){return l8(d,1,g)}),Ree=tn(function(d,g,_){return l8(d,ea(g)||0,_)});function Dee(d){return Bs(d,L)}function Tv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Yo(a);var _=function(){var P=arguments,R=g?g.apply(this,P):P[0],z=_.cache;if(z.has(R))return z.get(R);var X=d.apply(this,P);return _.cache=z.set(R,X)||z,X};return _.cache=new(Tv.Cache||Fs),_}Tv.Cache=Fs;function Mv(d){if(typeof d!="function")throw new Yo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function $ee(d){return mk(2,d)}var Iee=wQ(function(d,g){g=g.length==1&&Wt(g[0])?rr(g[0],wo(Et())):rr(li(g,1),wo(Et()));var _=g.length;return tn(function(P){for(var R=-1,z=wi(P.length,_);++R=g}),oc=p8(function(){return arguments}())?p8:function(d){return pr(d)&&kn.call(d,"callee")&&!e8.call(d,"callee")},Wt=ye.isArray,Zee=IP?wo(IP):iQ;function Ji(d){return d!=null&&Rv(d.length)&&!Vs(d)}function wr(d){return pr(d)&&Ji(d)}function Xee(d){return d===!0||d===!1||pr(d)&&Ni(d)==it}var Uu=fX||A_,Qee=NP?wo(NP):oQ;function Jee(d){return pr(d)&&d.nodeType===1&&!bp(d)}function ete(d){if(d==null)return!0;if(Ji(d)&&(Wt(d)||typeof d=="string"||typeof d.splice=="function"||Uu(d)||If(d)||oc(d)))return!d.length;var g=_i(d);if(g==lt||g==ze)return!d.size;if(vp(d))return!Hw(d).length;for(var _ in d)if(kn.call(d,_))return!1;return!0}function tte(d,g){return pp(d,g)}function nte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?pp(d,g,n,_):!!P}function v_(d){if(!pr(d))return!1;var g=Ni(d);return g==De||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!bp(d)}function rte(d){return typeof d=="number"&&n8(d)}function Vs(d){if(!lr(d))return!1;var g=Ni(d);return g==me||g==yt||g==Ee||g==de}function _k(d){return typeof d=="number"&&d==Xt(d)}function Rv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=j}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var Sk=LP?wo(LP):sQ;function ite(d,g){return d===g||Ww(d,g,s_(g))}function ote(d,g,_){return _=typeof _=="function"?_:n,Ww(d,g,s_(g),_)}function ate(d){return Ck(d)&&d!=+d}function ste(d){if(WQ(d))throw new Bt(o);return g8(d)}function ute(d){return d===null}function lte(d){return d==null}function Ck(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function bp(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=ov(d);if(g===null)return!0;var _=kn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&tv.call(_)==oX}var y_=FP?wo(FP):uQ;function cte(d){return _k(d)&&d>=-j&&d<=j}var Ek=jP?wo(jP):lQ;function Dv(d){return typeof d=="string"||!Wt(d)&&pr(d)&&Ni(d)==Fe}function So(d){return typeof d=="symbol"||pr(d)&&Ni(d)==Ae}var If=BP?wo(BP):cQ;function fte(d){return d===n}function dte(d){return pr(d)&&_i(d)==mt}function hte(d){return pr(d)&&Ni(d)==xn}var pte=Sv(Kw),gte=Sv(function(d,g){return d<=g});function Ok(d){if(!d)return[];if(Ji(d))return Dv(d)?Sa(d):Qi(d);if(ap&&d[ap])return qZ(d[ap]());var g=_i(d),_=g==lt?Dw:g==ze?Qm:Nf;return _(d)}function Ws(d){if(!d)return d===0?d:0;if(d=ea(d),d===W||d===-W){var g=d<0?-1:1;return g*K}return d===d?d:0}function Xt(d){var g=Ws(d),_=g%1;return g===g?_?g-_:g:0}function Ak(d){return d?tc(Xt(d),0,oe):0}function ea(d){if(typeof d=="number")return d;if(So(d))return Y;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=KP(d);var _=ct.test(d);return _||nt.test(d)?TZ(d.slice(2),_?2:8):We.test(d)?Y:+d}function Pk(d){return as(d,eo(d))}function mte(d){return d?tc(Xt(d),-j,j):d===0?d:0}function On(d){return d==null?"":_o(d)}var vte=Rf(function(d,g){if(vp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)kn.call(g,_)&&fp(d,_,g[_])}),kk=Rf(function(d,g){as(g,eo(g),d)}),$v=Rf(function(d,g,_,P){as(g,eo(g),d,P)}),yte=Rf(function(d,g,_,P){as(g,Qr(g),d,P)}),bte=zs(jw);function xte(d,g){var _=Mf(d);return g==null?_:s8(_,g)}var wte=tn(function(d,g){d=jn(d);var _=-1,P=g.length,R=P>2?g[2]:n;for(R&&Li(g[0],g[1],R)&&(P=1);++_1),z}),as(d,o_(d),_),P&&(_=Xo(_,f|h|p,RQ));for(var R=g.length;R--;)Xw(_,g[R]);return _});function jte(d,g){return Mk(d,Mv(Et(g)))}var Bte=zs(function(d,g){return d==null?{}:hQ(d,g)});function Mk(d,g){if(d==null)return{};var _=rr(o_(d),function(P){return[P]});return g=Et(g),_8(d,_,function(P,R){return g(P,R[0])})}function zte(d,g,_){g=Bu(g,d);var P=-1,R=g.length;for(R||(R=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var R=r8();return wi(d+R*(g-d+kZ("1e-"+((R+"").length-1))),g)}return Gw(d,g)}var Qte=Df(function(d,g,_){return g=g.toLowerCase(),d+(_?$k(g):g)});function $k(d){return w_(On(d).toLowerCase())}function Ik(d){return d=On(d),d&&d.replace(Ot,UZ).replace(bZ,"")}function Jte(d,g,_){d=On(d),g=_o(g);var P=d.length;_=_===n?P:tc(Xt(_),0,P);var R=_;return _-=g.length,_>=0&&d.slice(_,R)==g}function ene(d){return d=On(d),d&&qn.test(d)?d.replace(hn,VZ):d}function tne(d){return d=On(d),d&&ve.test(d)?d.replace(se,"\\$&"):d}var nne=Df(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),rne=Df(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),ine=F8("toLowerCase");function one(d,g,_){d=On(d),g=Xt(g);var P=g?Of(d):0;if(!g||P>=g)return d;var R=(g-P)/2;return _v(lv(R),_)+d+_v(uv(R),_)}function ane(d,g,_){d=On(d),g=Xt(g);var P=g?Of(d):0;return g&&P>>0,_?(d=On(d),d&&(typeof g=="string"||g!=null&&!y_(g))&&(g=_o(g),!g&&Ef(d))?zu(Sa(d),0,_):d.split(g,_)):[]}var hne=Df(function(d,g,_){return d+(_?" ":"")+w_(g)});function pne(d,g,_){return d=On(d),_=_==null?0:tc(Xt(_),0,d.length),g=_o(g),d.slice(_,_+g.length)==g}function gne(d,g,_){var P=B.templateSettings;_&&Li(d,g,_)&&(g=n),d=On(d),g=$v({},g,P,H8);var R=$v({},g.imports,P.imports,H8),z=Qr(R),X=Rw(R,z),ie,ce,Te=0,Me=g.interpolate||gt,$e="__p += '",Je=$w((g.escape||gt).source+"|"+Me.source+"|"+(Me===bo?_e:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(kn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++CZ+"]")+` `;d.replace(Je,function(Pt,on,pn,Co,Fi,Eo){return pn||(pn=Co),$e+=d.slice(Te,Eo).replace(ht,WZ),on&&(ie=!0,$e+=`' + __e(`+on+`) + '`),Fi&&(ce=!0,$e+=`'; @@ -477,12 +497,12 @@ __p += '`),pn&&($e+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+$e+`return __p -}`;var Qt=Lk(function(){return Sn(z,ft+"return "+$e).apply(n,X)});if(Qt.source=$e,v_(Qt))throw Qt;return Qt}function mne(d){return On(d).toLowerCase()}function vne(d){return On(d).toUpperCase()}function yne(d,g,_){if(d=On(d),d&&(_||g===n))return KP(d);if(!d||!(g=_o(g)))return d;var P=Sa(d),R=Sa(g),z=qP(P,R),X=GP(P,R)+1;return zu(P,z,X).join("")}function bne(d,g,_){if(d=On(d),d&&(_||g===n))return d.slice(0,ZP(d)+1);if(!d||!(g=_o(g)))return d;var P=Sa(d),R=GP(P,Sa(g))+1;return zu(P,0,R).join("")}function xne(d,g,_){if(d=On(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=_o(g)))return d;var P=Sa(d),R=qP(P,Sa(g));return zu(P,R).join("")}function wne(d,g){var _=U,P=H;if(lr(g)){var R="separator"in g?g.separator:R;_="length"in g?Zt(g.length):_,P="omission"in g?_o(g.omission):P}d=On(d);var z=d.length;if(Ef(d)){var X=Sa(d);z=X.length}if(_>=z)return d;var ie=_-Of(P);if(ie<1)return P;var ce=X?zu(X,0,ie).join(""):d.slice(0,ie);if(R===n)return ce+P;if(X&&(ie+=ce.length-ie),y_(R)){if(d.slice(ie).search(R)){var Te,Me=ce;for(R.global||(R=$2(R.source,On(je.exec(R))+"g")),R.lastIndex=0;Te=R.exec(Me);)var $e=Te.index;ce=ce.slice(0,$e===n?ie:$e)}}else if(d.indexOf(_o(R),ie)!=ie){var Je=ce.lastIndexOf(R);Je>-1&&(ce=ce.slice(0,Je))}return ce+P}function _ne(d){return d=On(d),d&&_n.test(d)?d.replace(_t,XZ):d}var Sne=Df(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),w_=F8("toUpperCase");function Nk(d,g,_){return d=On(d),g=_?n:g,g===n?KZ(d)?eX(d):LZ(d):d.match(g)||[]}var Lk=tn(function(d,g){try{return xo(d,n,g)}catch(_){return v_(_)?_:new Bt(_)}}),Cne=zs(function(d,g){return Go(g,function(_){_=ss(_),js(d,_,g_(d[_],d))}),d});function Ene(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Yo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var R=-1;++Rj)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var R=M2(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Zt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),R=B[P?"take"+(g=="last"?"Right":""):g],z=P||/^find/.test(g);R&&(B.prototype[g]=function(){var X=this.__wrapped__,ie=P?[1]:arguments,ce=X instanceof cn,Te=ie[0],Me=ce||Vt(X),$e=function(on){var pn=R.apply(B,Iu([on],ie));return P&&Je?pn[0]:pn};Me&&_&&typeof Te=="function"&&Te.length!=1&&(ce=Me=!1);var Je=this.__chain__,ft=!!this.__actions__.length,At=z&&!Je,Qt=ce&&!ft;if(!z&&Me){X=Qt?X:new cn(this);var Pt=d.apply(X,ie);return Pt.__actions__.push({func:Av,args:[$e],thisArg:n}),new Zo(Pt,Je)}return At&&Qt?d.apply(this,ie):(Pt=this.thru($e),At?P?Pt.value()[0]:Pt.value():Pt)})}),Go(["pop","push","shift","sort","splice","unshift"],function(d){var g=Jm[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var R=arguments;if(P&&!this.__chain__){var z=this.value();return g.apply(Vt(z)?z:[],R)}return this[_](function(X){return g.apply(Vt(X)?X:[],R)})}}),os(cn.prototype,function(d,g){var _=B[g];if(_){var P=_.name+"";kn.call(Tf,P)||(Tf[P]=[]),Tf[P].push({name:g,func:_})}}),Tf[xv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=_X,cn.prototype.reverse=SX,cn.prototype.value=CX,B.prototype.at=JJ,B.prototype.chain=eee,B.prototype.commit=tee,B.prototype.next=nee,B.prototype.plant=iee,B.prototype.reverse=oee,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=aee,B.prototype.first=B.prototype.head,ap&&(B.prototype[ap]=ree),B},Af=tX();Xl?((Xl.exports=Af)._=Af,S2._=Af):ui._=Af}).call(La)})(gx,gx.exports);var iQe=gx.exports;function zUe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var tP="ScrollArea",[uG,oQe]=vi(tP),[UUe,wa]=uG(tP),lG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),L=Gt(t,H=>u(H)),U=Em(i);return I.jsx(UUe,{scope:n,type:r,dir:U,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:I.jsx(pt.div,{dir:U,...a,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});lG.displayName=tP;var cG="ScrollAreaViewport",fG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=wa(cG,n),s=y.useRef(null),u=Gt(t,s,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});fG.displayName=cG;var $s="ScrollAreaScrollbar",VUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?I.jsx(WUe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(HUe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(dG,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(nP,{...r,ref:t}):null});VUe.displayName=$s;var WUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(dG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),HUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=p2(()=>u("SCROLL_END"),100),[s,u]=zUe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),I.jsx(Gr,{present:n||s!=="hidden",children:I.jsx(nP,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),dG=y.forwardRef((e,t)=>{const n=wa($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=p2(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=wa($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=mG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return QUe(h,a.current,s,p)}return n==="horizontal"?I.jsx(KUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=TI(h,s,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?I.jsx(qUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=TI(h,s);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),KUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wa($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(pG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),yG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:vx(a.paddingLeft),paddingEnd:vx(a.paddingRight)}})}})}),qUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wa($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(pG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),yG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:vx(a.paddingTop),paddingEnd:vx(a.paddingBottom)}})}})}),[GUe,hG]=uG($s),pG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=wa($s,n),[m,v]=y.useState(null),b=Gt(t,L=>v(L)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Vr(c),C=Vr(u),k=p2(f,10);function M(L){if(w.current){const U=L.clientX-w.current.left,H=L.clientY-w.current.top;l({x:U,y:H})}}return y.useEffect(()=>{const L=U=>{const H=U.target;m?.contains(H)&&E(U,O)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Eh(m,k),Eh(p.content,k),I.jsx(GUe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Vr(o),onThumbPointerUp:Vr(a),onThumbPositionChange:C,onThumbPointerDown:Vr(s),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(L))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,L=>{const U=L.target;U.hasPointerCapture(L.pointerId)&&U.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),mx="ScrollAreaThumb",YUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hG(mx,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(ZUe,{ref:t,...r})})}),ZUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=wa(mx,n),a=hG(mx,n),{onThumbPositionChange:s}=a,u=Gt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=p2(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=JUe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});YUe.displayName=mx;var rP="ScrollAreaCorner",gG=y.forwardRef((e,t)=>{const n=wa(rP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(XUe,{...e,ref:t}):null});gG.displayName=rP;var XUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=wa(rP,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Eh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Eh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vx(e){return e?parseInt(e,10):0}function mG(e,t){const n=e/t;return isNaN(n)?0:n}function h2(e){const t=mG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function QUe(e,t,n,r="ltr"){const i=h2(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return vG([u,l],f)(e)}function TI(e,t,n="ltr"){const r=h2(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=Q6(e,u);return vG([0,a],[0,s])(l)}function vG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function p2(e,t){const n=Vr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Eh(e,t){const n=Vr(t);ii(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var aQe=lG,sQe=fG,uQe=gG,iP="Progress",oP=100,[eVe,lQe]=vi(iP),[tVe,nVe]=eVe(iP),bG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=rVe,...a}=e;(i||i===0)&&!MI(i)&&console.error(iVe(`${i}`,"Progress"));const s=MI(i)?i:oP;r!==null&&!RI(r,s)&&console.error(oVe(`${r}`,"Progress"));const u=RI(r,s)?r:null,l=yx(u)?o(u,s):void 0;return I.jsx(tVe,{scope:n,value:u,max:s,children:I.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":yx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":_G(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});bG.displayName=iP;var xG="ProgressIndicator",wG=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=nVe(xG,n);return I.jsx(pt.div,{"data-state":_G(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});wG.displayName=xG;function rVe(e,t){return`${Math.round(e/t*100)}%`}function _G(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yx(e){return typeof e=="number"}function MI(e){return yx(e)&&!isNaN(e)&&e>0}function RI(e,t){return yx(e)&&!isNaN(e)&&e<=t&&e>=0}function iVe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oP}\`.`}function oVe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: +}`;var Jt=Lk(function(){return Sn(z,ft+"return "+$e).apply(n,X)});if(Jt.source=$e,v_(Jt))throw Jt;return Jt}function mne(d){return On(d).toLowerCase()}function vne(d){return On(d).toUpperCase()}function yne(d,g,_){if(d=On(d),d&&(_||g===n))return KP(d);if(!d||!(g=_o(g)))return d;var P=Sa(d),R=Sa(g),z=qP(P,R),X=GP(P,R)+1;return zu(P,z,X).join("")}function bne(d,g,_){if(d=On(d),d&&(_||g===n))return d.slice(0,ZP(d)+1);if(!d||!(g=_o(g)))return d;var P=Sa(d),R=GP(P,Sa(g))+1;return zu(P,0,R).join("")}function xne(d,g,_){if(d=On(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=_o(g)))return d;var P=Sa(d),R=qP(P,Sa(g));return zu(P,R).join("")}function wne(d,g){var _=U,P=H;if(lr(g)){var R="separator"in g?g.separator:R;_="length"in g?Xt(g.length):_,P="omission"in g?_o(g.omission):P}d=On(d);var z=d.length;if(Ef(d)){var X=Sa(d);z=X.length}if(_>=z)return d;var ie=_-Of(P);if(ie<1)return P;var ce=X?zu(X,0,ie).join(""):d.slice(0,ie);if(R===n)return ce+P;if(X&&(ie+=ce.length-ie),y_(R)){if(d.slice(ie).search(R)){var Te,Me=ce;for(R.global||(R=$w(R.source,On(je.exec(R))+"g")),R.lastIndex=0;Te=R.exec(Me);)var $e=Te.index;ce=ce.slice(0,$e===n?ie:$e)}}else if(d.indexOf(_o(R),ie)!=ie){var Je=ce.lastIndexOf(R);Je>-1&&(ce=ce.slice(0,Je))}return ce+P}function _ne(d){return d=On(d),d&&_n.test(d)?d.replace(_t,XZ):d}var Sne=Df(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),w_=F8("toUpperCase");function Nk(d,g,_){return d=On(d),g=_?n:g,g===n?KZ(d)?eX(d):LZ(d):d.match(g)||[]}var Lk=tn(function(d,g){try{return xo(d,n,g)}catch(_){return v_(_)?_:new Bt(_)}}),Cne=zs(function(d,g){return Go(g,function(_){_=ss(_),js(d,_,g_(d[_],d))}),d});function Ene(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Yo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var R=-1;++Rj)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var R=Mw(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Xt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),R=B[P?"take"+(g=="last"?"Right":""):g],z=P||/^find/.test(g);R&&(B.prototype[g]=function(){var X=this.__wrapped__,ie=P?[1]:arguments,ce=X instanceof cn,Te=ie[0],Me=ce||Wt(X),$e=function(on){var pn=R.apply(B,Iu([on],ie));return P&&Je?pn[0]:pn};Me&&_&&typeof Te=="function"&&Te.length!=1&&(ce=Me=!1);var Je=this.__chain__,ft=!!this.__actions__.length,At=z&&!Je,Jt=ce&&!ft;if(!z&&Me){X=Jt?X:new cn(this);var Pt=d.apply(X,ie);return Pt.__actions__.push({func:Av,args:[$e],thisArg:n}),new Zo(Pt,Je)}return At&&Jt?d.apply(this,ie):(Pt=this.thru($e),At?P?Pt.value()[0]:Pt.value():Pt)})}),Go(["pop","push","shift","sort","splice","unshift"],function(d){var g=Jm[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var R=arguments;if(P&&!this.__chain__){var z=this.value();return g.apply(Wt(z)?z:[],R)}return this[_](function(X){return g.apply(Wt(X)?X:[],R)})}}),os(cn.prototype,function(d,g){var _=B[g];if(_){var P=_.name+"";kn.call(Tf,P)||(Tf[P]=[]),Tf[P].push({name:g,func:_})}}),Tf[xv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=_X,cn.prototype.reverse=SX,cn.prototype.value=CX,B.prototype.at=JJ,B.prototype.chain=eee,B.prototype.commit=tee,B.prototype.next=nee,B.prototype.plant=iee,B.prototype.reverse=oee,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=aee,B.prototype.first=B.prototype.head,ap&&(B.prototype[ap]=ree),B},Af=tX();Xl?((Xl.exports=Af)._=Af,Sw._=Af):ui._=Af}).call(La)})(gx,gx.exports);var uQe=gx.exports;function zUe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var tP="ScrollArea",[uG,lQe]=vi(tP),[UUe,wa]=uG(tP),lG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),L=Yt(t,H=>u(H)),U=Em(i);return I.jsx(UUe,{scope:n,type:r,dir:U,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:I.jsx(pt.div,{dir:U,...a,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});lG.displayName=tP;var cG="ScrollAreaViewport",fG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=wa(cG,n),s=y.useRef(null),u=Yt(t,s,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});fG.displayName=cG;var $s="ScrollAreaScrollbar",VUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?I.jsx(WUe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(HUe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(dG,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(nP,{...r,ref:t}):null});VUe.displayName=$s;var WUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(dG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),HUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wa($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=pw(()=>u("SCROLL_END"),100),[s,u]=zUe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),I.jsx(Gr,{present:n||s!=="hidden",children:I.jsx(nP,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),dG=y.forwardRef((e,t)=>{const n=wa($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=pw(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=wa($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=mG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return QUe(h,a.current,s,p)}return n==="horizontal"?I.jsx(KUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=TI(h,s,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?I.jsx(qUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=TI(h,s);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),KUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wa($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Yt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(pG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),yG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:vx(a.paddingLeft),paddingEnd:vx(a.paddingRight)}})}})}),qUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wa($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Yt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(pG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),yG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:vx(a.paddingTop),paddingEnd:vx(a.paddingBottom)}})}})}),[GUe,hG]=uG($s),pG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=wa($s,n),[m,v]=y.useState(null),b=Yt(t,L=>v(L)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Vr(c),C=Vr(u),k=pw(f,10);function M(L){if(w.current){const U=L.clientX-w.current.left,H=L.clientY-w.current.top;l({x:U,y:H})}}return y.useEffect(()=>{const L=U=>{const H=U.target;m?.contains(H)&&E(U,O)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Eh(m,k),Eh(p.content,k),I.jsx(GUe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Vr(o),onThumbPointerUp:Vr(a),onThumbPositionChange:C,onThumbPointerDown:Vr(s),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(L))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,L=>{const U=L.target;U.hasPointerCapture(L.pointerId)&&U.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),mx="ScrollAreaThumb",YUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hG(mx,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(ZUe,{ref:t,...r})})}),ZUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=wa(mx,n),a=hG(mx,n),{onThumbPositionChange:s}=a,u=Yt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=pw(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=JUe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});YUe.displayName=mx;var rP="ScrollAreaCorner",gG=y.forwardRef((e,t)=>{const n=wa(rP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(XUe,{...e,ref:t}):null});gG.displayName=rP;var XUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=wa(rP,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Eh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Eh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vx(e){return e?parseInt(e,10):0}function mG(e,t){const n=e/t;return isNaN(n)?0:n}function hw(e){const t=mG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function QUe(e,t,n,r="ltr"){const i=hw(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return vG([u,l],f)(e)}function TI(e,t,n="ltr"){const r=hw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=Q6(e,u);return vG([0,a],[0,s])(l)}function vG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function pw(e,t){const n=Vr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Eh(e,t){const n=Vr(t);ii(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var cQe=lG,fQe=fG,dQe=gG,iP="Progress",oP=100,[eVe,hQe]=vi(iP),[tVe,nVe]=eVe(iP),bG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=rVe,...a}=e;(i||i===0)&&!MI(i)&&console.error(iVe(`${i}`,"Progress"));const s=MI(i)?i:oP;r!==null&&!RI(r,s)&&console.error(oVe(`${r}`,"Progress"));const u=RI(r,s)?r:null,l=yx(u)?o(u,s):void 0;return I.jsx(tVe,{scope:n,value:u,max:s,children:I.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":yx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":_G(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});bG.displayName=iP;var xG="ProgressIndicator",wG=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=nVe(xG,n);return I.jsx(pt.div,{"data-state":_G(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});wG.displayName=xG;function rVe(e,t){return`${Math.round(e/t*100)}%`}function _G(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yx(e){return typeof e=="number"}function MI(e){return yx(e)&&!isNaN(e)&&e>0}function RI(e,t){return yx(e)&&!isNaN(e)&&e<=t&&e>=0}function iVe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oP}\`.`}function oVe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${oP} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var cQe=bG,fQe=wG,aVe="Separator",DI="horizontal",sVe=["horizontal","vertical"],SG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=DI,...i}=e,o=uVe(r)?r:DI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});SG.displayName=aVe;function uVe(e){return sVe.includes(e)}var dQe=SG,aP="Switch",[lVe,hQe]=vi(aP),[cVe,fVe]=lVe(aP),CG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return I.jsxs(cVe,{scope:n,checked:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":AG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&I.jsx(dVe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});CG.displayName=aP;var EG="SwitchThumb",OG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=fVe(EG,n);return I.jsx(pt.span,{"data-state":AG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});OG.displayName=EG;var dVe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=jA(n),s=aO(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function AG(e){return e?"checked":"unchecked"}var pQe=CG,gQe=OG;/** +Defaulting to \`null\`.`}var pQe=bG,gQe=wG,aVe="Separator",DI="horizontal",sVe=["horizontal","vertical"],SG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=DI,...i}=e,o=uVe(r)?r:DI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});SG.displayName=aVe;function uVe(e){return sVe.includes(e)}var mQe=SG,aP="Switch",[lVe,vQe]=vi(aP),[cVe,fVe]=lVe(aP),CG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Yt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return I.jsxs(cVe,{scope:n,checked:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":AG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&I.jsx(dVe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});CG.displayName=aP;var EG="SwitchThumb",OG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=fVe(EG,n);return I.jsx(pt.span,{"data-state":AG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});OG.displayName=EG;var dVe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=jA(n),s=aO(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function AG(e){return e?"checked":"unchecked"}var yQe=CG,bQe=OG;/** * table-core * * Copyright (c) TanStack @@ -491,10 +511,10 @@ Defaulting to \`null\`.`}var cQe=bG,fQe=wG,aVe="Separator",DI="horizontal",sVe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function fl(e,t){return typeof e=="function"?e(t):e}function Vo(e,t){return n=>{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function g2(e){return e instanceof Function}function hVe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function pVe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function gw(e){return e instanceof Function}function hVe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function pVe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function gVe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function mVe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function $I(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const vVe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return A1(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),A1(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return A1(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return A1(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function A1(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=$I(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>$I(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const sP=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>pVe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>gVe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},PG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};PG.autoRemove=e=>qa(e);const kG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};kG.autoRemove=e=>qa(e);const TG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};TG.autoRemove=e=>qa(e);const MG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};MG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const RG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});RG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const DG=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});DG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const $G=(e,t,n)=>e.getValue(t)===n;$G.autoRemove=e=>qa(e);const IG=(e,t,n)=>e.getValue(t)==n;IG.autoRemove=e=>qa(e);const uP=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};uP.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};uP.autoRemove=e=>qa(e)||qa(e[0])&&qa(e[1]);const eu={includesString:PG,includesStringSensitive:kG,equalsString:TG,arrIncludes:MG,arrIncludesAll:RG,arrIncludesSome:DG,equals:$G,weakEquals:IG,inNumberRange:uP};function qa(e){return e==null||e===""}const bVe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return g2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=fl(n,o?o.value:void 0);if(II(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(II(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function II(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const xVe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),wVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},_Ve=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},SVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},EVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!hVe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},OVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),AVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,PVe=(e,t)=>t.length,m3={sum:xVe,min:wVe,max:_Ve,extent:SVe,mean:CVe,median:EVe,unique:OVe,uniqueCount:AVe,count:PVe},kVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return m3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return m3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:m3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function TVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const MVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[T0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=T0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=T0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return TVe(o,n,r)},Ct(e.options,"debugTable"))}},v3=()=>({left:[],right:[]}),RVe={getInitialState:e=>({columnPinning:v3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?v3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:v3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},P1={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},y3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),DVe={getDefaultColumnDef:()=>P1,getInitialState:e=>({columnSizing:{},columnSizingInfo:y3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:P1.minSize,(r=o??e.columnDef.size)!=null?r:P1.size),(i=e.columnDef.maxSize)!=null?i:P1.maxSize)},e.getStart=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),b3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=b3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(L=>{let[U,H]=L;l[U]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=$Ve()?{passive:!1}:!1;b3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?y3():(n=e.initialState.columnSizingInfo)!=null?n:y3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let k1=null;function $Ve(){if(typeof k1=="boolean")return k1;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return k1=e,k1}function b3(e){return e.type==="touchstart"}const IVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function T0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const NVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},LVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return g2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},FVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},a4=0,s4=10,x3=()=>({pageIndex:a4,pageSize:s4}),jVe={getInitialState:e=>({...e,pagination:{...x3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?x3():(i=e.initialState.pagination)!=null?i:x3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?a4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:a4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?s4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:s4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},w3=()=>({top:[],bottom:[]}),BVe={getInitialState:e=>({rowPinning:w3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?w3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:w3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},zVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{u4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return u4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return lP(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},u4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>u4(e,s.id,n,r,i))};function _3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=lP(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function lP(e,t){var n;return(n=t[e.id])!=null?n:!1}function l4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(lP(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=l4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const c4=/([0-9]+)/gm,UVe=(e,t,n)=>NG(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),VVe=(e,t,n)=>NG(Il(e.getValue(n)),Il(t.getValue(n))),WVe=(e,t,n)=>cP(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),HVe=(e,t,n)=>cP(Il(e.getValue(n)),Il(t.getValue(n))),KVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rcP(e.getValue(n),t.getValue(n));function cP(e,t){return e===t?0:e>t?1:-1}function Il(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function NG(e,t){const n=e.split(c4).filter(Boolean),r=t.split(c4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zp={alphanumeric:UVe,alphanumericCaseSensitive:VVe,text:WVe,textCaseSensitive:HVe,datetime:KVe,basic:qVe},GVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Zp.datetime;if(typeof o=="string"&&(r=!0,o.split(c4).length>1))return Zp.alphanumeric}return r?Zp.text:Zp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},YVe=[vVe,IVe,MVe,RVe,yVe,bVe,NVe,LVe,GVe,kVe,FVe,jVe,BVe,zVe,DVe];function ZVe(e){var t,n;const r=[...YVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=fl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=mVe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function XVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function LG(e,t,n){return n.options.filterFromLeafRows?QVe(e,t,n):JVe(e,t,n)}function QVe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function xQe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=XVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function wQe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Ct(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function gVe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function mVe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function $I(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const vVe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return A1(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),A1(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return A1(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return A1(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function A1(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=$I(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>$I(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const sP=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>pVe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>gVe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},PG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};PG.autoRemove=e=>qa(e);const kG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};kG.autoRemove=e=>qa(e);const TG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};TG.autoRemove=e=>qa(e);const MG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};MG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const RG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});RG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const DG=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});DG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const $G=(e,t,n)=>e.getValue(t)===n;$G.autoRemove=e=>qa(e);const IG=(e,t,n)=>e.getValue(t)==n;IG.autoRemove=e=>qa(e);const uP=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};uP.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};uP.autoRemove=e=>qa(e)||qa(e[0])&&qa(e[1]);const eu={includesString:PG,includesStringSensitive:kG,equalsString:TG,arrIncludes:MG,arrIncludesAll:RG,arrIncludesSome:DG,equals:$G,weakEquals:IG,inNumberRange:uP};function qa(e){return e==null||e===""}const bVe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return gw(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=fl(n,o?o.value:void 0);if(II(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(II(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function II(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const xVe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),wVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},_Ve=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},SVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},EVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!hVe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},OVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),AVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,PVe=(e,t)=>t.length,m3={sum:xVe,min:wVe,max:_Ve,extent:SVe,mean:CVe,median:EVe,unique:OVe,uniqueCount:AVe,count:PVe},kVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return m3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return m3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return gw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:m3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function TVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const MVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[T0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=T0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=T0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return TVe(o,n,r)},Ct(e.options,"debugTable"))}},v3=()=>({left:[],right:[]}),RVe={getInitialState:e=>({columnPinning:v3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?v3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:v3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},P1={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},y3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),DVe={getDefaultColumnDef:()=>P1,getInitialState:e=>({columnSizing:{},columnSizingInfo:y3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:P1.minSize,(r=o??e.columnDef.size)!=null?r:P1.size),(i=e.columnDef.maxSize)!=null?i:P1.maxSize)},e.getStart=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),b3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=b3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(L=>{let[U,H]=L;l[U]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=$Ve()?{passive:!1}:!1;b3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?y3():(n=e.initialState.columnSizingInfo)!=null?n:y3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let k1=null;function $Ve(){if(typeof k1=="boolean")return k1;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return k1=e,k1}function b3(e){return e.type==="touchstart"}const IVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function T0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const NVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},LVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return gw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},FVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},a4=0,s4=10,x3=()=>({pageIndex:a4,pageSize:s4}),jVe={getInitialState:e=>({...e,pagination:{...x3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?x3():(i=e.initialState.pagination)!=null?i:x3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?a4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:a4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?s4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:s4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},w3=()=>({top:[],bottom:[]}),BVe={getInitialState:e=>({rowPinning:w3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?w3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:w3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},zVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{u4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return u4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return lP(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},u4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>u4(e,s.id,n,r,i))};function _3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=lP(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function lP(e,t){var n;return(n=t[e.id])!=null?n:!1}function l4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(lP(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=l4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const c4=/([0-9]+)/gm,UVe=(e,t,n)=>NG(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),VVe=(e,t,n)=>NG(Il(e.getValue(n)),Il(t.getValue(n))),WVe=(e,t,n)=>cP(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),HVe=(e,t,n)=>cP(Il(e.getValue(n)),Il(t.getValue(n))),KVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rcP(e.getValue(n),t.getValue(n));function cP(e,t){return e===t?0:e>t?1:-1}function Il(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function NG(e,t){const n=e.split(c4).filter(Boolean),r=t.split(c4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zp={alphanumeric:UVe,alphanumericCaseSensitive:VVe,text:WVe,textCaseSensitive:HVe,datetime:KVe,basic:qVe},GVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Zp.datetime;if(typeof o=="string"&&(r=!0,o.split(c4).length>1))return Zp.alphanumeric}return r?Zp.text:Zp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return gw(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},YVe=[vVe,IVe,MVe,RVe,yVe,bVe,NVe,LVe,GVe,kVe,FVe,jVe,BVe,zVe,DVe];function ZVe(e){var t,n;const r=[...YVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=fl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=mVe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function XVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function LG(e,t,n){return n.options.filterFromLeafRows?QVe(e,t,n):JVe(e,t,n)}function QVe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function CQe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=XVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function EQe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack @@ -503,13 +523,13 @@ Defaulting to \`null\`.`}var cQe=bG,fQe=wG,aVe="Separator",DI="horizontal",sVe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _Qe(e,t){return e?eWe(e)?y.createElement(e,t):e:null}function eWe(e){return tWe(e)||typeof e=="function"||nWe(e)}function tWe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function nWe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function SQe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:ZVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const FG=Object.freeze({left:0,top:0,width:16,height:16}),bx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fP=Object.freeze({...FG,...bx}),f4=Object.freeze({...fP,body:"",hidden:!1});function rWe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function NI(e,t){const n=rWe(e,t);for(const r in f4)r in bx?r in e&&!(r in n)&&(n[r]=bx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function iWe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function oWe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=NI(r[s]||i[s],o)}return a(t),n.forEach(a),NI(e,o)}function jG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=iWe(e);for(const i in r){const o=r[i];o&&(t(i,oWe(e,i,o)),n.push(i))}return n}const aWe={provider:"",aliases:{},not_found:{},...FG};function S3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function BG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!S3(e,aWe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!S3(o,f4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!S3(o,f4))return null}return t}const zG=/^[a-z0-9]+(-[a-z0-9]+)*$/,m2=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!iy(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!iy(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!iy(s,n)?null:s}return null},iy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,LI=Object.create(null);function sWe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function lf(e,t){const n=LI[e]||(LI[e]=Object.create(null));return n[t]||(n[t]=sWe(e,t))}function dP(e,t){return BG(t)?jG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function uWe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let rm=!1;function UG(e){return typeof e=="boolean"&&(rm=e),rm}function FI(e){const t=typeof e=="string"?m2(e,!0,rm):e;if(t){const n=lf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function lWe(e,t){const n=m2(e,!0,rm);if(!n)return!1;const r=lf(n.provider,n.prefix);return t?uWe(r,n.name,t):(r.missing.add(n.name),!0)}function cWe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),rm&&!t&&!e.prefix){let i=!1;return BG(e)&&(e.prefix="",jG(e,(o,a)=>{lWe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!iy({provider:t,prefix:n,name:"a"}))return!1;const r=lf(t,n);return!!dP(r,e)}const VG=Object.freeze({width:null,height:null}),WG=Object.freeze({...VG,...bx}),fWe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dWe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(fWe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=dWe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function hWe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function pWe(e,t){return e?""+e+""+t:t}function gWe(e,t,n){const r=hWe(e);return pWe(r.defs,t+r.content+n)}const mWe=e=>e==="unset"||e==="undefined"||e==="none";function vWe(e,t){const n={...fP,...e},r={...WG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=gWe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=jI(f,u/l)):(c=a==="auto"?u:a,f=s===null?jI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{mWe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const yWe=/\sid="(\S+)"/g,bWe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xWe=0;function wWe(e,t=bWe){const n=[];let r;for(;r=yWe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(xWe++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const d4=Object.create(null);function _We(e,t){d4[e]=t}function h4(e){return d4[e]||d4[""]}function hP(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const pP=Object.create(null),Xp=["https://api.simplesvg.com","https://api.unisvg.com"],oy=[];for(;Xp.length>0;)Xp.length===1||Math.random()>.5?oy.push(Xp.shift()):oy.push(Xp.pop());pP[""]=hP({resources:["https://api.iconify.design"].concat(oy)});function SWe(e,t){const n=hP(t);return n===null?!1:(pP[e]=n,!0)}function gP(e){return pP[e]}const CWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let BI=CWe();function EWe(e,t){const n=gP(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function OWe(e){return e===404}const AWe=(e,t,n)=>{const r=[],i=EWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function PWe(e){if(typeof e=="string"){const t=gP(e);if(t)return t.path}return"/"}const kWe=(e,t,n)=>{if(!BI){n("abort",424);return}let r=PWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;BI(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(OWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},TWe={prepare:AWe,send:kWe};function MWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=lf(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function HG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function RWe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||HG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let DWe=0;function $We(e,t,n){const r=DWe++,i=HG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function IWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?m2(i,t,n):i;o&&r.push(o)}),r}var NWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function LWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const L=k!=="success";switch(h=h.filter(U=>U!==C),u){case"pending":break;case"failed":if(L||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(L){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const U=e.resources.indexOf(C.resource);U!==-1&&U!==e.index&&(e.index=U)}u="completed",p.forEach(U=>{U(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,L)=>{O(k,M,L)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function KG(e){const t={...NWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=LWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function zI(){}const C3=Object.create(null);function FWe(e){if(!C3[e]){const t=gP(e);if(!t)return;const n=KG(t),r={config:t,redundancy:n};C3[e]=r}return C3[e]}function jWe(e,t,n){let r,i;if(typeof e=="string"){const o=h4(e);if(!o)return n(void 0,424),zI;i=o.send;const a=FWe(e);a&&(r=a.redundancy)}else{const o=hP(e);if(o){r=KG(o);const a=e.resources?e.resources[0]:"",s=h4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),zI):r.query(t,i,n)().abort}const UI="iconify2",im="iconify",qG=im+"-count",VI=im+"-version",GG=36e5,BWe=168,zWe=50;function p4(e,t){try{return e.getItem(t)}catch{}}function mP(e,t,n){try{return e.setItem(t,n),!0}catch{}}function WI(e,t){try{e.removeItem(t)}catch{}}function g4(e,t){return mP(e,qG,t.toString())}function m4(e){return parseInt(p4(e,qG))||0}const v2={local:!0,session:!0},YG={local:new Set,session:new Set};let vP=!1;function UWe(e){vP=e}let T1=typeof window>"u"?{}:window;function ZG(e){const t=e+"Storage";try{if(T1&&T1[t]&&typeof T1[t].length=="number")return T1[t]}catch{}v2[e]=!1}function XG(e,t){const n=ZG(e);if(!n)return;const r=p4(n,VI);if(r!==UI){if(r){const s=m4(n);for(let u=0;u{const u=im+s.toString(),l=p4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}WI(n,u)}};let a=m4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,g4(n,a)):YG[e].add(s))}function QG(){if(!vP){UWe(!0);for(const e in v2)XG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=lf(r,i);if(!dP(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function VWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in v2)XG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function WWe(e,t){vP||QG();function n(r){let i;if(!v2[r]||!(i=ZG(r)))return;const o=YG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=m4(i),a>=zWe||!g4(i,a+1))return;const s={cached:Math.floor(Date.now()/GG),provider:e.provider,data:t};return mP(i,im+a.toString(),JSON.stringify(s))}t.lastModified&&!VWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function HWe(){}function KWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,RWe(e)}))}function qWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(zG)?t:n).push(r)}),{valid:t,invalid:n}}function Qp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!dP(e,n).length){i();return}r&&WWe(e,n)}catch(o){console.error(o)}i(),KWe(e)}function HI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function GWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){HI(e.loadIcons(i,r,n),c=>{Qp(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);HI(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;Qp(e,[c],p,!1)})});return}const{valid:a,invalid:s}=qWe(i);if(s.length&&Qp(e,s,null,!1),!a.length)return;const u=r.match(zG)?h4(n):null;if(!u){Qp(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{jWe(n,c,f=>{Qp(e,c.icons,f,!0)})})}))}const YWe=(e,t)=>{const n=IWe(e,!0,UG()),r=MWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,HWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(lf(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=lf(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&GWe(u,l)}),$We(t,r,o)};function ZWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in VG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const XWe=/[\s,]+/;function QWe(e,t){t.split(XWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function JWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function eHe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function tHe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function nHe(e){return"data:image/svg+xml,"+tHe(e)}function rHe(e){return'url("'+nHe(e)+'")'}let M0;function iHe(){try{M0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{M0=null}}function oHe(e){return M0===void 0&&iHe(),M0?M0.createHTML(e):e}const JG={...WG,inline:!1},aHe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},sHe={display:"inline-block"},v4={backgroundColor:"currentColor"},eY={backgroundColor:"transparent"},KI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},qI={WebkitMask:v4,mask:v4,background:eY};for(const e in qI){const t=qI[e];for(const n in KI)t[e+n]=KI[n]}const uHe={...JG,inline:!0};function GI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const lHe=(e,t,n)=>{const r=t.inline?uHe:JG,i=ZWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?aHe:{}};if(n){const b=m2(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&QWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=JWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=vWe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:oHe(wWe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=eHe(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":rHe(v),width:GI(c.width),height:GI(c.height),...sHe,...m?v4:eY,...s},y.createElement("span",u)};UG(!0);_We("",TWe);if(typeof document<"u"&&typeof window<"u"){QG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!cWe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;SWe(n,i)||console.error(r)}catch{console.error(r)}}}}function tY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=FI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=FI(m);if(l({name:m,data:v}))if(v===void 0){const b=YWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?lHe({...fP,...h},e,f):e.children?e.children:y.createElement("span",{})}const CQe=y.forwardRef((e,t)=>tY({...e,_ref:t}));y.forwardRef((e,t)=>tY({inline:!0,...e,_ref:t}));var nY="AlertDialog",[cHe,EQe]=vi(nY,[ez]),Du=ez(),rY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(J0e,{...r,...n,modal:!0})};rY.displayName=nY;var fHe="AlertDialogTrigger",iY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ege,{...i,...r,ref:t})});iY.displayName=fHe;var dHe="AlertDialogPortal",oY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(tge,{...r,...n})};oY.displayName=dHe;var hHe="AlertDialogOverlay",aY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(nge,{...i,...r,ref:t})});aY.displayName=hHe;var Ld="AlertDialogContent",[pHe,gHe]=cHe(Ld),sY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Du(n),a=y.useRef(null),s=Gt(t,a),u=y.useRef(null);return I.jsx(Y0e,{contentName:Ld,titleName:uY,docsSlug:"alert-dialog",children:I.jsx(pHe,{scope:n,cancelRef:u,children:I.jsxs(rge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(O5,{children:r}),I.jsx(vHe,{contentRef:a})]})})})});sY.displayName=Ld;var uY="AlertDialogTitle",lY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ige,{...i,...r,ref:t})});lY.displayName=uY;var cY="AlertDialogDescription",fY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(oge,{...i,...r,ref:t})});fY.displayName=cY;var mHe="AlertDialogAction",dY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(mz,{...i,...r,ref:t})});dY.displayName=mHe;var hY="AlertDialogCancel",pY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=gHe(hY,n),o=Du(n),a=Gt(t,i);return I.jsx(mz,{...o,...r,ref:a})});pY.displayName=hY;var vHe=({contentRef:e})=>{const t=`\`${Ld}\` requires a description for the component to be accessible for screen reader users. + */function OQe(e,t){return e?eWe(e)?y.createElement(e,t):e:null}function eWe(e){return tWe(e)||typeof e=="function"||nWe(e)}function tWe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function nWe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function AQe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:ZVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const FG=Object.freeze({left:0,top:0,width:16,height:16}),bx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fP=Object.freeze({...FG,...bx}),f4=Object.freeze({...fP,body:"",hidden:!1});function rWe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function NI(e,t){const n=rWe(e,t);for(const r in f4)r in bx?r in e&&!(r in n)&&(n[r]=bx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function iWe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function oWe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=NI(r[s]||i[s],o)}return a(t),n.forEach(a),NI(e,o)}function jG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=iWe(e);for(const i in r){const o=r[i];o&&(t(i,oWe(e,i,o)),n.push(i))}return n}const aWe={provider:"",aliases:{},not_found:{},...FG};function S3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function BG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!S3(e,aWe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!S3(o,f4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!S3(o,f4))return null}return t}const zG=/^[a-z0-9]+(-[a-z0-9]+)*$/,mw=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!iy(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!iy(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!iy(s,n)?null:s}return null},iy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,LI=Object.create(null);function sWe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function lf(e,t){const n=LI[e]||(LI[e]=Object.create(null));return n[t]||(n[t]=sWe(e,t))}function dP(e,t){return BG(t)?jG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function uWe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let rm=!1;function UG(e){return typeof e=="boolean"&&(rm=e),rm}function FI(e){const t=typeof e=="string"?mw(e,!0,rm):e;if(t){const n=lf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function lWe(e,t){const n=mw(e,!0,rm);if(!n)return!1;const r=lf(n.provider,n.prefix);return t?uWe(r,n.name,t):(r.missing.add(n.name),!0)}function cWe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),rm&&!t&&!e.prefix){let i=!1;return BG(e)&&(e.prefix="",jG(e,(o,a)=>{lWe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!iy({provider:t,prefix:n,name:"a"}))return!1;const r=lf(t,n);return!!dP(r,e)}const VG=Object.freeze({width:null,height:null}),WG=Object.freeze({...VG,...bx}),fWe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dWe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(fWe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=dWe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function hWe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function pWe(e,t){return e?""+e+""+t:t}function gWe(e,t,n){const r=hWe(e);return pWe(r.defs,t+r.content+n)}const mWe=e=>e==="unset"||e==="undefined"||e==="none";function vWe(e,t){const n={...fP,...e},r={...WG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=gWe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=jI(f,u/l)):(c=a==="auto"?u:a,f=s===null?jI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{mWe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const yWe=/\sid="(\S+)"/g,bWe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xWe=0;function wWe(e,t=bWe){const n=[];let r;for(;r=yWe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(xWe++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const d4=Object.create(null);function _We(e,t){d4[e]=t}function h4(e){return d4[e]||d4[""]}function hP(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const pP=Object.create(null),Xp=["https://api.simplesvg.com","https://api.unisvg.com"],oy=[];for(;Xp.length>0;)Xp.length===1||Math.random()>.5?oy.push(Xp.shift()):oy.push(Xp.pop());pP[""]=hP({resources:["https://api.iconify.design"].concat(oy)});function SWe(e,t){const n=hP(t);return n===null?!1:(pP[e]=n,!0)}function gP(e){return pP[e]}const CWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let BI=CWe();function EWe(e,t){const n=gP(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function OWe(e){return e===404}const AWe=(e,t,n)=>{const r=[],i=EWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function PWe(e){if(typeof e=="string"){const t=gP(e);if(t)return t.path}return"/"}const kWe=(e,t,n)=>{if(!BI){n("abort",424);return}let r=PWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;BI(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(OWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},TWe={prepare:AWe,send:kWe};function MWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=lf(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function HG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function RWe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||HG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let DWe=0;function $We(e,t,n){const r=DWe++,i=HG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function IWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?mw(i,t,n):i;o&&r.push(o)}),r}var NWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function LWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const L=k!=="success";switch(h=h.filter(U=>U!==C),u){case"pending":break;case"failed":if(L||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(L){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const U=e.resources.indexOf(C.resource);U!==-1&&U!==e.index&&(e.index=U)}u="completed",p.forEach(U=>{U(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,L)=>{O(k,M,L)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function KG(e){const t={...NWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=LWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function zI(){}const C3=Object.create(null);function FWe(e){if(!C3[e]){const t=gP(e);if(!t)return;const n=KG(t),r={config:t,redundancy:n};C3[e]=r}return C3[e]}function jWe(e,t,n){let r,i;if(typeof e=="string"){const o=h4(e);if(!o)return n(void 0,424),zI;i=o.send;const a=FWe(e);a&&(r=a.redundancy)}else{const o=hP(e);if(o){r=KG(o);const a=e.resources?e.resources[0]:"",s=h4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),zI):r.query(t,i,n)().abort}const UI="iconify2",im="iconify",qG=im+"-count",VI=im+"-version",GG=36e5,BWe=168,zWe=50;function p4(e,t){try{return e.getItem(t)}catch{}}function mP(e,t,n){try{return e.setItem(t,n),!0}catch{}}function WI(e,t){try{e.removeItem(t)}catch{}}function g4(e,t){return mP(e,qG,t.toString())}function m4(e){return parseInt(p4(e,qG))||0}const vw={local:!0,session:!0},YG={local:new Set,session:new Set};let vP=!1;function UWe(e){vP=e}let T1=typeof window>"u"?{}:window;function ZG(e){const t=e+"Storage";try{if(T1&&T1[t]&&typeof T1[t].length=="number")return T1[t]}catch{}vw[e]=!1}function XG(e,t){const n=ZG(e);if(!n)return;const r=p4(n,VI);if(r!==UI){if(r){const s=m4(n);for(let u=0;u{const u=im+s.toString(),l=p4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}WI(n,u)}};let a=m4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,g4(n,a)):YG[e].add(s))}function QG(){if(!vP){UWe(!0);for(const e in vw)XG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=lf(r,i);if(!dP(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function VWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in vw)XG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function WWe(e,t){vP||QG();function n(r){let i;if(!vw[r]||!(i=ZG(r)))return;const o=YG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=m4(i),a>=zWe||!g4(i,a+1))return;const s={cached:Math.floor(Date.now()/GG),provider:e.provider,data:t};return mP(i,im+a.toString(),JSON.stringify(s))}t.lastModified&&!VWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function HWe(){}function KWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,RWe(e)}))}function qWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(zG)?t:n).push(r)}),{valid:t,invalid:n}}function Qp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!dP(e,n).length){i();return}r&&WWe(e,n)}catch(o){console.error(o)}i(),KWe(e)}function HI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function GWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){HI(e.loadIcons(i,r,n),c=>{Qp(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);HI(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;Qp(e,[c],p,!1)})});return}const{valid:a,invalid:s}=qWe(i);if(s.length&&Qp(e,s,null,!1),!a.length)return;const u=r.match(zG)?h4(n):null;if(!u){Qp(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{jWe(n,c,f=>{Qp(e,c.icons,f,!0)})})}))}const YWe=(e,t)=>{const n=IWe(e,!0,UG()),r=MWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,HWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(lf(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=lf(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&GWe(u,l)}),$We(t,r,o)};function ZWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in VG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const XWe=/[\s,]+/;function QWe(e,t){t.split(XWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function JWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function eHe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function tHe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function nHe(e){return"data:image/svg+xml,"+tHe(e)}function rHe(e){return'url("'+nHe(e)+'")'}let M0;function iHe(){try{M0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{M0=null}}function oHe(e){return M0===void 0&&iHe(),M0?M0.createHTML(e):e}const JG={...WG,inline:!1},aHe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},sHe={display:"inline-block"},v4={backgroundColor:"currentColor"},eY={backgroundColor:"transparent"},KI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},qI={WebkitMask:v4,mask:v4,background:eY};for(const e in qI){const t=qI[e];for(const n in KI)t[e+n]=KI[n]}const uHe={...JG,inline:!0};function GI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const lHe=(e,t,n)=>{const r=t.inline?uHe:JG,i=ZWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?aHe:{}};if(n){const b=mw(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&QWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=JWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=vWe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:oHe(wWe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=eHe(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":rHe(v),width:GI(c.width),height:GI(c.height),...sHe,...m?v4:eY,...s},y.createElement("span",u)};UG(!0);_We("",TWe);if(typeof document<"u"&&typeof window<"u"){QG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!cWe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;SWe(n,i)||console.error(r)}catch{console.error(r)}}}}function tY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=FI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=FI(m);if(l({name:m,data:v}))if(v===void 0){const b=YWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?lHe({...fP,...h},e,f):e.children?e.children:y.createElement("span",{})}const PQe=y.forwardRef((e,t)=>tY({...e,_ref:t}));y.forwardRef((e,t)=>tY({inline:!0,...e,_ref:t}));var nY="AlertDialog",[cHe,kQe]=vi(nY,[ez]),Du=ez(),rY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(J0e,{...r,...n,modal:!0})};rY.displayName=nY;var fHe="AlertDialogTrigger",iY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ege,{...i,...r,ref:t})});iY.displayName=fHe;var dHe="AlertDialogPortal",oY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(tge,{...r,...n})};oY.displayName=dHe;var hHe="AlertDialogOverlay",aY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(nge,{...i,...r,ref:t})});aY.displayName=hHe;var Ld="AlertDialogContent",[pHe,gHe]=cHe(Ld),sY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Du(n),a=y.useRef(null),s=Yt(t,a),u=y.useRef(null);return I.jsx(Y0e,{contentName:Ld,titleName:uY,docsSlug:"alert-dialog",children:I.jsx(pHe,{scope:n,cancelRef:u,children:I.jsxs(rge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(O5,{children:r}),I.jsx(vHe,{contentRef:a})]})})})});sY.displayName=Ld;var uY="AlertDialogTitle",lY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ige,{...i,...r,ref:t})});lY.displayName=uY;var cY="AlertDialogDescription",fY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(oge,{...i,...r,ref:t})});fY.displayName=cY;var mHe="AlertDialogAction",dY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(mz,{...i,...r,ref:t})});dY.displayName=mHe;var hY="AlertDialogCancel",pY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=gHe(hY,n),o=Du(n),a=Yt(t,i);return I.jsx(mz,{...o,...r,ref:a})});pY.displayName=hY;var vHe=({contentRef:e})=>{const t=`\`${Ld}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${Ld}\` by passing a \`${cY}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ld}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},OQe=rY,AQe=iY,PQe=oY,kQe=aY,TQe=sY,MQe=dY,RQe=pY,DQe=lY,$Qe=fY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!wHe(n))throw TypeError("Stringified UUID is invalid");return n}function gY(e,t,n){e=e||{};var r=e.random||(e.rng||bHe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,_He(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function SHe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function CHe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var mY=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new AHe;function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},om(e)}function PHe(e,t){if(om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kHe(e){var t=PHe(e,"string");return om(t)=="symbol"?t:t+""}function THe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},TQe=rY,MQe=iY,RQe=oY,DQe=aY,$Qe=sY,IQe=dY,NQe=pY,LQe=lY,FQe=fY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!wHe(n))throw TypeError("Stringified UUID is invalid");return n}function gY(e,t,n){e=e||{};var r=e.random||(e.rng||bHe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,_He(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function SHe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function CHe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var mY=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new AHe;function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},om(e)}function PHe(e,t){if(om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kHe(e){var t=PHe(e,"string");return om(t)=="symbol"?t:t+""}function THe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DHe(e,t){if(e){if(typeof e=="string")return YI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YI(e,t)}}function YI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var s=RHe(n),u;!(u=s()).done;){var l=u.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function O3(e,t){var n=e.split(` `),r=e.substr(0,t).split(` `),i=r.length,o=r[r.length-1].length,a=n[r.length-1],s=r.length>1?r[r.length-2]:null,u=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:s,nextLine:u}}var nd={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` @@ -541,7 +561,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((s&248)===240&&o+91114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Oh.defaultChars=";/?:@&=+$,#";Oh.componentChars="";const eN={};function GHe(e){let t=eN[e];if(t)return t;t=eN[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=GHe(t);let i="";for(let o=0,a=e.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}qm.defaultChars=";/?:@&=+$,-_.!~*'()#";qm.componentChars="-_.!~*'()";function _P(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function xx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const YHe=/^([a-z0-9.+-]+:)/i,ZHe=/:[0-9]*$/,XHe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,QHe=["<",">",'"',"`"," ","\r",` -`," "],JHe=["{","}","|","\\","^","`"].concat(QHe),eKe=["'"].concat(JHe),tN=["%","/","?",";","#"].concat(eKe),nN=["/","?","#"],tKe=255,rN=/^[+a-z0-9A-Z_-]{0,63}$/,nKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,iN={javascript:!0,"javascript:":!0},oN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function SP(e,t){if(e&&e instanceof xx)return e;const n=new xx;return n.parse(e,t),n}xx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=XHe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=YHe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&iN[a])&&(o=o.substr(2),this.slashes=!0)),!iN[a]&&(i||a&&!oN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(rN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(nKe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>tKe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),oN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xx.prototype.parseHost=function(e){let t=ZHe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const rKe=Object.freeze(Object.defineProperty({__proto__:null,decode:Oh,encode:qm,format:_P,parse:SP},Symbol.toStringTag,{value:"Module"})),NY=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,LY=/[\0-\x1F\x7F-\x9F]/,iKe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,CP=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,FY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,jY=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,oKe=Object.freeze(Object.defineProperty({__proto__:null,Any:NY,Cc:LY,Cf:iKe,P:CP,S:FY,Z:jY},Symbol.toStringTag,{value:"Module"})),aKe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),sKe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var k3;const uKe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),lKe=(k3=String.fromCodePoint)!==null&&k3!==void 0?k3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function cKe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=uKe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const fKe=32;var hl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hl||(hl={}));function w4(e){return e>=ni.ZERO&&e<=ni.NINE}function dKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function hKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||w4(e)}function pKe(e){return e===ni.EQUALS||hKe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var il;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(il||(il={}));class gKe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=il.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|fKe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==il.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==il.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function BY(e){let t="";const n=new gKe(e,r=>t+=lKe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function mKe(e,t,n,r){const i=(t&hl.BRANCH_LENGTH)>>7,o=t&hl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const vKe=BY(aKe);BY(sKe);function zY(e,t=il.Legacy){return vKe(e,t)}function yKe(e){return Object.prototype.toString.call(e)}function EP(e){return yKe(e)==="[object String]"}const bKe=Object.prototype.hasOwnProperty;function xKe(e,t){return bKe.call(e,t)}function y2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function UY(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function OP(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function wx(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const VY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,wKe=/&([a-z#][a-z0-9]{1,31});/gi,_Ke=new RegExp(VY.source+"|"+wKe.source,"gi"),SKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function CKe(e,t){if(t.charCodeAt(0)===35&&SKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return OP(r)?wx(r):e}const n=zY(e);return n!==e?n:e}function EKe(e){return e.indexOf("\\")<0?e:e.replace(VY,"$1")}function Ah(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(_Ke,function(t,n,r){return n||CKe(t,r)})}const OKe=/[&<>"]/,AKe=/[&<>"]/g,PKe={"&":"&","<":"<",">":">",'"':"""};function kKe(e){return PKe[e]}function Nl(e){return OKe.test(e)?e.replace(AKe,kKe):e}const TKe=/[.?*+^$[\]\\(){}|-]/g;function MKe(e){return e.replace(TKe,"\\$&")}function Hn(e){switch(e){case 9:case 32:return!0}return!1}function am(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function sm(e){return CP.test(e)||FY.test(e)}function um(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function b2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const RKe={mdurl:rKe,ucmicro:oKe},DKe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:UY,assign:y2,escapeHtml:Nl,escapeRE:MKe,fromCodePoint:wx,has:xKe,isMdAsciiPunct:um,isPunctChar:sm,isSpace:Hn,isString:EP,isValidEntityCode:OP,isWhiteSpace:am,lib:RKe,normalizeReference:b2,unescapeAll:Ah,unescapeMd:EKe},Symbol.toStringTag,{value:"Module"}));function $Ke(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Ah(e.slice(t,i)),o.pos=i,o.ok=!0),o}function NKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Nl(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Nl(e[t].content)+` +`," "],JHe=["{","}","|","\\","^","`"].concat(QHe),eKe=["'"].concat(JHe),tN=["%","/","?",";","#"].concat(eKe),nN=["/","?","#"],tKe=255,rN=/^[+a-z0-9A-Z_-]{0,63}$/,nKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,iN={javascript:!0,"javascript:":!0},oN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function SP(e,t){if(e&&e instanceof xx)return e;const n=new xx;return n.parse(e,t),n}xx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=XHe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=YHe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&iN[a])&&(o=o.substr(2),this.slashes=!0)),!iN[a]&&(i||a&&!oN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(rN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(nKe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>tKe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),oN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xx.prototype.parseHost=function(e){let t=ZHe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const rKe=Object.freeze(Object.defineProperty({__proto__:null,decode:Oh,encode:qm,format:_P,parse:SP},Symbol.toStringTag,{value:"Module"})),NY=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,LY=/[\0-\x1F\x7F-\x9F]/,iKe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,CP=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,FY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,jY=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,oKe=Object.freeze(Object.defineProperty({__proto__:null,Any:NY,Cc:LY,Cf:iKe,P:CP,S:FY,Z:jY},Symbol.toStringTag,{value:"Module"})),aKe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),sKe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var k3;const uKe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),lKe=(k3=String.fromCodePoint)!==null&&k3!==void 0?k3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function cKe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=uKe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const fKe=32;var hl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hl||(hl={}));function w4(e){return e>=ni.ZERO&&e<=ni.NINE}function dKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function hKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||w4(e)}function pKe(e){return e===ni.EQUALS||hKe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var il;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(il||(il={}));class gKe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=il.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|fKe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==il.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==il.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function BY(e){let t="";const n=new gKe(e,r=>t+=lKe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function mKe(e,t,n,r){const i=(t&hl.BRANCH_LENGTH)>>7,o=t&hl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const vKe=BY(aKe);BY(sKe);function zY(e,t=il.Legacy){return vKe(e,t)}function yKe(e){return Object.prototype.toString.call(e)}function EP(e){return yKe(e)==="[object String]"}const bKe=Object.prototype.hasOwnProperty;function xKe(e,t){return bKe.call(e,t)}function yw(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function UY(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function OP(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function wx(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const VY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,wKe=/&([a-z#][a-z0-9]{1,31});/gi,_Ke=new RegExp(VY.source+"|"+wKe.source,"gi"),SKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function CKe(e,t){if(t.charCodeAt(0)===35&&SKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return OP(r)?wx(r):e}const n=zY(e);return n!==e?n:e}function EKe(e){return e.indexOf("\\")<0?e:e.replace(VY,"$1")}function Ah(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(_Ke,function(t,n,r){return n||CKe(t,r)})}const OKe=/[&<>"]/,AKe=/[&<>"]/g,PKe={"&":"&","<":"<",">":">",'"':"""};function kKe(e){return PKe[e]}function Nl(e){return OKe.test(e)?e.replace(AKe,kKe):e}const TKe=/[.?*+^$[\]\\(){}|-]/g;function MKe(e){return e.replace(TKe,"\\$&")}function Hn(e){switch(e){case 9:case 32:return!0}return!1}function am(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function sm(e){return CP.test(e)||FY.test(e)}function um(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function bw(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const RKe={mdurl:rKe,ucmicro:oKe},DKe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:UY,assign:yw,escapeHtml:Nl,escapeRE:MKe,fromCodePoint:wx,has:xKe,isMdAsciiPunct:um,isPunctChar:sm,isSpace:Hn,isString:EP,isValidEntityCode:OP,isWhiteSpace:am,lib:RKe,normalizeReference:bw,unescapeAll:Ah,unescapeMd:EKe},Symbol.toStringTag,{value:"Module"}));function $Ke(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Ah(e.slice(t,i)),o.pos=i,o.ok=!0),o}function NKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Nl(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Nl(e[t].content)+` `};Is.fence=function(e,t,n,r,i){const o=e[t],a=o.info?Ah(o.info).trim():"";let s="",u="";if(a){const c=a.split(/(\s+)/g);s=c[0],u=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,s,u)||Nl(o.content):l=Nl(o.content),l.indexOf("${l} `}return`
${l}
@@ -550,9 +570,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `};Is.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};Is.text=function(e,t){return Nl(e[t].content)};Is.html_block=function(e,t){return e[t].content};Is.html_inline=function(e,t){return e[t].content};function ip(){this.rules=y2({},Is)}ip.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n `:">",o};ip.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};is.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function WY(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}WY.prototype.Token=is;const FKe=/\r\n?|\n/g,jKe=/\0/g;function BKe(e){let t;t=e.src.replace(FKe,` `),t=t.replace(jKe,"�"),e.src=t}function zKe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function UKe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function WKe(e){return/^<\/a\s*>/i.test(e)}function HKe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(VKe(s.content)&&o>0&&o--,WKe(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const u=s.content;let l=e.md.linkify.match(u);const c=[];let f=s.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let p=0;ph){const E=new e.Token("text","",0);E.content=u.slice(h,w),E.level=f,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",v]],x.level=f++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=f,c.push(S);const O=new e.Token("link_close","a",-1);O.level=--f,O.markup="linkify",O.info="auto",c.push(O),h=l[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(qKe,YKe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function XKe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&HY.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function QKe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(KKe.test(e.tokens[t].content)&&ZKe(e.tokens[t].children),HY.test(e.tokens[t].content)&&XKe(e.tokens[t].children))}const JKe=/['"]/,aN=/['"]/g,sN="’";function D1(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function eqe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let s=o.content,u=0,l=s.length;e:for(;u=0)m=s.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=w),!f&&!h){p&&(o.content=D1(o.content,c.index,sN));continue}if(h)for(n=r.length-1;n>=0;n--){let O=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!JKe.test(e.tokens[t].content)||eqe(e.tokens[t].children,e)}function nqe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ns.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ns.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Hn(this.src.charCodeAt(--t)))return t+1;return t};Ns.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ns.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,s=t;sr?o[a]=new Array(u-r+1).join(" ")+this.src.slice(c,f):o[a]=this.src.slice(c,f)}return o.join("")};Ns.prototype.Token=is;const rqe=65536;function M3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function uN(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Hn(s)||a===45&&Hn(s))return!1;for(;o=4)return!1;l=uN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let O=0;O=4||(l=uN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=f-l.length,S>rqe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` -`,o.map=[t,e.line],!0}function aqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=cN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=lN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const L=[u,0];s.map=L,f&&(s.info=e.src.slice(a,p-1));const U=e.tight,H=e.tShift[u],V=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=H,e.sCount[u]=V,e.tight=U,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,L[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let G=0,q=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let L=!1;for(let U=0,H=k.length;U"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const dqe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hqe="[a-zA-Z_:][a-zA-Z0-9:._-]*",pqe="[^\"'=<>`\\x00-\\x20]+",gqe="'[^']*'",mqe='"[^"]*"',vqe="(?:"+pqe+"|"+gqe+"|"+mqe+")",yqe="(?:\\s+"+hqe+"(?:\\s*=\\s*"+vqe+")?)",KY="<[A-Za-z][A-Za-z0-9\\-]*"+yqe+"*\\s*\\/?>",qY="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",bqe="",xqe="<[?][\\s\\S]*?[?]>",wqe="]*>",_qe="",Sqe=new RegExp("^(?:"+KY+"|"+qY+"|"+bqe+"|"+xqe+"|"+wqe+"|"+_qe+")"),Cqe=new RegExp("^(?:"+KY+"|"+qY+")"),Jf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Cqe.source+"\\s*$"),/^$/,!1]];function Eqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Hn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Aqe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Gm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(Mqe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function Dqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){PP[e.charCodeAt(0)]=1});function $qe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&PP[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Iqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function jqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;dN(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[b2(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function zqe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[b2(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const Uqe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Vqe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Wqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(Vqe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Uqe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function Hqe(e){return/^\s]/i.test(e)}function Kqe(e){return/^<\/a\s*>/i.test(e)}function qqe(e){const t=e|32;return t>=97&&t<=122}function Gqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!qqe(i))return!1;const o=e.src.slice(r).match(Sqe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Hqe(a.content)&&e.linkLevel++,Kqe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Yqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Zqe=/^&([a-z][a-z0-9]{1,31});/i;function Xqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Yqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=OP(a)?wx(a):wx(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Zqe);if(o){const a=zY(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function hN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Qqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;hN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ym.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ym.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function _4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function w2(e){return Object.prototype.toString.call(e)}function tGe(e){return w2(e)==="[object String]"}function nGe(e){return w2(e)==="[object Object]"}function rGe(e){return w2(e)==="[object RegExp]"}function pN(e){return w2(e)==="[object Function]"}function iGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ZY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function oGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||ZY.hasOwnProperty(n)},!1)}const aGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},sGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",uGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function lGe(e){e.__index__=-1,e.__text_cache__=""}function cGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function gN(){return function(e,t){t.normalize(e)}}function _x(e){const t=e.re=eGe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(sGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,nGe(u)){rGe(u.validate)?l.validate=cGe(u.validate):pN(u.validate)?l.validate=u.validate:o(s,u),pN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=gN();return}if(tGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:gN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(iGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),lGe(e)}function fGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function S4(e,t){const n=new fGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||oGe(e)&&(t=e,e={}),this.__opts__=_4({},ZY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=_4({},aGe,e),this.__compiled__={},this.__tlds__=uGe,this.__tlds_replaced__=!1,this.re={},_x(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,_x(this),this};Wo.prototype.set=function(t){return this.__opts__=_4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(S4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(S4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,S4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),_x(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_x(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Fd=2147483647,ws=36,kP=1,lm=26,dGe=38,hGe=700,XY=72,QY=128,JY="-",pGe=/^xn--/,gGe=/[^\0-\x7F]/,mGe=/[\x2E\u3002\uFF0E\uFF61]/g,vGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$3=ws-kP,_s=Math.floor,I3=String.fromCharCode;function Ju(e){throw new RangeError(vGe[e])}function yGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function eZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(mGe,".");const i=e.split("."),o=yGe(i,t).join(".");return r+o}function tZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),xGe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},mN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},nZ=function(e,t,n){let r=0;for(e=n?_s(e/hGe):e>>1,e+=_s(e/t);e>$3*lm>>1;r+=ws)e=_s(e/$3);return _s(r+($3+1)*e/(e+dGe))},rZ=function(e){const t=[],n=e.length;let r=0,i=QY,o=XY,a=e.lastIndexOf(JY);a<0&&(a=0);for(let s=0;s=128&&Ju("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Ju("invalid-input");const h=xGe(e.charCodeAt(s++));h>=ws&&Ju("invalid-input"),h>_s((Fd-r)/c)&&Ju("overflow"),r+=h*c;const p=f<=o?kP:f>=o+lm?lm:f-o;if(h_s(Fd/m)&&Ju("overflow"),c*=m}const l=t.length+1;o=nZ(r-u,l,u==0),_s(r/l)>Fd-i&&Ju("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},iZ=function(e){const t=[];e=tZ(e);const n=e.length;let r=QY,i=0,o=XY;for(const u of e)u<128&&t.push(I3(u));const a=t.length;let s=a;for(a&&t.push(JY);s=r&&c_s((Fd-i)/l)&&Ju("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cFd&&Ju("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?kP:h>=o+lm?lm:h-o;if(f=0))try{t.hostname=oZ.toASCII(t.hostname)}catch{}return qm(_P(t))}function MGe(e){const t=SP(e,!0);if(t.hostname&&(!t.protocol||aZ.indexOf(t.protocol)>=0))try{t.hostname=oZ.toUnicode(t.hostname)}catch{}return Oh(_P(t),Oh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||EP(e)||(t=e||{},e="default"),this.inline=new Ym,this.block=new x2,this.core=new AP,this.renderer=new ip,this.linkify=new Wo,this.validateLink=kGe,this.normalizeLink=TGe,this.normalizeLinkText=MGe,this.utils=DKe,this.helpers=y2({},LKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return y2(this.options,e),this};es.prototype.configure=function(e){const t=this;if(EP(e)){const n=e;if(e=OGe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var sZ={exports:{}};(function(e){(function(t){var n=function(T){var D,$=new Float64Array(16);if(T)for(D=0;D>24&255,T[D+1]=$>>16&255,T[D+2]=$>>8&255,T[D+3]=$&255,T[D+4]=A>>24&255,T[D+5]=A>>16&255,T[D+6]=A>>8&255,T[D+7]=A&255}function v(T,D,$,A,N){var Q,ee=0;for(Q=0;Q>>8)-1}function b(T,D,$,A){return v(T,D,$,A,16)}function w(T,D,$,A){return v(T,D,$,A,32)}function x(T,D,$,A){for(var N=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,Q=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ee=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,fe=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,_e=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,je=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ie=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,nt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=N,ut=Q,Xe=ee,Ne=fe,Ke=_e,Ge=je,pe=We,he=ct,Re=Ie,Oe=nt,Pe=bt,Be=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,J,Yt=0;Yt<20;Yt+=2)J=Qe+vt|0,Ke^=J<<7|J>>>25,J=Ke+Qe|0,Re^=J<<9|J>>>23,J=Re+Ke|0,vt^=J<<13|J>>>19,J=vt+Re|0,Qe^=J<<18|J>>>14,J=Ge+ut|0,Oe^=J<<7|J>>>25,J=Oe+Ge|0,Lt^=J<<9|J>>>23,J=Lt+Oe|0,ut^=J<<13|J>>>19,J=ut+Lt|0,Ge^=J<<18|J>>>14,J=Pe+pe|0,Ft^=J<<7|J>>>25,J=Ft+Pe|0,Xe^=J<<9|J>>>23,J=Xe+Ft|0,pe^=J<<13|J>>>19,J=pe+Xe|0,Pe^=J<<18|J>>>14,J=$t+Be|0,Ne^=J<<7|J>>>25,J=Ne+$t|0,he^=J<<9|J>>>23,J=he+Ne|0,Be^=J<<13|J>>>19,J=Be+he|0,$t^=J<<18|J>>>14,J=Qe+Ne|0,ut^=J<<7|J>>>25,J=ut+Qe|0,Xe^=J<<9|J>>>23,J=Xe+ut|0,Ne^=J<<13|J>>>19,J=Ne+Xe|0,Qe^=J<<18|J>>>14,J=Ge+Ke|0,pe^=J<<7|J>>>25,J=pe+Ge|0,he^=J<<9|J>>>23,J=he+pe|0,Ke^=J<<13|J>>>19,J=Ke+he|0,Ge^=J<<18|J>>>14,J=Pe+Oe|0,Be^=J<<7|J>>>25,J=Be+Pe|0,Re^=J<<9|J>>>23,J=Re+Be|0,Oe^=J<<13|J>>>19,J=Oe+Re|0,Pe^=J<<18|J>>>14,J=$t+Ft|0,vt^=J<<7|J>>>25,J=vt+$t|0,Lt^=J<<9|J>>>23,J=Lt+vt|0,Ft^=J<<13|J>>>19,J=Ft+Lt|0,$t^=J<<18|J>>>14;Qe=Qe+N|0,ut=ut+Q|0,Xe=Xe+ee|0,Ne=Ne+fe|0,Ke=Ke+_e|0,Ge=Ge+je|0,pe=pe+We|0,he=he+ct|0,Re=Re+Ie|0,Oe=Oe+nt|0,Pe=Pe+bt|0,Be=Be+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Qe>>>0&255,T[1]=Qe>>>8&255,T[2]=Qe>>>16&255,T[3]=Qe>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Xe>>>0&255,T[9]=Xe>>>8&255,T[10]=Xe>>>16&255,T[11]=Xe>>>24&255,T[12]=Ne>>>0&255,T[13]=Ne>>>8&255,T[14]=Ne>>>16&255,T[15]=Ne>>>24&255,T[16]=Ke>>>0&255,T[17]=Ke>>>8&255,T[18]=Ke>>>16&255,T[19]=Ke>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=pe>>>0&255,T[25]=pe>>>8&255,T[26]=pe>>>16&255,T[27]=pe>>>24&255,T[28]=he>>>0&255,T[29]=he>>>8&255,T[30]=he>>>16&255,T[31]=he>>>24&255,T[32]=Re>>>0&255,T[33]=Re>>>8&255,T[34]=Re>>>16&255,T[35]=Re>>>24&255,T[36]=Oe>>>0&255,T[37]=Oe>>>8&255,T[38]=Oe>>>16&255,T[39]=Oe>>>24&255,T[40]=Pe>>>0&255,T[41]=Pe>>>8&255,T[42]=Pe>>>16&255,T[43]=Pe>>>24&255,T[44]=Be>>>0&255,T[45]=Be>>>8&255,T[46]=Be>>>16&255,T[47]=Be>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,D,$,A){for(var N=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,Q=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ee=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,fe=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,_e=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,je=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ie=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,nt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=N,ut=Q,Xe=ee,Ne=fe,Ke=_e,Ge=je,pe=We,he=ct,Re=Ie,Oe=nt,Pe=bt,Be=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,J,Yt=0;Yt<20;Yt+=2)J=Qe+vt|0,Ke^=J<<7|J>>>25,J=Ke+Qe|0,Re^=J<<9|J>>>23,J=Re+Ke|0,vt^=J<<13|J>>>19,J=vt+Re|0,Qe^=J<<18|J>>>14,J=Ge+ut|0,Oe^=J<<7|J>>>25,J=Oe+Ge|0,Lt^=J<<9|J>>>23,J=Lt+Oe|0,ut^=J<<13|J>>>19,J=ut+Lt|0,Ge^=J<<18|J>>>14,J=Pe+pe|0,Ft^=J<<7|J>>>25,J=Ft+Pe|0,Xe^=J<<9|J>>>23,J=Xe+Ft|0,pe^=J<<13|J>>>19,J=pe+Xe|0,Pe^=J<<18|J>>>14,J=$t+Be|0,Ne^=J<<7|J>>>25,J=Ne+$t|0,he^=J<<9|J>>>23,J=he+Ne|0,Be^=J<<13|J>>>19,J=Be+he|0,$t^=J<<18|J>>>14,J=Qe+Ne|0,ut^=J<<7|J>>>25,J=ut+Qe|0,Xe^=J<<9|J>>>23,J=Xe+ut|0,Ne^=J<<13|J>>>19,J=Ne+Xe|0,Qe^=J<<18|J>>>14,J=Ge+Ke|0,pe^=J<<7|J>>>25,J=pe+Ge|0,he^=J<<9|J>>>23,J=he+pe|0,Ke^=J<<13|J>>>19,J=Ke+he|0,Ge^=J<<18|J>>>14,J=Pe+Oe|0,Be^=J<<7|J>>>25,J=Be+Pe|0,Re^=J<<9|J>>>23,J=Re+Be|0,Oe^=J<<13|J>>>19,J=Oe+Re|0,Pe^=J<<18|J>>>14,J=$t+Ft|0,vt^=J<<7|J>>>25,J=vt+$t|0,Lt^=J<<9|J>>>23,J=Lt+vt|0,Ft^=J<<13|J>>>19,J=Ft+Lt|0,$t^=J<<18|J>>>14;T[0]=Qe>>>0&255,T[1]=Qe>>>8&255,T[2]=Qe>>>16&255,T[3]=Qe>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Pe>>>0&255,T[9]=Pe>>>8&255,T[10]=Pe>>>16&255,T[11]=Pe>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=pe>>>0&255,T[17]=pe>>>8&255,T[18]=pe>>>16&255,T[19]=pe>>>24&255,T[20]=he>>>0&255,T[21]=he>>>8&255,T[22]=he>>>16&255,T[23]=he>>>24&255,T[24]=Re>>>0&255,T[25]=Re>>>8&255,T[26]=Re>>>16&255,T[27]=Re>>>24&255,T[28]=Oe>>>0&255,T[29]=Oe>>>8&255,T[30]=Oe>>>16&255,T[31]=Oe>>>24&255}function O(T,D,$,A){x(T,D,$,A)}function E(T,D,$,A){S(T,D,$,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,D,$,A,N,Q,ee){var fe=new Uint8Array(16),_e=new Uint8Array(64),je,We;for(We=0;We<16;We++)fe[We]=0;for(We=0;We<8;We++)fe[We]=Q[We];for(;N>=64;){for(O(_e,fe,ee,C),We=0;We<64;We++)T[D+We]=$[A+We]^_e[We];for(je=1,We=8;We<16;We++)je=je+(fe[We]&255)|0,fe[We]=je&255,je>>>=8;N-=64,D+=64,A+=64}if(N>0)for(O(_e,fe,ee,C),We=0;We=64;){for(O(ee,Q,N,C),_e=0;_e<64;_e++)T[D+_e]=ee[_e];for(fe=1,_e=8;_e<16;_e++)fe=fe+(Q[_e]&255)|0,Q[_e]=fe&255,fe>>>=8;$-=64,D+=64}if($>0)for(O(ee,Q,N,C),_e=0;_e<$;_e++)T[D+_e]=ee[_e];return 0}function L(T,D,$,A,N){var Q=new Uint8Array(32);E(Q,A,N,C);for(var ee=new Uint8Array(8),fe=0;fe<8;fe++)ee[fe]=A[fe+16];return M(T,D,$,ee,Q)}function U(T,D,$,A,N,Q,ee){var fe=new Uint8Array(32);E(fe,Q,ee,C);for(var _e=new Uint8Array(8),je=0;je<8;je++)_e[je]=Q[je+16];return k(T,D,$,A,N,_e,fe)}var H=function(T){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,A,N,Q,ee,fe,_e;D=T[0]&255|(T[1]&255)<<8,this.r[0]=D&8191,$=T[2]&255|(T[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=($>>>10|A<<6)&7939,N=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|N<<9)&8191,Q=T[8]&255|(T[9]&255)<<8,this.r[4]=(N>>>4|Q<<12)&255,this.r[5]=Q>>>1&8190,ee=T[10]&255|(T[11]&255)<<8,this.r[6]=(Q>>>14|ee<<2)&8191,fe=T[12]&255|(T[13]&255)<<8,this.r[7]=(ee>>>11|fe<<5)&8065,_e=T[14]&255|(T[15]&255)<<8,this.r[8]=(fe>>>8|_e<<8)&8191,this.r[9]=_e>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};H.prototype.blocks=function(T,D,$){for(var A=this.fin?0:2048,N,Q,ee,fe,_e,je,We,ct,Ie,nt,bt,Ot,gt,ht,xt,wt,Qe,ut,Xe,Ne=this.h[0],Ke=this.h[1],Ge=this.h[2],pe=this.h[3],he=this.h[4],Re=this.h[5],Oe=this.h[6],Pe=this.h[7],Be=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],J=this.r[3],Yt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];$>=16;)N=T[D+0]&255|(T[D+1]&255)<<8,Ne+=N&8191,Q=T[D+2]&255|(T[D+3]&255)<<8,Ke+=(N>>>13|Q<<3)&8191,ee=T[D+4]&255|(T[D+5]&255)<<8,Ge+=(Q>>>10|ee<<6)&8191,fe=T[D+6]&255|(T[D+7]&255)<<8,pe+=(ee>>>7|fe<<9)&8191,_e=T[D+8]&255|(T[D+9]&255)<<8,he+=(fe>>>4|_e<<12)&8191,Re+=_e>>>1&8191,je=T[D+10]&255|(T[D+11]&255)<<8,Oe+=(_e>>>14|je<<2)&8191,We=T[D+12]&255|(T[D+13]&255)<<8,Pe+=(je>>>11|We<<5)&8191,ct=T[D+14]&255|(T[D+15]&255)<<8,Be+=(We>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ie=0,nt=Ie,nt+=Ne*Lt,nt+=Ke*(5*rn),nt+=Ge*(5*ln),nt+=pe*(5*jt),nt+=he*(5*un),Ie=nt>>>13,nt&=8191,nt+=Re*(5*sn),nt+=Oe*(5*Yt),nt+=Pe*(5*J),nt+=Be*(5*$t),nt+=vt*(5*Ft),Ie+=nt>>>13,nt&=8191,bt=Ie,bt+=Ne*Ft,bt+=Ke*Lt,bt+=Ge*(5*rn),bt+=pe*(5*ln),bt+=he*(5*jt),Ie=bt>>>13,bt&=8191,bt+=Re*(5*un),bt+=Oe*(5*sn),bt+=Pe*(5*Yt),bt+=Be*(5*J),bt+=vt*(5*$t),Ie+=bt>>>13,bt&=8191,Ot=Ie,Ot+=Ne*$t,Ot+=Ke*Ft,Ot+=Ge*Lt,Ot+=pe*(5*rn),Ot+=he*(5*ln),Ie=Ot>>>13,Ot&=8191,Ot+=Re*(5*jt),Ot+=Oe*(5*un),Ot+=Pe*(5*sn),Ot+=Be*(5*Yt),Ot+=vt*(5*J),Ie+=Ot>>>13,Ot&=8191,gt=Ie,gt+=Ne*J,gt+=Ke*$t,gt+=Ge*Ft,gt+=pe*Lt,gt+=he*(5*rn),Ie=gt>>>13,gt&=8191,gt+=Re*(5*ln),gt+=Oe*(5*jt),gt+=Pe*(5*un),gt+=Be*(5*sn),gt+=vt*(5*Yt),Ie+=gt>>>13,gt&=8191,ht=Ie,ht+=Ne*Yt,ht+=Ke*J,ht+=Ge*$t,ht+=pe*Ft,ht+=he*Lt,Ie=ht>>>13,ht&=8191,ht+=Re*(5*rn),ht+=Oe*(5*ln),ht+=Pe*(5*jt),ht+=Be*(5*un),ht+=vt*(5*sn),Ie+=ht>>>13,ht&=8191,xt=Ie,xt+=Ne*sn,xt+=Ke*Yt,xt+=Ge*J,xt+=pe*$t,xt+=he*Ft,Ie=xt>>>13,xt&=8191,xt+=Re*Lt,xt+=Oe*(5*rn),xt+=Pe*(5*ln),xt+=Be*(5*jt),xt+=vt*(5*un),Ie+=xt>>>13,xt&=8191,wt=Ie,wt+=Ne*un,wt+=Ke*sn,wt+=Ge*Yt,wt+=pe*J,wt+=he*$t,Ie=wt>>>13,wt&=8191,wt+=Re*Ft,wt+=Oe*Lt,wt+=Pe*(5*rn),wt+=Be*(5*ln),wt+=vt*(5*jt),Ie+=wt>>>13,wt&=8191,Qe=Ie,Qe+=Ne*jt,Qe+=Ke*un,Qe+=Ge*sn,Qe+=pe*Yt,Qe+=he*J,Ie=Qe>>>13,Qe&=8191,Qe+=Re*$t,Qe+=Oe*Ft,Qe+=Pe*Lt,Qe+=Be*(5*rn),Qe+=vt*(5*ln),Ie+=Qe>>>13,Qe&=8191,ut=Ie,ut+=Ne*ln,ut+=Ke*jt,ut+=Ge*un,ut+=pe*sn,ut+=he*Yt,Ie=ut>>>13,ut&=8191,ut+=Re*J,ut+=Oe*$t,ut+=Pe*Ft,ut+=Be*Lt,ut+=vt*(5*rn),Ie+=ut>>>13,ut&=8191,Xe=Ie,Xe+=Ne*rn,Xe+=Ke*ln,Xe+=Ge*jt,Xe+=pe*un,Xe+=he*sn,Ie=Xe>>>13,Xe&=8191,Xe+=Re*Yt,Xe+=Oe*J,Xe+=Pe*$t,Xe+=Be*Ft,Xe+=vt*Lt,Ie+=Xe>>>13,Xe&=8191,Ie=(Ie<<2)+Ie|0,Ie=Ie+nt|0,nt=Ie&8191,Ie=Ie>>>13,bt+=Ie,Ne=nt,Ke=bt,Ge=Ot,pe=gt,he=ht,Re=xt,Oe=wt,Pe=Qe,Be=ut,vt=Xe,D+=16,$-=16;this.h[0]=Ne,this.h[1]=Ke,this.h[2]=Ge,this.h[3]=pe,this.h[4]=he,this.h[5]=Re,this.h[6]=Oe,this.h[7]=Pe,this.h[8]=Be,this.h[9]=vt},H.prototype.finish=function(T,D){var $=new Uint16Array(10),A,N,Q,ee;if(this.leftover){for(ee=this.leftover,this.buffer[ee++]=1;ee<16;ee++)this.buffer[ee]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,ee=2;ee<10;ee++)this.h[ee]+=A,A=this.h[ee]>>>13,this.h[ee]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,$[0]=this.h[0]+5,A=$[0]>>>13,$[0]&=8191,ee=1;ee<10;ee++)$[ee]=this.h[ee]+A,A=$[ee]>>>13,$[ee]&=8191;for($[9]-=8192,N=(A^1)-1,ee=0;ee<10;ee++)$[ee]&=N;for(N=~N,ee=0;ee<10;ee++)this.h[ee]=this.h[ee]&N|$[ee];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Q=this.h[0]+this.pad[0],this.h[0]=Q&65535,ee=1;ee<8;ee++)Q=(this.h[ee]+this.pad[ee]|0)+(Q>>>16)|0,this.h[ee]=Q&65535;T[D+0]=this.h[0]>>>0&255,T[D+1]=this.h[0]>>>8&255,T[D+2]=this.h[1]>>>0&255,T[D+3]=this.h[1]>>>8&255,T[D+4]=this.h[2]>>>0&255,T[D+5]=this.h[2]>>>8&255,T[D+6]=this.h[3]>>>0&255,T[D+7]=this.h[3]>>>8&255,T[D+8]=this.h[4]>>>0&255,T[D+9]=this.h[4]>>>8&255,T[D+10]=this.h[5]>>>0&255,T[D+11]=this.h[5]>>>8&255,T[D+12]=this.h[6]>>>0&255,T[D+13]=this.h[6]>>>8&255,T[D+14]=this.h[7]>>>0&255,T[D+15]=this.h[7]>>>8&255},H.prototype.update=function(T,D,$){var A,N;if(this.leftover){for(N=16-this.leftover,N>$&&(N=$),A=0;A=16&&(N=$-$%16,this.blocks(T,D,N),D+=N,$-=N),$){for(A=0;A<$;A++)this.buffer[this.leftover+A]=T[D+A];this.leftover+=$}};function V(T,D,$,A,N,Q){var ee=new H(Q);return ee.update($,A,N),ee.finish(T,D),0}function ne(T,D,$,A,N,Q){var ee=new Uint8Array(16);return V(ee,0,$,A,N,Q),b(T,D,ee,0)}function Z(T,D,$,A,N){var Q;if($<32)return-1;for(U(T,0,D,0,$,A,N),V(T,16,T,32,$-32,T),Q=0;Q<16;Q++)T[Q]=0;return 0}function G(T,D,$,A,N){var Q,ee=new Uint8Array(32);if($<32||(L(ee,0,32,A,N),ne(D,16,D,32,$-32,ee)!==0))return-1;for(U(T,0,D,0,$,A,N),Q=0;Q<32;Q++)T[Q]=0;return 0}function q(T,D){var $;for($=0;$<16;$++)T[$]=D[$]|0}function W(T){var D,$,A=1;for(D=0;D<16;D++)$=T[D]+A+65535,A=Math.floor($/65536),T[D]=$-A*65536;T[0]+=A-1+37*(A-1)}function j(T,D,$){for(var A,N=~($-1),Q=0;Q<16;Q++)A=N&(T[Q]^D[Q]),T[Q]^=A,D[Q]^=A}function K(T,D){var $,A,N,Q=n(),ee=n();for($=0;$<16;$++)ee[$]=D[$];for(W(ee),W(ee),W(ee),A=0;A<2;A++){for(Q[0]=ee[0]-65517,$=1;$<15;$++)Q[$]=ee[$]-65535-(Q[$-1]>>16&1),Q[$-1]&=65535;Q[15]=ee[15]-32767-(Q[14]>>16&1),N=Q[15]>>16&1,Q[14]&=65535,j(ee,Q,1-N)}for($=0;$<16;$++)T[2*$]=ee[$]&255,T[2*$+1]=ee[$]>>8}function Y(T,D){var $=new Uint8Array(32),A=new Uint8Array(32);return K($,T),K(A,D),w($,0,A,0)}function oe(T){var D=new Uint8Array(32);return K(D,T),D[0]&1}function ae(T,D){var $;for($=0;$<16;$++)T[$]=D[2*$]+(D[2*$+1]<<8);T[15]&=32767}function ue(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]+$[A]}function be(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]-$[A]}function we(T,D,$){var A,N,Q=0,ee=0,fe=0,_e=0,je=0,We=0,ct=0,Ie=0,nt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Qe=0,ut=0,Xe=0,Ne=0,Ke=0,Ge=0,pe=0,he=0,Re=0,Oe=0,Pe=0,Be=0,vt=0,Lt=0,Ft=0,$t=0,J=$[0],Yt=$[1],sn=$[2],un=$[3],jt=$[4],ln=$[5],rn=$[6],Gn=$[7],mn=$[8],Pn=$[9],Yn=$[10],Zn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];A=D[0],Q+=A*J,ee+=A*Yt,fe+=A*sn,_e+=A*un,je+=A*jt,We+=A*ln,ct+=A*rn,Ie+=A*Gn,nt+=A*mn,bt+=A*Pn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Qe+=A*Nr,A=D[1],ee+=A*J,fe+=A*Yt,_e+=A*sn,je+=A*un,We+=A*jt,ct+=A*ln,Ie+=A*rn,nt+=A*Gn,bt+=A*mn,Ot+=A*Pn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Qe+=A*Ir,ut+=A*Nr,A=D[2],fe+=A*J,_e+=A*Yt,je+=A*sn,We+=A*un,ct+=A*jt,Ie+=A*ln,nt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*Pn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Qe+=A*$r,ut+=A*Ir,Xe+=A*Nr,A=D[3],_e+=A*J,je+=A*Yt,We+=A*sn,ct+=A*un,Ie+=A*jt,nt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*Pn,xt+=A*Yn,wt+=A*Zn,Qe+=A*xr,ut+=A*$r,Xe+=A*Ir,Ne+=A*Nr,A=D[4],je+=A*J,We+=A*Yt,ct+=A*sn,Ie+=A*un,nt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*Pn,wt+=A*Yn,Qe+=A*Zn,ut+=A*xr,Xe+=A*$r,Ne+=A*Ir,Ke+=A*Nr,A=D[5],We+=A*J,ct+=A*Yt,Ie+=A*sn,nt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*Pn,Qe+=A*Yn,ut+=A*Zn,Xe+=A*xr,Ne+=A*$r,Ke+=A*Ir,Ge+=A*Nr,A=D[6],ct+=A*J,Ie+=A*Yt,nt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Qe+=A*Pn,ut+=A*Yn,Xe+=A*Zn,Ne+=A*xr,Ke+=A*$r,Ge+=A*Ir,pe+=A*Nr,A=D[7],Ie+=A*J,nt+=A*Yt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Qe+=A*mn,ut+=A*Pn,Xe+=A*Yn,Ne+=A*Zn,Ke+=A*xr,Ge+=A*$r,pe+=A*Ir,he+=A*Nr,A=D[8],nt+=A*J,bt+=A*Yt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Qe+=A*Gn,ut+=A*mn,Xe+=A*Pn,Ne+=A*Yn,Ke+=A*Zn,Ge+=A*xr,pe+=A*$r,he+=A*Ir,Re+=A*Nr,A=D[9],bt+=A*J,Ot+=A*Yt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Qe+=A*rn,ut+=A*Gn,Xe+=A*mn,Ne+=A*Pn,Ke+=A*Yn,Ge+=A*Zn,pe+=A*xr,he+=A*$r,Re+=A*Ir,Oe+=A*Nr,A=D[10],Ot+=A*J,gt+=A*Yt,ht+=A*sn,xt+=A*un,wt+=A*jt,Qe+=A*ln,ut+=A*rn,Xe+=A*Gn,Ne+=A*mn,Ke+=A*Pn,Ge+=A*Yn,pe+=A*Zn,he+=A*xr,Re+=A*$r,Oe+=A*Ir,Pe+=A*Nr,A=D[11],gt+=A*J,ht+=A*Yt,xt+=A*sn,wt+=A*un,Qe+=A*jt,ut+=A*ln,Xe+=A*rn,Ne+=A*Gn,Ke+=A*mn,Ge+=A*Pn,pe+=A*Yn,he+=A*Zn,Re+=A*xr,Oe+=A*$r,Pe+=A*Ir,Be+=A*Nr,A=D[12],ht+=A*J,xt+=A*Yt,wt+=A*sn,Qe+=A*un,ut+=A*jt,Xe+=A*ln,Ne+=A*rn,Ke+=A*Gn,Ge+=A*mn,pe+=A*Pn,he+=A*Yn,Re+=A*Zn,Oe+=A*xr,Pe+=A*$r,Be+=A*Ir,vt+=A*Nr,A=D[13],xt+=A*J,wt+=A*Yt,Qe+=A*sn,ut+=A*un,Xe+=A*jt,Ne+=A*ln,Ke+=A*rn,Ge+=A*Gn,pe+=A*mn,he+=A*Pn,Re+=A*Yn,Oe+=A*Zn,Pe+=A*xr,Be+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=D[14],wt+=A*J,Qe+=A*Yt,ut+=A*sn,Xe+=A*un,Ne+=A*jt,Ke+=A*ln,Ge+=A*rn,pe+=A*Gn,he+=A*mn,Re+=A*Pn,Oe+=A*Yn,Pe+=A*Zn,Be+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=D[15],Qe+=A*J,ut+=A*Yt,Xe+=A*sn,Ne+=A*un,Ke+=A*jt,Ge+=A*ln,pe+=A*rn,he+=A*Gn,Re+=A*mn,Oe+=A*Pn,Pe+=A*Yn,Be+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,Q+=38*ut,ee+=38*Xe,fe+=38*Ne,_e+=38*Ke,je+=38*Ge,We+=38*pe,ct+=38*he,Ie+=38*Re,nt+=38*Oe,bt+=38*Pe,Ot+=38*Be,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,N=1,A=Q+N+65535,N=Math.floor(A/65536),Q=A-N*65536,A=ee+N+65535,N=Math.floor(A/65536),ee=A-N*65536,A=fe+N+65535,N=Math.floor(A/65536),fe=A-N*65536,A=_e+N+65535,N=Math.floor(A/65536),_e=A-N*65536,A=je+N+65535,N=Math.floor(A/65536),je=A-N*65536,A=We+N+65535,N=Math.floor(A/65536),We=A-N*65536,A=ct+N+65535,N=Math.floor(A/65536),ct=A-N*65536,A=Ie+N+65535,N=Math.floor(A/65536),Ie=A-N*65536,A=nt+N+65535,N=Math.floor(A/65536),nt=A-N*65536,A=bt+N+65535,N=Math.floor(A/65536),bt=A-N*65536,A=Ot+N+65535,N=Math.floor(A/65536),Ot=A-N*65536,A=gt+N+65535,N=Math.floor(A/65536),gt=A-N*65536,A=ht+N+65535,N=Math.floor(A/65536),ht=A-N*65536,A=xt+N+65535,N=Math.floor(A/65536),xt=A-N*65536,A=wt+N+65535,N=Math.floor(A/65536),wt=A-N*65536,A=Qe+N+65535,N=Math.floor(A/65536),Qe=A-N*65536,Q+=N-1+37*(N-1),N=1,A=Q+N+65535,N=Math.floor(A/65536),Q=A-N*65536,A=ee+N+65535,N=Math.floor(A/65536),ee=A-N*65536,A=fe+N+65535,N=Math.floor(A/65536),fe=A-N*65536,A=_e+N+65535,N=Math.floor(A/65536),_e=A-N*65536,A=je+N+65535,N=Math.floor(A/65536),je=A-N*65536,A=We+N+65535,N=Math.floor(A/65536),We=A-N*65536,A=ct+N+65535,N=Math.floor(A/65536),ct=A-N*65536,A=Ie+N+65535,N=Math.floor(A/65536),Ie=A-N*65536,A=nt+N+65535,N=Math.floor(A/65536),nt=A-N*65536,A=bt+N+65535,N=Math.floor(A/65536),bt=A-N*65536,A=Ot+N+65535,N=Math.floor(A/65536),Ot=A-N*65536,A=gt+N+65535,N=Math.floor(A/65536),gt=A-N*65536,A=ht+N+65535,N=Math.floor(A/65536),ht=A-N*65536,A=xt+N+65535,N=Math.floor(A/65536),xt=A-N*65536,A=wt+N+65535,N=Math.floor(A/65536),wt=A-N*65536,A=Qe+N+65535,N=Math.floor(A/65536),Qe=A-N*65536,Q+=N-1+37*(N-1),T[0]=Q,T[1]=ee,T[2]=fe,T[3]=_e,T[4]=je,T[5]=We,T[6]=ct,T[7]=Ie,T[8]=nt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Qe}function He(T,D){we(T,D,D)}function Ee(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=253;A>=0;A--)He($,$),A!==2&&A!==4&&we($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function it(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=250;A>=0;A--)He($,$),A!==1&&we($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function ke(T,D,$){var A=new Uint8Array(32),N=new Float64Array(80),Q,ee,fe=n(),_e=n(),je=n(),We=n(),ct=n(),Ie=n();for(ee=0;ee<31;ee++)A[ee]=D[ee];for(A[31]=D[31]&127|64,A[0]&=248,ae(N,$),ee=0;ee<16;ee++)_e[ee]=N[ee],We[ee]=fe[ee]=je[ee]=0;for(fe[0]=We[0]=1,ee=254;ee>=0;--ee)Q=A[ee>>>3]>>>(ee&7)&1,j(fe,_e,Q),j(je,We,Q),ue(ct,fe,je),be(fe,fe,je),ue(je,_e,We),be(_e,_e,We),He(We,ct),He(Ie,fe),we(fe,je,fe),we(je,_e,ct),ue(ct,fe,je),be(fe,fe,je),He(_e,fe),be(je,We,Ie),we(fe,je,u),ue(fe,fe,We),we(je,je,fe),we(fe,We,Ie),we(We,_e,N),He(_e,ct),j(fe,_e,Q),j(je,We,Q);for(ee=0;ee<16;ee++)N[ee+16]=fe[ee],N[ee+32]=je[ee],N[ee+48]=_e[ee],N[ee+64]=We[ee];var nt=N.subarray(32),bt=N.subarray(16);return Ee(nt,nt),we(bt,bt,nt),K(T,bt),0}function Le(T,D){return ke(T,D,o)}function De(T,D){return r(D,32),Le(T,D)}function me(T,D,$){var A=new Uint8Array(32);return ke(A,$,D),E(T,i,A,C)}var yt=Z,lt=G;function Nt(T,D,$,A,N,Q){var ee=new Uint8Array(32);return me(ee,N,Q),yt(T,D,$,A,ee)}function yn(T,D,$,A,N,Q){var ee=new Uint8Array(32);return me(ee,N,Q),lt(T,D,$,A,ee)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function te(T,D,$,A){for(var N=new Int32Array(16),Q=new Int32Array(16),ee,fe,_e,je,We,ct,Ie,nt,bt,Ot,gt,ht,xt,wt,Qe,ut,Xe,Ne,Ke,Ge,pe,he,Re,Oe,Pe,Be,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],J=T[4],Yt=T[5],sn=T[6],un=T[7],jt=D[0],ln=D[1],rn=D[2],Gn=D[3],mn=D[4],Pn=D[5],Yn=D[6],Zn=D[7],xr=0;A>=128;){for(Ke=0;Ke<16;Ke++)Ge=8*Ke+xr,N[Ke]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],Q[Ke]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(Ke=0;Ke<80;Ke++)if(ee=vt,fe=Lt,_e=Ft,je=$t,We=J,ct=Yt,Ie=sn,nt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=Pn,Qe=Yn,ut=Zn,pe=un,he=Zn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=(J>>>14|mn<<18)^(J>>>18|mn<<14)^(mn>>>9|J<<23),he=(mn>>>14|J<<18)^(mn>>>18|J<<14)^(J>>>9|mn<<23),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=J&Yt^~J&sn,he=mn&Pn^~mn&Yn,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=nn[Ke*2],he=nn[Ke*2+1],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=N[Ke%16],he=Q[Ke%16],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,Xe=Pe&65535|Be<<16,Ne=Re&65535|Oe<<16,pe=Xe,he=Ne,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),he=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=vt&Lt^vt&Ft^Lt&Ft,he=jt&ln^jt&rn^ln&rn,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,nt=Pe&65535|Be<<16,ut=Re&65535|Oe<<16,pe=je,he=ht,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=Xe,he=Ne,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,je=Pe&65535|Be<<16,ht=Re&65535|Oe<<16,Lt=ee,Ft=fe,$t=_e,J=je,Yt=We,sn=ct,un=Ie,vt=nt,ln=bt,rn=Ot,Gn=gt,mn=ht,Pn=xt,Yn=wt,Zn=Qe,jt=ut,Ke%16===15)for(Ge=0;Ge<16;Ge++)pe=N[Ge],he=Q[Ge],Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=N[(Ge+9)%16],he=Q[(Ge+9)%16],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Xe=N[(Ge+1)%16],Ne=Q[(Ge+1)%16],pe=(Xe>>>1|Ne<<31)^(Xe>>>8|Ne<<24)^Xe>>>7,he=(Ne>>>1|Xe<<31)^(Ne>>>8|Xe<<24)^(Ne>>>7|Xe<<25),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Xe=N[(Ge+14)%16],Ne=Q[(Ge+14)%16],pe=(Xe>>>19|Ne<<13)^(Ne>>>29|Xe<<3)^Xe>>>6,he=(Ne>>>19|Xe<<13)^(Xe>>>29|Ne<<3)^(Ne>>>6|Xe<<26),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,N[Ge]=Pe&65535|Be<<16,Q[Ge]=Re&65535|Oe<<16;pe=vt,he=jt,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[0],he=D[0],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[0]=vt=Pe&65535|Be<<16,D[0]=jt=Re&65535|Oe<<16,pe=Lt,he=ln,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[1],he=D[1],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[1]=Lt=Pe&65535|Be<<16,D[1]=ln=Re&65535|Oe<<16,pe=Ft,he=rn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[2],he=D[2],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[2]=Ft=Pe&65535|Be<<16,D[2]=rn=Re&65535|Oe<<16,pe=$t,he=Gn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[3],he=D[3],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[3]=$t=Pe&65535|Be<<16,D[3]=Gn=Re&65535|Oe<<16,pe=J,he=mn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[4],he=D[4],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[4]=J=Pe&65535|Be<<16,D[4]=mn=Re&65535|Oe<<16,pe=Yt,he=Pn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[5],he=D[5],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[5]=Yt=Pe&65535|Be<<16,D[5]=Pn=Re&65535|Oe<<16,pe=sn,he=Yn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[6],he=D[6],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[6]=sn=Pe&65535|Be<<16,D[6]=Yn=Re&65535|Oe<<16,pe=un,he=Zn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[7],he=D[7],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[7]=un=Pe&65535|Be<<16,D[7]=Zn=Re&65535|Oe<<16,xr+=128,A-=128}return A}function de(T,D,$){var A=new Int32Array(8),N=new Int32Array(8),Q=new Uint8Array(256),ee,fe=$;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,N[0]=4089235720,N[1]=2227873595,N[2]=4271175723,N[3]=1595750129,N[4]=2917565137,N[5]=725511199,N[6]=4215389547,N[7]=327033209,te(A,N,D,$),$%=128,ee=0;ee<$;ee++)Q[ee]=D[fe-$+ee];for(Q[$]=128,$=256-128*($<112?1:0),Q[$-9]=0,m(Q,$-8,fe/536870912|0,fe<<3),te(A,N,Q,$),ee=0;ee<8;ee++)m(T,8*ee,A[ee],N[ee]);return 0}function ge(T,D){var $=n(),A=n(),N=n(),Q=n(),ee=n(),fe=n(),_e=n(),je=n(),We=n();be($,T[1],T[0]),be(We,D[1],D[0]),we($,$,We),ue(A,T[0],T[1]),ue(We,D[0],D[1]),we(A,A,We),we(N,T[3],D[3]),we(N,N,c),we(Q,T[2],D[2]),ue(Q,Q,Q),be(ee,A,$),be(fe,Q,N),ue(_e,Q,N),ue(je,A,$),we(T[0],ee,fe),we(T[1],je,_e),we(T[2],_e,fe),we(T[3],ee,je)}function ze(T,D,$){var A;for(A=0;A<4;A++)j(T[A],D[A],$)}function Fe(T,D){var $=n(),A=n(),N=n();Ee(N,D[2]),we($,D[0],N),we(A,D[1],N),K(T,A),T[31]^=oe($)<<7}function Ae(T,D,$){var A,N;for(q(T[0],a),q(T[1],s),q(T[2],s),q(T[3],a),N=255;N>=0;--N)A=$[N/8|0]>>(N&7)&1,ze(T,D,A),ge(D,T),ge(T,T),ze(T,D,A)}function tt(T,D){var $=[n(),n(),n(),n()];q($[0],f),q($[1],h),q($[2],s),we($[3],f,h),Ae(T,$,D)}function mt(T,D,$){var A=new Uint8Array(64),N=[n(),n(),n(),n()],Q;for($||r(D,32),de(A,D,32),A[0]&=248,A[31]&=127,A[31]|=64,tt(N,A),Fe(T,N),Q=0;Q<32;Q++)D[Q+32]=T[Q];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ht(T,D){var $,A,N,Q;for(A=63;A>=32;--A){for($=0,N=A-32,Q=A-12;N>4)*xn[N],$=D[N]>>8,D[N]&=255;for(N=0;N<32;N++)D[N]-=$*xn[N];for(A=0;A<32;A++)D[A+1]+=D[A]>>8,T[A]=D[A]&255}function wn(T){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=T[$];for($=0;$<64;$++)T[$]=0;Ht(T,D)}function Ii(T,D,$,A){var N=new Uint8Array(64),Q=new Uint8Array(64),ee=new Uint8Array(64),fe,_e,je=new Float64Array(64),We=[n(),n(),n(),n()];de(N,A,32),N[0]&=248,N[31]&=127,N[31]|=64;var ct=$+64;for(fe=0;fe<$;fe++)T[64+fe]=D[fe];for(fe=0;fe<32;fe++)T[32+fe]=N[32+fe];for(de(ee,T.subarray(32),$+32),wn(ee),tt(We,ee),Fe(T,We),fe=32;fe<64;fe++)T[fe]=A[fe];for(de(Q,T,$+64),wn(Q),fe=0;fe<64;fe++)je[fe]=0;for(fe=0;fe<32;fe++)je[fe]=ee[fe];for(fe=0;fe<32;fe++)for(_e=0;_e<32;_e++)je[fe+_e]+=Q[fe]*N[_e];return Ht(T.subarray(32),je),ct}function br(T,D){var $=n(),A=n(),N=n(),Q=n(),ee=n(),fe=n(),_e=n();return q(T[2],s),ae(T[1],D),He(N,T[1]),we(Q,N,l),be(N,N,T[2]),ue(Q,T[2],Q),He(ee,Q),He(fe,ee),we(_e,fe,ee),we($,_e,N),we($,$,Q),it($,$),we($,$,N),we($,$,Q),we($,$,Q),we(T[0],$,Q),He(A,T[0]),we(A,A,Q),Y(A,N)&&we(T[0],T[0],p),He(A,T[0]),we(A,A,Q),Y(A,N)?-1:(oe(T[0])===D[31]>>7&&be(T[0],a,T[0]),we(T[3],T[0],T[1]),0)}function yi(T,D,$,A){var N,Q=new Uint8Array(32),ee=new Uint8Array(64),fe=[n(),n(),n(),n()],_e=[n(),n(),n(),n()];if($<64||br(_e,A))return-1;for(N=0;N<$;N++)T[N]=D[N];for(N=0;N<32;N++)T[N+32]=A[N];if(de(ee,T,$),wn(ee),Ae(fe,_e,ee),tt(_e,D.subarray(32)),ge(fe,_e),Fe(Q,fe),$-=64,w(D,0,Q,0)){for(N=0;N<$;N++)T[N]=0;return-1}for(N=0;N<$;N++)T[N]=D[N+64];return $}var sr=32,si=24,bi=32,Rr=16,Xi=32,yo=32,xi=32,Dr=32,_a=32,_t=si,hn=bi,_n=Rr,qn=64,ur=32,Xr=64,bo=32,Zl=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:U,crypto_stream:L,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:V,crypto_onetimeauth_verify:ne,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:ke,crypto_scalarmult_base:Le,crypto_box_beforenm:me,crypto_box_afternm:yt,crypto_box:Nt,crypto_box_open:yn,crypto_box_keypair:De,crypto_hash:de,crypto_sign:Ii,crypto_sign_keypair:mt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:sr,crypto_secretbox_NONCEBYTES:si,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Xi,crypto_scalarmult_SCALARBYTES:yo,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:_a,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:_n,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:bo,crypto_hash_BYTES:Zl,gf:n,D:l,L:xn,pack25519:K,unpack25519:ae,M:we,A:ue,S:He,Z:be,pow2523:it,add:ge,set25519:q,modL:Ht,scalarmult:Ae,scalarbase:tt};function Sf(T,D){if(T.length!==sr)throw new Error("bad key size");if(D.length!==si)throw new Error("bad nonce size")}function re(T,D){if(T.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function se(){for(var T=0;T=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),D=new Uint8Array(Xr);return mt(T,D),{publicKey:T,secretKey:D}},t.sign.keyPair.fromSecretKey=function(T){if(se(T),T.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),I.jsxs(DGe,{scope:n,state:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Sl(w)?"mixed":w,"aria-required":a,"data-state":dZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Sl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&I.jsx(IGe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Sl(o)?!1:o})]})});lZ.displayName=TP;var cZ="CheckboxIndicator",fZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=$Ge(cZ,n);return I.jsx(Gr,{present:r||Sl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":dZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});fZ.displayName=cZ;var IGe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=jA(n),u=aO(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Sl(n),p.call(c,Sl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Sl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Sl(e){return e==="indeterminate"}function dZ(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}var FQe=lZ,jQe=fZ;export{wZe as $,BYe as A,ehe as B,FYe as C,jYe as D,zYe as E,LYe as F,J0e as G,nge as H,uYe as I,rge as J,mz as K,XYe as L,oge as M,ege as N,LGe as O,UGe as P,kYe as Q,F as R,Al as S,ige as T,tge as U,EZe as V,GYe as W,OZe as X,mZe as Y,vZe as Z,xZe as _,HGe as a,jXe as a$,SZe as a0,WYe as a1,_Ze as a2,JYe as a3,bZe as a4,CZe as a5,pZe as a6,gZe as a7,yZe as a8,cZe as a9,_Ye as aA,wYe as aB,bYe as aC,SYe as aD,fYe as aE,JGe as aF,NZe as aG,rZe as aH,pXe as aI,dYe as aJ,yYe as aK,CXe as aL,EXe as aM,OXe as aN,WGe as aO,MXe as aP,RXe as aQ,DXe as aR,TXe as aS,IXe as aT,LXe as aU,NXe as aV,FXe as aW,KYe as aX,qXe as aY,YYe as aZ,GXe as a_,lZe as aa,fZe as ab,eYe as ac,PZe as ad,Wve as ae,Hve as af,TZe as ag,$Ze as ah,MZe as ai,RZe as aj,BGe as ak,QGe as al,nYe as am,vYe as an,qGe as ao,rYe as ap,hYe as aq,tYe as ar,sYe as as,mYe as at,gYe as au,lYe as av,pYe as aw,XGe as ax,YGe as ay,iYe as az,mm as b,dXe as b$,BXe as b0,zXe as b1,VXe as b2,WXe as b3,KXe as b4,HXe as b5,YXe as b6,UXe as b7,QXe as b8,qYe as b9,sQe as bA,uQe as bB,VUe as bC,YUe as bD,iQe as bE,cXe as bF,LZe as bG,zZe as bH,jZe as bI,ZXe as bJ,Ui as bK,cQe as bL,fQe as bM,uXe as bN,vXe as bO,hXe as bP,tXe as bQ,ZZe as bR,YZe as bS,dQe as bT,ZGe as bU,xYe as bV,cYe as bW,GGe as bX,pQe as bY,gQe as bZ,DYe as b_,nQe as ba,rQe as bb,eQe as bc,tQe as bd,c3 as be,RYe as bf,_f as bg,WZe as bh,AXe as bi,PXe as bj,IA as bk,NA as bl,QNe as bm,Js as bn,xf as bo,tp as bp,XXe as bq,FZe as br,UZe as bs,lXe as bt,VZe as bu,wXe as bv,xXe as bw,nXe as bx,bXe as by,aQe as bz,dn as c,eZe as c0,tZe as c1,_Qe as c2,CQe as c3,XZe as c4,BZe as c5,kQe as c6,TQe as c7,DQe as c8,$Qe as c9,NQe as cA,gXe as cB,JZe as cC,rXe as cD,fXe as cE,eXe as cF,mXe as cG,oXe as cH,FQe as cI,jQe as cJ,ZYe as cK,uZe as cL,HYe as cM,QYe as cN,sZe as cO,iXe as cP,zGe as cQ,KZe as cR,FUe as cS,iZe as cT,QZe as cU,HZe as cV,MQe as ca,RQe as cb,OQe as cc,AQe as cd,PQe as ce,nZe as cf,oZe as cg,yXe as ch,SQe as ci,mQe as cj,bQe as ck,xQe as cl,wQe as cm,sXe as cn,qZe as co,GZe as cp,_Xe as cq,es as cr,yr as cs,aXe as ct,vQe as cu,yQe as cv,aZe as cw,Jc as cx,DZe as cy,IQe as cz,FGe as d,qr as e,AYe as f,EYe as g,OYe as h,CYe as i,I as j,Yi as k,IYe as l,Vk as m,MYe as n,jGe as o,PYe as p,UYe as q,y as r,z5 as s,KGe as t,UF as u,aYe as v,oYe as w,VYe as x,VGe as y,NYe as z}; +`,o.map=[t,e.line],!0}function aqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=cN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=lN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const L=[u,0];s.map=L,f&&(s.info=e.src.slice(a,p-1));const U=e.tight,H=e.tShift[u],V=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=H,e.sCount[u]=V,e.tight=U,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,L[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let G=0,q=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let L=!1;for(let U=0,H=k.length;U"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const dqe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hqe="[a-zA-Z_:][a-zA-Z0-9:._-]*",pqe="[^\"'=<>`\\x00-\\x20]+",gqe="'[^']*'",mqe='"[^"]*"',vqe="(?:"+pqe+"|"+gqe+"|"+mqe+")",yqe="(?:\\s+"+hqe+"(?:\\s*=\\s*"+vqe+")?)",KY="<[A-Za-z][A-Za-z0-9\\-]*"+yqe+"*\\s*\\/?>",qY="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",bqe="",xqe="<[?][\\s\\S]*?[?]>",wqe="]*>",_qe="",Sqe=new RegExp("^(?:"+KY+"|"+qY+"|"+bqe+"|"+xqe+"|"+wqe+"|"+_qe+")"),Cqe=new RegExp("^(?:"+KY+"|"+qY+")"),Jf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Cqe.source+"\\s*$"),/^$/,!1]];function Eqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Hn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Aqe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Gm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(Mqe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function Dqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){PP[e.charCodeAt(0)]=1});function $qe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&PP[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Iqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function jqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;dN(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[bw(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function zqe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[bw(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const Uqe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Vqe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Wqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(Vqe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Uqe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function Hqe(e){return/^\s]/i.test(e)}function Kqe(e){return/^<\/a\s*>/i.test(e)}function qqe(e){const t=e|32;return t>=97&&t<=122}function Gqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!qqe(i))return!1;const o=e.src.slice(r).match(Sqe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Hqe(a.content)&&e.linkLevel++,Kqe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Yqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Zqe=/^&([a-z][a-z0-9]{1,31});/i;function Xqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Yqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=OP(a)?wx(a):wx(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Zqe);if(o){const a=zY(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function hN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Qqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;hN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ym.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ym.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function _4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function ww(e){return Object.prototype.toString.call(e)}function tGe(e){return ww(e)==="[object String]"}function nGe(e){return ww(e)==="[object Object]"}function rGe(e){return ww(e)==="[object RegExp]"}function pN(e){return ww(e)==="[object Function]"}function iGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ZY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function oGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||ZY.hasOwnProperty(n)},!1)}const aGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},sGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",uGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function lGe(e){e.__index__=-1,e.__text_cache__=""}function cGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function gN(){return function(e,t){t.normalize(e)}}function _x(e){const t=e.re=eGe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(sGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,nGe(u)){rGe(u.validate)?l.validate=cGe(u.validate):pN(u.validate)?l.validate=u.validate:o(s,u),pN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=gN();return}if(tGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:gN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(iGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),lGe(e)}function fGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function S4(e,t){const n=new fGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||oGe(e)&&(t=e,e={}),this.__opts__=_4({},ZY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=_4({},aGe,e),this.__compiled__={},this.__tlds__=uGe,this.__tlds_replaced__=!1,this.re={},_x(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,_x(this),this};Wo.prototype.set=function(t){return this.__opts__=_4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(S4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(S4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,S4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),_x(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_x(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Fd=2147483647,ws=36,kP=1,lm=26,dGe=38,hGe=700,XY=72,QY=128,JY="-",pGe=/^xn--/,gGe=/[^\0-\x7F]/,mGe=/[\x2E\u3002\uFF0E\uFF61]/g,vGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$3=ws-kP,_s=Math.floor,I3=String.fromCharCode;function Ju(e){throw new RangeError(vGe[e])}function yGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function eZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(mGe,".");const i=e.split("."),o=yGe(i,t).join(".");return r+o}function tZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),xGe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},mN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},nZ=function(e,t,n){let r=0;for(e=n?_s(e/hGe):e>>1,e+=_s(e/t);e>$3*lm>>1;r+=ws)e=_s(e/$3);return _s(r+($3+1)*e/(e+dGe))},rZ=function(e){const t=[],n=e.length;let r=0,i=QY,o=XY,a=e.lastIndexOf(JY);a<0&&(a=0);for(let s=0;s=128&&Ju("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Ju("invalid-input");const h=xGe(e.charCodeAt(s++));h>=ws&&Ju("invalid-input"),h>_s((Fd-r)/c)&&Ju("overflow"),r+=h*c;const p=f<=o?kP:f>=o+lm?lm:f-o;if(h_s(Fd/m)&&Ju("overflow"),c*=m}const l=t.length+1;o=nZ(r-u,l,u==0),_s(r/l)>Fd-i&&Ju("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},iZ=function(e){const t=[];e=tZ(e);const n=e.length;let r=QY,i=0,o=XY;for(const u of e)u<128&&t.push(I3(u));const a=t.length;let s=a;for(a&&t.push(JY);s=r&&c_s((Fd-i)/l)&&Ju("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cFd&&Ju("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?kP:h>=o+lm?lm:h-o;if(f=0))try{t.hostname=oZ.toASCII(t.hostname)}catch{}return qm(_P(t))}function MGe(e){const t=SP(e,!0);if(t.hostname&&(!t.protocol||aZ.indexOf(t.protocol)>=0))try{t.hostname=oZ.toUnicode(t.hostname)}catch{}return Oh(_P(t),Oh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||EP(e)||(t=e||{},e="default"),this.inline=new Ym,this.block=new xw,this.core=new AP,this.renderer=new ip,this.linkify=new Wo,this.validateLink=kGe,this.normalizeLink=TGe,this.normalizeLinkText=MGe,this.utils=DKe,this.helpers=yw({},LKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return yw(this.options,e),this};es.prototype.configure=function(e){const t=this;if(EP(e)){const n=e;if(e=OGe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var sZ={exports:{}};(function(e){(function(t){var n=function(T){var D,$=new Float64Array(16);if(T)for(D=0;D>24&255,T[D+1]=$>>16&255,T[D+2]=$>>8&255,T[D+3]=$&255,T[D+4]=A>>24&255,T[D+5]=A>>16&255,T[D+6]=A>>8&255,T[D+7]=A&255}function v(T,D,$,A,N){var Q,ee=0;for(Q=0;Q>>8)-1}function b(T,D,$,A){return v(T,D,$,A,16)}function w(T,D,$,A){return v(T,D,$,A,32)}function x(T,D,$,A){for(var N=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,Q=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ee=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,fe=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,_e=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,je=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ie=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,nt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=N,ut=Q,Xe=ee,Ne=fe,Ke=_e,Ge=je,pe=We,he=ct,Re=Ie,Oe=nt,Pe=bt,Be=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,J,Zt=0;Zt<20;Zt+=2)J=Qe+vt|0,Ke^=J<<7|J>>>25,J=Ke+Qe|0,Re^=J<<9|J>>>23,J=Re+Ke|0,vt^=J<<13|J>>>19,J=vt+Re|0,Qe^=J<<18|J>>>14,J=Ge+ut|0,Oe^=J<<7|J>>>25,J=Oe+Ge|0,Lt^=J<<9|J>>>23,J=Lt+Oe|0,ut^=J<<13|J>>>19,J=ut+Lt|0,Ge^=J<<18|J>>>14,J=Pe+pe|0,Ft^=J<<7|J>>>25,J=Ft+Pe|0,Xe^=J<<9|J>>>23,J=Xe+Ft|0,pe^=J<<13|J>>>19,J=pe+Xe|0,Pe^=J<<18|J>>>14,J=$t+Be|0,Ne^=J<<7|J>>>25,J=Ne+$t|0,he^=J<<9|J>>>23,J=he+Ne|0,Be^=J<<13|J>>>19,J=Be+he|0,$t^=J<<18|J>>>14,J=Qe+Ne|0,ut^=J<<7|J>>>25,J=ut+Qe|0,Xe^=J<<9|J>>>23,J=Xe+ut|0,Ne^=J<<13|J>>>19,J=Ne+Xe|0,Qe^=J<<18|J>>>14,J=Ge+Ke|0,pe^=J<<7|J>>>25,J=pe+Ge|0,he^=J<<9|J>>>23,J=he+pe|0,Ke^=J<<13|J>>>19,J=Ke+he|0,Ge^=J<<18|J>>>14,J=Pe+Oe|0,Be^=J<<7|J>>>25,J=Be+Pe|0,Re^=J<<9|J>>>23,J=Re+Be|0,Oe^=J<<13|J>>>19,J=Oe+Re|0,Pe^=J<<18|J>>>14,J=$t+Ft|0,vt^=J<<7|J>>>25,J=vt+$t|0,Lt^=J<<9|J>>>23,J=Lt+vt|0,Ft^=J<<13|J>>>19,J=Ft+Lt|0,$t^=J<<18|J>>>14;Qe=Qe+N|0,ut=ut+Q|0,Xe=Xe+ee|0,Ne=Ne+fe|0,Ke=Ke+_e|0,Ge=Ge+je|0,pe=pe+We|0,he=he+ct|0,Re=Re+Ie|0,Oe=Oe+nt|0,Pe=Pe+bt|0,Be=Be+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Qe>>>0&255,T[1]=Qe>>>8&255,T[2]=Qe>>>16&255,T[3]=Qe>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Xe>>>0&255,T[9]=Xe>>>8&255,T[10]=Xe>>>16&255,T[11]=Xe>>>24&255,T[12]=Ne>>>0&255,T[13]=Ne>>>8&255,T[14]=Ne>>>16&255,T[15]=Ne>>>24&255,T[16]=Ke>>>0&255,T[17]=Ke>>>8&255,T[18]=Ke>>>16&255,T[19]=Ke>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=pe>>>0&255,T[25]=pe>>>8&255,T[26]=pe>>>16&255,T[27]=pe>>>24&255,T[28]=he>>>0&255,T[29]=he>>>8&255,T[30]=he>>>16&255,T[31]=he>>>24&255,T[32]=Re>>>0&255,T[33]=Re>>>8&255,T[34]=Re>>>16&255,T[35]=Re>>>24&255,T[36]=Oe>>>0&255,T[37]=Oe>>>8&255,T[38]=Oe>>>16&255,T[39]=Oe>>>24&255,T[40]=Pe>>>0&255,T[41]=Pe>>>8&255,T[42]=Pe>>>16&255,T[43]=Pe>>>24&255,T[44]=Be>>>0&255,T[45]=Be>>>8&255,T[46]=Be>>>16&255,T[47]=Be>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,D,$,A){for(var N=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,Q=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ee=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,fe=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,_e=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,je=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,We=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ie=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,nt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=N,ut=Q,Xe=ee,Ne=fe,Ke=_e,Ge=je,pe=We,he=ct,Re=Ie,Oe=nt,Pe=bt,Be=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,J,Zt=0;Zt<20;Zt+=2)J=Qe+vt|0,Ke^=J<<7|J>>>25,J=Ke+Qe|0,Re^=J<<9|J>>>23,J=Re+Ke|0,vt^=J<<13|J>>>19,J=vt+Re|0,Qe^=J<<18|J>>>14,J=Ge+ut|0,Oe^=J<<7|J>>>25,J=Oe+Ge|0,Lt^=J<<9|J>>>23,J=Lt+Oe|0,ut^=J<<13|J>>>19,J=ut+Lt|0,Ge^=J<<18|J>>>14,J=Pe+pe|0,Ft^=J<<7|J>>>25,J=Ft+Pe|0,Xe^=J<<9|J>>>23,J=Xe+Ft|0,pe^=J<<13|J>>>19,J=pe+Xe|0,Pe^=J<<18|J>>>14,J=$t+Be|0,Ne^=J<<7|J>>>25,J=Ne+$t|0,he^=J<<9|J>>>23,J=he+Ne|0,Be^=J<<13|J>>>19,J=Be+he|0,$t^=J<<18|J>>>14,J=Qe+Ne|0,ut^=J<<7|J>>>25,J=ut+Qe|0,Xe^=J<<9|J>>>23,J=Xe+ut|0,Ne^=J<<13|J>>>19,J=Ne+Xe|0,Qe^=J<<18|J>>>14,J=Ge+Ke|0,pe^=J<<7|J>>>25,J=pe+Ge|0,he^=J<<9|J>>>23,J=he+pe|0,Ke^=J<<13|J>>>19,J=Ke+he|0,Ge^=J<<18|J>>>14,J=Pe+Oe|0,Be^=J<<7|J>>>25,J=Be+Pe|0,Re^=J<<9|J>>>23,J=Re+Be|0,Oe^=J<<13|J>>>19,J=Oe+Re|0,Pe^=J<<18|J>>>14,J=$t+Ft|0,vt^=J<<7|J>>>25,J=vt+$t|0,Lt^=J<<9|J>>>23,J=Lt+vt|0,Ft^=J<<13|J>>>19,J=Ft+Lt|0,$t^=J<<18|J>>>14;T[0]=Qe>>>0&255,T[1]=Qe>>>8&255,T[2]=Qe>>>16&255,T[3]=Qe>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Pe>>>0&255,T[9]=Pe>>>8&255,T[10]=Pe>>>16&255,T[11]=Pe>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=pe>>>0&255,T[17]=pe>>>8&255,T[18]=pe>>>16&255,T[19]=pe>>>24&255,T[20]=he>>>0&255,T[21]=he>>>8&255,T[22]=he>>>16&255,T[23]=he>>>24&255,T[24]=Re>>>0&255,T[25]=Re>>>8&255,T[26]=Re>>>16&255,T[27]=Re>>>24&255,T[28]=Oe>>>0&255,T[29]=Oe>>>8&255,T[30]=Oe>>>16&255,T[31]=Oe>>>24&255}function O(T,D,$,A){x(T,D,$,A)}function E(T,D,$,A){S(T,D,$,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,D,$,A,N,Q,ee){var fe=new Uint8Array(16),_e=new Uint8Array(64),je,We;for(We=0;We<16;We++)fe[We]=0;for(We=0;We<8;We++)fe[We]=Q[We];for(;N>=64;){for(O(_e,fe,ee,C),We=0;We<64;We++)T[D+We]=$[A+We]^_e[We];for(je=1,We=8;We<16;We++)je=je+(fe[We]&255)|0,fe[We]=je&255,je>>>=8;N-=64,D+=64,A+=64}if(N>0)for(O(_e,fe,ee,C),We=0;We=64;){for(O(ee,Q,N,C),_e=0;_e<64;_e++)T[D+_e]=ee[_e];for(fe=1,_e=8;_e<16;_e++)fe=fe+(Q[_e]&255)|0,Q[_e]=fe&255,fe>>>=8;$-=64,D+=64}if($>0)for(O(ee,Q,N,C),_e=0;_e<$;_e++)T[D+_e]=ee[_e];return 0}function L(T,D,$,A,N){var Q=new Uint8Array(32);E(Q,A,N,C);for(var ee=new Uint8Array(8),fe=0;fe<8;fe++)ee[fe]=A[fe+16];return M(T,D,$,ee,Q)}function U(T,D,$,A,N,Q,ee){var fe=new Uint8Array(32);E(fe,Q,ee,C);for(var _e=new Uint8Array(8),je=0;je<8;je++)_e[je]=Q[je+16];return k(T,D,$,A,N,_e,fe)}var H=function(T){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,A,N,Q,ee,fe,_e;D=T[0]&255|(T[1]&255)<<8,this.r[0]=D&8191,$=T[2]&255|(T[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=($>>>10|A<<6)&7939,N=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|N<<9)&8191,Q=T[8]&255|(T[9]&255)<<8,this.r[4]=(N>>>4|Q<<12)&255,this.r[5]=Q>>>1&8190,ee=T[10]&255|(T[11]&255)<<8,this.r[6]=(Q>>>14|ee<<2)&8191,fe=T[12]&255|(T[13]&255)<<8,this.r[7]=(ee>>>11|fe<<5)&8065,_e=T[14]&255|(T[15]&255)<<8,this.r[8]=(fe>>>8|_e<<8)&8191,this.r[9]=_e>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};H.prototype.blocks=function(T,D,$){for(var A=this.fin?0:2048,N,Q,ee,fe,_e,je,We,ct,Ie,nt,bt,Ot,gt,ht,xt,wt,Qe,ut,Xe,Ne=this.h[0],Ke=this.h[1],Ge=this.h[2],pe=this.h[3],he=this.h[4],Re=this.h[5],Oe=this.h[6],Pe=this.h[7],Be=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],J=this.r[3],Zt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];$>=16;)N=T[D+0]&255|(T[D+1]&255)<<8,Ne+=N&8191,Q=T[D+2]&255|(T[D+3]&255)<<8,Ke+=(N>>>13|Q<<3)&8191,ee=T[D+4]&255|(T[D+5]&255)<<8,Ge+=(Q>>>10|ee<<6)&8191,fe=T[D+6]&255|(T[D+7]&255)<<8,pe+=(ee>>>7|fe<<9)&8191,_e=T[D+8]&255|(T[D+9]&255)<<8,he+=(fe>>>4|_e<<12)&8191,Re+=_e>>>1&8191,je=T[D+10]&255|(T[D+11]&255)<<8,Oe+=(_e>>>14|je<<2)&8191,We=T[D+12]&255|(T[D+13]&255)<<8,Pe+=(je>>>11|We<<5)&8191,ct=T[D+14]&255|(T[D+15]&255)<<8,Be+=(We>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ie=0,nt=Ie,nt+=Ne*Lt,nt+=Ke*(5*rn),nt+=Ge*(5*ln),nt+=pe*(5*jt),nt+=he*(5*un),Ie=nt>>>13,nt&=8191,nt+=Re*(5*sn),nt+=Oe*(5*Zt),nt+=Pe*(5*J),nt+=Be*(5*$t),nt+=vt*(5*Ft),Ie+=nt>>>13,nt&=8191,bt=Ie,bt+=Ne*Ft,bt+=Ke*Lt,bt+=Ge*(5*rn),bt+=pe*(5*ln),bt+=he*(5*jt),Ie=bt>>>13,bt&=8191,bt+=Re*(5*un),bt+=Oe*(5*sn),bt+=Pe*(5*Zt),bt+=Be*(5*J),bt+=vt*(5*$t),Ie+=bt>>>13,bt&=8191,Ot=Ie,Ot+=Ne*$t,Ot+=Ke*Ft,Ot+=Ge*Lt,Ot+=pe*(5*rn),Ot+=he*(5*ln),Ie=Ot>>>13,Ot&=8191,Ot+=Re*(5*jt),Ot+=Oe*(5*un),Ot+=Pe*(5*sn),Ot+=Be*(5*Zt),Ot+=vt*(5*J),Ie+=Ot>>>13,Ot&=8191,gt=Ie,gt+=Ne*J,gt+=Ke*$t,gt+=Ge*Ft,gt+=pe*Lt,gt+=he*(5*rn),Ie=gt>>>13,gt&=8191,gt+=Re*(5*ln),gt+=Oe*(5*jt),gt+=Pe*(5*un),gt+=Be*(5*sn),gt+=vt*(5*Zt),Ie+=gt>>>13,gt&=8191,ht=Ie,ht+=Ne*Zt,ht+=Ke*J,ht+=Ge*$t,ht+=pe*Ft,ht+=he*Lt,Ie=ht>>>13,ht&=8191,ht+=Re*(5*rn),ht+=Oe*(5*ln),ht+=Pe*(5*jt),ht+=Be*(5*un),ht+=vt*(5*sn),Ie+=ht>>>13,ht&=8191,xt=Ie,xt+=Ne*sn,xt+=Ke*Zt,xt+=Ge*J,xt+=pe*$t,xt+=he*Ft,Ie=xt>>>13,xt&=8191,xt+=Re*Lt,xt+=Oe*(5*rn),xt+=Pe*(5*ln),xt+=Be*(5*jt),xt+=vt*(5*un),Ie+=xt>>>13,xt&=8191,wt=Ie,wt+=Ne*un,wt+=Ke*sn,wt+=Ge*Zt,wt+=pe*J,wt+=he*$t,Ie=wt>>>13,wt&=8191,wt+=Re*Ft,wt+=Oe*Lt,wt+=Pe*(5*rn),wt+=Be*(5*ln),wt+=vt*(5*jt),Ie+=wt>>>13,wt&=8191,Qe=Ie,Qe+=Ne*jt,Qe+=Ke*un,Qe+=Ge*sn,Qe+=pe*Zt,Qe+=he*J,Ie=Qe>>>13,Qe&=8191,Qe+=Re*$t,Qe+=Oe*Ft,Qe+=Pe*Lt,Qe+=Be*(5*rn),Qe+=vt*(5*ln),Ie+=Qe>>>13,Qe&=8191,ut=Ie,ut+=Ne*ln,ut+=Ke*jt,ut+=Ge*un,ut+=pe*sn,ut+=he*Zt,Ie=ut>>>13,ut&=8191,ut+=Re*J,ut+=Oe*$t,ut+=Pe*Ft,ut+=Be*Lt,ut+=vt*(5*rn),Ie+=ut>>>13,ut&=8191,Xe=Ie,Xe+=Ne*rn,Xe+=Ke*ln,Xe+=Ge*jt,Xe+=pe*un,Xe+=he*sn,Ie=Xe>>>13,Xe&=8191,Xe+=Re*Zt,Xe+=Oe*J,Xe+=Pe*$t,Xe+=Be*Ft,Xe+=vt*Lt,Ie+=Xe>>>13,Xe&=8191,Ie=(Ie<<2)+Ie|0,Ie=Ie+nt|0,nt=Ie&8191,Ie=Ie>>>13,bt+=Ie,Ne=nt,Ke=bt,Ge=Ot,pe=gt,he=ht,Re=xt,Oe=wt,Pe=Qe,Be=ut,vt=Xe,D+=16,$-=16;this.h[0]=Ne,this.h[1]=Ke,this.h[2]=Ge,this.h[3]=pe,this.h[4]=he,this.h[5]=Re,this.h[6]=Oe,this.h[7]=Pe,this.h[8]=Be,this.h[9]=vt},H.prototype.finish=function(T,D){var $=new Uint16Array(10),A,N,Q,ee;if(this.leftover){for(ee=this.leftover,this.buffer[ee++]=1;ee<16;ee++)this.buffer[ee]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,ee=2;ee<10;ee++)this.h[ee]+=A,A=this.h[ee]>>>13,this.h[ee]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,$[0]=this.h[0]+5,A=$[0]>>>13,$[0]&=8191,ee=1;ee<10;ee++)$[ee]=this.h[ee]+A,A=$[ee]>>>13,$[ee]&=8191;for($[9]-=8192,N=(A^1)-1,ee=0;ee<10;ee++)$[ee]&=N;for(N=~N,ee=0;ee<10;ee++)this.h[ee]=this.h[ee]&N|$[ee];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Q=this.h[0]+this.pad[0],this.h[0]=Q&65535,ee=1;ee<8;ee++)Q=(this.h[ee]+this.pad[ee]|0)+(Q>>>16)|0,this.h[ee]=Q&65535;T[D+0]=this.h[0]>>>0&255,T[D+1]=this.h[0]>>>8&255,T[D+2]=this.h[1]>>>0&255,T[D+3]=this.h[1]>>>8&255,T[D+4]=this.h[2]>>>0&255,T[D+5]=this.h[2]>>>8&255,T[D+6]=this.h[3]>>>0&255,T[D+7]=this.h[3]>>>8&255,T[D+8]=this.h[4]>>>0&255,T[D+9]=this.h[4]>>>8&255,T[D+10]=this.h[5]>>>0&255,T[D+11]=this.h[5]>>>8&255,T[D+12]=this.h[6]>>>0&255,T[D+13]=this.h[6]>>>8&255,T[D+14]=this.h[7]>>>0&255,T[D+15]=this.h[7]>>>8&255},H.prototype.update=function(T,D,$){var A,N;if(this.leftover){for(N=16-this.leftover,N>$&&(N=$),A=0;A=16&&(N=$-$%16,this.blocks(T,D,N),D+=N,$-=N),$){for(A=0;A<$;A++)this.buffer[this.leftover+A]=T[D+A];this.leftover+=$}};function V(T,D,$,A,N,Q){var ee=new H(Q);return ee.update($,A,N),ee.finish(T,D),0}function ne(T,D,$,A,N,Q){var ee=new Uint8Array(16);return V(ee,0,$,A,N,Q),b(T,D,ee,0)}function Z(T,D,$,A,N){var Q;if($<32)return-1;for(U(T,0,D,0,$,A,N),V(T,16,T,32,$-32,T),Q=0;Q<16;Q++)T[Q]=0;return 0}function G(T,D,$,A,N){var Q,ee=new Uint8Array(32);if($<32||(L(ee,0,32,A,N),ne(D,16,D,32,$-32,ee)!==0))return-1;for(U(T,0,D,0,$,A,N),Q=0;Q<32;Q++)T[Q]=0;return 0}function q(T,D){var $;for($=0;$<16;$++)T[$]=D[$]|0}function W(T){var D,$,A=1;for(D=0;D<16;D++)$=T[D]+A+65535,A=Math.floor($/65536),T[D]=$-A*65536;T[0]+=A-1+37*(A-1)}function j(T,D,$){for(var A,N=~($-1),Q=0;Q<16;Q++)A=N&(T[Q]^D[Q]),T[Q]^=A,D[Q]^=A}function K(T,D){var $,A,N,Q=n(),ee=n();for($=0;$<16;$++)ee[$]=D[$];for(W(ee),W(ee),W(ee),A=0;A<2;A++){for(Q[0]=ee[0]-65517,$=1;$<15;$++)Q[$]=ee[$]-65535-(Q[$-1]>>16&1),Q[$-1]&=65535;Q[15]=ee[15]-32767-(Q[14]>>16&1),N=Q[15]>>16&1,Q[14]&=65535,j(ee,Q,1-N)}for($=0;$<16;$++)T[2*$]=ee[$]&255,T[2*$+1]=ee[$]>>8}function Y(T,D){var $=new Uint8Array(32),A=new Uint8Array(32);return K($,T),K(A,D),w($,0,A,0)}function oe(T){var D=new Uint8Array(32);return K(D,T),D[0]&1}function ae(T,D){var $;for($=0;$<16;$++)T[$]=D[2*$]+(D[2*$+1]<<8);T[15]&=32767}function ue(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]+$[A]}function be(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]-$[A]}function we(T,D,$){var A,N,Q=0,ee=0,fe=0,_e=0,je=0,We=0,ct=0,Ie=0,nt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Qe=0,ut=0,Xe=0,Ne=0,Ke=0,Ge=0,pe=0,he=0,Re=0,Oe=0,Pe=0,Be=0,vt=0,Lt=0,Ft=0,$t=0,J=$[0],Zt=$[1],sn=$[2],un=$[3],jt=$[4],ln=$[5],rn=$[6],Gn=$[7],mn=$[8],Pn=$[9],Yn=$[10],Zn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];A=D[0],Q+=A*J,ee+=A*Zt,fe+=A*sn,_e+=A*un,je+=A*jt,We+=A*ln,ct+=A*rn,Ie+=A*Gn,nt+=A*mn,bt+=A*Pn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Qe+=A*Nr,A=D[1],ee+=A*J,fe+=A*Zt,_e+=A*sn,je+=A*un,We+=A*jt,ct+=A*ln,Ie+=A*rn,nt+=A*Gn,bt+=A*mn,Ot+=A*Pn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Qe+=A*Ir,ut+=A*Nr,A=D[2],fe+=A*J,_e+=A*Zt,je+=A*sn,We+=A*un,ct+=A*jt,Ie+=A*ln,nt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*Pn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Qe+=A*$r,ut+=A*Ir,Xe+=A*Nr,A=D[3],_e+=A*J,je+=A*Zt,We+=A*sn,ct+=A*un,Ie+=A*jt,nt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*Pn,xt+=A*Yn,wt+=A*Zn,Qe+=A*xr,ut+=A*$r,Xe+=A*Ir,Ne+=A*Nr,A=D[4],je+=A*J,We+=A*Zt,ct+=A*sn,Ie+=A*un,nt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*Pn,wt+=A*Yn,Qe+=A*Zn,ut+=A*xr,Xe+=A*$r,Ne+=A*Ir,Ke+=A*Nr,A=D[5],We+=A*J,ct+=A*Zt,Ie+=A*sn,nt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*Pn,Qe+=A*Yn,ut+=A*Zn,Xe+=A*xr,Ne+=A*$r,Ke+=A*Ir,Ge+=A*Nr,A=D[6],ct+=A*J,Ie+=A*Zt,nt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Qe+=A*Pn,ut+=A*Yn,Xe+=A*Zn,Ne+=A*xr,Ke+=A*$r,Ge+=A*Ir,pe+=A*Nr,A=D[7],Ie+=A*J,nt+=A*Zt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Qe+=A*mn,ut+=A*Pn,Xe+=A*Yn,Ne+=A*Zn,Ke+=A*xr,Ge+=A*$r,pe+=A*Ir,he+=A*Nr,A=D[8],nt+=A*J,bt+=A*Zt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Qe+=A*Gn,ut+=A*mn,Xe+=A*Pn,Ne+=A*Yn,Ke+=A*Zn,Ge+=A*xr,pe+=A*$r,he+=A*Ir,Re+=A*Nr,A=D[9],bt+=A*J,Ot+=A*Zt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Qe+=A*rn,ut+=A*Gn,Xe+=A*mn,Ne+=A*Pn,Ke+=A*Yn,Ge+=A*Zn,pe+=A*xr,he+=A*$r,Re+=A*Ir,Oe+=A*Nr,A=D[10],Ot+=A*J,gt+=A*Zt,ht+=A*sn,xt+=A*un,wt+=A*jt,Qe+=A*ln,ut+=A*rn,Xe+=A*Gn,Ne+=A*mn,Ke+=A*Pn,Ge+=A*Yn,pe+=A*Zn,he+=A*xr,Re+=A*$r,Oe+=A*Ir,Pe+=A*Nr,A=D[11],gt+=A*J,ht+=A*Zt,xt+=A*sn,wt+=A*un,Qe+=A*jt,ut+=A*ln,Xe+=A*rn,Ne+=A*Gn,Ke+=A*mn,Ge+=A*Pn,pe+=A*Yn,he+=A*Zn,Re+=A*xr,Oe+=A*$r,Pe+=A*Ir,Be+=A*Nr,A=D[12],ht+=A*J,xt+=A*Zt,wt+=A*sn,Qe+=A*un,ut+=A*jt,Xe+=A*ln,Ne+=A*rn,Ke+=A*Gn,Ge+=A*mn,pe+=A*Pn,he+=A*Yn,Re+=A*Zn,Oe+=A*xr,Pe+=A*$r,Be+=A*Ir,vt+=A*Nr,A=D[13],xt+=A*J,wt+=A*Zt,Qe+=A*sn,ut+=A*un,Xe+=A*jt,Ne+=A*ln,Ke+=A*rn,Ge+=A*Gn,pe+=A*mn,he+=A*Pn,Re+=A*Yn,Oe+=A*Zn,Pe+=A*xr,Be+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=D[14],wt+=A*J,Qe+=A*Zt,ut+=A*sn,Xe+=A*un,Ne+=A*jt,Ke+=A*ln,Ge+=A*rn,pe+=A*Gn,he+=A*mn,Re+=A*Pn,Oe+=A*Yn,Pe+=A*Zn,Be+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=D[15],Qe+=A*J,ut+=A*Zt,Xe+=A*sn,Ne+=A*un,Ke+=A*jt,Ge+=A*ln,pe+=A*rn,he+=A*Gn,Re+=A*mn,Oe+=A*Pn,Pe+=A*Yn,Be+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,Q+=38*ut,ee+=38*Xe,fe+=38*Ne,_e+=38*Ke,je+=38*Ge,We+=38*pe,ct+=38*he,Ie+=38*Re,nt+=38*Oe,bt+=38*Pe,Ot+=38*Be,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,N=1,A=Q+N+65535,N=Math.floor(A/65536),Q=A-N*65536,A=ee+N+65535,N=Math.floor(A/65536),ee=A-N*65536,A=fe+N+65535,N=Math.floor(A/65536),fe=A-N*65536,A=_e+N+65535,N=Math.floor(A/65536),_e=A-N*65536,A=je+N+65535,N=Math.floor(A/65536),je=A-N*65536,A=We+N+65535,N=Math.floor(A/65536),We=A-N*65536,A=ct+N+65535,N=Math.floor(A/65536),ct=A-N*65536,A=Ie+N+65535,N=Math.floor(A/65536),Ie=A-N*65536,A=nt+N+65535,N=Math.floor(A/65536),nt=A-N*65536,A=bt+N+65535,N=Math.floor(A/65536),bt=A-N*65536,A=Ot+N+65535,N=Math.floor(A/65536),Ot=A-N*65536,A=gt+N+65535,N=Math.floor(A/65536),gt=A-N*65536,A=ht+N+65535,N=Math.floor(A/65536),ht=A-N*65536,A=xt+N+65535,N=Math.floor(A/65536),xt=A-N*65536,A=wt+N+65535,N=Math.floor(A/65536),wt=A-N*65536,A=Qe+N+65535,N=Math.floor(A/65536),Qe=A-N*65536,Q+=N-1+37*(N-1),N=1,A=Q+N+65535,N=Math.floor(A/65536),Q=A-N*65536,A=ee+N+65535,N=Math.floor(A/65536),ee=A-N*65536,A=fe+N+65535,N=Math.floor(A/65536),fe=A-N*65536,A=_e+N+65535,N=Math.floor(A/65536),_e=A-N*65536,A=je+N+65535,N=Math.floor(A/65536),je=A-N*65536,A=We+N+65535,N=Math.floor(A/65536),We=A-N*65536,A=ct+N+65535,N=Math.floor(A/65536),ct=A-N*65536,A=Ie+N+65535,N=Math.floor(A/65536),Ie=A-N*65536,A=nt+N+65535,N=Math.floor(A/65536),nt=A-N*65536,A=bt+N+65535,N=Math.floor(A/65536),bt=A-N*65536,A=Ot+N+65535,N=Math.floor(A/65536),Ot=A-N*65536,A=gt+N+65535,N=Math.floor(A/65536),gt=A-N*65536,A=ht+N+65535,N=Math.floor(A/65536),ht=A-N*65536,A=xt+N+65535,N=Math.floor(A/65536),xt=A-N*65536,A=wt+N+65535,N=Math.floor(A/65536),wt=A-N*65536,A=Qe+N+65535,N=Math.floor(A/65536),Qe=A-N*65536,Q+=N-1+37*(N-1),T[0]=Q,T[1]=ee,T[2]=fe,T[3]=_e,T[4]=je,T[5]=We,T[6]=ct,T[7]=Ie,T[8]=nt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Qe}function He(T,D){we(T,D,D)}function Ee(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=253;A>=0;A--)He($,$),A!==2&&A!==4&&we($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function it(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=250;A>=0;A--)He($,$),A!==1&&we($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function ke(T,D,$){var A=new Uint8Array(32),N=new Float64Array(80),Q,ee,fe=n(),_e=n(),je=n(),We=n(),ct=n(),Ie=n();for(ee=0;ee<31;ee++)A[ee]=D[ee];for(A[31]=D[31]&127|64,A[0]&=248,ae(N,$),ee=0;ee<16;ee++)_e[ee]=N[ee],We[ee]=fe[ee]=je[ee]=0;for(fe[0]=We[0]=1,ee=254;ee>=0;--ee)Q=A[ee>>>3]>>>(ee&7)&1,j(fe,_e,Q),j(je,We,Q),ue(ct,fe,je),be(fe,fe,je),ue(je,_e,We),be(_e,_e,We),He(We,ct),He(Ie,fe),we(fe,je,fe),we(je,_e,ct),ue(ct,fe,je),be(fe,fe,je),He(_e,fe),be(je,We,Ie),we(fe,je,u),ue(fe,fe,We),we(je,je,fe),we(fe,We,Ie),we(We,_e,N),He(_e,ct),j(fe,_e,Q),j(je,We,Q);for(ee=0;ee<16;ee++)N[ee+16]=fe[ee],N[ee+32]=je[ee],N[ee+48]=_e[ee],N[ee+64]=We[ee];var nt=N.subarray(32),bt=N.subarray(16);return Ee(nt,nt),we(bt,bt,nt),K(T,bt),0}function Le(T,D){return ke(T,D,o)}function De(T,D){return r(D,32),Le(T,D)}function me(T,D,$){var A=new Uint8Array(32);return ke(A,$,D),E(T,i,A,C)}var yt=Z,lt=G;function Nt(T,D,$,A,N,Q){var ee=new Uint8Array(32);return me(ee,N,Q),yt(T,D,$,A,ee)}function yn(T,D,$,A,N,Q){var ee=new Uint8Array(32);return me(ee,N,Q),lt(T,D,$,A,ee)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function te(T,D,$,A){for(var N=new Int32Array(16),Q=new Int32Array(16),ee,fe,_e,je,We,ct,Ie,nt,bt,Ot,gt,ht,xt,wt,Qe,ut,Xe,Ne,Ke,Ge,pe,he,Re,Oe,Pe,Be,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],J=T[4],Zt=T[5],sn=T[6],un=T[7],jt=D[0],ln=D[1],rn=D[2],Gn=D[3],mn=D[4],Pn=D[5],Yn=D[6],Zn=D[7],xr=0;A>=128;){for(Ke=0;Ke<16;Ke++)Ge=8*Ke+xr,N[Ke]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],Q[Ke]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(Ke=0;Ke<80;Ke++)if(ee=vt,fe=Lt,_e=Ft,je=$t,We=J,ct=Zt,Ie=sn,nt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=Pn,Qe=Yn,ut=Zn,pe=un,he=Zn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=(J>>>14|mn<<18)^(J>>>18|mn<<14)^(mn>>>9|J<<23),he=(mn>>>14|J<<18)^(mn>>>18|J<<14)^(J>>>9|mn<<23),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=J&Zt^~J&sn,he=mn&Pn^~mn&Yn,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=nn[Ke*2],he=nn[Ke*2+1],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=N[Ke%16],he=Q[Ke%16],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,Xe=Pe&65535|Be<<16,Ne=Re&65535|Oe<<16,pe=Xe,he=Ne,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),he=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,pe=vt&Lt^vt&Ft^Lt&Ft,he=jt&ln^jt&rn^ln&rn,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,nt=Pe&65535|Be<<16,ut=Re&65535|Oe<<16,pe=je,he=ht,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=Xe,he=Ne,Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,je=Pe&65535|Be<<16,ht=Re&65535|Oe<<16,Lt=ee,Ft=fe,$t=_e,J=je,Zt=We,sn=ct,un=Ie,vt=nt,ln=bt,rn=Ot,Gn=gt,mn=ht,Pn=xt,Yn=wt,Zn=Qe,jt=ut,Ke%16===15)for(Ge=0;Ge<16;Ge++)pe=N[Ge],he=Q[Ge],Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=N[(Ge+9)%16],he=Q[(Ge+9)%16],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Xe=N[(Ge+1)%16],Ne=Q[(Ge+1)%16],pe=(Xe>>>1|Ne<<31)^(Xe>>>8|Ne<<24)^Xe>>>7,he=(Ne>>>1|Xe<<31)^(Ne>>>8|Xe<<24)^(Ne>>>7|Xe<<25),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Xe=N[(Ge+14)%16],Ne=Q[(Ge+14)%16],pe=(Xe>>>19|Ne<<13)^(Ne>>>29|Xe<<3)^Xe>>>6,he=(Ne>>>19|Xe<<13)^(Xe>>>29|Ne<<3)^(Ne>>>6|Xe<<26),Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,N[Ge]=Pe&65535|Be<<16,Q[Ge]=Re&65535|Oe<<16;pe=vt,he=jt,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[0],he=D[0],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[0]=vt=Pe&65535|Be<<16,D[0]=jt=Re&65535|Oe<<16,pe=Lt,he=ln,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[1],he=D[1],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[1]=Lt=Pe&65535|Be<<16,D[1]=ln=Re&65535|Oe<<16,pe=Ft,he=rn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[2],he=D[2],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[2]=Ft=Pe&65535|Be<<16,D[2]=rn=Re&65535|Oe<<16,pe=$t,he=Gn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[3],he=D[3],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[3]=$t=Pe&65535|Be<<16,D[3]=Gn=Re&65535|Oe<<16,pe=J,he=mn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[4],he=D[4],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[4]=J=Pe&65535|Be<<16,D[4]=mn=Re&65535|Oe<<16,pe=Zt,he=Pn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[5],he=D[5],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[5]=Zt=Pe&65535|Be<<16,D[5]=Pn=Re&65535|Oe<<16,pe=sn,he=Yn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[6],he=D[6],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[6]=sn=Pe&65535|Be<<16,D[6]=Yn=Re&65535|Oe<<16,pe=un,he=Zn,Re=he&65535,Oe=he>>>16,Pe=pe&65535,Be=pe>>>16,pe=T[7],he=D[7],Re+=he&65535,Oe+=he>>>16,Pe+=pe&65535,Be+=pe>>>16,Oe+=Re>>>16,Pe+=Oe>>>16,Be+=Pe>>>16,T[7]=un=Pe&65535|Be<<16,D[7]=Zn=Re&65535|Oe<<16,xr+=128,A-=128}return A}function de(T,D,$){var A=new Int32Array(8),N=new Int32Array(8),Q=new Uint8Array(256),ee,fe=$;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,N[0]=4089235720,N[1]=2227873595,N[2]=4271175723,N[3]=1595750129,N[4]=2917565137,N[5]=725511199,N[6]=4215389547,N[7]=327033209,te(A,N,D,$),$%=128,ee=0;ee<$;ee++)Q[ee]=D[fe-$+ee];for(Q[$]=128,$=256-128*($<112?1:0),Q[$-9]=0,m(Q,$-8,fe/536870912|0,fe<<3),te(A,N,Q,$),ee=0;ee<8;ee++)m(T,8*ee,A[ee],N[ee]);return 0}function ge(T,D){var $=n(),A=n(),N=n(),Q=n(),ee=n(),fe=n(),_e=n(),je=n(),We=n();be($,T[1],T[0]),be(We,D[1],D[0]),we($,$,We),ue(A,T[0],T[1]),ue(We,D[0],D[1]),we(A,A,We),we(N,T[3],D[3]),we(N,N,c),we(Q,T[2],D[2]),ue(Q,Q,Q),be(ee,A,$),be(fe,Q,N),ue(_e,Q,N),ue(je,A,$),we(T[0],ee,fe),we(T[1],je,_e),we(T[2],_e,fe),we(T[3],ee,je)}function ze(T,D,$){var A;for(A=0;A<4;A++)j(T[A],D[A],$)}function Fe(T,D){var $=n(),A=n(),N=n();Ee(N,D[2]),we($,D[0],N),we(A,D[1],N),K(T,A),T[31]^=oe($)<<7}function Ae(T,D,$){var A,N;for(q(T[0],a),q(T[1],s),q(T[2],s),q(T[3],a),N=255;N>=0;--N)A=$[N/8|0]>>(N&7)&1,ze(T,D,A),ge(D,T),ge(T,T),ze(T,D,A)}function tt(T,D){var $=[n(),n(),n(),n()];q($[0],f),q($[1],h),q($[2],s),we($[3],f,h),Ae(T,$,D)}function mt(T,D,$){var A=new Uint8Array(64),N=[n(),n(),n(),n()],Q;for($||r(D,32),de(A,D,32),A[0]&=248,A[31]&=127,A[31]|=64,tt(N,A),Fe(T,N),Q=0;Q<32;Q++)D[Q+32]=T[Q];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Kt(T,D){var $,A,N,Q;for(A=63;A>=32;--A){for($=0,N=A-32,Q=A-12;N>4)*xn[N],$=D[N]>>8,D[N]&=255;for(N=0;N<32;N++)D[N]-=$*xn[N];for(A=0;A<32;A++)D[A+1]+=D[A]>>8,T[A]=D[A]&255}function wn(T){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=T[$];for($=0;$<64;$++)T[$]=0;Kt(T,D)}function Ii(T,D,$,A){var N=new Uint8Array(64),Q=new Uint8Array(64),ee=new Uint8Array(64),fe,_e,je=new Float64Array(64),We=[n(),n(),n(),n()];de(N,A,32),N[0]&=248,N[31]&=127,N[31]|=64;var ct=$+64;for(fe=0;fe<$;fe++)T[64+fe]=D[fe];for(fe=0;fe<32;fe++)T[32+fe]=N[32+fe];for(de(ee,T.subarray(32),$+32),wn(ee),tt(We,ee),Fe(T,We),fe=32;fe<64;fe++)T[fe]=A[fe];for(de(Q,T,$+64),wn(Q),fe=0;fe<64;fe++)je[fe]=0;for(fe=0;fe<32;fe++)je[fe]=ee[fe];for(fe=0;fe<32;fe++)for(_e=0;_e<32;_e++)je[fe+_e]+=Q[fe]*N[_e];return Kt(T.subarray(32),je),ct}function br(T,D){var $=n(),A=n(),N=n(),Q=n(),ee=n(),fe=n(),_e=n();return q(T[2],s),ae(T[1],D),He(N,T[1]),we(Q,N,l),be(N,N,T[2]),ue(Q,T[2],Q),He(ee,Q),He(fe,ee),we(_e,fe,ee),we($,_e,N),we($,$,Q),it($,$),we($,$,N),we($,$,Q),we($,$,Q),we(T[0],$,Q),He(A,T[0]),we(A,A,Q),Y(A,N)&&we(T[0],T[0],p),He(A,T[0]),we(A,A,Q),Y(A,N)?-1:(oe(T[0])===D[31]>>7&&be(T[0],a,T[0]),we(T[3],T[0],T[1]),0)}function yi(T,D,$,A){var N,Q=new Uint8Array(32),ee=new Uint8Array(64),fe=[n(),n(),n(),n()],_e=[n(),n(),n(),n()];if($<64||br(_e,A))return-1;for(N=0;N<$;N++)T[N]=D[N];for(N=0;N<32;N++)T[N+32]=A[N];if(de(ee,T,$),wn(ee),Ae(fe,_e,ee),tt(_e,D.subarray(32)),ge(fe,_e),Fe(Q,fe),$-=64,w(D,0,Q,0)){for(N=0;N<$;N++)T[N]=0;return-1}for(N=0;N<$;N++)T[N]=D[N+64];return $}var sr=32,si=24,bi=32,Rr=16,Xi=32,yo=32,xi=32,Dr=32,_a=32,_t=si,hn=bi,_n=Rr,qn=64,ur=32,Xr=64,bo=32,Zl=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:U,crypto_stream:L,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:V,crypto_onetimeauth_verify:ne,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:ke,crypto_scalarmult_base:Le,crypto_box_beforenm:me,crypto_box_afternm:yt,crypto_box:Nt,crypto_box_open:yn,crypto_box_keypair:De,crypto_hash:de,crypto_sign:Ii,crypto_sign_keypair:mt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:sr,crypto_secretbox_NONCEBYTES:si,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Xi,crypto_scalarmult_SCALARBYTES:yo,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:_a,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:_n,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:bo,crypto_hash_BYTES:Zl,gf:n,D:l,L:xn,pack25519:K,unpack25519:ae,M:we,A:ue,S:He,Z:be,pow2523:it,add:ge,set25519:q,modL:Kt,scalarmult:Ae,scalarbase:tt};function Sf(T,D){if(T.length!==sr)throw new Error("bad key size");if(D.length!==si)throw new Error("bad nonce size")}function re(T,D){if(T.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function se(){for(var T=0;T=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),D=new Uint8Array(Xr);return mt(T,D),{publicKey:T,secretKey:D}},t.sign.keyPair.fromSecretKey=function(T){if(se(T),T.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Yt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),I.jsxs(DGe,{scope:n,state:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Sl(w)?"mixed":w,"aria-required":a,"data-state":dZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Sl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&I.jsx(IGe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Sl(o)?!1:o})]})});lZ.displayName=TP;var cZ="CheckboxIndicator",fZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=$Ge(cZ,n);return I.jsx(Gr,{present:r||Sl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":dZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});fZ.displayName=cZ;var IGe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=jA(n),u=aO(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Sl(n),p.call(c,Sl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Sl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Sl(e){return e==="indeterminate"}function dZ(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}var UQe=lZ,VQe=fZ;export{wZe as $,BYe as A,ehe as B,FYe as C,jYe as D,zYe as E,LYe as F,J0e as G,nge as H,uYe as I,rge as J,mz as K,XYe as L,oge as M,ege as N,LGe as O,UGe as P,kYe as Q,F as R,Al as S,ige as T,tge as U,EZe as V,GYe as W,OZe as X,mZe as Y,vZe as Z,xZe as _,HGe as a,QXe as a$,SZe as a0,WYe as a1,_Ze as a2,JYe as a3,bZe as a4,CZe as a5,pZe as a6,gZe as a7,yZe as a8,cZe as a9,iYe as aA,_Ye as aB,wYe as aC,bYe as aD,SYe as aE,fYe as aF,JGe as aG,OXe as aH,rZe as aI,gXe as aJ,dYe as aK,yYe as aL,PXe as aM,kXe as aN,TXe as aO,WGe as aP,$Xe as aQ,IXe as aR,NXe as aS,LXe as aT,jXe as aU,zXe as aV,BXe as aW,UXe as aX,KYe as aY,XXe as aZ,YYe as a_,lZe as aa,fZe as ab,eYe as ac,PZe as ad,Wve as ae,Hve as af,TZe as ag,$Ze as ah,MZe as ai,RZe as aj,BGe as ak,QGe as al,nYe as am,vYe as an,qGe as ao,lXe as ap,rYe as aq,hYe as ar,tYe as as,sYe as at,mYe as au,gYe as av,lYe as aw,pYe as ax,XGe as ay,YGe as az,mm as b,DYe as b$,VXe as b0,WXe as b1,HXe as b2,qXe as b3,GXe as b4,ZXe as b5,YXe as b6,JXe as b7,KXe as b8,nQe as b9,cQe as bA,fQe as bB,dQe as bC,VUe as bD,YUe as bE,uQe as bF,uXe as bG,IZe as bH,jZe as bI,LZe as bJ,eQe as bK,Ui as bL,pQe as bM,gQe as bN,aXe as bO,bXe as bP,pXe as bQ,JZe as bR,GZe as bS,qZe as bT,mQe as bU,ZGe as bV,xYe as bW,cYe as bX,GGe as bY,yQe as bZ,bQe as b_,qYe as ba,aQe as bb,sQe as bc,iQe as bd,oQe as be,c3 as bf,RYe as bg,_f as bh,UZe as bi,MXe as bj,RXe as bk,IA as bl,NA as bm,QNe as bn,Js as bo,xf as bp,tp as bq,tQe as br,NZe as bs,BZe as bt,sXe as bu,zZe as bv,SXe as bw,_Xe as bx,eXe as by,wXe as bz,dn as c,ZZe as c$,hXe as c0,eZe as c1,tZe as c2,OQe as c3,PQe as c4,YZe as c5,FZe as c6,DQe as c7,$Qe as c8,LQe as c9,iXe as cA,wQe as cB,_Qe as cC,aZe as cD,Jc as cE,DZe as cF,jQe as cG,BQe as cH,mXe as cI,XZe as cJ,tXe as cK,cXe as cL,QZe as cM,yXe as cN,rXe as cO,UQe as cP,VQe as cQ,ZYe as cR,uZe as cS,HYe as cT,QYe as cU,sZe as cV,nXe as cW,zGe as cX,WZe as cY,FUe as cZ,iZe as c_,FQe as ca,IQe as cb,NQe as cc,TQe as cd,MQe as ce,RQe as cf,nZe as cg,oZe as ch,xXe as ci,AQe as cj,xQe as ck,SQe as cl,CQe as cm,EQe as cn,tpe as co,spe as cp,Zhe as cq,fXe as cr,vXe as cs,dXe as ct,oXe as cu,HZe as cv,KZe as cw,CXe as cx,es as cy,yr as cz,FGe as d,VZe as d0,qr as e,AYe as f,EYe as g,OYe as h,CYe as i,I as j,Yi as k,IYe as l,Vk as m,MYe as n,jGe as o,PYe as p,UYe as q,y as r,z5 as s,KGe as t,UF as u,aYe as v,oYe as w,VYe as x,VGe as y,NYe as z}; diff --git a/public/assets/admin/locales/en-US.js b/public/assets/admin/locales/en-US.js index e8852b9..81b7d20 100644 --- a/public/assets/admin/locales/en-US.js +++ b/public/assets/admin/locales/en-US.js @@ -151,6 +151,7 @@ window.XBOARD_TRANSLATIONS['en-US'] = { "systemConfig": "System Configuration", "themeConfig": "Theme Configuration", "noticeManagement": "Notice Management", + "pluginManagement": "Plugin Management", "paymentConfig": "Payment Configuration", "knowledgeManagement": "Knowledge Management", "nodeManagement": "Node Management", @@ -163,6 +164,58 @@ window.XBOARD_TRANSLATIONS['en-US'] = { "userManagement": "User Management", "ticketManagement": "Ticket Management" }, + "plugin": { + "title": "Plugin Management", + "description": "Manage and configure system plugins", + "search": { + "placeholder": "Search plugin name or description..." + }, + "category": { + "placeholder": "Select Category", + "all": "All", + "other": "Other" + }, + "tabs": { + "all": "All Plugins", + "installed": "Installed", + "available": "Available" + }, + "status": { + "enabled": "Enabled", + "disabled": "Disabled" + }, + "button": { + "install": "Install", + "config": "Configure", + "enable": "Enable", + "disable": "Disable" + }, + "uninstall": { + "title": "Uninstall Plugin", + "description": "Are you sure you want to uninstall this plugin? Plugin data will be cleared after uninstallation.", + "button": "Uninstall" + }, + "config": { + "title": "Configuration", + "description": "Modify plugin configuration", + "save": "Save", + "cancel": "Cancel" + }, + "author": "Author", + "messages": { + "installSuccess": "Plugin installed successfully", + "installError": "Failed to install plugin", + "uninstallSuccess": "Plugin uninstalled successfully", + "uninstallError": "Failed to uninstall plugin", + "enableSuccess": "Plugin enabled successfully", + "enableError": "Failed to enable plugin", + "disableSuccess": "Plugin disabled successfully", + "disableError": "Failed to disable plugin", + "configLoadError": "Failed to load plugin configuration", + "configSaveSuccess": "Configuration saved successfully", + "configSaveError": "Failed to save configuration" + } + }, "settings": { "title": "System Settings", "description": "Manage core system configurations, including site, security, subscription, invite commission, nodes, email, and notifications", diff --git a/public/assets/admin/locales/ko-KR.js b/public/assets/admin/locales/ko-KR.js index 5e4c0d3..add98ae 100644 --- a/public/assets/admin/locales/ko-KR.js +++ b/public/assets/admin/locales/ko-KR.js @@ -151,6 +151,7 @@ window.XBOARD_TRANSLATIONS['ko-KR'] = { "systemConfig": "시스템 설정", "themeConfig": "테마 설정", "noticeManagement": "공지사항 관리", + "pluginManagement": "플러그인 관리", "paymentConfig": "결제 설정", "knowledgeManagement": "지식 관리", "nodeManagement": "노드 관리", @@ -163,6 +164,58 @@ window.XBOARD_TRANSLATIONS['ko-KR'] = { "userManagement": "사용자 관리", "ticketManagement": "티켓 관리" }, + "plugin": { + "title": "플러그인 관리", + "description": "시스템 플러그인 관리 및 설정", + "search": { + "placeholder": "플러그인 이름 또는 설명 검색..." + }, + "category": { + "placeholder": "카테고리 선택", + "all": "전체", + "other": "기타" + }, + "tabs": { + "all": "전체 플러그인", + "installed": "설치됨", + "available": "사용 가능" + }, + "status": { + "enabled": "활성화됨", + "disabled": "비활성화됨" + }, + "button": { + "install": "설치", + "config": "설정", + "enable": "활성화", + "disable": "비활성화" + }, + "uninstall": { + "title": "플러그인 제거", + "description": "이 플러그인을 제거하시겠습니까? 제거 후 플러그인 데이터가 삭제됩니다.", + "button": "제거" + }, + "config": { + "title": "설정", + "description": "플러그인 설정 수정", + "save": "저장", + "cancel": "취소" + }, + "author": "작성자", + "messages": { + "installSuccess": "플러그인이 성공적으로 설치되었습니다", + "installError": "플러그인 설치에 실패했습니다", + "uninstallSuccess": "플러그인이 성공적으로 제거되었습니다", + "uninstallError": "플러그인 제거에 실패했습니다", + "enableSuccess": "플러그인이 성공적으로 활성화되었습니다", + "enableError": "플러그인 활성화에 실패했습니다", + "disableSuccess": "플러그인이 성공적으로 비활성화되었습니다", + "disableError": "플러그인 비활성화에 실패했습니다", + "configLoadError": "플러그인 설정을 불러오는데 실패했습니다", + "configSaveSuccess": "설정이 성공적으로 저장되었습니다", + "configSaveError": "설정 저장에 실패했습니다" + } + }, "settings": { "title": "시스템 설정", "description": "사이트, 보안, 구독, 초대 수수료, 노드, 이메일 및 알림을 포함한 핵심 시스템 구성을 관리합니다", diff --git a/public/assets/admin/locales/zh-CN.js b/public/assets/admin/locales/zh-CN.js index e86d159..e19a824 100644 --- a/public/assets/admin/locales/zh-CN.js +++ b/public/assets/admin/locales/zh-CN.js @@ -150,6 +150,7 @@ window.XBOARD_TRANSLATIONS['zh-CN'] = { "systemManagement": "系统管理", "systemConfig": "系统配置", "themeConfig": "主题配置", + "pluginManagement": "插件管理", "noticeManagement": "公告管理", "paymentConfig": "支付配置", "knowledgeManagement": "知识库管理", @@ -163,6 +164,58 @@ window.XBOARD_TRANSLATIONS['zh-CN'] = { "userManagement": "用户管理", "ticketManagement": "工单管理" }, + "plugin": { + "title": "插件管理", + "description": "管理和配置系统插件", + "search": { + "placeholder": "搜索插件名称或描述..." + }, + "category": { + "placeholder": "选择分类", + "all": "全部", + "other": "其他" + }, + "tabs": { + "all": "全部插件", + "installed": "已安装", + "available": "可用插件" + }, + "status": { + "enabled": "已启用", + "disabled": "已禁用" + }, + "button": { + "install": "安装", + "config": "配置", + "enable": "启用", + "disable": "禁用" + }, + "uninstall": { + "title": "卸载插件", + "description": "确定要卸载该插件吗?卸载后插件数据将被清除。", + "button": "卸载" + }, + "config": { + "title": "配置", + "description": "修改插件配置", + "save": "保存", + "cancel": "取消" + }, + "author": "作者", + "messages": { + "installSuccess": "插件安装成功", + "installError": "插件安装失败", + "uninstallSuccess": "插件卸载成功", + "uninstallError": "插件卸载失败", + "enableSuccess": "插件启用成功", + "enableError": "插件启用失败", + "disableSuccess": "插件禁用成功", + "disableError": "插件禁用失败", + "configLoadError": "加载插件配置失败", + "configSaveSuccess": "配置保存成功", + "configSaveError": "配置保存失败" + } + }, "settings": { "title": "系统设置", "description": "管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置", @@ -1941,6 +1994,7 @@ window.XBOARD_TRANSLATIONS['zh-CN'] = { "dashboard": "仪表盘", "systemManagement": "系统管理", "systemConfig": "系统配置", + "pluginManagement": "插件管理", "themeConfig": "主题配置", "noticeManagement": "公告管理", "paymentConfig": "支付配置",