Changeset 3349303
- Timestamp:
- 08/24/2025 04:39:35 PM (6 months ago)
- Location:
- versatile-toolkit
- Files:
-
- 108 added
- 17 edited
-
assets/screenshot-1.png (modified) (previous)
-
tags/1.0.0 (added)
-
tags/1.0.0/assets (added)
-
tags/1.0.0/assets/dist (added)
-
tags/1.0.0/assets/dist/css (added)
-
tags/1.0.0/assets/dist/css/style.min.css (added)
-
tags/1.0.0/assets/dist/js (added)
-
tags/1.0.0/assets/dist/js/versatile-js.min.js (added)
-
tags/1.0.0/assets/images (added)
-
tags/1.0.0/components.json (added)
-
tags/1.0.0/composer.json (added)
-
tags/1.0.0/constants.php (added)
-
tags/1.0.0/inc (added)
-
tags/1.0.0/inc/Admin (added)
-
tags/1.0.0/inc/Admin/Init.php (added)
-
tags/1.0.0/inc/Admin/Menu (added)
-
tags/1.0.0/inc/Admin/Menu/MainMenu.php (added)
-
tags/1.0.0/inc/Controllers (added)
-
tags/1.0.0/inc/Core (added)
-
tags/1.0.0/inc/Core/Enqueue.php (added)
-
tags/1.0.0/inc/Database (added)
-
tags/1.0.0/inc/Database/DatabaseAbstract.php (added)
-
tags/1.0.0/inc/Database/Migration.php (added)
-
tags/1.0.0/inc/Helpers (added)
-
tags/1.0.0/inc/Helpers/CookieHelper.php (added)
-
tags/1.0.0/inc/Helpers/MoodHelper.php (added)
-
tags/1.0.0/inc/Helpers/QueryHelper.php (added)
-
tags/1.0.0/inc/Helpers/SessionHelper.php (added)
-
tags/1.0.0/inc/Helpers/ValidationHelper.php (added)
-
tags/1.0.0/inc/Helpers/VersatileInput.php (added)
-
tags/1.0.0/inc/Init.php (added)
-
tags/1.0.0/inc/Models (added)
-
tags/1.0.0/inc/Models/DemoModel.php (added)
-
tags/1.0.0/inc/RestAPI (added)
-
tags/1.0.0/inc/RestAPI/Routes.php (added)
-
tags/1.0.0/inc/Services (added)
-
tags/1.0.0/inc/Services/Comingsoon (added)
-
tags/1.0.0/inc/Services/Comingsoon/ComingsoonMood.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/classic.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/corporate.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/creative.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/minimal.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/modern.php (added)
-
tags/1.0.0/inc/Services/Comingsoon/Templates/neon.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/MaintenanceMode.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/classic.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/corporate.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/creative.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/minimal.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/modern.php (added)
-
tags/1.0.0/inc/Services/MaintenanceMode/Templates/neon.php (added)
-
tags/1.0.0/inc/Services/QuickPick (added)
-
tags/1.0.0/inc/Services/QuickPick/QuickPick.php (added)
-
tags/1.0.0/inc/Services/ServiceInit.php (added)
-
tags/1.0.0/inc/Services/Troubleshoot (added)
-
tags/1.0.0/inc/Services/Troubleshoot/DebugLog.php (added)
-
tags/1.0.0/inc/Services/Troubleshoot/MuVersatileToolkit.php (added)
-
tags/1.0.0/inc/Services/Troubleshoot/TroubleshootInit.php (added)
-
tags/1.0.0/inc/Traits (added)
-
tags/1.0.0/inc/Traits/JsonResponse.php (added)
-
tags/1.0.0/inc/Traits/RestResponse.php (added)
-
tags/1.0.0/inc/VersatileGlobals.php (added)
-
tags/1.0.0/languages (added)
-
tags/1.0.0/languages/versatile-toolkit.pot (added)
-
tags/1.0.0/languages/versatile.pot (added)
-
tags/1.0.0/readme.txt (added)
-
tags/1.0.0/scripts (added)
-
tags/1.0.0/tailwind.config.js (added)
-
tags/1.0.0/tsconfig.json (added)
-
tags/1.0.0/vendor (added)
-
tags/1.0.0/vendor/autoload.php (added)
-
tags/1.0.0/vendor/composer (added)
-
tags/1.0.0/vendor/composer/ClassLoader.php (added)
-
tags/1.0.0/vendor/composer/InstalledVersions.php (added)
-
tags/1.0.0/vendor/composer/LICENSE (added)
-
tags/1.0.0/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.0/vendor/composer/autoload_files.php (added)
-
tags/1.0.0/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.0/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.0/vendor/composer/autoload_real.php (added)
-
tags/1.0.0/vendor/composer/autoload_static.php (added)
-
tags/1.0.0/vendor/composer/installed.json (added)
-
tags/1.0.0/vendor/composer/installed.php (added)
-
tags/1.0.0/vendor/composer/platform_check.php (added)
-
tags/1.0.0/versatile-toolkit.php (added)
-
tags/1.0.0/views (added)
-
tags/1.0.0/views/pages (added)
-
tags/1.0.0/views/pages/versatile-view.php (added)
-
trunk/assets/dist/css/style.min.css (modified) (1 diff)
-
trunk/assets/dist/js/versatile-js.min.js (modified) (18 diffs)
-
trunk/constants.php (modified) (5 diffs)
-
trunk/inc/Core/Enqueue.php (modified) (3 diffs)
-
trunk/inc/Helpers/MoodHelper.php (added)
-
trunk/inc/Helpers/ValidationHelper.php (modified) (2 diffs)
-
trunk/inc/RestAPI/Routes.php (modified) (2 diffs)
-
trunk/inc/Services/Comingsoon/ComingsoonMood.php (modified) (8 diffs)
-
trunk/inc/Services/Comingsoon/Templates (added)
-
trunk/inc/Services/Comingsoon/Templates/classic.php (added)
-
trunk/inc/Services/Comingsoon/Templates/corporate.php (added)
-
trunk/inc/Services/Comingsoon/Templates/creative.php (added)
-
trunk/inc/Services/Comingsoon/Templates/minimal.php (added)
-
trunk/inc/Services/Comingsoon/Templates/modern.php (added)
-
trunk/inc/Services/Comingsoon/Templates/neon.php (added)
-
trunk/inc/Services/MaintenanceMode/MaintenanceMode.php (modified) (8 diffs)
-
trunk/inc/Services/MaintenanceMode/Templates (added)
-
trunk/inc/Services/MaintenanceMode/Templates/classic.php (added)
-
trunk/inc/Services/MaintenanceMode/Templates/corporate.php (added)
-
trunk/inc/Services/MaintenanceMode/Templates/creative.php (added)
-
trunk/inc/Services/MaintenanceMode/Templates/minimal.php (added)
-
trunk/inc/Services/MaintenanceMode/Templates/modern.php (added)
-
trunk/inc/Services/MaintenanceMode/Templates/neon.php (added)
-
trunk/inc/Services/QuickPick (added)
-
trunk/inc/Services/QuickPick/QuickPick.php (added)
-
trunk/inc/Services/ServiceInit.php (modified) (6 diffs)
-
trunk/inc/Services/Troubleshoot/DebugLog.php (added)
-
trunk/inc/Services/Troubleshoot/TroubleshootInit.php (modified) (7 diffs)
-
trunk/inc/Traits/JsonResponse.php (modified) (1 diff)
-
trunk/inc/VersatileGlobals.php (modified) (5 diffs)
-
trunk/languages/versatile-toolkit.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tsconfig.json (modified) (1 diff)
-
trunk/versatile-toolkit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
versatile-toolkit/trunk/assets/dist/css/style.min.css
r3342118 r3349303 1 *,:after,:before{--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:rgba(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:rgba(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: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height: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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--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:221.2 83.2% 53.3%;--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:221.2 83.2% 53.3%;--radius:0.5rem;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%}*{border-color:hsl(var(--border))}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.\!z-\[9999999\]{z-index:9999999!important}.z-40{z-index:40}.z-50{z-index:50}.z-\[99999\]{z-index:99999}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.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-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-\[300px\]{max-height:300px}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[42px\]{min-height:42px}.min-h-\[60px\]{min-height:60px}.min-h-\[64px\]{min-height:64px}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-6xl{max-width:72rem}.max-w-\[800px\]{max-width:800px}.max-w-lg{max-width:32rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:var(--radix-popover-content-transform-origin)}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.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-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,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-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.bg-\[\#c7c6c6\]{--tw-bg-opacity:1;background-color:rgb(199 198 198/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/80{background-color:rgba(0,0,0,.8)}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.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-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.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-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.pb-4{padding-bottom:1rem}.pl-2\.5{padding-left:.625rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[0\.8rem\]{font-size:.8rem}.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-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/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-foreground{color:hsl(var(--foreground))}.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-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-secondary{color:hsl(var(--secondary))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/50{color:hsla(0,0%,100%,.5)}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{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 rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{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 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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(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-offset-background{--tw-ring-offset-color:hsl(var(--background))}.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)}.transition{transition-duration:.15s;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-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,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{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.fade-in-0{--tw-enter-opacity:0}.zoom-in-95{--tw-enter-scale:.95}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.wp-person a:focus .gravatar,a:focus,a:focus .media-icon img,a:focus .plugin-icon{box-shadow:0 0 0 0 #2271b1;color:#043959;outline:0 solid transparent}.file\:border-0::file-selector-button{border-width:0}.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}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:border:after{border-width:1px;content:var(--tw-content)}.after\:border-gray-300:after{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1));content:var(--tw-content)}.after\:bg-white:after{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));content:var(--tw-content)}.after\:transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.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-200\/80:hover{background-color:rgba(187,247,208,.8)}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-white\/100:hover{color:#fff}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(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)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.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-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))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(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)}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--tw-translate-x:100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1));content:var(--tw-content)}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:ring-4{--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(4px + 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)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:1rem}.data-\[state\=checked\]\:translate-x-4[data-state=checked],.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0px}@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-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.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-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-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.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\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(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)}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-duration:.15s;animation-name:exit}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.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]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}@media (min-width:640px){.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:text-sm{font-size:.875rem;line-height:1.25rem}}.\[\&\: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)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&\[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)) skewX(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-bottom:.375rem;padding-top:.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-bottom:.75rem;padding-top:.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\]\:size-4 svg{height:1rem;width:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} 1 *, ::before, ::after { 2 --tw-border-spacing-x: 0; 3 --tw-border-spacing-y: 0; 4 --tw-translate-x: 0; 5 --tw-translate-y: 0; 6 --tw-rotate: 0; 7 --tw-skew-x: 0; 8 --tw-skew-y: 0; 9 --tw-scale-x: 1; 10 --tw-scale-y: 1; 11 --tw-pan-x: ; 12 --tw-pan-y: ; 13 --tw-pinch-zoom: ; 14 --tw-scroll-snap-strictness: proximity; 15 --tw-gradient-from-position: ; 16 --tw-gradient-via-position: ; 17 --tw-gradient-to-position: ; 18 --tw-ordinal: ; 19 --tw-slashed-zero: ; 20 --tw-numeric-figure: ; 21 --tw-numeric-spacing: ; 22 --tw-numeric-fraction: ; 23 --tw-ring-inset: ; 24 --tw-ring-offset-width: 0px; 25 --tw-ring-offset-color: #fff; 26 --tw-ring-color: rgb(59 130 246 / 0.5); 27 --tw-ring-offset-shadow: 0 0 #0000; 28 --tw-ring-shadow: 0 0 #0000; 29 --tw-shadow: 0 0 #0000; 30 --tw-shadow-colored: 0 0 #0000; 31 --tw-blur: ; 32 --tw-brightness: ; 33 --tw-contrast: ; 34 --tw-grayscale: ; 35 --tw-hue-rotate: ; 36 --tw-invert: ; 37 --tw-saturate: ; 38 --tw-sepia: ; 39 --tw-drop-shadow: ; 40 --tw-backdrop-blur: ; 41 --tw-backdrop-brightness: ; 42 --tw-backdrop-contrast: ; 43 --tw-backdrop-grayscale: ; 44 --tw-backdrop-hue-rotate: ; 45 --tw-backdrop-invert: ; 46 --tw-backdrop-opacity: ; 47 --tw-backdrop-saturate: ; 48 --tw-backdrop-sepia: ; 49 --tw-contain-size: ; 50 --tw-contain-layout: ; 51 --tw-contain-paint: ; 52 --tw-contain-style: ; 53 } 54 55 ::backdrop { 56 --tw-border-spacing-x: 0; 57 --tw-border-spacing-y: 0; 58 --tw-translate-x: 0; 59 --tw-translate-y: 0; 60 --tw-rotate: 0; 61 --tw-skew-x: 0; 62 --tw-skew-y: 0; 63 --tw-scale-x: 1; 64 --tw-scale-y: 1; 65 --tw-pan-x: ; 66 --tw-pan-y: ; 67 --tw-pinch-zoom: ; 68 --tw-scroll-snap-strictness: proximity; 69 --tw-gradient-from-position: ; 70 --tw-gradient-via-position: ; 71 --tw-gradient-to-position: ; 72 --tw-ordinal: ; 73 --tw-slashed-zero: ; 74 --tw-numeric-figure: ; 75 --tw-numeric-spacing: ; 76 --tw-numeric-fraction: ; 77 --tw-ring-inset: ; 78 --tw-ring-offset-width: 0px; 79 --tw-ring-offset-color: #fff; 80 --tw-ring-color: rgb(59 130 246 / 0.5); 81 --tw-ring-offset-shadow: 0 0 #0000; 82 --tw-ring-shadow: 0 0 #0000; 83 --tw-shadow: 0 0 #0000; 84 --tw-shadow-colored: 0 0 #0000; 85 --tw-blur: ; 86 --tw-brightness: ; 87 --tw-contrast: ; 88 --tw-grayscale: ; 89 --tw-hue-rotate: ; 90 --tw-invert: ; 91 --tw-saturate: ; 92 --tw-sepia: ; 93 --tw-drop-shadow: ; 94 --tw-backdrop-blur: ; 95 --tw-backdrop-brightness: ; 96 --tw-backdrop-contrast: ; 97 --tw-backdrop-grayscale: ; 98 --tw-backdrop-hue-rotate: ; 99 --tw-backdrop-invert: ; 100 --tw-backdrop-opacity: ; 101 --tw-backdrop-saturate: ; 102 --tw-backdrop-sepia: ; 103 --tw-contain-size: ; 104 --tw-contain-layout: ; 105 --tw-contain-paint: ; 106 --tw-contain-style: ; 107 }/* 108 ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com 109 *//* 110 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 111 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) 112 */ 113 114 *, 115 ::before, 116 ::after { 117 box-sizing: border-box; /* 1 */ 118 border-width: 0; /* 2 */ 119 border-style: solid; /* 2 */ 120 border-color: #e5e7eb; /* 2 */ 121 } 122 123 ::before, 124 ::after { 125 --tw-content: ''; 126 } 127 128 /* 129 1. Use a consistent sensible line-height in all browsers. 130 2. Prevent adjustments of font size after orientation changes in iOS. 131 3. Use a more readable tab size. 132 4. Use the user's configured `sans` font-family by default. 133 5. Use the user's configured `sans` font-feature-settings by default. 134 6. Use the user's configured `sans` font-variation-settings by default. 135 7. Disable tap highlights on iOS 136 */ 137 138 html, 139 :host { 140 line-height: 1.5; /* 1 */ 141 -webkit-text-size-adjust: 100%; /* 2 */ 142 -moz-tab-size: 4; /* 3 */ 143 -o-tab-size: 4; 144 tab-size: 4; /* 3 */ 145 font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ 146 font-feature-settings: normal; /* 5 */ 147 font-variation-settings: normal; /* 6 */ 148 -webkit-tap-highlight-color: transparent; /* 7 */ 149 } 150 151 /* 152 1. Remove the margin in all browsers. 153 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. 154 */ 155 156 body { 157 margin: 0; /* 1 */ 158 line-height: inherit; /* 2 */ 159 } 160 161 /* 162 1. Add the correct height in Firefox. 163 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 164 3. Ensure horizontal rules are visible by default. 165 */ 166 167 hr { 168 height: 0; /* 1 */ 169 color: inherit; /* 2 */ 170 border-top-width: 1px; /* 3 */ 171 } 172 173 /* 174 Add the correct text decoration in Chrome, Edge, and Safari. 175 */ 176 177 abbr:where([title]) { 178 -webkit-text-decoration: underline dotted; 179 text-decoration: underline dotted; 180 } 181 182 /* 183 Remove the default font size and weight for headings. 184 */ 185 186 h1, 187 h2, 188 h3, 189 h4, 190 h5, 191 h6 { 192 font-size: inherit; 193 font-weight: inherit; 194 } 195 196 /* 197 Reset links to optimize for opt-in styling instead of opt-out. 198 */ 199 200 a { 201 color: inherit; 202 text-decoration: inherit; 203 } 204 205 /* 206 Add the correct font weight in Edge and Safari. 207 */ 208 209 b, 210 strong { 211 font-weight: bolder; 212 } 213 214 /* 215 1. Use the user's configured `mono` font-family by default. 216 2. Use the user's configured `mono` font-feature-settings by default. 217 3. Use the user's configured `mono` font-variation-settings by default. 218 4. Correct the odd `em` font sizing in all browsers. 219 */ 220 221 code, 222 kbd, 223 samp, 224 pre { 225 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ 226 font-feature-settings: normal; /* 2 */ 227 font-variation-settings: normal; /* 3 */ 228 font-size: 1em; /* 4 */ 229 } 230 231 /* 232 Add the correct font size in all browsers. 233 */ 234 235 small { 236 font-size: 80%; 237 } 238 239 /* 240 Prevent `sub` and `sup` elements from affecting the line height in all browsers. 241 */ 242 243 sub, 244 sup { 245 font-size: 75%; 246 line-height: 0; 247 position: relative; 248 vertical-align: baseline; 249 } 250 251 sub { 252 bottom: -0.25em; 253 } 254 255 sup { 256 top: -0.5em; 257 } 258 259 /* 260 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 261 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 262 3. Remove gaps between table borders by default. 263 */ 264 265 table { 266 text-indent: 0; /* 1 */ 267 border-color: inherit; /* 2 */ 268 border-collapse: collapse; /* 3 */ 269 } 270 271 /* 272 1. Change the font styles in all browsers. 273 2. Remove the margin in Firefox and Safari. 274 3. Remove default padding in all browsers. 275 */ 276 277 button, 278 input, 279 optgroup, 280 select, 281 textarea { 282 font-family: inherit; /* 1 */ 283 font-feature-settings: inherit; /* 1 */ 284 font-variation-settings: inherit; /* 1 */ 285 font-size: 100%; /* 1 */ 286 font-weight: inherit; /* 1 */ 287 line-height: inherit; /* 1 */ 288 letter-spacing: inherit; /* 1 */ 289 color: inherit; /* 1 */ 290 margin: 0; /* 2 */ 291 padding: 0; /* 3 */ 292 } 293 294 /* 295 Remove the inheritance of text transform in Edge and Firefox. 296 */ 297 298 button, 299 select { 300 text-transform: none; 301 } 302 303 /* 304 1. Correct the inability to style clickable types in iOS and Safari. 305 2. Remove default button styles. 306 */ 307 308 button, 309 input:where([type='button']), 310 input:where([type='reset']), 311 input:where([type='submit']) { 312 -webkit-appearance: button; /* 1 */ 313 background-color: transparent; /* 2 */ 314 background-image: none; /* 2 */ 315 } 316 317 /* 318 Use the modern Firefox focus style for all focusable elements. 319 */ 320 321 :-moz-focusring { 322 outline: auto; 323 } 324 325 /* 326 Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) 327 */ 328 329 :-moz-ui-invalid { 330 box-shadow: none; 331 } 332 333 /* 334 Add the correct vertical alignment in Chrome and Firefox. 335 */ 336 337 progress { 338 vertical-align: baseline; 339 } 340 341 /* 342 Correct the cursor style of increment and decrement buttons in Safari. 343 */ 344 345 ::-webkit-inner-spin-button, 346 ::-webkit-outer-spin-button { 347 height: auto; 348 } 349 350 /* 351 1. Correct the odd appearance in Chrome and Safari. 352 2. Correct the outline style in Safari. 353 */ 354 355 [type='search'] { 356 -webkit-appearance: textfield; /* 1 */ 357 outline-offset: -2px; /* 2 */ 358 } 359 360 /* 361 Remove the inner padding in Chrome and Safari on macOS. 362 */ 363 364 ::-webkit-search-decoration { 365 -webkit-appearance: none; 366 } 367 368 /* 369 1. Correct the inability to style clickable types in iOS and Safari. 370 2. Change font properties to `inherit` in Safari. 371 */ 372 373 ::-webkit-file-upload-button { 374 -webkit-appearance: button; /* 1 */ 375 font: inherit; /* 2 */ 376 } 377 378 /* 379 Add the correct display in Chrome and Safari. 380 */ 381 382 summary { 383 display: list-item; 384 } 385 386 /* 387 Removes the default spacing and border for appropriate elements. 388 */ 389 390 blockquote, 391 dl, 392 dd, 393 h1, 394 h2, 395 h3, 396 h4, 397 h5, 398 h6, 399 hr, 400 figure, 401 p, 402 pre { 403 margin: 0; 404 } 405 406 fieldset { 407 margin: 0; 408 padding: 0; 409 } 410 411 legend { 412 padding: 0; 413 } 414 415 ol, 416 ul, 417 menu { 418 list-style: none; 419 margin: 0; 420 padding: 0; 421 } 422 423 /* 424 Reset default styling for dialogs. 425 */ 426 dialog { 427 padding: 0; 428 } 429 430 /* 431 Prevent resizing textareas horizontally by default. 432 */ 433 434 textarea { 435 resize: vertical; 436 } 437 438 /* 439 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 440 2. Set the default placeholder color to the user's configured gray 400 color. 441 */ 442 443 input::-moz-placeholder, textarea::-moz-placeholder { 444 opacity: 1; /* 1 */ 445 color: #9ca3af; /* 2 */ 446 } 447 448 input::placeholder, 449 textarea::placeholder { 450 opacity: 1; /* 1 */ 451 color: #9ca3af; /* 2 */ 452 } 453 454 /* 455 Set the default cursor for buttons. 456 */ 457 458 button, 459 [role="button"] { 460 cursor: pointer; 461 } 462 463 /* 464 Make sure disabled buttons don't get the pointer cursor. 465 */ 466 :disabled { 467 cursor: default; 468 } 469 470 /* 471 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 472 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) 473 This can trigger a poorly considered lint error in some tools but is included by design. 474 */ 475 476 img, 477 svg, 478 video, 479 canvas, 480 audio, 481 iframe, 482 embed, 483 object { 484 display: block; /* 1 */ 485 vertical-align: middle; /* 2 */ 486 } 487 488 /* 489 Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) 490 */ 491 492 img, 493 video { 494 max-width: 100%; 495 height: auto; 496 } 497 498 /* Make elements with the HTML hidden attribute stay hidden by default */ 499 [hidden]:where(:not([hidden="until-found"])) { 500 display: none; 501 } 502 :root { 503 --background: 0 0% 100%; 504 --foreground: 222.2 84% 4.9%; 505 --card: 0 0% 100%; 506 --card-foreground: 222.2 84% 4.9%; 507 --popover: 0 0% 100%; 508 --popover-foreground: 222.2 84% 4.9%; 509 --primary: 221.2 83.2% 53.3%; 510 --primary-foreground: 210 40% 98%; 511 --secondary: 210 40% 96.1%; 512 --secondary-foreground: 222.2 47.4% 11.2%; 513 --muted: 210 40% 96.1%; 514 --muted-foreground: 215.4 16.3% 46.9%; 515 --accent: 210 40% 96.1%; 516 --accent-foreground: 222.2 47.4% 11.2%; 517 --destructive: 0 84.2% 60.2%; 518 --destructive-foreground: 210 40% 98%; 519 --border: 214.3 31.8% 91.4%; 520 --input: 214.3 31.8% 91.4%; 521 --ring: 221.2 83.2% 53.3%; 522 --radius: 0.5rem; 523 --chart-1: 12 76% 61%; 524 --chart-2: 173 58% 39%; 525 --chart-3: 197 37% 24%; 526 --chart-4: 43 74% 66%; 527 --chart-5: 27 87% 67%; 528 } 529 * { 530 border-color: hsl(var(--border)); 531 } 532 body { 533 background-color: hsl(var(--background)); 534 font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 535 color: hsl(var(--foreground)); 536 -webkit-font-smoothing: antialiased; 537 -moz-osx-font-smoothing: grayscale; 538 } 539 .sr-only { 540 position: absolute; 541 width: 1px; 542 height: 1px; 543 padding: 0; 544 margin: -1px; 545 overflow: hidden; 546 clip: rect(0, 0, 0, 0); 547 white-space: nowrap; 548 border-width: 0; 549 } 550 .pointer-events-none { 551 pointer-events: none; 552 } 553 .collapse { 554 visibility: collapse; 555 } 556 .static { 557 position: static; 558 } 559 .fixed { 560 position: fixed; 561 } 562 .absolute { 563 position: absolute; 564 } 565 .relative { 566 position: relative; 567 } 568 .sticky { 569 position: sticky; 570 } 571 .inset-0 { 572 inset: 0px; 573 } 574 .inset-x-0 { 575 left: 0px; 576 right: 0px; 577 } 578 .inset-y-0 { 579 top: 0px; 580 bottom: 0px; 581 } 582 .bottom-0 { 583 bottom: 0px; 584 } 585 .left-0 { 586 left: 0px; 587 } 588 .left-2 { 589 left: 0.5rem; 590 } 591 .left-\[50\%\] { 592 left: 50%; 593 } 594 .right-0 { 595 right: 0px; 596 } 597 .right-1 { 598 right: 0.25rem; 599 } 600 .right-2 { 601 right: 0.5rem; 602 } 603 .right-4 { 604 right: 1rem; 605 } 606 .top-0 { 607 top: 0px; 608 } 609 .top-1\/2 { 610 top: 50%; 611 } 612 .top-2 { 613 top: 0.5rem; 614 } 615 .top-4 { 616 top: 1rem; 617 } 618 .top-\[50\%\] { 619 top: 50%; 620 } 621 .top-full { 622 top: 100%; 623 } 624 .-top-\[15px\] { 625 top: -15px; 626 } 627 .\!z-\[9999999\] { 628 z-index: 9999999 !important; 629 } 630 .z-10 { 631 z-index: 10; 632 } 633 .z-50 { 634 z-index: 50; 635 } 636 .z-\[999999\] { 637 z-index: 999999; 638 } 639 .z-\[99999\] { 640 z-index: 99999; 641 } 642 .-mx-1 { 643 margin-left: -0.25rem; 644 margin-right: -0.25rem; 645 } 646 .mx-2 { 647 margin-left: 0.5rem; 648 margin-right: 0.5rem; 649 } 650 .mx-auto { 651 margin-left: auto; 652 margin-right: auto; 653 } 654 .my-2 { 655 margin-top: 0.5rem; 656 margin-bottom: 0.5rem; 657 } 658 .my-8 { 659 margin-top: 2rem; 660 margin-bottom: 2rem; 661 } 662 .\!ml-2 { 663 margin-left: 0.5rem !important; 664 } 665 .mb-1 { 666 margin-bottom: 0.25rem; 667 } 668 .mb-2 { 669 margin-bottom: 0.5rem; 670 } 671 .mb-3 { 672 margin-bottom: 0.75rem; 673 } 674 .mb-4 { 675 margin-bottom: 1rem; 676 } 677 .ml-1 { 678 margin-left: 0.25rem; 679 } 680 .ml-2 { 681 margin-left: 0.5rem; 682 } 683 .ml-auto { 684 margin-left: auto; 685 } 686 .mr-1 { 687 margin-right: 0.25rem; 688 } 689 .mr-2 { 690 margin-right: 0.5rem; 691 } 692 .mt-1 { 693 margin-top: 0.25rem; 694 } 695 .mt-10 { 696 margin-top: 2.5rem; 697 } 698 .mt-2 { 699 margin-top: 0.5rem; 700 } 701 .mt-3 { 702 margin-top: 0.75rem; 703 } 704 .mt-4 { 705 margin-top: 1rem; 706 } 707 .mt-5 { 708 margin-top: 1.25rem; 709 } 710 .mt-6 { 711 margin-top: 1.5rem; 712 } 713 .mt-8 { 714 margin-top: 2rem; 715 } 716 .line-clamp-2 { 717 overflow: hidden; 718 display: -webkit-box; 719 -webkit-box-orient: vertical; 720 -webkit-line-clamp: 2; 721 } 722 .block { 723 display: block; 724 } 725 .inline-block { 726 display: inline-block; 727 } 728 .inline { 729 display: inline; 730 } 731 .flex { 732 display: flex; 733 } 734 .inline-flex { 735 display: inline-flex; 736 } 737 .table { 738 display: table; 739 } 740 .grid { 741 display: grid; 742 } 743 .hidden { 744 display: none; 745 } 746 .aspect-\[4\/3\] { 747 aspect-ratio: 4/3; 748 } 749 .aspect-square { 750 aspect-ratio: 1 / 1; 751 } 752 .h-10 { 753 height: 2.5rem; 754 } 755 .h-12 { 756 height: 3rem; 757 } 758 .h-16 { 759 height: 4rem; 760 } 761 .h-2\.5 { 762 height: 0.625rem; 763 } 764 .h-24 { 765 height: 6rem; 766 } 767 .h-3 { 768 height: 0.75rem; 769 } 770 .h-3\.5 { 771 height: 0.875rem; 772 } 773 .h-32 { 774 height: 8rem; 775 } 776 .h-4 { 777 height: 1rem; 778 } 779 .h-5 { 780 height: 1.25rem; 781 } 782 .h-5\/6 { 783 height: 83.333333%; 784 } 785 .h-6 { 786 height: 1.5rem; 787 } 788 .h-8 { 789 height: 2rem; 790 } 791 .h-9 { 792 height: 2.25rem; 793 } 794 .h-\[100px\] { 795 height: 100px; 796 } 797 .h-\[1500px\] { 798 height: 1500px; 799 } 800 .h-\[25px\] { 801 height: 25px; 802 } 803 .h-\[45px\] { 804 height: 45px; 805 } 806 .h-\[var\(--radix-select-trigger-height\)\] { 807 height: var(--radix-select-trigger-height); 808 } 809 .h-auto { 810 height: auto; 811 } 812 .h-full { 813 height: 100%; 814 } 815 .h-px { 816 height: 1px; 817 } 818 .max-h-32 { 819 max-height: 8rem; 820 } 821 .max-h-\[300px\] { 822 max-height: 300px; 823 } 824 .max-h-\[70vh\] { 825 max-height: 70vh; 826 } 827 .min-h-\[2\.5rem\] { 828 min-height: 2.5rem; 829 } 830 .min-h-\[42px\] { 831 min-height: 42px; 832 } 833 .min-h-\[60px\] { 834 min-height: 60px; 835 } 836 .min-h-\[64px\] { 837 min-height: 64px; 838 } 839 .w-1\/2 { 840 width: 50%; 841 } 842 .w-10 { 843 width: 2.5rem; 844 } 845 .w-11 { 846 width: 2.75rem; 847 } 848 .w-11\/12 { 849 width: 91.666667%; 850 } 851 .w-12 { 852 width: 3rem; 853 } 854 .w-14 { 855 width: 3.5rem; 856 } 857 .w-16 { 858 width: 4rem; 859 } 860 .w-2\.5 { 861 width: 0.625rem; 862 } 863 .w-20 { 864 width: 5rem; 865 } 866 .w-24 { 867 width: 6rem; 868 } 869 .w-3 { 870 width: 0.75rem; 871 } 872 .w-3\.5 { 873 width: 0.875rem; 874 } 875 .w-3\/4 { 876 width: 75%; 877 } 878 .w-32 { 879 width: 8rem; 880 } 881 .w-36 { 882 width: 9rem; 883 } 884 .w-4 { 885 width: 1rem; 886 } 887 .w-40 { 888 width: 10rem; 889 } 890 .w-48 { 891 width: 12rem; 892 } 893 .w-5 { 894 width: 1.25rem; 895 } 896 .w-6 { 897 width: 1.5rem; 898 } 899 .w-64 { 900 width: 16rem; 901 } 902 .w-72 { 903 width: 18rem; 904 } 905 .w-8 { 906 width: 2rem; 907 } 908 .w-80 { 909 width: 20rem; 910 } 911 .w-9 { 912 width: 2.25rem; 913 } 914 .w-\[100px\] { 915 width: 100px; 916 } 917 .w-\[200px\] { 918 width: 200px; 919 } 920 .w-\[300px\] { 921 width: 300px; 922 } 923 .w-\[900px\] { 924 width: 900px; 925 } 926 .w-full { 927 width: 100%; 928 } 929 .min-w-\[40px\] { 930 min-width: 40px; 931 } 932 .min-w-\[8rem\] { 933 min-width: 8rem; 934 } 935 .min-w-\[var\(--radix-select-trigger-width\)\] { 936 min-width: var(--radix-select-trigger-width); 937 } 938 .min-w-full { 939 min-width: 100%; 940 } 941 .max-w-2xl { 942 max-width: 42rem; 943 } 944 .max-w-4xl { 945 max-width: 56rem; 946 } 947 .max-w-6xl { 948 max-width: 72rem; 949 } 950 .max-w-\[800px\] { 951 max-width: 800px; 952 } 953 .max-w-lg { 954 max-width: 32rem; 955 } 956 .max-w-md { 957 max-width: 28rem; 958 } 959 .max-w-xs { 960 max-width: 20rem; 961 } 962 .flex-1 { 963 flex: 1 1 0%; 964 } 965 .flex-shrink-0 { 966 flex-shrink: 0; 967 } 968 .shrink-0 { 969 flex-shrink: 0; 970 } 971 .caption-bottom { 972 caption-side: bottom; 973 } 974 .origin-\[--radix-popover-content-transform-origin\] { 975 transform-origin: var(--radix-popover-content-transform-origin); 976 } 977 .-translate-y-1\/2 { 978 --tw-translate-y: -50%; 979 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 980 } 981 .translate-x-\[-50\%\] { 982 --tw-translate-x: -50%; 983 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 984 } 985 .translate-y-\[-50\%\] { 986 --tw-translate-y: -50%; 987 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 988 } 989 .transform { 990 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 991 } 992 @keyframes pulse { 993 994 50% { 995 opacity: .5; 996 } 997 } 998 .animate-pulse { 999 animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 1000 } 1001 @keyframes spin { 1002 1003 to { 1004 transform: rotate(360deg); 1005 } 1006 } 1007 .animate-spin { 1008 animation: spin 1s linear infinite; 1009 } 1010 .cursor-default { 1011 cursor: default; 1012 } 1013 .cursor-not-allowed { 1014 cursor: not-allowed; 1015 } 1016 .cursor-pointer { 1017 cursor: pointer; 1018 } 1019 .select-none { 1020 -webkit-user-select: none; 1021 -moz-user-select: none; 1022 user-select: none; 1023 } 1024 .grid-cols-6 { 1025 grid-template-columns: repeat(6, minmax(0, 1fr)); 1026 } 1027 .flex-row { 1028 flex-direction: row; 1029 } 1030 .flex-col { 1031 flex-direction: column; 1032 } 1033 .flex-col-reverse { 1034 flex-direction: column-reverse; 1035 } 1036 .flex-wrap { 1037 flex-wrap: wrap; 1038 } 1039 .items-center { 1040 align-items: center; 1041 } 1042 .justify-center { 1043 justify-content: center; 1044 } 1045 .justify-between { 1046 justify-content: space-between; 1047 } 1048 .gap-1 { 1049 gap: 0.25rem; 1050 } 1051 .gap-10 { 1052 gap: 2.5rem; 1053 } 1054 .gap-2 { 1055 gap: 0.5rem; 1056 } 1057 .gap-3 { 1058 gap: 0.75rem; 1059 } 1060 .gap-4 { 1061 gap: 1rem; 1062 } 1063 .gap-5 { 1064 gap: 1.25rem; 1065 } 1066 .space-x-1 > :not([hidden]) ~ :not([hidden]) { 1067 --tw-space-x-reverse: 0; 1068 margin-right: calc(0.25rem * var(--tw-space-x-reverse)); 1069 margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); 1070 } 1071 .space-x-2 > :not([hidden]) ~ :not([hidden]) { 1072 --tw-space-x-reverse: 0; 1073 margin-right: calc(0.5rem * var(--tw-space-x-reverse)); 1074 margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); 1075 } 1076 .space-x-3 > :not([hidden]) ~ :not([hidden]) { 1077 --tw-space-x-reverse: 0; 1078 margin-right: calc(0.75rem * var(--tw-space-x-reverse)); 1079 margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); 1080 } 1081 .space-x-4 > :not([hidden]) ~ :not([hidden]) { 1082 --tw-space-x-reverse: 0; 1083 margin-right: calc(1rem * var(--tw-space-x-reverse)); 1084 margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); 1085 } 1086 .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { 1087 --tw-space-y-reverse: 0; 1088 margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); 1089 margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); 1090 } 1091 .space-y-2 > :not([hidden]) ~ :not([hidden]) { 1092 --tw-space-y-reverse: 0; 1093 margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); 1094 margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); 1095 } 1096 .space-y-3 > :not([hidden]) ~ :not([hidden]) { 1097 --tw-space-y-reverse: 0; 1098 margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); 1099 margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); 1100 } 1101 .space-y-4 > :not([hidden]) ~ :not([hidden]) { 1102 --tw-space-y-reverse: 0; 1103 margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); 1104 margin-bottom: calc(1rem * var(--tw-space-y-reverse)); 1105 } 1106 .space-y-6 > :not([hidden]) ~ :not([hidden]) { 1107 --tw-space-y-reverse: 0; 1108 margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); 1109 margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); 1110 } 1111 .overflow-auto { 1112 overflow: auto; 1113 } 1114 .overflow-hidden { 1115 overflow: hidden; 1116 } 1117 .overflow-x-auto { 1118 overflow-x: auto; 1119 } 1120 .overflow-y-auto { 1121 overflow-y: auto; 1122 } 1123 .overflow-x-hidden { 1124 overflow-x: hidden; 1125 } 1126 .whitespace-nowrap { 1127 white-space: nowrap; 1128 } 1129 .whitespace-pre-wrap { 1130 white-space: pre-wrap; 1131 } 1132 .break-words { 1133 overflow-wrap: break-word; 1134 } 1135 .break-all { 1136 word-break: break-all; 1137 } 1138 .rounded { 1139 border-radius: 0.25rem; 1140 } 1141 .rounded-2xl { 1142 border-radius: 1rem; 1143 } 1144 .rounded-full { 1145 border-radius: 9999px; 1146 } 1147 .rounded-lg { 1148 border-radius: var(--radius); 1149 } 1150 .rounded-md { 1151 border-radius: calc(var(--radius) - 2px); 1152 } 1153 .rounded-sm { 1154 border-radius: calc(var(--radius) - 4px); 1155 } 1156 .rounded-xl { 1157 border-radius: 0.75rem; 1158 } 1159 .rounded-b-lg { 1160 border-bottom-right-radius: var(--radius); 1161 border-bottom-left-radius: var(--radius); 1162 } 1163 .border { 1164 border-width: 1px; 1165 } 1166 .border-0 { 1167 border-width: 0px; 1168 } 1169 .border-2 { 1170 border-width: 2px; 1171 } 1172 .border-b { 1173 border-bottom-width: 1px; 1174 } 1175 .border-l { 1176 border-left-width: 1px; 1177 } 1178 .border-r { 1179 border-right-width: 1px; 1180 } 1181 .border-t { 1182 border-top-width: 1px; 1183 } 1184 .\!border-slate-200 { 1185 --tw-border-opacity: 1 !important; 1186 border-color: rgb(226 232 240 / var(--tw-border-opacity, 1)) !important; 1187 } 1188 .border-blue-200 { 1189 --tw-border-opacity: 1; 1190 border-color: rgb(191 219 254 / var(--tw-border-opacity, 1)); 1191 } 1192 .border-blue-700 { 1193 --tw-border-opacity: 1; 1194 border-color: rgb(29 78 216 / var(--tw-border-opacity, 1)); 1195 } 1196 .border-gray-200 { 1197 --tw-border-opacity: 1; 1198 border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); 1199 } 1200 .border-gray-400 { 1201 --tw-border-opacity: 1; 1202 border-color: rgb(156 163 175 / var(--tw-border-opacity, 1)); 1203 } 1204 .border-input { 1205 border-color: hsl(var(--input)); 1206 } 1207 .border-primary { 1208 border-color: hsl(var(--primary)); 1209 } 1210 .border-red-200 { 1211 --tw-border-opacity: 1; 1212 border-color: rgb(254 202 202 / var(--tw-border-opacity, 1)); 1213 } 1214 .border-slate-100 { 1215 --tw-border-opacity: 1; 1216 border-color: rgb(241 245 249 / var(--tw-border-opacity, 1)); 1217 } 1218 .border-slate-200 { 1219 --tw-border-opacity: 1; 1220 border-color: rgb(226 232 240 / var(--tw-border-opacity, 1)); 1221 } 1222 .border-transparent { 1223 border-color: transparent; 1224 } 1225 .bg-\[\#c7c6c6\] { 1226 --tw-bg-opacity: 1; 1227 background-color: rgb(199 198 198 / var(--tw-bg-opacity, 1)); 1228 } 1229 .bg-\[\#e5e5e5\] { 1230 --tw-bg-opacity: 1; 1231 background-color: rgb(229 229 229 / var(--tw-bg-opacity, 1)); 1232 } 1233 .bg-background { 1234 background-color: hsl(var(--background)); 1235 } 1236 .bg-background\/80 { 1237 background-color: hsl(var(--background) / 0.8); 1238 } 1239 .bg-black { 1240 --tw-bg-opacity: 1; 1241 background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); 1242 } 1243 .bg-black\/80 { 1244 background-color: rgb(0 0 0 / 0.8); 1245 } 1246 .bg-blue-100 { 1247 --tw-bg-opacity: 1; 1248 background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1)); 1249 } 1250 .bg-blue-300 { 1251 --tw-bg-opacity: 1; 1252 background-color: rgb(147 197 253 / var(--tw-bg-opacity, 1)); 1253 } 1254 .bg-blue-50 { 1255 --tw-bg-opacity: 1; 1256 background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1)); 1257 } 1258 .bg-blue-500 { 1259 --tw-bg-opacity: 1; 1260 background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); 1261 } 1262 .bg-blue-600 { 1263 --tw-bg-opacity: 1; 1264 background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); 1265 } 1266 .bg-border { 1267 background-color: hsl(var(--border)); 1268 } 1269 .bg-card { 1270 background-color: hsl(var(--card)); 1271 } 1272 .bg-destructive { 1273 background-color: hsl(var(--destructive)); 1274 } 1275 .bg-gray-100 { 1276 --tw-bg-opacity: 1; 1277 background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); 1278 } 1279 .bg-gray-200 { 1280 --tw-bg-opacity: 1; 1281 background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)); 1282 } 1283 .bg-gray-300 { 1284 --tw-bg-opacity: 1; 1285 background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)); 1286 } 1287 .bg-gray-50 { 1288 --tw-bg-opacity: 1; 1289 background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); 1290 } 1291 .bg-green-100 { 1292 --tw-bg-opacity: 1; 1293 background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1)); 1294 } 1295 .bg-green-500 { 1296 --tw-bg-opacity: 1; 1297 background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1)); 1298 } 1299 .bg-green-600 { 1300 --tw-bg-opacity: 1; 1301 background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)); 1302 } 1303 .bg-muted { 1304 background-color: hsl(var(--muted)); 1305 } 1306 .bg-muted\/50 { 1307 background-color: hsl(var(--muted) / 0.5); 1308 } 1309 .bg-popover { 1310 background-color: hsl(var(--popover)); 1311 } 1312 .bg-primary { 1313 background-color: hsl(var(--primary)); 1314 } 1315 .bg-primary\/10 { 1316 background-color: hsl(var(--primary) / 0.1); 1317 } 1318 .bg-red-100 { 1319 --tw-bg-opacity: 1; 1320 background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); 1321 } 1322 .bg-red-50 { 1323 --tw-bg-opacity: 1; 1324 background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1)); 1325 } 1326 .bg-red-500 { 1327 --tw-bg-opacity: 1; 1328 background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); 1329 } 1330 .bg-secondary { 1331 background-color: hsl(var(--secondary)); 1332 } 1333 .bg-slate-100 { 1334 --tw-bg-opacity: 1; 1335 background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1)); 1336 } 1337 .bg-slate-200 { 1338 --tw-bg-opacity: 1; 1339 background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1)); 1340 } 1341 .bg-slate-300 { 1342 --tw-bg-opacity: 1; 1343 background-color: rgb(203 213 225 / var(--tw-bg-opacity, 1)); 1344 } 1345 .bg-slate-50 { 1346 --tw-bg-opacity: 1; 1347 background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); 1348 } 1349 .bg-transparent { 1350 background-color: transparent; 1351 } 1352 .bg-white { 1353 --tw-bg-opacity: 1; 1354 background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); 1355 } 1356 .bg-yellow-500 { 1357 --tw-bg-opacity: 1; 1358 background-color: rgb(234 179 8 / var(--tw-bg-opacity, 1)); 1359 } 1360 .bg-yellow-600 { 1361 --tw-bg-opacity: 1; 1362 background-color: rgb(202 138 4 / var(--tw-bg-opacity, 1)); 1363 } 1364 .bg-opacity-50 { 1365 --tw-bg-opacity: 0.5; 1366 } 1367 .bg-opacity-80 { 1368 --tw-bg-opacity: 0.8; 1369 } 1370 .bg-opacity-90 { 1371 --tw-bg-opacity: 0.9; 1372 } 1373 .bg-opacity-85 { 1374 --tw-bg-opacity: 0.85; 1375 } 1376 .bg-gradient-to-br { 1377 background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); 1378 } 1379 .from-blue-50 { 1380 --tw-gradient-from: #eff6ff var(--tw-gradient-from-position); 1381 --tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position); 1382 --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); 1383 } 1384 .to-indigo-100 { 1385 --tw-gradient-to: #e0e7ff var(--tw-gradient-to-position); 1386 } 1387 .fill-current { 1388 fill: currentColor; 1389 } 1390 .object-cover { 1391 -o-object-fit: cover; 1392 object-fit: cover; 1393 } 1394 .p-0 { 1395 padding: 0px; 1396 } 1397 .p-1 { 1398 padding: 0.25rem; 1399 } 1400 .p-2 { 1401 padding: 0.5rem; 1402 } 1403 .p-3 { 1404 padding: 0.75rem; 1405 } 1406 .p-4 { 1407 padding: 1rem; 1408 } 1409 .p-6 { 1410 padding: 1.5rem; 1411 } 1412 .px-1 { 1413 padding-left: 0.25rem; 1414 padding-right: 0.25rem; 1415 } 1416 .px-2 { 1417 padding-left: 0.5rem; 1418 padding-right: 0.5rem; 1419 } 1420 .px-2\.5 { 1421 padding-left: 0.625rem; 1422 padding-right: 0.625rem; 1423 } 1424 .px-3 { 1425 padding-left: 0.75rem; 1426 padding-right: 0.75rem; 1427 } 1428 .px-4 { 1429 padding-left: 1rem; 1430 padding-right: 1rem; 1431 } 1432 .px-8 { 1433 padding-left: 2rem; 1434 padding-right: 2rem; 1435 } 1436 .py-0\.5 { 1437 padding-top: 0.125rem; 1438 padding-bottom: 0.125rem; 1439 } 1440 .py-1 { 1441 padding-top: 0.25rem; 1442 padding-bottom: 0.25rem; 1443 } 1444 .py-1\.5 { 1445 padding-top: 0.375rem; 1446 padding-bottom: 0.375rem; 1447 } 1448 .py-10 { 1449 padding-top: 2.5rem; 1450 padding-bottom: 2.5rem; 1451 } 1452 .py-12 { 1453 padding-top: 3rem; 1454 padding-bottom: 3rem; 1455 } 1456 .py-2 { 1457 padding-top: 0.5rem; 1458 padding-bottom: 0.5rem; 1459 } 1460 .py-3 { 1461 padding-top: 0.75rem; 1462 padding-bottom: 0.75rem; 1463 } 1464 .py-4 { 1465 padding-top: 1rem; 1466 padding-bottom: 1rem; 1467 } 1468 .py-6 { 1469 padding-top: 1.5rem; 1470 padding-bottom: 1.5rem; 1471 } 1472 .pb-4 { 1473 padding-bottom: 1rem; 1474 } 1475 .pb-5 { 1476 padding-bottom: 1.25rem; 1477 } 1478 .pl-2\.5 { 1479 padding-left: 0.625rem; 1480 } 1481 .pl-8 { 1482 padding-left: 2rem; 1483 } 1484 .pr-2 { 1485 padding-right: 0.5rem; 1486 } 1487 .pr-2\.5 { 1488 padding-right: 0.625rem; 1489 } 1490 .pr-4 { 1491 padding-right: 1rem; 1492 } 1493 .pt-0 { 1494 padding-top: 0px; 1495 } 1496 .pt-2 { 1497 padding-top: 0.5rem; 1498 } 1499 .text-left { 1500 text-align: left; 1501 } 1502 .text-center { 1503 text-align: center; 1504 } 1505 .align-middle { 1506 vertical-align: middle; 1507 } 1508 .font-mono { 1509 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 1510 } 1511 .text-2xl { 1512 font-size: 1.5rem; 1513 line-height: 2rem; 1514 } 1515 .text-\[0\.8rem\] { 1516 font-size: 0.8rem; 1517 } 1518 .text-base { 1519 font-size: 1rem; 1520 line-height: 1.5rem; 1521 } 1522 .text-lg { 1523 font-size: 1.125rem; 1524 line-height: 1.75rem; 1525 } 1526 .text-sm { 1527 font-size: 0.875rem; 1528 line-height: 1.25rem; 1529 } 1530 .text-xl { 1531 font-size: 1.25rem; 1532 line-height: 1.75rem; 1533 } 1534 .text-xs { 1535 font-size: 0.75rem; 1536 line-height: 1rem; 1537 } 1538 .font-medium { 1539 font-weight: 500; 1540 } 1541 .font-semibold { 1542 font-weight: 600; 1543 } 1544 .leading-none { 1545 line-height: 1; 1546 } 1547 .tracking-tight { 1548 letter-spacing: -0.025em; 1549 } 1550 .tracking-widest { 1551 letter-spacing: 0.1em; 1552 } 1553 .text-blue-500 { 1554 --tw-text-opacity: 1; 1555 color: rgb(59 130 246 / var(--tw-text-opacity, 1)); 1556 } 1557 .text-blue-600 { 1558 --tw-text-opacity: 1; 1559 color: rgb(37 99 235 / var(--tw-text-opacity, 1)); 1560 } 1561 .text-blue-700 { 1562 --tw-text-opacity: 1; 1563 color: rgb(29 78 216 / var(--tw-text-opacity, 1)); 1564 } 1565 .text-blue-800 { 1566 --tw-text-opacity: 1; 1567 color: rgb(30 64 175 / var(--tw-text-opacity, 1)); 1568 } 1569 .text-card-foreground { 1570 color: hsl(var(--card-foreground)); 1571 } 1572 .text-current { 1573 color: currentColor; 1574 } 1575 .text-destructive { 1576 color: hsl(var(--destructive)); 1577 } 1578 .text-destructive-foreground { 1579 color: hsl(var(--destructive-foreground)); 1580 } 1581 .text-foreground { 1582 color: hsl(var(--foreground)); 1583 } 1584 .text-gray-500 { 1585 --tw-text-opacity: 1; 1586 color: rgb(107 114 128 / var(--tw-text-opacity, 1)); 1587 } 1588 .text-gray-600 { 1589 --tw-text-opacity: 1; 1590 color: rgb(75 85 99 / var(--tw-text-opacity, 1)); 1591 } 1592 .text-gray-700 { 1593 --tw-text-opacity: 1; 1594 color: rgb(55 65 81 / var(--tw-text-opacity, 1)); 1595 } 1596 .text-green-500 { 1597 --tw-text-opacity: 1; 1598 color: rgb(34 197 94 / var(--tw-text-opacity, 1)); 1599 } 1600 .text-green-600 { 1601 --tw-text-opacity: 1; 1602 color: rgb(22 163 74 / var(--tw-text-opacity, 1)); 1603 } 1604 .text-green-800 { 1605 --tw-text-opacity: 1; 1606 color: rgb(22 101 52 / var(--tw-text-opacity, 1)); 1607 } 1608 .text-muted-foreground { 1609 color: hsl(var(--muted-foreground)); 1610 } 1611 .text-popover-foreground { 1612 color: hsl(var(--popover-foreground)); 1613 } 1614 .text-primary { 1615 color: hsl(var(--primary)); 1616 } 1617 .text-primary-foreground { 1618 color: hsl(var(--primary-foreground)); 1619 } 1620 .text-red-500 { 1621 --tw-text-opacity: 1; 1622 color: rgb(239 68 68 / var(--tw-text-opacity, 1)); 1623 } 1624 .text-red-600 { 1625 --tw-text-opacity: 1; 1626 color: rgb(220 38 38 / var(--tw-text-opacity, 1)); 1627 } 1628 .text-red-700 { 1629 --tw-text-opacity: 1; 1630 color: rgb(185 28 28 / var(--tw-text-opacity, 1)); 1631 } 1632 .text-red-800 { 1633 --tw-text-opacity: 1; 1634 color: rgb(153 27 27 / var(--tw-text-opacity, 1)); 1635 } 1636 .text-secondary { 1637 color: hsl(var(--secondary)); 1638 } 1639 .text-secondary-foreground { 1640 color: hsl(var(--secondary-foreground)); 1641 } 1642 .text-slate-400 { 1643 --tw-text-opacity: 1; 1644 color: rgb(148 163 184 / var(--tw-text-opacity, 1)); 1645 } 1646 .text-slate-500 { 1647 --tw-text-opacity: 1; 1648 color: rgb(100 116 139 / var(--tw-text-opacity, 1)); 1649 } 1650 .text-slate-600 { 1651 --tw-text-opacity: 1; 1652 color: rgb(71 85 105 / var(--tw-text-opacity, 1)); 1653 } 1654 .text-slate-700 { 1655 --tw-text-opacity: 1; 1656 color: rgb(51 65 85 / var(--tw-text-opacity, 1)); 1657 } 1658 .text-slate-800 { 1659 --tw-text-opacity: 1; 1660 color: rgb(30 41 59 / var(--tw-text-opacity, 1)); 1661 } 1662 .text-white { 1663 --tw-text-opacity: 1; 1664 color: rgb(255 255 255 / var(--tw-text-opacity, 1)); 1665 } 1666 .text-white\/50 { 1667 color: rgb(255 255 255 / 0.5); 1668 } 1669 .text-yellow-500 { 1670 --tw-text-opacity: 1; 1671 color: rgb(234 179 8 / var(--tw-text-opacity, 1)); 1672 } 1673 .underline-offset-4 { 1674 text-underline-offset: 4px; 1675 } 1676 .opacity-0 { 1677 opacity: 0; 1678 } 1679 .opacity-100 { 1680 opacity: 1; 1681 } 1682 .opacity-20 { 1683 opacity: 0.2; 1684 } 1685 .opacity-25 { 1686 opacity: 0.25; 1687 } 1688 .opacity-50 { 1689 opacity: 0.5; 1690 } 1691 .opacity-70 { 1692 opacity: 0.7; 1693 } 1694 .opacity-75 { 1695 opacity: 0.75; 1696 } 1697 .opacity-90 { 1698 opacity: 0.9; 1699 } 1700 .shadow { 1701 --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); 1702 --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); 1703 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1704 } 1705 .shadow-lg { 1706 --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); 1707 --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 1708 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1709 } 1710 .shadow-md { 1711 --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); 1712 --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); 1713 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1714 } 1715 .shadow-sm { 1716 --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); 1717 --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); 1718 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1719 } 1720 .shadow-xl { 1721 --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); 1722 --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); 1723 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1724 } 1725 .outline-none { 1726 outline: 2px solid transparent; 1727 outline-offset: 2px; 1728 } 1729 .outline { 1730 outline-style: solid; 1731 } 1732 .ring-0 { 1733 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 1734 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); 1735 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 1736 } 1737 .ring-2 { 1738 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 1739 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); 1740 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 1741 } 1742 .ring-blue-500 { 1743 --tw-ring-opacity: 1; 1744 --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); 1745 } 1746 .ring-offset-background { 1747 --tw-ring-offset-color: hsl(var(--background)); 1748 } 1749 .filter { 1750 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); 1751 } 1752 .backdrop-blur-sm { 1753 --tw-backdrop-blur: blur(4px); 1754 -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); 1755 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); 1756 } 1757 .transition { 1758 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; 1759 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; 1760 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; 1761 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1762 transition-duration: 150ms; 1763 } 1764 .transition-all { 1765 transition-property: all; 1766 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1767 transition-duration: 150ms; 1768 } 1769 .transition-colors { 1770 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; 1771 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1772 transition-duration: 150ms; 1773 } 1774 .transition-opacity { 1775 transition-property: opacity; 1776 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1777 transition-duration: 150ms; 1778 } 1779 .transition-transform { 1780 transition-property: transform; 1781 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1782 transition-duration: 150ms; 1783 } 1784 .duration-1000 { 1785 transition-duration: 1000ms; 1786 } 1787 .duration-200 { 1788 transition-duration: 200ms; 1789 } 1790 .duration-300 { 1791 transition-duration: 300ms; 1792 } 1793 .duration-500 { 1794 transition-duration: 500ms; 1795 } 1796 .ease-in-out { 1797 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1798 } 1799 @keyframes enter { 1800 1801 from { 1802 opacity: var(--tw-enter-opacity, 1); 1803 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)); 1804 } 1805 } 1806 @keyframes exit { 1807 1808 to { 1809 opacity: var(--tw-exit-opacity, 1); 1810 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)); 1811 } 1812 } 1813 .animate-in { 1814 animation-name: enter; 1815 animation-duration: 150ms; 1816 --tw-enter-opacity: initial; 1817 --tw-enter-scale: initial; 1818 --tw-enter-rotate: initial; 1819 --tw-enter-translate-x: initial; 1820 --tw-enter-translate-y: initial; 1821 } 1822 .fade-in-0 { 1823 --tw-enter-opacity: 0; 1824 } 1825 .zoom-in-95 { 1826 --tw-enter-scale: .95; 1827 } 1828 .duration-1000 { 1829 animation-duration: 1000ms; 1830 } 1831 .duration-200 { 1832 animation-duration: 200ms; 1833 } 1834 .duration-300 { 1835 animation-duration: 300ms; 1836 } 1837 .duration-500 { 1838 animation-duration: 500ms; 1839 } 1840 .ease-in-out { 1841 animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1842 } 1843 .wp-person a:focus .gravatar, 1844 a:focus, 1845 a:focus .media-icon img, 1846 a:focus .plugin-icon { 1847 color: unset; 1848 box-shadow: unset; 1849 outline: unset; 1850 } 1851 1852 a:active, 1853 a:hover, 1854 a:focus { 1855 color: unset; 1856 } 1857 1858 .file\:border-0::file-selector-button { 1859 border-width: 0px; 1860 } 1861 1862 .file\:bg-transparent::file-selector-button { 1863 background-color: transparent; 1864 } 1865 1866 .file\:text-sm::file-selector-button { 1867 font-size: 0.875rem; 1868 line-height: 1.25rem; 1869 } 1870 1871 .file\:font-medium::file-selector-button { 1872 font-weight: 500; 1873 } 1874 1875 .file\:text-foreground::file-selector-button { 1876 color: hsl(var(--foreground)); 1877 } 1878 1879 .placeholder\:text-muted-foreground::-moz-placeholder { 1880 color: hsl(var(--muted-foreground)); 1881 } 1882 1883 .placeholder\:text-muted-foreground::placeholder { 1884 color: hsl(var(--muted-foreground)); 1885 } 1886 1887 .after\:absolute::after { 1888 content: var(--tw-content); 1889 position: absolute; 1890 } 1891 1892 .after\:left-\[2px\]::after { 1893 content: var(--tw-content); 1894 left: 2px; 1895 } 1896 1897 .after\:top-\[2px\]::after { 1898 content: var(--tw-content); 1899 top: 2px; 1900 } 1901 1902 .after\:h-5::after { 1903 content: var(--tw-content); 1904 height: 1.25rem; 1905 } 1906 1907 .after\:w-5::after { 1908 content: var(--tw-content); 1909 width: 1.25rem; 1910 } 1911 1912 .after\:rounded-full::after { 1913 content: var(--tw-content); 1914 border-radius: 9999px; 1915 } 1916 1917 .after\:border::after { 1918 content: var(--tw-content); 1919 border-width: 1px; 1920 } 1921 1922 .after\:border-gray-300::after { 1923 content: var(--tw-content); 1924 --tw-border-opacity: 1; 1925 border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)); 1926 } 1927 1928 .after\:border-slate-300::after { 1929 content: var(--tw-content); 1930 --tw-border-opacity: 1; 1931 border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); 1932 } 1933 1934 .after\:bg-white::after { 1935 content: var(--tw-content); 1936 --tw-bg-opacity: 1; 1937 background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); 1938 } 1939 1940 .after\:transition-all::after { 1941 content: var(--tw-content); 1942 transition-property: all; 1943 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1944 transition-duration: 150ms; 1945 } 1946 1947 .after\:content-\[\'\'\]::after { 1948 --tw-content: ''; 1949 content: var(--tw-content); 1950 } 1951 1952 .hover\:border-blue-300:hover { 1953 --tw-border-opacity: 1; 1954 border-color: rgb(147 197 253 / var(--tw-border-opacity, 1)); 1955 } 1956 1957 .hover\:bg-accent:hover { 1958 background-color: hsl(var(--accent)); 1959 } 1960 1961 .hover\:bg-blue-100:hover { 1962 --tw-bg-opacity: 1; 1963 background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1)); 1964 } 1965 1966 .hover\:bg-blue-200:hover { 1967 --tw-bg-opacity: 1; 1968 background-color: rgb(191 219 254 / var(--tw-bg-opacity, 1)); 1969 } 1970 1971 .hover\:bg-blue-50:hover { 1972 --tw-bg-opacity: 1; 1973 background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1)); 1974 } 1975 1976 .hover\:bg-blue-700:hover { 1977 --tw-bg-opacity: 1; 1978 background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1)); 1979 } 1980 1981 .hover\:bg-destructive\/80:hover { 1982 background-color: hsl(var(--destructive) / 0.8); 1983 } 1984 1985 .hover\:bg-destructive\/90:hover { 1986 background-color: hsl(var(--destructive) / 0.9); 1987 } 1988 1989 .hover\:bg-gray-100:hover { 1990 --tw-bg-opacity: 1; 1991 background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); 1992 } 1993 1994 .hover\:bg-gray-300:hover { 1995 --tw-bg-opacity: 1; 1996 background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)); 1997 } 1998 1999 .hover\:bg-green-200\/80:hover { 2000 background-color: rgb(187 247 208 / 0.8); 2001 } 2002 2003 .hover\:bg-green-600:hover { 2004 --tw-bg-opacity: 1; 2005 background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)); 2006 } 2007 2008 .hover\:bg-green-700:hover { 2009 --tw-bg-opacity: 1; 2010 background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1)); 2011 } 2012 2013 .hover\:bg-muted\/50:hover { 2014 background-color: hsl(var(--muted) / 0.5); 2015 } 2016 2017 .hover\:bg-primary\/80:hover { 2018 background-color: hsl(var(--primary) / 0.8); 2019 } 2020 2021 .hover\:bg-primary\/90:hover { 2022 background-color: hsl(var(--primary) / 0.9); 2023 } 2024 2025 .hover\:bg-secondary\/80:hover { 2026 background-color: hsl(var(--secondary) / 0.8); 2027 } 2028 2029 .hover\:bg-slate-100:hover { 2030 --tw-bg-opacity: 1; 2031 background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1)); 2032 } 2033 2034 .hover\:bg-slate-200:hover { 2035 --tw-bg-opacity: 1; 2036 background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1)); 2037 } 2038 2039 .hover\:bg-slate-300:hover { 2040 --tw-bg-opacity: 1; 2041 background-color: rgb(203 213 225 / var(--tw-bg-opacity, 1)); 2042 } 2043 2044 .hover\:bg-slate-50\/60:hover { 2045 background-color: rgb(248 250 252 / 0.6); 2046 } 2047 2048 .hover\:bg-yellow-600:hover { 2049 --tw-bg-opacity: 1; 2050 background-color: rgb(202 138 4 / var(--tw-bg-opacity, 1)); 2051 } 2052 2053 .hover\:bg-yellow-700:hover { 2054 --tw-bg-opacity: 1; 2055 background-color: rgb(161 98 7 / var(--tw-bg-opacity, 1)); 2056 } 2057 2058 .hover\:text-accent-foreground:hover { 2059 color: hsl(var(--accent-foreground)); 2060 } 2061 2062 .hover\:text-blue-800:hover { 2063 --tw-text-opacity: 1; 2064 color: rgb(30 64 175 / var(--tw-text-opacity, 1)); 2065 } 2066 2067 .hover\:text-white:hover { 2068 --tw-text-opacity: 1; 2069 color: rgb(255 255 255 / var(--tw-text-opacity, 1)); 2070 } 2071 2072 .hover\:text-white\/100:hover { 2073 color: rgb(255 255 255 / 1); 2074 } 2075 2076 .hover\:underline:hover { 2077 text-decoration-line: underline; 2078 } 2079 2080 .hover\:opacity-100:hover { 2081 opacity: 1; 2082 } 2083 2084 .hover\:shadow-lg:hover { 2085 --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); 2086 --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 2087 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 2088 } 2089 2090 .hover\:shadow-md:hover { 2091 --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); 2092 --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); 2093 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 2094 } 2095 2096 .hover\:ring-1:hover { 2097 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 2098 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); 2099 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 2100 } 2101 2102 .hover\:ring-gray-300:hover { 2103 --tw-ring-opacity: 1; 2104 --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1)); 2105 } 2106 2107 .focus\:bg-accent:focus { 2108 background-color: hsl(var(--accent)); 2109 } 2110 2111 .focus\:\!text-white:focus { 2112 --tw-text-opacity: 1 !important; 2113 color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; 2114 } 2115 2116 .focus\:text-accent-foreground:focus { 2117 color: hsl(var(--accent-foreground)); 2118 } 2119 2120 .focus\:outline-none:focus { 2121 outline: 2px solid transparent; 2122 outline-offset: 2px; 2123 } 2124 2125 .focus\:ring-2:focus { 2126 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 2127 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); 2128 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 2129 } 2130 2131 .focus\:ring-ring:focus { 2132 --tw-ring-color: hsl(var(--ring)); 2133 } 2134 2135 .focus\:ring-slate-300:focus { 2136 --tw-ring-opacity: 1; 2137 --tw-ring-color: rgb(203 213 225 / var(--tw-ring-opacity, 1)); 2138 } 2139 2140 .focus\:ring-offset-2:focus { 2141 --tw-ring-offset-width: 2px; 2142 } 2143 2144 .focus-visible\:outline-none:focus-visible { 2145 outline: 2px solid transparent; 2146 outline-offset: 2px; 2147 } 2148 2149 .focus-visible\:ring-1:focus-visible { 2150 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 2151 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); 2152 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 2153 } 2154 2155 .focus-visible\:ring-2:focus-visible { 2156 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 2157 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); 2158 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 2159 } 2160 2161 .focus-visible\:ring-ring:focus-visible { 2162 --tw-ring-color: hsl(var(--ring)); 2163 } 2164 2165 .focus-visible\:ring-offset-2:focus-visible { 2166 --tw-ring-offset-width: 2px; 2167 } 2168 2169 .focus-visible\:ring-offset-background:focus-visible { 2170 --tw-ring-offset-color: hsl(var(--background)); 2171 } 2172 2173 .disabled\:pointer-events-none:disabled { 2174 pointer-events: none; 2175 } 2176 2177 .disabled\:cursor-not-allowed:disabled { 2178 cursor: not-allowed; 2179 } 2180 2181 .disabled\:bg-slate-300:disabled { 2182 --tw-bg-opacity: 1; 2183 background-color: rgb(203 213 225 / var(--tw-bg-opacity, 1)); 2184 } 2185 2186 .disabled\:opacity-40:disabled { 2187 opacity: 0.4; 2188 } 2189 2190 .disabled\:opacity-50:disabled { 2191 opacity: 0.5; 2192 } 2193 2194 .group:hover .group-hover\:flex { 2195 display: flex; 2196 } 2197 2198 .group.toaster .group-\[\.toaster\]\:border-border { 2199 border-color: hsl(var(--border)); 2200 } 2201 2202 .group.toast .group-\[\.toast\]\:bg-muted { 2203 background-color: hsl(var(--muted)); 2204 } 2205 2206 .group.toast .group-\[\.toast\]\:bg-primary { 2207 background-color: hsl(var(--primary)); 2208 } 2209 2210 .group.toaster .group-\[\.toaster\]\:bg-background { 2211 background-color: hsl(var(--background)); 2212 } 2213 2214 .group.toast .group-\[\.toast\]\:text-muted-foreground { 2215 color: hsl(var(--muted-foreground)); 2216 } 2217 2218 .group.toast .group-\[\.toast\]\:text-primary-foreground { 2219 color: hsl(var(--primary-foreground)); 2220 } 2221 2222 .group.toaster .group-\[\.toaster\]\:text-foreground { 2223 color: hsl(var(--foreground)); 2224 } 2225 2226 .group.toaster .group-\[\.toaster\]\:shadow-lg { 2227 --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); 2228 --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 2229 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 2230 } 2231 2232 .peer:checked ~ .peer-checked\:bg-blue-600 { 2233 --tw-bg-opacity: 1; 2234 background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); 2235 } 2236 2237 .peer:checked ~ .peer-checked\:after\:translate-x-full::after { 2238 content: var(--tw-content); 2239 --tw-translate-x: 100%; 2240 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2241 } 2242 2243 .peer:checked ~ .peer-checked\:after\:border-white::after { 2244 content: var(--tw-content); 2245 --tw-border-opacity: 1; 2246 border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); 2247 } 2248 2249 .peer:focus ~ .peer-focus\:outline-none { 2250 outline: 2px solid transparent; 2251 outline-offset: 2px; 2252 } 2253 2254 .peer:focus ~ .peer-focus\:ring-4 { 2255 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 2256 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); 2257 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 2258 } 2259 2260 .peer:focus ~ .peer-focus\:ring-blue-300 { 2261 --tw-ring-opacity: 1; 2262 --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1)); 2263 } 2264 2265 .peer:disabled ~ .peer-disabled\:cursor-not-allowed { 2266 cursor: not-allowed; 2267 } 2268 2269 .peer:disabled ~ .peer-disabled\:opacity-70 { 2270 opacity: 0.7; 2271 } 2272 2273 .data-\[disabled\=true\]\:pointer-events-none[data-disabled="true"] { 2274 pointer-events: none; 2275 } 2276 2277 .data-\[disabled\]\:pointer-events-none[data-disabled] { 2278 pointer-events: none; 2279 } 2280 2281 .data-\[side\=bottom\]\:translate-y-1[data-side="bottom"] { 2282 --tw-translate-y: 0.25rem; 2283 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2284 } 2285 2286 .data-\[side\=left\]\:-translate-x-1[data-side="left"] { 2287 --tw-translate-x: -0.25rem; 2288 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2289 } 2290 2291 .data-\[side\=right\]\:translate-x-1[data-side="right"] { 2292 --tw-translate-x: 0.25rem; 2293 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2294 } 2295 2296 .data-\[side\=top\]\:-translate-y-1[data-side="top"] { 2297 --tw-translate-y: -0.25rem; 2298 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2299 } 2300 2301 .data-\[state\=checked\]\:translate-x-4[data-state="checked"] { 2302 --tw-translate-x: 1rem; 2303 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2304 } 2305 2306 .data-\[state\=unchecked\]\:translate-x-0[data-state="unchecked"] { 2307 --tw-translate-x: 0px; 2308 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2309 } 2310 2311 @keyframes accordion-up { 2312 2313 from { 2314 height: var(--radix-accordion-content-height); 2315 } 2316 2317 to { 2318 height: 0; 2319 } 2320 } 2321 2322 .data-\[state\=closed\]\:animate-accordion-up[data-state="closed"] { 2323 animation: accordion-up 0.2s ease-out; 2324 } 2325 2326 @keyframes accordion-down { 2327 2328 from { 2329 height: 0; 2330 } 2331 2332 to { 2333 height: var(--radix-accordion-content-height); 2334 } 2335 } 2336 2337 .data-\[state\=open\]\:animate-accordion-down[data-state="open"] { 2338 animation: accordion-down 0.2s ease-out; 2339 } 2340 2341 .data-\[selected\=true\]\:bg-accent[data-selected="true"] { 2342 background-color: hsl(var(--accent)); 2343 } 2344 2345 .data-\[state\=active\]\:bg-background[data-state="active"] { 2346 background-color: hsl(var(--background)); 2347 } 2348 2349 .data-\[state\=checked\]\:bg-primary[data-state="checked"] { 2350 background-color: hsl(var(--primary)); 2351 } 2352 2353 .data-\[state\=open\]\:bg-accent[data-state="open"] { 2354 background-color: hsl(var(--accent)); 2355 } 2356 2357 .data-\[state\=open\]\:bg-secondary[data-state="open"] { 2358 background-color: hsl(var(--secondary)); 2359 } 2360 2361 .data-\[state\=selected\]\:bg-muted[data-state="selected"] { 2362 background-color: hsl(var(--muted)); 2363 } 2364 2365 .data-\[state\=unchecked\]\:bg-input[data-state="unchecked"] { 2366 background-color: hsl(var(--input)); 2367 } 2368 2369 .data-\[selected\=true\]\:text-accent-foreground[data-selected="true"] { 2370 color: hsl(var(--accent-foreground)); 2371 } 2372 2373 .data-\[state\=active\]\:text-foreground[data-state="active"] { 2374 color: hsl(var(--foreground)); 2375 } 2376 2377 .data-\[state\=checked\]\:text-primary-foreground[data-state="checked"] { 2378 color: hsl(var(--primary-foreground)); 2379 } 2380 2381 .data-\[state\=open\]\:text-muted-foreground[data-state="open"] { 2382 color: hsl(var(--muted-foreground)); 2383 } 2384 2385 .data-\[disabled\=true\]\:opacity-50[data-disabled="true"] { 2386 opacity: 0.5; 2387 } 2388 2389 .data-\[disabled\]\:opacity-50[data-disabled] { 2390 opacity: 0.5; 2391 } 2392 2393 .data-\[state\=active\]\:shadow-sm[data-state="active"] { 2394 --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); 2395 --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); 2396 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 2397 } 2398 2399 .data-\[state\=closed\]\:duration-300[data-state="closed"] { 2400 transition-duration: 300ms; 2401 } 2402 2403 .data-\[state\=open\]\:duration-500[data-state="open"] { 2404 transition-duration: 500ms; 2405 } 2406 2407 .data-\[state\=open\]\:animate-in[data-state="open"] { 2408 animation-name: enter; 2409 animation-duration: 150ms; 2410 --tw-enter-opacity: initial; 2411 --tw-enter-scale: initial; 2412 --tw-enter-rotate: initial; 2413 --tw-enter-translate-x: initial; 2414 --tw-enter-translate-y: initial; 2415 } 2416 2417 .data-\[state\=closed\]\:animate-out[data-state="closed"] { 2418 animation-name: exit; 2419 animation-duration: 150ms; 2420 --tw-exit-opacity: initial; 2421 --tw-exit-scale: initial; 2422 --tw-exit-rotate: initial; 2423 --tw-exit-translate-x: initial; 2424 --tw-exit-translate-y: initial; 2425 } 2426 2427 .data-\[state\=closed\]\:fade-out-0[data-state="closed"] { 2428 --tw-exit-opacity: 0; 2429 } 2430 2431 .data-\[state\=open\]\:fade-in-0[data-state="open"] { 2432 --tw-enter-opacity: 0; 2433 } 2434 2435 .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] { 2436 --tw-exit-scale: .95; 2437 } 2438 2439 .data-\[state\=open\]\:zoom-in-95[data-state="open"] { 2440 --tw-enter-scale: .95; 2441 } 2442 2443 .data-\[side\=bottom\]\:slide-in-from-top-2[data-side="bottom"] { 2444 --tw-enter-translate-y: -0.5rem; 2445 } 2446 2447 .data-\[side\=left\]\:slide-in-from-right-2[data-side="left"] { 2448 --tw-enter-translate-x: 0.5rem; 2449 } 2450 2451 .data-\[side\=right\]\:slide-in-from-left-2[data-side="right"] { 2452 --tw-enter-translate-x: -0.5rem; 2453 } 2454 2455 .data-\[side\=top\]\:slide-in-from-bottom-2[data-side="top"] { 2456 --tw-enter-translate-y: 0.5rem; 2457 } 2458 2459 .data-\[state\=closed\]\:slide-out-to-bottom[data-state="closed"] { 2460 --tw-exit-translate-y: 100%; 2461 } 2462 2463 .data-\[state\=closed\]\:slide-out-to-left[data-state="closed"] { 2464 --tw-exit-translate-x: -100%; 2465 } 2466 2467 .data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state="closed"] { 2468 --tw-exit-translate-x: -50%; 2469 } 2470 2471 .data-\[state\=closed\]\:slide-out-to-right[data-state="closed"] { 2472 --tw-exit-translate-x: 100%; 2473 } 2474 2475 .data-\[state\=closed\]\:slide-out-to-top[data-state="closed"] { 2476 --tw-exit-translate-y: -100%; 2477 } 2478 2479 .data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state="closed"] { 2480 --tw-exit-translate-y: -48%; 2481 } 2482 2483 .data-\[state\=open\]\:slide-in-from-bottom[data-state="open"] { 2484 --tw-enter-translate-y: 100%; 2485 } 2486 2487 .data-\[state\=open\]\:slide-in-from-left[data-state="open"] { 2488 --tw-enter-translate-x: -100%; 2489 } 2490 2491 .data-\[state\=open\]\:slide-in-from-left-1\/2[data-state="open"] { 2492 --tw-enter-translate-x: -50%; 2493 } 2494 2495 .data-\[state\=open\]\:slide-in-from-right[data-state="open"] { 2496 --tw-enter-translate-x: 100%; 2497 } 2498 2499 .data-\[state\=open\]\:slide-in-from-top[data-state="open"] { 2500 --tw-enter-translate-y: -100%; 2501 } 2502 2503 .data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state="open"] { 2504 --tw-enter-translate-y: -48%; 2505 } 2506 2507 .data-\[state\=closed\]\:duration-300[data-state="closed"] { 2508 animation-duration: 300ms; 2509 } 2510 2511 .data-\[state\=open\]\:duration-500[data-state="open"] { 2512 animation-duration: 500ms; 2513 } 2514 2515 @media (min-width: 640px) { 2516 2517 .sm\:max-w-\[425px\] { 2518 max-width: 425px; 2519 } 2520 2521 .sm\:max-w-\[540px\] { 2522 max-width: 540px; 2523 } 2524 2525 .sm\:max-w-sm { 2526 max-width: 24rem; 2527 } 2528 2529 .sm\:flex-row { 2530 flex-direction: row; 2531 } 2532 2533 .sm\:items-center { 2534 align-items: center; 2535 } 2536 2537 .sm\:justify-end { 2538 justify-content: flex-end; 2539 } 2540 2541 .sm\:justify-between { 2542 justify-content: space-between; 2543 } 2544 2545 .sm\:space-x-2 > :not([hidden]) ~ :not([hidden]) { 2546 --tw-space-x-reverse: 0; 2547 margin-right: calc(0.5rem * var(--tw-space-x-reverse)); 2548 margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); 2549 } 2550 2551 .sm\:rounded-lg { 2552 border-radius: var(--radius); 2553 } 2554 2555 .sm\:text-left { 2556 text-align: left; 2557 } 2558 } 2559 2560 @media (min-width: 768px) { 2561 2562 .md\:text-sm { 2563 font-size: 0.875rem; 2564 line-height: 1.25rem; 2565 } 2566 } 2567 2568 .\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]) { 2569 padding-right: 0px; 2570 } 2571 2572 .\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox] { 2573 --tw-translate-y: 2px; 2574 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2575 } 2576 2577 .\[\&\>tr\]\:last\:border-b-0:last-child>tr { 2578 border-bottom-width: 0px; 2579 } 2580 2581 .\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg { 2582 --tw-rotate: 180deg; 2583 transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); 2584 } 2585 2586 .\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading] { 2587 padding-left: 0.5rem; 2588 padding-right: 0.5rem; 2589 } 2590 2591 .\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading] { 2592 padding-top: 0.375rem; 2593 padding-bottom: 0.375rem; 2594 } 2595 2596 .\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading] { 2597 font-size: 0.75rem; 2598 line-height: 1rem; 2599 } 2600 2601 .\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading] { 2602 font-weight: 500; 2603 } 2604 2605 .\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading] { 2606 color: hsl(var(--muted-foreground)); 2607 } 2608 2609 .\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden]) ~[cmdk-group] { 2610 padding-top: 0px; 2611 } 2612 2613 .\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group] { 2614 padding-left: 0.5rem; 2615 padding-right: 0.5rem; 2616 } 2617 2618 .\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg { 2619 height: 1.25rem; 2620 } 2621 2622 .\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg { 2623 width: 1.25rem; 2624 } 2625 2626 .\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input] { 2627 height: 3rem; 2628 } 2629 2630 .\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item] { 2631 padding-left: 0.5rem; 2632 padding-right: 0.5rem; 2633 } 2634 2635 .\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item] { 2636 padding-top: 0.75rem; 2637 padding-bottom: 0.75rem; 2638 } 2639 2640 .\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg { 2641 height: 1.25rem; 2642 } 2643 2644 .\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg { 2645 width: 1.25rem; 2646 } 2647 2648 .\[\&_svg\]\:pointer-events-none svg { 2649 pointer-events: none; 2650 } 2651 2652 .\[\&_svg\]\:size-4 svg { 2653 width: 1rem; 2654 height: 1rem; 2655 } 2656 2657 .\[\&_svg\]\:shrink-0 svg { 2658 flex-shrink: 0; 2659 } 2660 2661 .\[\&_tr\:last-child\]\:border-0 tr:last-child { 2662 border-width: 0px; 2663 } 2664 2665 .\[\&_tr\]\:border-b tr { 2666 border-bottom-width: 1px; 2667 } -
versatile-toolkit/trunk/assets/dist/js/versatile-js.min.js
r3342118 r3349303 1 (()=>{"use strict";var e,t,r={20:(e,t,r)=>{var n=r(594), o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,i={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},206:e=>{e.exports=ReactDOM},338:(e,t,r)=>{var n=r(206);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},594:e=>{e.exports=React},848:(e,t,r)=>{e.exports=r(20)}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,o.d(i,a),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i=o(338),a=o(594),s=o.t(a,2),l="popstate";function c(e={}){return y(function(e,t){let{pathname:r="/",search:n="",hash:o=""}=m(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),p("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:h(t))},function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e)try{throw new Error(t)}catch(e){}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?m(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function h({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function m(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function y(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s="POP",c=null,u=d();function d(){return(a.state||{idx:null}).idx}function h(){s="POP";let e=d(),t=null==e?null:e-u;u=e,c&&c({action:s,location:y.location,delta:t})}function m(e){return v(e)}null==u&&(u=0,a.replaceState({...a.state,idx:u},""));let y={get action(){return s},get location(){return e(o,a)},listen(e){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(l,h),c=e,()=>{o.removeEventListener(l,h),c=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=p(y.location,e,t);r&&r(n,e),u=d()+1;let l=f(n,u),h=y.createHref(n);try{a.pushState(l,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(h)}i&&c&&c({action:s,location:y.location,delta:1})},replace:function(e,t){s="REPLACE";let n=p(y.location,e,t);r&&r(n,e),u=d();let o=f(n,u),l=y.createHref(n);a.replaceState(o,"",l),i&&c&&c({action:s,location:y.location,delta:0})},go:e=>a.go(e)};return y}function v(e,t=!1){let r="http://localhost";"undefined"!=typeof window&&(r="null"!==window.location.origin?window.location.origin:window.location.href),u(r,"No window.location.(origin|href) available to create URL");let n="string"==typeof e?e:h(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}new WeakMap;function g(e,t,r="/"){return b(e,t,r,!1)}function b(e,t,r,n){let o=D(("string"==typeof t?m(t):t).pathname||"/",r);if(null==o)return null;let i=x(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=T(o);a=N(i[e],t,n)}return a}function x(e,t=[],r=[],n=""){let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(u(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let s=$([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(u(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),x(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:P(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of w(e.path))o(e,t,r);else o(e,t)}),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let a=w(n.join("/")),s=[];return s.push(...a.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var _=/^:[\w-]+$/,k=3,j=2,O=1,S=10,E=-2,C=e=>"*"===e;function P(e,t){let r=e.split("/"),n=r.length;return r.some(C)&&(n+=E),t&&(n+=j),r.filter(e=>!C(e)).reduce((e,t)=>e+(_.test(t)?k:""===t?O:S),n)}function N(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,c="/"===i?t:t.slice(i.length)||"/",u=R({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=R({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:$([i,u.pathname]),pathnameBase:V($([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=$([i,u.pathnameBase]))}return a}function R(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=A(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function A(e,t=!1,r=!0){d("*"===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 n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function T(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function F(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function I(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function M(e){let t=I(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function L(e,t,r,n=!1){let o;"string"==typeof e?o=m(e):(o={...e},u(!o.pathname||!o.pathname.includes("?"),F("?","pathname","search",o)),u(!o.pathname||!o.pathname.includes("#"),F("#","pathname","hash",o)),u(!o.search||!o.search.includes("#"),F("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?m(e):e,i=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:i,search:z(n),hash:q(o)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var $=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function U(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var Z=["POST","PUT","PATCH","DELETE"],W=(new Set(Z),["GET",...Z]);new Set(W),Symbol("ResetLoaderData");var B=a.createContext(null);B.displayName="DataRouter";var Q=a.createContext(null);Q.displayName="DataRouterState";var K=a.createContext(!1);var H=a.createContext({isTransitioning:!1});H.displayName="ViewTransition";var G=a.createContext(new Map);G.displayName="Fetchers";var Y=a.createContext(null);Y.displayName="Await";var J=a.createContext(null);J.displayName="Navigation";var X=a.createContext(null);X.displayName="Location";var ee=a.createContext({outlet:null,matches:[],isDataRoute:!1});ee.displayName="Route";var te=a.createContext(null);te.displayName="RouteError";function re(){return null!=a.useContext(X)}function ne(){return u(re(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(X).location}var oe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ie(e){a.useContext(J).static||a.useLayoutEffect(e)}function ae(){let{isDataRoute:e}=a.useContext(ee);return e?function(){let{router:e}=me("useNavigate"),t=ve("useNavigate"),r=a.useRef(!1);ie(()=>{r.current=!0});let n=a.useCallback(async(n,o={})=>{d(r.current,oe),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t]);return n}():function(){u(re(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(B),{basename:t,navigator:r}=a.useContext(J),{matches:n}=a.useContext(ee),{pathname:o}=ne(),i=JSON.stringify(M(n)),s=a.useRef(!1);ie(()=>{s.current=!0});let l=a.useCallback((n,a={})=>{if(d(s.current,oe),!s.current)return;if("number"==typeof n)return void r.go(n);let l=L(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:$([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)},[t,r,i,o,e]);return l}()}a.createContext(null);function se(e,{relative:t}={}){let{matches:r}=a.useContext(ee),{pathname:n}=ne(),o=JSON.stringify(M(r));return a.useMemo(()=>L(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function le(e,t,r,n){u(re(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=a.useContext(J),{matches:i}=a.useContext(ee),s=i[i.length-1],l=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",p=s&&s.route;{let e=p&&p.path||"";xe(c,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,y=ne();if(t){let e="string"==typeof t?m(t):t;u("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=y;let v=h.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=g(e,{pathname:b});d(p||null!=x,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),d(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=pe(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:$([f,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:$([f,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),i,r,n);return t&&w?a.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},w):w}function ce(){let e=ge(),t=U(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return s=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:i},"ErrorBoundary")," or"," ",a.createElement("code",{style:i},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:o},r):null,s)}var ue=a.createElement(ce,null),de=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?a.createElement(ee.Provider,{value:this.props.routeContext},a.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function fe({routeContext:e,match:t,children:r}){let n=a.useContext(B);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(ee.Provider,{value:e},r)}function pe(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(r)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||i){s=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=i&&n.route.id?i[n.route.id]:void 0,f=n.route.errorElement||ue,s&&(l<0&&0===c?(xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):l===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,c+1)),m=()=>{let t;return t=u?f:d?p:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(fe,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===c)?a.createElement(de,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}function he(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function me(e){let t=a.useContext(B);return u(t,he(e)),t}function ye(e){let t=a.useContext(Q);return u(t,he(e)),t}function ve(e){let t=function(e){let t=a.useContext(ee);return u(t,he(e)),t}(e),r=t.matches[t.matches.length-1];return u(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ge(){let e=a.useContext(te),t=ye("useRouteError"),r=ve("useRouteError");return void 0!==e?e:t.errors?.[r]}var be={};function xe(e,t,r){t||be[e]||(be[e]=!0,d(!1,r))}var we={};function _e(e,t){e||we[t]||(we[t]=!0)}a.memo(function({routes:e,future:t,state:r}){return le(e,void 0,r,t)});function ke({to:e,replace:t,state:r,relative:n}){u(re(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=a.useContext(J);d(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=a.useContext(ee),{pathname:s}=ne(),l=ae(),c=L(e,M(i),s,"path"===n),f=JSON.stringify(c);return a.useEffect(()=>{l(JSON.parse(f),{replace:t,state:r,relative:n})},[l,f,n,t,r]),null}function je(e){u(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Oe({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1}){u(!re(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=a.useMemo(()=>({basename:s,navigator:o,static:i,future:{}}),[s,o,i]);"string"==typeof r&&(r=m(r));let{pathname:c="/",search:f="",hash:p="",state:h=null,key:y="default"}=r,v=a.useMemo(()=>{let e=D(c,s);return null==e?null:{location:{pathname:e,search:f,hash:p,state:h,key:y},navigationType:n}},[s,c,f,p,h,y,n]);return d(null!=v,`<Router basename="${s}"> is not able to match the URL "${c}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:a.createElement(J.Provider,{value:l},a.createElement(X.Provider,{children:t,value:v}))}function Se({children:e,location:t}){return le(Ee(e),t)}a.Component;function Ee(e,t=[]){let r=[];return a.Children.forEach(e,(e,n)=>{if(!a.isValidElement(e))return;let o=[...t,n];if(e.type===a.Fragment)return void r.push.apply(r,Ee(e.props.children,o));u(e.type===je,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,"An index route cannot have child routes.");let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Ee(e.props.children,o)),r.push(i)}),r}var Ce="get",Pe="application/x-www-form-urlencoded";function Ne(e){return null!=e&&"string"==typeof e.tagName}var Re=null;var Ae=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Te(e){return null==e||Ae.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pe}"`),null)}function De(e,t){let r,n,o,i,a;if(Ne(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?D(a,t):null,r=e.getAttribute("method")||Ce,o=Te(e.getAttribute("enctype"))||Pe,i=new FormData(e)}else if(function(e){return Ne(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ne(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(n=s?D(s,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Ce,o=Te(e.getAttribute("formenctype"))||Te(a.getAttribute("enctype"))||Pe,i=new FormData(a,e),!function(){if(null===Re)try{new FormData(document.createElement("form"),0),Re=!1}catch(e){Re=!0}return Re}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,n)}}else{if(Ne(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ce,n=null,o=Pe,a=e}var s;return i&&"text/plain"===o&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function Fe(e){return{__html:e}}function Ie(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Me(e,t,r){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname=`_root.${r}`:t&&"/"===D(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Le(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(e){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $e(e){return null!=e&&"string"==typeof e.page}function Ve(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function ze(e,t,r,n,o,i){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===i?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===i?t.filter((t,i)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function qe(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1),[...new Set(n)];var n}function Ue(e,t){let r=new Set,n=new Set(t);return e.reduce((e,o)=>{if(t&&!$e(o)&&"script"===o.as&&o.href&&n.has(o.href))return e;let i=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(o));return r.has(i)||(r.add(i),e.push({key:i,link:o})),e},[])}function Ze(e,t){return"lazy"===e.mode&&!0===t}function We(){let e=a.useContext(B);return Ie(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Be(){let e=a.useContext(Q);return Ie(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qe=a.createContext(void 0);function Ke(){let e=a.useContext(Qe);return Ie(e,"You must render this element inside a <HydratedRouter> element"),e}function He(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ge(e,t,r){if(r&&!et)return[e[0]];if(t){let r=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,r+1)}return e}Qe.displayName="FrameworkContext";function Ye({page:e,...t}){let{router:r}=We(),n=a.useMemo(()=>g(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?a.createElement(Xe,{page:e,matches:n,...t}):null}function Je(e){let{manifest:t,routeModules:r}=Ke(),[n,o]=a.useState([]);return a.useEffect(()=>{let n=!1;return async function(e,t,r){return Ue((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await Le(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Ve).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,r]),n}function Xe({page:e,matches:t,...r}){let n=ne(),{manifest:o,routeModules:i}=Ke(),{basename:s}=We(),{loaderData:l,matches:c}=Be(),u=a.useMemo(()=>ze(e,t,c,o,n,"data"),[e,t,c,o,n]),d=a.useMemo(()=>ze(e,t,c,o,n,"assets"),[e,t,c,o,n]),f=a.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,a=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in l&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:r.add(e.route.id))}),0===r.size)return[];let c=Me(e,s,"data");return a&&r.size>0&&c.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,l,n,o,u,t,e,i]),p=a.useMemo(()=>qe(d,o),[d,o]),h=Je(d);return a.createElement(a.Fragment,null,f.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),p.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),h.map(({key:e,link:t})=>a.createElement("link",{key:e,...t})))}var et=!1;function tt(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:o,routeDiscovery:i,ssr:s}=Ke(),{router:l,static:c,staticContext:u}=We(),{matches:d}=Be(),f=a.useContext(K),p=Ze(i,s);o&&(o.didRenderScripts=!0);let h=Ge(d,null,n);a.useEffect(()=>{et=!0},[]);let m=a.useMemo(()=>{if(f)return null;let n=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=c?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${p?"":`import ${JSON.stringify(t.url)}`};\n${h.map((e,r)=>{let n=`route${r}`,o=t.routes[e.route.id];Ie(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:l,module:c}=o,u=[...i?[{module:i,varName:`${n}_clientAction`}]:[],...a?[{module:a,varName:`${n}_clientLoader`}]:[],...s?[{module:s,varName:`${n}_clientMiddleware`}]:[],...l?[{module:l,varName:`${n}_HydrateFallback`}]:[],{module:c,varName:`${n}_main`}];return 1===u.length?`import * as ${n} from ${JSON.stringify(c)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join("\n"),`const ${n} = {${u.map(e=>`...${e.varName}`).join(",")}};`].join("\n")}).join("\n")}\n ${p?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},r){let n=new Set(r.state.matches.map(e=>e.route.id)),o=r.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach(e=>{let t=g(r.routes,e,r.basename);t&&t.forEach(e=>n.add(e.route.id))});let a=[...n].reduce((e,r)=>Object.assign(e,{[r]:t.routes[r]}),{});return{...t,routes:a,sri:!!e||void 0}}(t,l),null,2)};`:""}\n window.__reactRouterRouteModules = {${h.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return a.createElement(a.Fragment,null,a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Fe(n),type:void 0}),a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Fe(o),type:"module",async:!0}))},[]),y=et||f?[]:(v=t.entry.imports.concat(qe(h,t,{includeHydrateFallback:!0})),[...new Set(v)]);var v;let b="object"==typeof t.sri?t.sri:{};return _e(!f,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),et||f?null:a.createElement(a.Fragment,null,"object"==typeof t.sri?a.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:b})}}):null,p?null:a.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:b[t.url],suppressHydrationWarning:!0}),a.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:b[t.entry.module],suppressHydrationWarning:!0}),y.map(t=>a.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:b[t],suppressHydrationWarning:!0})),m)}function rt(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}a.Component;function nt({error:e,isOutsideRemixApp:t}){let r,n=a.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(U(e))return a.createElement(ot,{title:"Unhandled Thrown Response!"},a.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);if(e instanceof Error)r=e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);r=new Error(t)}return a.createElement(ot,{title:"Application Error!",isOutsideRemixApp:t},a.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),a.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n)}function ot({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:o}=Ke();return o.root?.Layout&&!r?n:a.createElement("html",{lang:"en"},a.createElement("head",null,a.createElement("meta",{charSet:"utf-8"}),a.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),a.createElement("title",null,e)),a.createElement("body",null,a.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?a.createElement(tt,null):null)))}var it="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{it&&(window.__reactRouterVersion="7.7.0")}catch(mt){}function at({basename:e,children:t,window:r}){let n=a.useRef();null==n.current&&(n.current=c({window:r,v5Compat:!0}));let o=n.current,[i,s]=a.useState({action:o.action,location:o.location}),l=a.useCallback(e=>{a.startTransition(()=>s(e))},[s]);return a.useLayoutEffect(()=>o.listen(l),[o,l]),a.createElement(Oe,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var st=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lt=a.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:i,state:s,target:l,to:c,preventScrollReset:f,viewTransition:p,...m},y){let v,{basename:g}=a.useContext(J),b="string"==typeof c&&st.test(c),x=!1;if("string"==typeof c&&b&&(v=c,it))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=D(t.pathname,g);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:x=!0}catch(e){d(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=function(e,{relative:t}={}){u(re(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=a.useContext(J),{hash:o,pathname:i,search:s}=se(e,{relative:t}),l=i;return"/"!==r&&(l="/"===i?r:$([r,i])),n.createHref({pathname:l,search:s,hash:o})}(c,{relative:n}),[_,k,j]=function(e,t){let r=a.useContext(Qe),[n,o]=a.useState(!1),[i,s]=a.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=a.useRef(null);a.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(n){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[n]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return r?"intent"!==e?[i,p,{}]:[i,p,{onFocus:He(l,h),onBlur:He(c,m),onMouseEnter:He(u,h),onMouseLeave:He(d,m),onTouchStart:He(f,h)}]:[!1,p,{}]}(r,m),O=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=ae(),c=ne(),u=se(e,{relative:i});return a.useCallback(a=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(a,t)){a.preventDefault();let t=void 0!==r?r:h(c)===h(u);l(e,{replace:t,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[c,l,u,r,n,t,e,o,i,s])}(c,{replace:i,state:s,target:l,preventScrollReset:f,relative:n,viewTransition:p});let S=a.createElement("a",{...m,...j,href:v||w,onClick:x||o?e:function(t){e&&e(t),t.defaultPrevented||O(t)},ref:rt(y,k),target:l,"data-discover":b||"render"!==t?void 0:"true"});return _&&!b?a.createElement(a.Fragment,null,S,a.createElement(Ye,{page:w})):S});lt.displayName="Link",a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:i,viewTransition:s,children:l,...c},d){let f=se(i,{relative:c.relative}),p=ne(),h=a.useContext(Q),{navigator:m,basename:y}=a.useContext(J),v=null!=h&&function(e,t={}){let r=a.useContext(H);u(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=dt("useViewTransitionState"),o=se(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=D(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=D(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=R(o.pathname,s)||null!=R(o.pathname,i)}(f)&&!0===s,g=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,b=p.pathname,x=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(b=b.toLowerCase(),x=x?x.toLowerCase():null,g=g.toLowerCase()),x&&y&&(x=D(x,y)||x);const w="/"!==g&&g.endsWith("/")?g.length-1:g.length;let _,k=b===g||!n&&b.startsWith(g)&&"/"===b.charAt(w),j=null!=x&&(x===g||!n&&x.startsWith(g)&&"/"===x.charAt(g.length)),O={isActive:k,isPending:j,isTransitioning:v},S=k?e:void 0;_="function"==typeof r?r(O):[r,k?"active":null,j?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(O):o;return a.createElement(lt,{...c,"aria-current":S,className:_,ref:d,style:E,to:i,viewTransition:s},"function"==typeof l?l(O):l)}).displayName="NavLink";var ct=a.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Ce,action:l,onSubmit:c,relative:d,preventScrollReset:f,viewTransition:p,...m},y)=>{let v=ht(),g=function(e,{relative:t}={}){let{basename:r}=a.useContext(J),n=a.useContext(ee);u(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...se(e||".",{relative:t})},s=ne();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();i.search=r?`?${r}`:""}}e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(i.pathname="/"===i.pathname?r:$([r,i.pathname]));return h(i)}(l,{relative:d}),b="get"===s.toLowerCase()?"get":"post",x="string"==typeof l&&st.test(l);return a.createElement("form",{ref:y,method:b,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,a=n?.getAttribute("formmethod")||s;v(n||e.currentTarget,{fetcherKey:t,method:a,navigate:r,replace:o,state:i,relative:d,preventScrollReset:f,viewTransition:p})},...m,"data-discover":x||"render"!==e?void 0:"true"})});function ut(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dt(e){let t=a.useContext(B);return u(t,ut(e)),t}ct.displayName="Form";var ft=0,pt=()=>`__${String(++ft)}__`;function ht(){let{router:e}=dt("useSubmit"),{basename:t}=a.useContext(J),r=ve("useRouteId");return a.useCallback(async(n,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=De(n,t);if(!1===o.navigate){let t=o.fetcherKey||pt();await e.fetch(t,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}let mt={data:""},yt=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||mt,vt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,gt=/\/\*[^]*?\*\/| +/g,bt=/\n+/g,xt=(e,t)=>{let r="",n="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?r=i+" "+a+";":n+="f"==i[1]?xt(a,i):i+"{"+xt(a,"k"==i[1]?"":t)+"}":"object"==typeof a?n+=xt(a,t?t.replace(/([^,])+/g,e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=xt.p?xt.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},wt={},_t=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+_t(e[r]);return t}return e},kt=(e,t,r,n,o)=>{let i=_t(e),a=wt[i]||(wt[i]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(i));if(!wt[a]){let t=i!==e?e:(e=>{let t,r,n=[{}];for(;t=vt.exec(e.replace(gt,""));)t[4]?n.shift():t[3]?(r=t[3].replace(bt," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(bt," ").trim();return n[0]})(e);wt[a]=xt(o?{["@keyframes "+a]:t}:t,r?"":"."+a)}let s=r&&wt.g?wt.g:null;return r&&(wt.g=wt[a]),((e,t,r,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(wt[a],t,n,s),a};function jt(e){let t=this||{},r=e.call?e(t.p):e;return kt(r.unshift?r.raw?((e,t,r)=>e.reduce((e,n,o)=>{let i=t[o];if(i&&i.call){let e=i(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":xt(e,""):!1===e?"":e}return e+n+(null==i?"":i)},""))(r,[].slice.call(arguments,1),t.p):r.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):r,yt(t.target),t.g,t.o,t.k)}jt.bind({g:1});let Ot,St,Et,Ct=jt.bind({k:1});function Pt(e,t){let r=this||{};return function(){let n=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;r.p=Object.assign({theme:St&&St()},s),r.o=/ *go\d+/.test(l),s.className=jt.apply(r,n)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),Et&&c[0]&&Et(s),Ot(c,s)}return t?t(o):o}}var Nt=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,Rt=(()=>{let e=0;return()=>(++e).toString()})(),At=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Tt=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return Tt(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+o}))}}},Dt=[],Ft={toasts:[],pausedAt:void 0},It=e=>{Ft=Tt(Ft,e),Dt.forEach(e=>{e(Ft)})},Mt={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Lt=e=>(t,r)=>{let n=((e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||Rt()}))(t,e,r);return It({type:2,toast:n}),n.id},$t=(e,t)=>Lt("blank")(e,t);$t.error=Lt("error"),$t.success=Lt("success"),$t.loading=Lt("loading"),$t.custom=Lt("custom"),$t.dismiss=e=>{It({type:3,toastId:e})},$t.remove=e=>It({type:4,toastId:e}),$t.promise=(e,t,r)=>{let n=$t.loading(t.loading,{...r,...null==r?void 0:r.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let o=t.success?Nt(t.success,e):void 0;return o?$t.success(o,{id:n,...r,...null==r?void 0:r.success}):$t.dismiss(n),e}).catch(e=>{let o=t.error?Nt(t.error,e):void 0;o?$t.error(o,{id:n,...r,...null==r?void 0:r.error}):$t.dismiss(n)}),e};var Vt=(e,t)=>{It({type:1,toast:{id:e,height:t}})},zt=()=>{It({type:5,time:Date.now()})},qt=new Map,Ut=e=>{let{toasts:t,pausedAt:r}=((e={})=>{let[t,r]=(0,a.useState)(Ft),n=(0,a.useRef)(Ft);(0,a.useEffect)(()=>(n.current!==Ft&&r(Ft),Dt.push(r),()=>{let e=Dt.indexOf(r);e>-1&&Dt.splice(e,1)}),[]);let o=t.toasts.map(t=>{var r,n,o;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(r=e[t.type])?void 0:r.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Mt[t.type],style:{...e.style,...null==(o=e[t.type])?void 0:o.style,...t.style}}});return{...t,toasts:o}})(e);(0,a.useEffect)(()=>{if(r)return;let e=Date.now(),n=t.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(r<0))return setTimeout(()=>$t.dismiss(t.id),r);t.visible&&$t.dismiss(t.id)});return()=>{n.forEach(e=>e&&clearTimeout(e))}},[t,r]);let n=(0,a.useCallback)(()=>{r&&It({type:6,time:Date.now()})},[r]),o=(0,a.useCallback)((e,r)=>{let{reverseOrder:n=!1,gutter:o=8,defaultPosition:i}=r||{},a=t.filter(t=>(t.position||i)===(e.position||i)&&t.height),s=a.findIndex(t=>t.id===e.id),l=a.filter((e,t)=>t<s&&e.visible).length;return a.filter(e=>e.visible).slice(...n?[l+1]:[0,l]).reduce((e,t)=>e+(t.height||0)+o,0)},[t]);return(0,a.useEffect)(()=>{t.forEach(e=>{if(e.dismissed)((e,t=1e3)=>{if(qt.has(e))return;let r=setTimeout(()=>{qt.delete(e),It({type:4,toastId:e})},t);qt.set(e,r)})(e.id,e.removeDelay);else{let t=qt.get(e.id);t&&(clearTimeout(t),qt.delete(e.id))}})},[t]),{toasts:t,handlers:{updateHeight:Vt,startPause:zt,endPause:n,calculateOffset:o}}},Zt=Ct`1 (()=>{"use strict";var e,t,r={20:(e,t,r)=>{var n=r(594),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},206:e=>{e.exports=ReactDOM},338:(e,t,r)=>{var n=r(206);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},594:e=>{e.exports=React},848:(e,t,r)=>{e.exports=r(20)}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,a),o.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(o,i),o},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var o=a(338),i=a(594),s=a.t(i,2),l="popstate";function c(e={}){return y(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=m(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),h("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:p(t))},function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e)try{throw new Error(t)}catch(e){}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?m(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function p({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function m(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function y(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s="POP",c=null,u=d();function d(){return(i.state||{idx:null}).idx}function p(){s="POP";let e=d(),t=null==e?null:e-u;u=e,c&&c({action:s,location:y.location,delta:t})}function m(e){return v(e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let y={get action(){return s},get location(){return e(a,i)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(l,p),c=e,()=>{a.removeEventListener(l,p),c=null}},createHref:e=>t(a,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=h(y.location,e,t);r&&r(n,e),u=d()+1;let l=f(n,u),p=y.createHref(n);try{i.pushState(l,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(p)}o&&c&&c({action:s,location:y.location,delta:1})},replace:function(e,t){s="REPLACE";let n=h(y.location,e,t);r&&r(n,e),u=d();let a=f(n,u),l=y.createHref(n);i.replaceState(a,"",l),o&&c&&c({action:s,location:y.location,delta:0})},go:e=>i.go(e)};return y}function v(e,t=!1){let r="http://localhost";"undefined"!=typeof window&&(r="null"!==window.location.origin?window.location.origin:window.location.href),u(r,"No window.location.(origin|href) available to create URL");let n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}new WeakMap;function g(e,t,r="/"){return b(e,t,r,!1)}function b(e,t,r,n){let a=D(("string"==typeof t?m(t):t).pathname||"/",r);if(null==a)return null;let o=x(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e){let t=T(a);i=C(o[e],t,n)}return i}function x(e,t=[],r=[],n=""){let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(u(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let s=$([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(u(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),x(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:P(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of w(e.path))a(e,t,r);else a(e,t)}),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=w(n.join("/")),s=[];return s.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var j=/^:[\w-]+$/,_=3,k=2,O=1,S=10,N=-2,E=e=>"*"===e;function P(e,t){let r=e.split("/"),n=r.length;return r.some(E)&&(n+=N),t&&(n+=k),r.filter(e=>!E(e)).reduce((e,t)=>e+(j.test(t)?_:""===t?O:S),n)}function C(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=R({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=R({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(a,u.params),i.push({params:a,pathname:$([o,u.pathname]),pathnameBase:V($([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=$([o,u.pathnameBase]))}return i}function R(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=A(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1),l=n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=s[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:o,pathnameBase:i,pattern:e}}function A(e,t=!1,r=!0){d("*"===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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function T(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function F(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function I(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function M(e){let t=I(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function L(e,t,r,n=!1){let a;"string"==typeof e?a=m(e):(a={...e},u(!a.pathname||!a.pathname.includes("?"),F("?","pathname","search",a)),u(!a.pathname||!a.pathname.includes("#"),F("#","pathname","hash",a)),u(!a.search||!a.search.includes("#"),F("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:a=""}="string"==typeof e?m(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:z(n),hash:U(a)}}(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var $=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function q(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var W=["POST","PUT","PATCH","DELETE"],Z=(new Set(W),["GET",...W]);new Set(Z),Symbol("ResetLoaderData");var B=i.createContext(null);B.displayName="DataRouter";var H=i.createContext(null);H.displayName="DataRouterState";var K=i.createContext(!1);var Q=i.createContext({isTransitioning:!1});Q.displayName="ViewTransition";var G=i.createContext(new Map);G.displayName="Fetchers";var J=i.createContext(null);J.displayName="Await";var Y=i.createContext(null);Y.displayName="Navigation";var X=i.createContext(null);X.displayName="Location";var ee=i.createContext({outlet:null,matches:[],isDataRoute:!1});ee.displayName="Route";var te=i.createContext(null);te.displayName="RouteError";function re(){return null!=i.useContext(X)}function ne(){return u(re(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(X).location}var ae="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function oe(e){i.useContext(Y).static||i.useLayoutEffect(e)}function ie(){let{isDataRoute:e}=i.useContext(ee);return e?function(){let{router:e}=me("useNavigate"),t=ve("useNavigate"),r=i.useRef(!1);oe(()=>{r.current=!0});let n=i.useCallback(async(n,a={})=>{d(r.current,ae),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t]);return n}():function(){u(re(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(B),{basename:t,navigator:r}=i.useContext(Y),{matches:n}=i.useContext(ee),{pathname:a}=ne(),o=JSON.stringify(M(n)),s=i.useRef(!1);oe(()=>{s.current=!0});let l=i.useCallback((n,i={})=>{if(d(s.current,ae),!s.current)return;if("number"==typeof n)return void r.go(n);let l=L(n,JSON.parse(o),a,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:$([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[t,r,o,a,e]);return l}()}i.createContext(null);function se(e,{relative:t}={}){let{matches:r}=i.useContext(ee),{pathname:n}=ne(),a=JSON.stringify(M(r));return i.useMemo(()=>L(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function le(e,t,r,n){u(re(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Y),{matches:o}=i.useContext(ee),s=o[o.length-1],l=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",h=s&&s.route;{let e=h&&h.path||"";xe(c,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,y=ne();if(t){let e="string"==typeof t?m(t):t;u("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=y;let v=p.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=g(e,{pathname:b});d(h||null!=x,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),d(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=he(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:$([f,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:$([f,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,r,n);return t&&w?i.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},w):w}function ce(){let e=ge(),t=q(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},s=null;return s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,s)}var ue=i.createElement(ce,null),de=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?i.createElement(ee.Provider,{value:this.props.routeContext},i.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function fe({routeContext:e,match:t,children:r}){let n=i.useContext(B);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(ee.Provider,{value:e},r)}function he(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,o=r?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(r)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){s=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight((e,n,c)=>{let u,d=!1,f=null,h=null;r&&(u=o&&n.route.id?o[n.route.id]:void 0,f=n.route.errorElement||ue,s&&(l<0&&0===c?(xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,h=null):l===c&&(d=!0,h=n.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,c+1)),m=()=>{let t;return t=u?f:d?h:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(fe,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===c)?i.createElement(de,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}function pe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function me(e){let t=i.useContext(B);return u(t,pe(e)),t}function ye(e){let t=i.useContext(H);return u(t,pe(e)),t}function ve(e){let t=function(e){let t=i.useContext(ee);return u(t,pe(e)),t}(e),r=t.matches[t.matches.length-1];return u(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ge(){let e=i.useContext(te),t=ye("useRouteError"),r=ve("useRouteError");return void 0!==e?e:t.errors?.[r]}var be={};function xe(e,t,r){t||be[e]||(be[e]=!0,d(!1,r))}var we={};function je(e,t){e||we[t]||(we[t]=!0)}i.memo(function({routes:e,future:t,state:r}){return le(e,void 0,r,t)});function _e({to:e,replace:t,state:r,relative:n}){u(re(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=i.useContext(Y);d(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=i.useContext(ee),{pathname:s}=ne(),l=ie(),c=L(e,M(o),s,"path"===n),f=JSON.stringify(c);return i.useEffect(()=>{l(JSON.parse(f),{replace:t,state:r,relative:n})},[l,f,n,t,r]),null}function ke(e){u(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Oe({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1}){u(!re(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=i.useMemo(()=>({basename:s,navigator:a,static:o,future:{}}),[s,a,o]);"string"==typeof r&&(r=m(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:y="default"}=r,v=i.useMemo(()=>{let e=D(c,s);return null==e?null:{location:{pathname:e,search:f,hash:h,state:p,key:y},navigationType:n}},[s,c,f,h,p,y,n]);return d(null!=v,`<Router basename="${s}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:i.createElement(Y.Provider,{value:l},i.createElement(X.Provider,{children:t,value:v}))}function Se({children:e,location:t}){return le(Ne(e),t)}i.Component;function Ne(e,t=[]){let r=[];return i.Children.forEach(e,(e,n)=>{if(!i.isValidElement(e))return;let a=[...t,n];if(e.type===i.Fragment)return void r.push.apply(r,Ne(e.props.children,a));u(e.type===ke,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Ne(e.props.children,a)),r.push(o)}),r}var Ee="get",Pe="application/x-www-form-urlencoded";function Ce(e){return null!=e&&"string"==typeof e.tagName}function Re(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var Ae=null;var Te=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return null==e||Te.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pe}"`),null)}function Fe(e,t){let r,n,a,o,i;if(Ce(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?D(i,t):null,r=e.getAttribute("method")||Ee,a=De(e.getAttribute("enctype"))||Pe,o=new FormData(e)}else if(function(e){return Ce(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ce(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?D(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||Ee,a=De(e.getAttribute("formenctype"))||De(i.getAttribute("enctype"))||Pe,o=new FormData(i,e),!function(){if(null===Ae)try{new FormData(document.createElement("form"),0),Ae=!1}catch(e){Ae=!0}return Ae}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Ce(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ee,n=null,a=Pe,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function Ie(e){return{__html:e}}function Me(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Le(e,t,r){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname=`_root.${r}`:t&&"/"===D(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function $e(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(e){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ve(e){return null!=e&&"string"==typeof e.page}function ze(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Ue(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(i(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function qe(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1),[...new Set(n)];var n}function We(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!Ve(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e},[])}function Ze(e,t){return"lazy"===e.mode&&!0===t}function Be(){let e=i.useContext(B);return Me(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function He(){let e=i.useContext(H);return Me(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ke=i.createContext(void 0);function Qe(){let e=i.useContext(Ke);return Me(e,"You must render this element inside a <HydratedRouter> element"),e}function Ge(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Je(e,t,r){if(r&&!tt)return[e[0]];if(t){let r=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,r+1)}return e}Ke.displayName="FrameworkContext";function Ye({page:e,...t}){let{router:r}=Be(),n=i.useMemo(()=>g(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?i.createElement(et,{page:e,matches:n,...t}):null}function Xe(e){let{manifest:t,routeModules:r}=Qe(),[n,a]=i.useState([]);return i.useEffect(()=>{let n=!1;return async function(e,t,r){return We((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await $e(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(ze).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),n}function et({page:e,matches:t,...r}){let n=ne(),{manifest:a,routeModules:o}=Qe(),{basename:s}=Be(),{loaderData:l,matches:c}=He(),u=i.useMemo(()=>Ue(e,t,c,a,n,"data"),[e,t,c,a,n]),d=i.useMemo(()=>Ue(e,t,c,a,n,"assets"),[e,t,c,a,n]),f=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,i=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:r.add(e.route.id))}),0===r.size)return[];let c=Le(e,s,"data");return i&&r.size>0&&c.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,l,n,a,u,t,e,o]),h=i.useMemo(()=>qe(d,a),[d,a]),p=Xe(d);return i.createElement(i.Fragment,null,f.map(e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),h.map(e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),p.map(({key:e,link:t})=>i.createElement("link",{key:e,...t})))}var tt=!1;function rt(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:s}=Qe(),{router:l,static:c,staticContext:u}=Be(),{matches:d}=He(),f=i.useContext(K),h=Ze(o,s);a&&(a.didRenderScripts=!0);let p=Je(d,null,n);i.useEffect(()=>{tt=!0},[]);let m=i.useMemo(()=>{if(f)return null;let n=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",a=c?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${h?"":`import ${JSON.stringify(t.url)}`};\n${p.map((e,r)=>{let n=`route${r}`,a=t.routes[e.route.id];Me(a,`Route ${e.route.id} not found in manifest`);let{clientActionModule:o,clientLoaderModule:i,clientMiddlewareModule:s,hydrateFallbackModule:l,module:c}=a,u=[...o?[{module:o,varName:`${n}_clientAction`}]:[],...i?[{module:i,varName:`${n}_clientLoader`}]:[],...s?[{module:s,varName:`${n}_clientMiddleware`}]:[],...l?[{module:l,varName:`${n}_HydrateFallback`}]:[],{module:c,varName:`${n}_main`}];return 1===u.length?`import * as ${n} from ${JSON.stringify(c)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join("\n"),`const ${n} = {${u.map(e=>`...${e.varName}`).join(",")}};`].join("\n")}).join("\n")}\n ${h?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},r){let n=new Set(r.state.matches.map(e=>e.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(e=>{let t=g(r.routes,e,r.basename);t&&t.forEach(e=>n.add(e.route.id))});let i=[...n].reduce((e,r)=>Object.assign(e,{[r]:t.routes[r]}),{});return{...t,routes:i,sri:!!e||void 0}}(t,l),null,2)};`:""}\n window.__reactRouterRouteModules = {${p.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Ie(n),type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Ie(a),type:"module",async:!0}))},[]),y=tt||f?[]:(v=t.entry.imports.concat(qe(p,t,{includeHydrateFallback:!0})),[...new Set(v)]);var v;let b="object"==typeof t.sri?t.sri:{};return je(!f,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),tt||f?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:b})}}):null,h?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:b[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:b[t.entry.module],suppressHydrationWarning:!0}),y.map(t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:b[t],suppressHydrationWarning:!0})),m)}function nt(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}i.Component;function at({error:e,isOutsideRemixApp:t}){let r,n=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(q(e))return i.createElement(ot,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);if(e instanceof Error)r=e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);r=new Error(t)}return i.createElement(ot,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n)}function ot({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=Qe();return a.root?.Layout&&!r?n:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?i.createElement(rt,null):null)))}var it="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{it&&(window.__reactRouterVersion="7.7.0")}catch(vt){}function st({basename:e,children:t,window:r}){let n=i.useRef();null==n.current&&(n.current=c({window:r,v5Compat:!0}));let a=n.current,[o,s]=i.useState({action:a.action,location:a.location}),l=i.useCallback(e=>{i.startTransition(()=>s(e))},[s]);return i.useLayoutEffect(()=>a.listen(l),[a,l]),i.createElement(Oe,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var lt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ct=i.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:a,replace:o,state:s,target:l,to:c,preventScrollReset:f,viewTransition:h,...m},y){let v,{basename:g}=i.useContext(Y),b="string"==typeof c&<.test(c),x=!1;if("string"==typeof c&&b&&(v=c,it))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=D(t.pathname,g);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:x=!0}catch(e){d(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=function(e,{relative:t}={}){u(re(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(Y),{hash:a,pathname:o,search:s}=se(e,{relative:t}),l=o;return"/"!==r&&(l="/"===o?r:$([r,o])),n.createHref({pathname:l,search:s,hash:a})}(c,{relative:n}),[j,_,k]=function(e,t){let r=i.useContext(Ke),[n,a]=i.useState(!1),[o,s]=i.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,h=i.useRef(null);i.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}},[e]),i.useEffect(()=>{if(n){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{a(!0)},m=()=>{a(!1),s(!1)};return r?"intent"!==e?[o,h,{}]:[o,h,{onFocus:Ge(l,p),onBlur:Ge(c,m),onMouseEnter:Ge(u,p),onMouseLeave:Ge(d,m),onTouchStart:Ge(f,p)}]:[!1,h,{}]}(r,m),O=function(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:s}={}){let l=ie(),c=ne(),u=se(e,{relative:o});return i.useCallback(i=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(i,t)){i.preventDefault();let t=void 0!==r?r:p(c)===p(u);l(e,{replace:t,state:n,preventScrollReset:a,relative:o,viewTransition:s})}},[c,l,u,r,n,t,e,a,o,s])}(c,{replace:o,state:s,target:l,preventScrollReset:f,relative:n,viewTransition:h});let S=i.createElement("a",{...m,...k,href:v||w,onClick:x||a?e:function(t){e&&e(t),t.defaultPrevented||O(t)},ref:nt(y,_),target:l,"data-discover":b||"render"!==t?void 0:"true"});return j&&!b?i.createElement(i.Fragment,null,S,i.createElement(Ye,{page:w})):S});ct.displayName="Link",i.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:a,to:o,viewTransition:s,children:l,...c},d){let f=se(o,{relative:c.relative}),h=ne(),p=i.useContext(H),{navigator:m,basename:y}=i.useContext(Y),v=null!=p&&function(e,t={}){let r=i.useContext(Q);u(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=ft("useViewTransitionState"),a=se(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=D(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=D(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=R(a.pathname,s)||null!=R(a.pathname,o)}(f)&&!0===s,g=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,b=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(b=b.toLowerCase(),x=x?x.toLowerCase():null,g=g.toLowerCase()),x&&y&&(x=D(x,y)||x);const w="/"!==g&&g.endsWith("/")?g.length-1:g.length;let j,_=b===g||!n&&b.startsWith(g)&&"/"===b.charAt(w),k=null!=x&&(x===g||!n&&x.startsWith(g)&&"/"===x.charAt(g.length)),O={isActive:_,isPending:k,isTransitioning:v},S=_?e:void 0;j="function"==typeof r?r(O):[r,_?"active":null,k?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let N="function"==typeof a?a(O):a;return i.createElement(ct,{...c,"aria-current":S,className:j,ref:d,style:N,to:o,viewTransition:s},"function"==typeof l?l(O):l)}).displayName="NavLink";var ut=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:s=Ee,action:l,onSubmit:c,relative:d,preventScrollReset:f,viewTransition:h,...m},y)=>{let v=yt(),g=function(e,{relative:t}={}){let{basename:r}=i.useContext(Y),n=i.useContext(ee);u(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...se(e||".",{relative:t})},s=ne();if(null==e){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:$([r,o.pathname]));return p(o)}(l,{relative:d}),b="get"===s.toLowerCase()?"get":"post",x="string"==typeof l&<.test(l);return i.createElement("form",{ref:y,method:b,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,i=n?.getAttribute("formmethod")||s;v(n||e.currentTarget,{fetcherKey:t,method:i,navigate:r,replace:a,state:o,relative:d,preventScrollReset:f,viewTransition:h})},...m,"data-discover":x||"render"!==e?void 0:"true"})});function dt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ft(e){let t=i.useContext(B);return u(t,dt(e)),t}function ht(e){d("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Re(e)),r=i.useRef(!1),n=ne(),a=i.useMemo(()=>function(e,t){let r=Re(e);return t&&t.forEach((e,n)=>{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(n.search,r.current?null:t.current),[n.search]),o=ie(),s=i.useCallback((e,t)=>{const n=Re("function"==typeof e?e(new URLSearchParams(a)):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,s]}ut.displayName="Form";var pt=0,mt=()=>`__${String(++pt)}__`;function yt(){let{router:e}=ft("useSubmit"),{basename:t}=i.useContext(Y),r=ve("useRouteId");return i.useCallback(async(n,a={})=>{let{action:o,method:i,encType:s,formData:l,body:c}=Fe(n,t);if(!1===a.navigate){let t=a.fetcherKey||mt();await e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}let vt={data:""},gt=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||vt,bt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,xt=/\/\*[^]*?\*\/| +/g,wt=/\n+/g,jt=(e,t)=>{let r="",n="",a="";for(let o in e){let i=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+i+";":n+="f"==o[1]?jt(i,o):o+"{"+jt(i,"k"==o[1]?"":t)+"}":"object"==typeof i?n+=jt(i,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=i&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=jt.p?jt.p(o,i):o+":"+i+";")}return r+(t&&a?t+"{"+a+"}":a)+n},_t={},kt=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+kt(e[r]);return t}return e},Ot=(e,t,r,n,a)=>{let o=kt(e),i=_t[o]||(_t[o]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(o));if(!_t[i]){let t=o!==e?e:(e=>{let t,r,n=[{}];for(;t=bt.exec(e.replace(xt,""));)t[4]?n.shift():t[3]?(r=t[3].replace(wt," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(wt," ").trim();return n[0]})(e);_t[i]=jt(a?{["@keyframes "+i]:t}:t,r?"":"."+i)}let s=r&&_t.g?_t.g:null;return r&&(_t.g=_t[i]),((e,t,r,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(_t[i],t,n,s),i};function St(e){let t=this||{},r=e.call?e(t.p):e;return Ot(r.unshift?r.raw?((e,t,r)=>e.reduce((e,n,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":jt(e,""):!1===e?"":e}return e+n+(null==o?"":o)},""))(r,[].slice.call(arguments,1),t.p):r.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):r,gt(t.target),t.g,t.o,t.k)}St.bind({g:1});let Nt,Et,Pt,Ct=St.bind({k:1});function Rt(e,t){let r=this||{};return function(){let n=arguments;function a(o,i){let s=Object.assign({},o),l=s.className||a.className;r.p=Object.assign({theme:Et&&Et()},s),r.o=/ *go\d+/.test(l),s.className=St.apply(r,n)+(l?" "+l:""),t&&(s.ref=i);let c=e;return e[0]&&(c=s.as||e,delete s.as),Pt&&c[0]&&Pt(s),Nt(c,s)}return t?t(a):a}}var At=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,Tt=(()=>{let e=0;return()=>(++e).toString()})(),Dt=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Ft=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return Ft(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+a}))}}},It=[],Mt={toasts:[],pausedAt:void 0},Lt=e=>{Mt=Ft(Mt,e),It.forEach(e=>{e(Mt)})},$t={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Vt=e=>(t,r)=>{let n=((e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||Tt()}))(t,e,r);return Lt({type:2,toast:n}),n.id},zt=(e,t)=>Vt("blank")(e,t);zt.error=Vt("error"),zt.success=Vt("success"),zt.loading=Vt("loading"),zt.custom=Vt("custom"),zt.dismiss=e=>{Lt({type:3,toastId:e})},zt.remove=e=>Lt({type:4,toastId:e}),zt.promise=(e,t,r)=>{let n=zt.loading(t.loading,{...r,...null==r?void 0:r.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let a=t.success?At(t.success,e):void 0;return a?zt.success(a,{id:n,...r,...null==r?void 0:r.success}):zt.dismiss(n),e}).catch(e=>{let a=t.error?At(t.error,e):void 0;a?zt.error(a,{id:n,...r,...null==r?void 0:r.error}):zt.dismiss(n)}),e};var Ut=(e,t)=>{Lt({type:1,toast:{id:e,height:t}})},qt=()=>{Lt({type:5,time:Date.now()})},Wt=new Map,Zt=e=>{let{toasts:t,pausedAt:r}=((e={})=>{let[t,r]=(0,i.useState)(Mt),n=(0,i.useRef)(Mt);(0,i.useEffect)(()=>(n.current!==Mt&&r(Mt),It.push(r),()=>{let e=It.indexOf(r);e>-1&&It.splice(e,1)}),[]);let a=t.toasts.map(t=>{var r,n,a;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(r=e[t.type])?void 0:r.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||$t[t.type],style:{...e.style,...null==(a=e[t.type])?void 0:a.style,...t.style}}});return{...t,toasts:a}})(e);(0,i.useEffect)(()=>{if(r)return;let e=Date.now(),n=t.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(r<0))return setTimeout(()=>zt.dismiss(t.id),r);t.visible&&zt.dismiss(t.id)});return()=>{n.forEach(e=>e&&clearTimeout(e))}},[t,r]);let n=(0,i.useCallback)(()=>{r&&Lt({type:6,time:Date.now()})},[r]),a=(0,i.useCallback)((e,r)=>{let{reverseOrder:n=!1,gutter:a=8,defaultPosition:o}=r||{},i=t.filter(t=>(t.position||o)===(e.position||o)&&t.height),s=i.findIndex(t=>t.id===e.id),l=i.filter((e,t)=>t<s&&e.visible).length;return i.filter(e=>e.visible).slice(...n?[l+1]:[0,l]).reduce((e,t)=>e+(t.height||0)+a,0)},[t]);return(0,i.useEffect)(()=>{t.forEach(e=>{if(e.dismissed)((e,t=1e3)=>{if(Wt.has(e))return;let r=setTimeout(()=>{Wt.delete(e),Lt({type:4,toastId:e})},t);Wt.set(e,r)})(e.id,e.removeDelay);else{let t=Wt.get(e.id);t&&(clearTimeout(t),Wt.delete(e.id))}})},[t]),{toasts:t,handlers:{updateHeight:Ut,startPause:qt,endPause:n,calculateOffset:a}}},Bt=Ct` 2 2 from { 3 3 transform: scale(0) rotate(45deg); … … 7 7 transform: scale(1) rotate(45deg); 8 8 opacity: 1; 9 }`, Wt=Ct`9 }`,Ht=Ct` 10 10 from { 11 11 transform: scale(0); … … 15 15 transform: scale(1); 16 16 opacity: 1; 17 }`, Bt=Ct`17 }`,Kt=Ct` 18 18 from { 19 19 transform: scale(0) rotate(90deg); … … 23 23 transform: scale(1) rotate(90deg); 24 24 opacity: 1; 25 }`,Qt= Pt("div")`25 }`,Qt=Rt("div")` 26 26 width: 20px; 27 27 opacity: 0; … … 32 32 transform: rotate(45deg); 33 33 34 animation: ${ Zt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)34 animation: ${Bt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 35 35 forwards; 36 36 animation-delay: 100ms; … … 39 39 &:before { 40 40 content: ''; 41 animation: ${ Wt} 0.15s ease-out forwards;41 animation: ${Ht} 0.15s ease-out forwards; 42 42 animation-delay: 150ms; 43 43 position: absolute; … … 52 52 53 53 &:before { 54 animation: ${ Bt} 0.15s ease-out forwards;54 animation: ${Kt} 0.15s ease-out forwards; 55 55 animation-delay: 180ms; 56 56 transform: rotate(90deg); 57 57 } 58 `, Kt=Ct`58 `,Gt=Ct` 59 59 from { 60 60 transform: rotate(0deg); … … 63 63 transform: rotate(360deg); 64 64 } 65 `, Ht=Pt("div")`65 `,Jt=Rt("div")` 66 66 width: 12px; 67 67 height: 12px; … … 71 71 border-color: ${e=>e.secondary||"#e0e0e0"}; 72 72 border-right-color: ${e=>e.primary||"#616161"}; 73 animation: ${ Kt} 1s linear infinite;74 `, Gt=Ct`73 animation: ${Gt} 1s linear infinite; 74 `,Yt=Ct` 75 75 from { 76 76 transform: scale(0) rotate(45deg); … … 80 80 transform: scale(1) rotate(45deg); 81 81 opacity: 1; 82 }`, Yt=Ct`82 }`,Xt=Ct` 83 83 0% { 84 84 height: 0; … … 94 94 opacity: 1; 95 95 height: 10px; 96 }`, Jt=Pt("div")`96 }`,er=Rt("div")` 97 97 width: 20px; 98 98 opacity: 0; … … 103 103 transform: rotate(45deg); 104 104 105 animation: ${ Gt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)105 animation: ${Yt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 106 106 forwards; 107 107 animation-delay: 100ms; … … 109 109 content: ''; 110 110 box-sizing: border-box; 111 animation: ${ Yt} 0.2s ease-out forwards;111 animation: ${Xt} 0.2s ease-out forwards; 112 112 opacity: 0; 113 113 animation-delay: 200ms; … … 121 121 width: 6px; 122 122 } 123 `, Xt=Pt("div")`123 `,tr=Rt("div")` 124 124 position: absolute; 125 `, er=Pt("div")`125 `,rr=Rt("div")` 126 126 position: relative; 127 127 display: flex; … … 130 130 min-width: 20px; 131 131 min-height: 20px; 132 `, tr=Ct`132 `,nr=Ct` 133 133 from { 134 134 transform: scale(0.6); … … 138 138 transform: scale(1); 139 139 opacity: 1; 140 }`, rr=Pt("div")`140 }`,ar=Rt("div")` 141 141 position: relative; 142 142 transform: scale(0.6); 143 143 opacity: 0.4; 144 144 min-width: 20px; 145 animation: ${ tr} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)145 animation: ${nr} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 146 146 forwards; 147 `, nr=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return void 0!==t?"string"==typeof t?a.createElement(rr,null,t):t:"blank"===r?null:a.createElement(er,null,a.createElement(Ht,{...n}),"loading"!==r&&a.createElement(Xt,null,"error"===r?a.createElement(Qt,{...n}):a.createElement(Jt,{...n})))},or=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,ir=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,ar=Pt("div")`147 `,or=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return void 0!==t?"string"==typeof t?i.createElement(ar,null,t):t:"blank"===r?null:i.createElement(rr,null,i.createElement(Jt,{...n}),"loading"!==r&&i.createElement(tr,null,"error"===r?i.createElement(Qt,{...n}):i.createElement(er,{...n})))},ir=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,sr=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,lr=Rt("div")` 148 148 display: flex; 149 149 align-items: center; … … 157 157 padding: 8px 10px; 158 158 border-radius: 8px; 159 `, sr=Pt("div")`159 `,cr=Rt("div")` 160 160 display: flex; 161 161 justify-content: center; … … 164 164 flex: 1 1 auto; 165 165 white-space: pre-line; 166 `, lr=a.memo(({toast:e,position:t,style:r,children:n})=>{let o=e.height?((e,t)=>{let r=e.includes("top")?1:-1,[n,o]=At()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[or(r),ir(r)];return{animation:t?`${Ct(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ct(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=a.createElement(nr,{toast:e}),s=a.createElement(sr,{...e.ariaProps},Nt(e.message,e));return a.createElement(ar,{className:e.className,style:{...o,...r,...e.style}},"function"==typeof n?n({icon:i,message:s}):a.createElement(a.Fragment,null,i,s))});!function(e,t,r,n){xt.p=t,Ot=e,St=r,Et=n}(a.createElement);var cr=({id:e,className:t,style:r,onHeightUpdate:n,children:o})=>{let i=a.useCallback(t=>{if(t){let r=()=>{let r=t.getBoundingClientRect().height;n(e,r)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return a.createElement("div",{ref:i,className:t,style:r},o)},ur=jt`166 `,ur=i.memo(({toast:e,position:t,style:r,children:n})=>{let a=e.height?((e,t)=>{let r=e.includes("top")?1:-1,[n,a]=Dt()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[ir(r),sr(r)];return{animation:t?`${Ct(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ct(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},o=i.createElement(or,{toast:e}),s=i.createElement(cr,{...e.ariaProps},At(e.message,e));return i.createElement(lr,{className:e.className,style:{...a,...r,...e.style}},"function"==typeof n?n({icon:o,message:s}):i.createElement(i.Fragment,null,o,s))});!function(e,t,r,n){jt.p=t,Nt=e,Et=r,Pt=n}(i.createElement);var dr=({id:e,className:t,style:r,onHeightUpdate:n,children:a})=>{let o=i.useCallback(t=>{if(t){let r=()=>{let r=t.getBoundingClientRect().height;n(e,r)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return i.createElement("div",{ref:o,className:t,style:r},a)},fr=St` 167 167 z-index: 9999; 168 168 > * { 169 169 pointer-events: auto; 170 170 } 171 `, dr=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:o,containerStyle:i,containerClassName:s})=>{let{toasts:l,handlers:c}=Ut(r);return a.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(r=>{let i=r.position||t,s=((e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:At()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...o}})(i,c.calculateOffset(r,{reverseOrder:e,gutter:n,defaultPosition:t}));return a.createElement(cr,{id:r.id,key:r.id,onHeightUpdate:c.updateHeight,className:r.visible?ur:"",style:s},"custom"===r.type?Nt(r.message,r):o?o(r):a.createElement(lr,{toast:r,position:i}))}))},fr=$t,pr="undefined"==typeof window||"Deno"in globalThis;function hr(){}function mr(e){return"number"==typeof e&&e>=0&&e!==1/0}function yr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return"function"==typeof e?e(t):e}function gr(e,t){return"function"==typeof e?e(t):e}function br(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a)if(n){if(t.queryHash!==wr(a,t.options))return!1}else if(!kr(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function xr(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(_r(t.options.mutationKey)!==_r(i))return!1}else if(!kr(t.options.mutationKey,i))return!1}return(!n||t.state.status===n)&&!(o&&!o(t))}function wr(e,t){return(t?.queryKeyHashFn||_r)(e)}function _r(e){return JSON.stringify(e,(e,t)=>Er(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function kr(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>kr(e[r],t[r])))}function jr(e,t){if(e===t)return e;const r=Sr(e)&&Sr(t);if(r||Er(e)&&Er(t)){const n=r?e:Object.keys(e),o=n.length,i=r?t:Object.keys(t),a=i.length,s=r?[]:{},l=new Set(n);let c=0;for(let n=0;n<a;n++){const o=r?n:i[n];(!r&&l.has(o)||r)&&void 0===e[o]&&void 0===t[o]?(s[o]=void 0,c++):(s[o]=jr(e[o],t[o]),s[o]===e[o]&&void 0!==e[o]&&c++)}return o===a&&c===o?e:s}return t}function Or(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Sr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Er(e){if(!Cr(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Cr(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Cr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Pr(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?jr(e,t):t}function Nr(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Rr(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ar=Symbol();function Tr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Ar?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Dr(e,t){return"function"==typeof e?e(...t):!!e}var Fr=e=>setTimeout(e,0);var Ir=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},o=Fr;const i=n=>{t?e.push(n):o(()=>{r(n)})};return{batch:i=>{let a;t++;try{a=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o(()=>{n(()=>{t.forEach(e=>{r(e)})})})})()}return a},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{o=e}}}(),Mr=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(){}},Lr=new class extends Mr{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!pr&&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(e=>{"boolean"==typeof e?this.setFocused(e):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"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},$r=new class extends Mr{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!pr&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}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.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function Vr(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function zr(e){return Math.min(1e3*2**e,3e4)}function qr(e){return"online"!==(e??"online")||$r.isOnline()}var Ur=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Zr(e){return e instanceof Ur}function Wr(e){let t,r=!1,n=0,o=!1;const i=Vr(),a=()=>Lr.isFocused()&&("always"===e.networkMode||$r.isOnline())&&e.canRun(),s=()=>qr(e.networkMode)&&e.canRun(),l=r=>{o||(o=!0,e.onSuccess?.(r),t?.(),i.resolve(r))},c=r=>{o||(o=!0,e.onError?.(r),t?.(),i.reject(r))},u=()=>new Promise(r=>{t=e=>{(o||a())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,o||e.onContinue?.()}),d=()=>{if(o)return;let t;const i=0===n?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(o)return;const i=e.retry??(pr?0:3),s=e.retryDelay??zr,l="function"==typeof s?s(n,t):s,f=!0===i||"number"==typeof i&&n<i||"function"==typeof i&&i(n,t);var p;!r&&f?(n++,e.onFail?.(n,t),(p=l,new Promise(e=>{setTimeout(e,p)})).then(()=>a()?void 0:u()).then(()=>{r?c(t):d()})):c(t)})};return{promise:i,cancel:t=>{o||(c(new Ur(t)),e.abort?.())},continue:()=>(t?.(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),i)}}var Br=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mr(this.gcTime)&&(this.#o=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pr?1/0:3e5))}clearGcTimeout(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}},Qr=class extends Br{#i;#a;#s;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#s=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,t){const r=Pr(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>!1!==gr(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ar||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===vr(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!yr(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.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.#c&&(this.#d?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,r.signal)})},o=()=>{const e=Tr(this.options,t),r=(()=>{const e={client:this.#l,queryKey:this.queryKey,meta:this.meta};return n(e),e})();return this.#d=!1,this.options.persister?this.options.persister(e,r,this):e(r)},i=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:o};return n(e),e})();this.options.behavior?.onFetch(i,this),this.#a=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===i.fetchOptions?.meta||this.#f({type:"fetch",meta:i.fetchOptions?.meta});const a=e=>{Zr(e)&&e.silent||this.#f({type:"error",error:e}),Zr(e)||(this.#s.config.onError?.(e,this),this.#s.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=Wr({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0!==e){try{this.setData(e)}catch(e){return void a(e)}this.#s.config.onSuccess?.(e,this),this.#s.config.onSettled?.(e,this.state.error,this),this.scheduleGc()}else a(new Error(`${this.queryHash} data is undefined`))},onError:a,onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#c.start()}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Kr(t.data,this.options),fetchMeta:e.meta??null};case"success":return this.#a=void 0,{...t,data:e.data,dataUpdateCount:t.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 Zr(r)&&r.revert&&this.#a?{...this.#a,fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Ir.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Kr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qr(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Hr=class extends Mr{constructor(e={}){super(),this.config=e,this.#p=new Map}#p;build(e,t,r){const n=t.queryKey,o=t.queryHash??wr(n,t);let i=this.get(o);return i||(i=new Qr({client:e,queryKey:n,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}add(e){this.#p.has(e.queryHash)||(this.#p.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#p.get(e.queryHash);t&&(e.destroy(),t===e&&this.#p.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ir.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#p.get(e)}getAll(){return[...this.#p.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>br(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>br(e,t)):t}notify(e){Ir.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ir.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ir.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gr=class extends Br{#h;#m;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#h=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},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.#h.includes(e)||(this.#h.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#h=this.#h.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#h.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#f({type:"continue"})};this.#c=Wr({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});const r="pending"===this.state.status,n=!this.#c.canStart();try{if(r)t();else{this.#f({type:"pending",variables:e,isPaused:n}),await(this.#m.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#f({type:"pending",context:t,variables:e,isPaused:n})}const o=await this.#c.start();return await(this.#m.config.onSuccess?.(o,e,this.state.context,this)),await(this.options.onSuccess?.(o,e,this.state.context)),await(this.#m.config.onSettled?.(o,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(o,null,e,this.state.context)),this.#f({type:"success",data:o}),o}catch(t){try{throw await(this.#m.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#f({type:"error",error:t})}}finally{this.#m.runNext(this)}}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Ir.batch(()=>{this.#h.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}};var Yr=class extends Mr{constructor(e={}){super(),this.config=e,this.#y=new Set,this.#v=new Map,this.#g=0}#y;#v;#g;build(e,t,r){const n=new Gr({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#y.add(e);const t=Jr(e);if("string"==typeof t){const r=this.#v.get(t);r?r.push(e):this.#v.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#y.delete(e)){const t=Jr(e);if("string"==typeof t){const r=this.#v.get(t);if(r)if(r.length>1){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#v.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Jr(e);if("string"==typeof t){const r=this.#v.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){const t=Jr(e);if("string"==typeof t){const r=this.#v.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}return Promise.resolve()}clear(){Ir.batch(()=>{this.#y.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#y.clear(),this.#v.clear()})}getAll(){return Array.from(this.#y)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>xr(t,e))}findAll(e={}){return this.getAll().filter(t=>xr(e,t))}notify(e){Ir.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return Ir.batch(()=>Promise.all(e.map(e=>e.continue().catch(hr))))}};function Jr(e){return e.options.scope?.id}function Xr(e){return{onFetch:(t,r)=>{const n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let r=!1;const c=Tr(t.options,t.fetchOptions),u=async(e,n,o)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);const i=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:n,direction:o?"backward":"forward",meta:t.options.meta};var i;return i=e,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),e})(),a=await c(i),{maxPages:s}=t.options,l=o?Rr:Nr;return{pages:l(e.pages,a,s),pageParams:l(e.pageParams,n,s)}};if(o&&i.length){const e="backward"===o,t={pages:i,pageParams:a},r=(e?tn:en)(n,t);s=await u(t,r,e)}else{const t=e??i.length;do{const e=0===l?a[0]??n.initialPageParam:en(n,s);if(l>0&&null==e)break;s=await u(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function en(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function tn(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var rn=o(848),nn=a.createContext(void 0),on=e=>{const t=a.useContext(nn);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},an=({client:e,children:t})=>(a.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,rn.jsx)(nn.Provider,{value:e,children:t}));const sn=wp.i18n;function ln(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ln(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function cn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ln(e))&&(n&&(n+=" "),n+=t);return n}const un=e=>{const t=hn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),dn(r,t)||pn(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},dn=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?dn(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},fn=/^\[(.+)\]$/,pn=e=>{if(fn.test(e)){const t=fn.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},hn=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const e in r)mn(r[e],n,e,t);return n},mn=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:yn(t,e)).classGroupId=r)}if("function"==typeof e)return vn(e)?void mn(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{mn(o,yn(t,e),r,n)})})},yn=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},vn=e=>e.isThemeGetter,gn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},bn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,i=0;for(let a=0;a<e.length;a++){let s=e[a];if(0===n&&0===o){if(":"===s){t.push(e.slice(i,a)),i=a+1;continue}if("/"===s){r=a;continue}}"["===s?n++:"]"===s?n--:"("===s?o++:")"===s&&o--}const a=0===t.length?e:e.substring(i),s=xn(a);return{modifiers:t,hasImportantModifier:s!==a,baseClassName:s,maybePostfixModifierPosition:r&&r>i?r-i:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},xn=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,wn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},_n=/\s+/;function kn(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=jn(e))&&(n&&(n+=" "),n+=t);return n}const jn=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=jn(e[n]))&&(r&&(r+=" "),r+=t);return r};function On(e,...t){let r,n,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:gn(e.cacheSize),parseClassName:bn(e),sortModifiers:wn(e),...un(e)}))(l),n=r.cache.get,o=r.cache.set,i=a,a(s)};function a(e){const t=n(e);if(t)return t;const i=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(_n);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let h=!!p,m=n(h?f.substring(0,p):f);if(!m){if(!h){l=t+(l.length>0?" "+l:l);continue}if(m=n(f),!m){l=t+(l.length>0?" "+l:l);continue}h=!1}const y=i(u).join(":"),v=d?y+"!":y,g=v+m;if(a.includes(g))continue;a.push(g);const b=o(m,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,i),i}return function(){return i(kn.apply(null,arguments))}}const Sn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},En=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pn=/^\d+\/\d+$/,Nn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rn=/\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$/,An=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fn=e=>Pn.test(e),In=e=>!!e&&!Number.isNaN(Number(e)),Mn=e=>!!e&&Number.isInteger(Number(e)),Ln=e=>e.endsWith("%")&&In(e.slice(0,-1)),$n=e=>Nn.test(e),Vn=()=>!0,zn=e=>Rn.test(e)&&!An.test(e),qn=()=>!1,Un=e=>Tn.test(e),Zn=e=>Dn.test(e),Wn=e=>!Qn(e)&&!Xn(e),Bn=e=>ao(e,uo,qn),Qn=e=>En.test(e),Kn=e=>ao(e,fo,zn),Hn=e=>ao(e,po,In),Gn=e=>ao(e,lo,qn),Yn=e=>ao(e,co,Zn),Jn=e=>ao(e,mo,Un),Xn=e=>Cn.test(e),eo=e=>so(e,fo),to=e=>so(e,ho),ro=e=>so(e,lo),no=e=>so(e,uo),oo=e=>so(e,co),io=e=>so(e,mo,!0),ao=(e,t,r)=>{const n=En.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},so=(e,t,r=!1)=>{const n=Cn.exec(e);return!!n&&(n[1]?t(n[1]):r)},lo=e=>"position"===e||"percentage"===e,co=e=>"image"===e||"url"===e,uo=e=>"length"===e||"size"===e||"bg-size"===e,fo=e=>"length"===e,po=e=>"number"===e,ho=e=>"family-name"===e,mo=e=>"shadow"===e,yo=(Symbol.toStringTag,()=>{const e=Sn("color"),t=Sn("font"),r=Sn("text"),n=Sn("font-weight"),o=Sn("tracking"),i=Sn("leading"),a=Sn("breakpoint"),s=Sn("container"),l=Sn("spacing"),c=Sn("radius"),u=Sn("shadow"),d=Sn("inset-shadow"),f=Sn("text-shadow"),p=Sn("drop-shadow"),h=Sn("blur"),m=Sn("perspective"),y=Sn("aspect"),v=Sn("ease"),g=Sn("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Xn,Qn],x=()=>[Xn,Qn,l],w=()=>[Fn,"full","auto",...x()],_=()=>[Mn,"none","subgrid",Xn,Qn],k=()=>["auto",{span:["full",Mn,Xn,Qn]},Mn,Xn,Qn],j=()=>[Mn,"auto",Xn,Qn],O=()=>["auto","min","max","fr",Xn,Qn],S=()=>["auto",...x()],E=()=>[Fn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],C=()=>[e,Xn,Qn],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ro,Gn,{position:[Xn,Qn]}],N=()=>["auto","cover","contain",no,Bn,{size:[Xn,Qn]}],R=()=>[Ln,eo,Kn],A=()=>["","none","full",c,Xn,Qn],T=()=>["",In,eo,Kn],D=()=>[In,Ln,ro,Gn],F=()=>["","none",h,Xn,Qn],I=()=>["none",In,Xn,Qn],M=()=>["none",In,Xn,Qn],L=()=>[In,Xn,Qn],$=()=>[Fn,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$n],breakpoint:[$n],color:[Vn],container:[$n],"drop-shadow":[$n],ease:["in","out","in-out"],font:[Wn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$n],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$n],shadow:[$n],spacing:["px",In],text:[$n],"text-shadow":[$n],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fn,Qn,Xn,y]}],container:["container"],columns:[{columns:[In,Qn,Xn,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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"],sr:["sr-only","not-sr-only"],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:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Mn,"auto",Xn,Qn]}],basis:[{basis:[Fn,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[In,Fn,"auto","initial","none",Qn]}],grow:[{grow:["",In,Xn,Qn]}],shrink:[{shrink:["",In,Xn,Qn]}],order:[{order:[Mn,"first","last","none",Xn,Qn]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],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:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],w:[{w:[s,"screen",...E()]}],"min-w":[{"min-w":[s,"screen","none",...E()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh",...E()]}],"font-size":[{text:["base",r,eo,Kn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Xn,Hn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ln,Qn]}],"font-family":[{font:[to,Qn,t]}],"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:[o,Xn,Qn]}],"line-clamp":[{"line-clamp":[In,"none",Xn,Hn]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",Xn,Qn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Xn,Qn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[In,"from-font","auto",Xn,Kn]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[In,"auto",Xn,Qn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xn,Qn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xn,Qn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mn,Xn,Qn],radial:["",Xn,Qn],conic:[Mn,Xn,Qn]},oo,Yn]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:T()}],"border-w-x":[{"border-x":T()}],"border-w-y":[{"border-y":T()}],"border-w-s":[{"border-s":T()}],"border-w-e":[{"border-e":T()}],"border-w-t":[{"border-t":T()}],"border-w-r":[{"border-r":T()}],"border-w-b":[{"border-b":T()}],"border-w-l":[{"border-l":T()}],"divide-x":[{"divide-x":T()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":T()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[In,Xn,Qn]}],"outline-w":[{outline:["",In,eo,Kn]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,io,Jn]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,io,Jn]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[In,Kn]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":T()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,io,Jn]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[In,Xn,Qn]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[In]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Xn,Qn]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[In]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Xn,Qn]}],filter:[{filter:["","none",Xn,Qn]}],blur:[{blur:F()}],brightness:[{brightness:[In,Xn,Qn]}],contrast:[{contrast:[In,Xn,Qn]}],"drop-shadow":[{"drop-shadow":["","none",p,io,Jn]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",In,Xn,Qn]}],"hue-rotate":[{"hue-rotate":[In,Xn,Qn]}],invert:[{invert:["",In,Xn,Qn]}],saturate:[{saturate:[In,Xn,Qn]}],sepia:[{sepia:["",In,Xn,Qn]}],"backdrop-filter":[{"backdrop-filter":["","none",Xn,Qn]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[In,Xn,Qn]}],"backdrop-contrast":[{"backdrop-contrast":[In,Xn,Qn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",In,Xn,Qn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[In,Xn,Qn]}],"backdrop-invert":[{"backdrop-invert":["",In,Xn,Qn]}],"backdrop-opacity":[{"backdrop-opacity":[In,Xn,Qn]}],"backdrop-saturate":[{"backdrop-saturate":[In,Xn,Qn]}],"backdrop-sepia":[{"backdrop-sepia":["",In,Xn,Qn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Xn,Qn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[In,"initial",Xn,Qn]}],ease:[{ease:["linear","initial",v,Xn,Qn]}],delay:[{delay:[In,Xn,Qn]}],animate:[{animate:["none",g,Xn,Qn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Xn,Qn]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:I()}],"rotate-x":[{"rotate-x":I()}],"rotate-y":[{"rotate-y":I()}],"rotate-z":[{"rotate-z":I()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[Xn,Qn,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Xn,Qn]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",Xn,Qn]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[In,eo,Kn,Hn]}],stroke:[{stroke:["none",...C()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),vo=On(yo);function go(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return vo(cn(t))}function bo(e){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(e)}var xo=["className"],wo=["className"],_o=["className"],ko=["className"],jo=["className"],Oo=["className"];function So(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?So(Object(r),!0).forEach(function(t){Co(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Co(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=bo(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Po(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var No=a.forwardRef(function(e,t){var r=e.className,n=Po(e,xo);return(0,rn.jsx)("div",Eo({ref:t,className:go("rounded-xl border bg-card text-card-foreground shadow",r)},n))});No.displayName="Card";var Ro=a.forwardRef(function(e,t){var r=e.className,n=Po(e,wo);return(0,rn.jsx)("div",Eo({ref:t,className:go("flex flex-col space-y-1.5 p-6",r)},n))});Ro.displayName="CardHeader";var Ao=a.forwardRef(function(e,t){var r=e.className,n=Po(e,_o);return(0,rn.jsx)("div",Eo({ref:t,className:go("font-semibold leading-none tracking-tight",r)},n))});Ao.displayName="CardTitle",a.forwardRef(function(e,t){var r=e.className,n=Po(e,ko);return(0,rn.jsx)("div",Eo({ref:t,className:go("text-sm text-muted-foreground",r)},n))}).displayName="CardDescription";var To=a.forwardRef(function(e,t){var r=e.className,n=Po(e,jo);return(0,rn.jsx)("div",Eo({ref:t,className:go("p-6 pt-0",r)},n))});function Do(e){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(e)}function Fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Io(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Do(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Do(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Do(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}To.displayName="CardContent",a.forwardRef(function(e,t){var r=e.className,n=Po(e,Oo);return(0,rn.jsx)("div",Eo({ref:t,className:go("flex items-center p-6 pt-0",r)},n))}).displayName="CardFooter";var Mo=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(r),!0).forEach(function(t){Io(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},window._versatileObject);const Lo=Mo;var $o=class extends Mr{constructor(e,t){super(),this.options=t,this.#l=e,this.#b=null,this.#x=Vr(),this.options.experimental_prefetchInRender||this.#x.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#l;#w=void 0;#_=void 0;#k=void 0;#j;#O;#x;#b;#S;#E;#C;#P;#N;#R;#A=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#w.addObserver(this),Vo(this.#w,this.options)?this.#T():this.updateResult(),this.#D())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zo(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zo(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#F(),this.#I(),this.#w.removeObserver(this)}setOptions(e){const t=this.options,r=this.#w;if(this.options=this.#l.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof gr(this.options.enabled,this.#w))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#M(),this.#w.setOptions(this.options),t._defaulted&&!Or(this.options,t)&&this.#l.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this});const n=this.hasListeners();n&&qo(this.#w,r,this.options,t)&&this.#T(),this.updateResult(),!n||this.#w===r&&gr(this.options.enabled,this.#w)===gr(t.enabled,this.#w)&&vr(this.options.staleTime,this.#w)===vr(t.staleTime,this.#w)||this.#L();const o=this.#$();!n||this.#w===r&&gr(this.options.enabled,this.#w)===gr(t.enabled,this.#w)&&o===this.#R||this.#V(o)}getOptimisticResult(e){const t=this.#l.getQueryCache().build(this.#l,e),r=this.createResult(t,e);return function(e,t){if(!Or(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(this.#k=r,this.#O=this.options,this.#j=this.#w.state),r}getCurrentResult(){return this.#k}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),Reflect.get(e,r))})}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#l.defaultQueryOptions(e),r=this.#l.getQueryCache().build(this.#l,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#T({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#k))}#T(e){this.#M();let t=this.#w.fetch(this.options,e);return e?.throwOnError||(t=t.catch(hr)),t}#L(){this.#F();const e=vr(this.options.staleTime,this.#w);if(pr||this.#k.isStale||!mr(e))return;const t=yr(this.#k.dataUpdatedAt,e)+1;this.#P=setTimeout(()=>{this.#k.isStale||this.updateResult()},t)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#w):this.options.refetchInterval)??!1}#V(e){this.#I(),this.#R=e,!pr&&!1!==gr(this.options.enabled,this.#w)&&mr(this.#R)&&0!==this.#R&&(this.#N=setInterval(()=>{(this.options.refetchIntervalInBackground||Lr.isFocused())&&this.#T()},this.#R))}#D(){this.#L(),this.#V(this.#$())}#F(){this.#P&&(clearTimeout(this.#P),this.#P=void 0)}#I(){this.#N&&(clearInterval(this.#N),this.#N=void 0)}createResult(e,t){const r=this.#w,n=this.options,o=this.#k,i=this.#j,a=this.#O,s=e!==r?e.state:this.#_,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&Vo(e,t),a=o&&qo(e,r,t,n);(i||a)&&(u={...u,...Kr(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:h}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===h){let e;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(e=o.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#C?.state.data,this.#C):t.placeholderData,void 0!==e&&(h="success",c=Pr(o?.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(o&&c===i?.data&&t.select===this.#S)c=this.#E;else try{this.#S=t.select,c=t.select(c),c=Pr(o?.data,c,t),this.#E=c,this.#b=null}catch(e){this.#b=e}this.#b&&(f=this.#b,c=this.#E,p=Date.now(),h="error");const y="fetching"===u.fetchStatus,v="pending"===h,g="error"===h,b=v&&y,x=void 0!==c,w={status:h,fetchStatus:u.fetchStatus,isPending:v,isSuccess:"success"===h,isError:g,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:g&&!x,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:g&&x,isStale:Uo(e,t),refetch:this.refetch,promise:this.#x,isEnabled:!1!==gr(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===w.status?e.reject(w.error):void 0!==w.data&&e.resolve(w.data)},n=()=>{const e=this.#x=w.promise=Vr();t(e)},o=this.#x;switch(o.status){case"pending":e.queryHash===r.queryHash&&t(o);break;case"fulfilled":"error"!==w.status&&w.data===o.value||n();break;case"rejected":"error"===w.status&&w.error===o.reason||n()}}return w}updateResult(){const e=this.#k,t=this.createResult(this.#w,this.options);if(this.#j=this.#w.state,this.#O=this.options,void 0!==this.#j.data&&(this.#C=this.#w),Or(t,e))return;this.#k=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#A.size)return!0;const n=new Set(r??this.#A);return this.options.throwOnError&&n.add("error"),Object.keys(this.#k).some(t=>{const r=t;return this.#k[r]!==e[r]&&n.has(r)})})()})}#M(){const e=this.#l.getQueryCache().build(this.#l,this.options);if(e===this.#w)return;const t=this.#w;this.#w=e,this.#_=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#D()}#z(e){Ir.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#k)}),this.#l.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function Vo(e,t){return function(e,t){return!1!==gr(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&zo(e,t,t.refetchOnMount)}function zo(e,t,r){if(!1!==gr(t.enabled,e)&&"static"!==vr(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&Uo(e,t)}return!1}function qo(e,t,r,n){return(e!==t||!1===gr(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&Uo(e,r)}function Uo(e,t){return!1!==gr(t.enabled,e)&&e.isStaleByTime(vr(t.staleTime,e))}function Zo(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wo=a.createContext(Zo()),Bo=a.createContext(!1),Qo=(Bo.Provider,(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}));function Ko(e,t,r){const n=a.useContext(Bo),o=a.useContext(Wo),i=on(r),s=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=n?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}})(s),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(s,o),(e=>{a.useEffect(()=>{e.clearReset()},[e])})(o);const l=!i.getQueryCache().get(s.queryHash),[c]=a.useState(()=>new t(i,s)),u=c.getOptimisticResult(s),d=!n&&!1!==e.subscribed;if(a.useSyncExternalStore(a.useCallback(e=>{const t=d?c.subscribe(Ir.batchCalls(e)):hr;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),a.useEffect(()=>{c.setOptions(s)},[s,c]),((e,t)=>e?.suspense&&t.isPending)(s,u))throw Qo(s,c,o);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&void 0===e.data||Dr(r,[e.error,n])))({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:i.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw u.error;if(i.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.experimental_prefetchInRender&&!pr&&((e,t)=>e.isLoading&&e.isFetching&&!t)(u,n)){const e=l?Qo(s,c,o):i.getQueryCache().get(s.queryHash)?.promise;e?.catch(hr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function Ho(e,t){return Ko(e,$o,t)}var Go=class extends Mr{#l;#k=void 0;#q;#U;constructor(e,t){super(),this.#l=e,this.setOptions(t),this.bindMethods(),this.#Z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#l.defaultMutationOptions(e),Or(this.options,t)||this.#l.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#q,observer:this}),t?.mutationKey&&this.options.mutationKey&&_r(t.mutationKey)!==_r(this.options.mutationKey)?this.reset():"pending"===this.#q?.state.status&&this.#q.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#q?.removeObserver(this)}onMutationUpdate(e){this.#Z(),this.#z(e)}getCurrentResult(){return this.#k}reset(){this.#q?.removeObserver(this),this.#q=void 0,this.#Z(),this.#z()}mutate(e,t){return this.#U=t,this.#q?.removeObserver(this),this.#q=this.#l.getMutationCache().build(this.#l,this.options),this.#q.addObserver(this),this.#q.execute(e)}#Z(){const e=this.#q?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#k={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){Ir.batch(()=>{if(this.#U&&this.hasListeners()){const t=this.#k.variables,r=this.#k.context;"success"===e?.type?(this.#U.onSuccess?.(e.data,t,r),this.#U.onSettled?.(e.data,null,t,r)):"error"===e?.type&&(this.#U.onError?.(e.error,t,r),this.#U.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#k)})})}};function Yo(e,t){const r=on(t),[n]=a.useState(()=>new Go(r,e));a.useEffect(()=>{n.setOptions(e)},[n,e]);const o=a.useSyncExternalStore(a.useCallback(e=>n.subscribe(Ir.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=a.useCallback((e,t)=>{n.mutate(e,t).catch(hr)},[n]);if(o.error&&Dr(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function Jo(e){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jo(e)}var Xo=function(e){return e instanceof File||e instanceof Blob},ei=function(e){return"string"==typeof e},ti=function(e){return"boolean"==typeof e},ri=function(e){return"number"==typeof e},ni=function(e){for(var t=new FormData,r=function(){var r=o[n],i=e[r];Array.isArray(i)?i.forEach(function(e,n){Xo(e)||ei(e)?t.append("".concat(r,"[").concat(n,"]"),e):ti(e)||ri(e)?t.append("".concat(r,"[").concat(n,"]"),e.toString()):"object"===Jo(e)&&null!==e?t.append("".concat(r,"[").concat(n,"]"),JSON.stringify(e)):t.append("".concat(r,"[").concat(n,"]"),e)}):Xo(i)||ei(i)?t.append(r,i):ti(i)?t.append(r,i.toString()):ri(i)?t.append(r,"".concat(i)):"object"===Jo(i)&&null!==i?t.append(r,JSON.stringify(i)):t.append(r,i)},n=0,o=Object.keys(e);n<o.length;n++)r();return t};function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}function ii(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return ai(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ai(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ai(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,ai(d,"constructor",c),ai(c,"constructor",l),l.displayName="GeneratorFunction",ai(c,o,"GeneratorFunction"),ai(d),ai(d,o,"Generator"),ai(d,n,function(){return this}),ai(d,"toString",function(){return"[object Generator]"}),(ii=function(){return{w:i,m:f}})()}function ai(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ai=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ai(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ai(e,t,r,n)}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function li(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?si(Object(r),!0).forEach(function(t){ci(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ci(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=oi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ui(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function di(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ui(i,n,o,a,s,"next",e)}function s(e){ui(i,n,o,a,s,"throw",e)}a(void 0)})}}function fi(e,t){return pi.apply(this,arguments)}function pi(){return pi=di(ii().m(function e(t,r){var n,o,i,a,s,l,c,u,d,f,p,h,m;return ii().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=Lo.wp_rest_nonce,i=Lo.nonce_key,a=Lo.nonce_value,s="".concat(t),l=(null===(n=r.method)||void 0===n?void 0:n.toUpperCase())||"POST",c=li({"X-WP-Nonce":o},r.headers||{}),u={method:l,headers:c},["GET","DELETE"].includes(l)?((d=new URLSearchParams(null==r?void 0:r.body)).append(i,a),s+="?".concat(d.toString())):r.body&&((f=ni(r.body)).append(i,a),u.body=f),e.p=1,e.n=2,fetch(s,u);case 2:return p=e.v,e.n=3,p.json();case 3:if(200!==(h=e.v).status_code){e.n=4;break}return e.a(2,h);case 4:throw new Error(h.message);case 5:e.n=7;break;case 6:throw e.p=6,m=e.v,new Error((null==m?void 0:m.message)||"fetch request error!!");case 7:return e.a(2)}},e,null,[[1,6]])})),pi.apply(this,arguments)}function hi(e,t){return mi.apply(this,arguments)}function mi(){return mi=di(ii().m(function e(t,r){var n,o,i,a,s,l,c,u,d;return ii().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=Lo.wp_rest_nonce,o=Lo.nonce_key,i=Lo.nonce_value,a="".concat(t),s={method:r.method||"POST",headers:li({"X-WP-Nonce":n},r.headers||{}),body:r.body},r.body&&((l=ni(r.body)).append(o,i),s.body=l),e.p=1,e.n=2,fetch(a,s);case 2:return c=e.v,e.n=3,c.json();case 3:if(200!==(u=e.v).status_code){e.n=4;break}return e.a(2,u);case 4:throw new Error(u.message);case 5:e.n=7;break;case 6:throw e.p=6,d=e.v,new Error((null==d?void 0:d.message)||"fetch request error!!");case 7:return e.a(2)}},e,null,[[1,6]])})),mi.apply(this,arguments)}function yi(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return vi(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(vi(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,vi(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,vi(d,"constructor",c),vi(c,"constructor",l),l.displayName="GeneratorFunction",vi(c,o,"GeneratorFunction"),vi(d),vi(d,o,"Generator"),vi(d,n,function(){return this}),vi(d,"toString",function(){return"[object Generator]"}),(yi=function(){return{w:i,m:f}})()}function vi(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}vi=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){vi(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},vi(e,t,r,n)}function gi(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function bi(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){gi(i,n,o,a,s,"next",e)}function s(e){gi(i,n,o,a,s,"throw",e)}a(void 0)})}}var xi=function(){return Ho({queryKey:["getMoodInfo"],queryFn:(e=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_mood_info",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3});var e},wi=function(){return Ho({queryKey:["getEnableServiceList"],queryFn:(e=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_enable_service_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3});var e};function _i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ki(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ki(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const ji=function(){var e=wi(),t=e.data,r=e.isLoading,n=null==t?void 0:t.data;return(0,rn.jsx)(rn.Fragment,{children:(0,rn.jsx)("div",{className:"mt-10 flex flex-wrap gap-3",children:r?(0,rn.jsx)("span",{className:"text-xl",children:(0,sn.__)("Loading","versatile-toolkit")}):Object.entries(n).filter(function(e){var t=_i(e,2);t[0];return t[1].enable}).map(function(e){var t=_i(e,2),r=t[0],n=t[1];return(0,rn.jsx)(No,{className:"w-[300px] hover:bg-gray-100",children:(0,rn.jsxs)(lt,{to:"/".concat(n.path),className:"block p-3",children:[(0,rn.jsx)(Ro,{className:"p-0",children:(0,rn.jsx)(Ao,{className:"text-xl",children:n.label})}),(0,rn.jsx)(To,{className:"p-0 pt-2",children:(0,rn.jsx)("p",{children:n.description})})]})},r)})})})};function Oi(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Si(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Oi(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Oi(e[t],null)}}}}function Ei(...e){return a.useCallback(Si(...e),e)}function Ci(e){const t=Ni(e),r=a.forwardRef((e,r)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(Ai);if(s){const e=s.props.children,n=i.map(t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return(0,rn.jsx)(t,{...o,ref:r,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,rn.jsx)(t,{...o,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var Pi=Ci("Slot");function Ni(e){const t=a.forwardRef((e,t)=>{const{children:r,...n}=e;if(a.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(o.ref=t?Si(t,e):e),a.cloneElement(r,o)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ri=Symbol("radix.slottable");function Ai(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ri}const Ti=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Di=cn,Fi=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Di(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=Ti(t)||Ti(n);return o[e][a]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):{...i,...s}[t]===r})?[...e,r,n]:e},[]);return Di(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)};function Ii(e){return Ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(e)}var Mi=["className","variant","size","asChild"];function Li(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function $i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Ii(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ii(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ii(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Vi=Fi("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"}}),zi=a.forwardRef(function(e,t){var r=e.className,n=e.variant,o=e.size,i=e.asChild,a=void 0!==i&&i,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Mi),l=a?Pi:"button";return(0,rn.jsx)(l,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Li(Object(r),!0).forEach(function(t){$i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Li(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:go(Vi({variant:n,size:o,className:r})),ref:t},s))});zi.displayName="Button";const qi=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");var Ui={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"};const Zi=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...l},c)=>(0,a.createElement)("svg",{ref:c,...Ui,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:qi("lucide",o),...l},[...s.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(i)?i:[i]])),Wi=(e,t)=>{const r=(0,a.forwardRef)(({className:r,...n},o)=>{return(0,a.createElement)(Zi,{ref:o,iconNode:t,className:qi(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var i});return r.displayName=`${e}`,r},Bi=Wi("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Qi=Wi("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ki=Wi("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function Hi(e){return Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi(e)}var Gi=["className","variant"];function Yi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ji(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Hi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xi=Fi("inline-flex items-center rounded-full 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:"bg-primary text-primary-foreground hover:bg-primary/80",success:"bg-green-100 text-green-800 hover:bg-green-200/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input bg-background hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ea(e){var t=e.className,r=e.variant,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Gi);return(0,rn.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yi(Object(r),!0).forEach(function(t){Ji(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yi(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:go(Xi({variant:r}),t)},n))}var ta=.999,ra=/[\\\/_+.#"@\[\(\{&]/,na=/[\\\/_+.#"@\[\(\{&]/g,oa=/[\s-]/,ia=/[\s-]/g;function aa(e,t,r,n,o,i,a){if(i===t.length)return o===e.length?1:.99;var s=`${o},${i}`;if(void 0!==a[s])return a[s];for(var l,c,u,d,f=n.charAt(i),p=r.indexOf(f,o),h=0;p>=0;)(l=aa(e,t,r,n,p+1,i+1,a))>h&&(p===o?l*=1:ra.test(e.charAt(p-1))?(l*=.8,(u=e.slice(o,p-1).match(na))&&o>0&&(l*=Math.pow(ta,u.length))):oa.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(ia))&&o>0&&(l*=Math.pow(ta,d.length))):(l*=.17,o>0&&(l*=Math.pow(ta,p-o))),e.charAt(p)!==t.charAt(i)&&(l*=.9999)),(l<.1&&r.charAt(p-1)===n.charAt(i+1)||n.charAt(i+1)===n.charAt(i)&&r.charAt(p-1)!==n.charAt(i))&&(.1*(c=aa(e,t,r,n,p+1,i+2,a))>l&&(l=.1*c)),l>h&&(h=l),p=r.indexOf(f,p+1);return a[s]=h,h}function sa(e){return e.toLowerCase().replace(ia," ")}function la(e,t,r){return aa(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,sa(e),sa(t),0,0,{})}function ca(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function ua(e,t=[]){let r=[];const n=()=>{const t=r.map(e=>a.createContext(e));return function(r){const n=r?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){const o=a.createContext(n),i=r.length;r=[...r,n];const s=t=>{const{scope:r,children:n,...s}=t,l=r?.[e]?.[i]||o,c=a.useMemo(()=>s,Object.values(s));return(0,rn.jsx)(l.Provider,{value:c,children:n})};return s.displayName=t+"Provider",[s,function(r,s){const l=s?.[e]?.[i]||o,c=a.useContext(l);if(c)return c;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},da(n,...t)]}function da(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}var fa=globalThis?.document?a.useLayoutEffect:()=>{},pa=s[" useId ".trim().toString()]||(()=>{}),ha=0;function ma(e){const[t,r]=a.useState(pa());return fa(()=>{e||r(e=>e??String(ha++))},[e]),e||(t?`radix-${t}`:"")}var ya=s[" useInsertionEffect ".trim().toString()]||fa;function va({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=function({defaultProp:e,onChange:t}){const[r,n]=a.useState(e),o=a.useRef(r),i=a.useRef(t);return ya(()=>{i.current=t},[t]),a.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:o;{const t=a.useRef(void 0!==e);a.useEffect(()=>{const e=t.current;if(e!==l){}t.current=l},[l,n])}const u=a.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else i(t)},[l,e,i,s]);return[c,u]}Symbol("RADIX:SYNC_STATE");var ga=o(206),ba=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Ci(`Primitive.${t}`),n=a.forwardRef((e,n)=>{const{asChild:o,...i}=e,a=o?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,rn.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function xa(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...e)=>t.current?.(...e),[])}var wa,_a="dismissableLayer.update",ka="dismissableLayer.pointerDownOutside",ja="dismissableLayer.focusOutside",Oa=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sa=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=a.useContext(Oa),[d,f]=a.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=a.useState({}),m=Ei(t,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(v),b=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=g,_=function(e,t=globalThis?.document){const r=xa(e),n=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){Pa(ka,r,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));w&&!r&&(o?.(e),s?.(e),e.defaultPrevented||l?.())},p),k=function(e,t=globalThis?.document){const r=xa(e),n=a.useRef(!1);return a.useEffect(()=>{const e=e=>{if(e.target&&!n.current){Pa(ja,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},p);return function(e,t=globalThis?.document){const r=xa(e);a.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{b===u.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),a.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(wa=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ca(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=wa)}},[d,p,r,u]),a.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ca())},[d,u]),a.useEffect(()=>{const e=()=>h({});return document.addEventListener(_a,e),()=>document.removeEventListener(_a,e)},[]),(0,rn.jsx)(ba.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:ca(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ca(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ca(e.onPointerDownCapture,_.onPointerDownCapture)})});Sa.displayName="DismissableLayer";var Ea=a.forwardRef((e,t)=>{const r=a.useContext(Oa),n=a.useRef(null),o=Ei(t,n);return a.useEffect(()=>{const e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,rn.jsx)(ba.div,{...e,ref:o})});function Ca(){const e=new CustomEvent(_a);document.dispatchEvent(e)}function Pa(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&ga.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}Ea.displayName="DismissableLayerBranch";var Na="focusScope.autoFocusOnMount",Ra="focusScope.autoFocusOnUnmount",Aa={bubbles:!1,cancelable:!0},Ta=a.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=a.useState(null),u=xa(o),d=xa(i),f=a.useRef(null),p=Ei(t,e=>c(e)),h=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(n){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Ma(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ma(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ma(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,l,h.paused]),a.useEffect(()=>{if(l){La.add(h);const t=document.activeElement;if(!l.contains(t)){const r=new CustomEvent(Na,Aa);l.addEventListener(Na,u),l.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ma(n,{select:t}),document.activeElement!==r)return}((e=Da(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Ma(l))}return()=>{l.removeEventListener(Na,u),setTimeout(()=>{const e=new CustomEvent(Ra,Aa);l.addEventListener(Ra,d),l.dispatchEvent(e),e.defaultPrevented||Ma(t??document.body,{select:!0}),l.removeEventListener(Ra,d),La.remove(h)},0)}}var e},[l,u,d,h]);const m=a.useCallback(e=>{if(!r&&!n)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[n,i]=function(e){const t=Da(e),r=Fa(t,e),n=Fa(t.reverse(),e);return[r,n]}(t);n&&i?e.shiftKey||o!==i?e.shiftKey&&o===n&&(e.preventDefault(),r&&Ma(i,{select:!0})):(e.preventDefault(),r&&Ma(n,{select:!0})):o===t&&e.preventDefault()}},[r,n,h.paused]);return(0,rn.jsx)(ba.div,{tabIndex:-1,...s,ref:p,onKeyDown:m})});function Da(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Fa(e,t){for(const r of e)if(!Ia(r,{upTo:t}))return r}function Ia(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Ma(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Ta.displayName="FocusScope";var La=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=$a(e,t),e.unshift(t)},remove(t){e=$a(e,t),e[0]?.resume()}}}();function $a(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Va=a.forwardRef((e,t)=>{const{container:r,...n}=e,[o,i]=a.useState(!1);fa(()=>i(!0),[]);const s=r||o&&globalThis?.document?.body;return s?ga.createPortal((0,rn.jsx)(ba.div,{...n,ref:t}),s):null});Va.displayName="Portal";var za=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=a.useState(),n=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return a.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const e=qa(n.current);i.current="mounted"===l?e:"none"},[l]),fa(()=>{const t=n.current,r=o.current;if(r!==e){const n=i.current,a=qa(t);if(e)c("MOUNT");else if("none"===a||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,c]),fa(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,a=i=>{const a=qa(n.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(i.current=qa(n.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),o="function"==typeof r?r({present:n.isPresent}):a.Children.only(r),i=Ei(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof r||n.isPresent?a.cloneElement(o,{ref:i}):null};function qa(e){return e?.animationName||"none"}za.displayName="Presence";var Ua=0;function Za(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wa()),document.body.insertAdjacentElement("beforeend",e[1]??Wa()),Ua++,()=>{1===Ua&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ua--}},[])}function Wa(){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 Ba=function(){return Ba=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ba.apply(this,arguments)};function Qa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}Object.create;function Ka(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ha="right-scroll-bar-position",Ga="width-before-scroll-bar";function Ya(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ja="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Xa=new WeakMap;function es(e,t){var r,n,o,i=(r=t||null,n=function(t){return e.forEach(function(e){return Ya(e,t)})},(o=(0,a.useState)(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=n,o.facade);return Ja(function(){var t=Xa.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||Ya(e,null)}),n.forEach(function(e){r.has(e)||Ya(e,o)})}Xa.set(i,e)},[e]),i}function ts(e){return e}function rs(e,t){void 0===t&&(t=ts);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}};return o}var ns=function(e){void 0===e&&(e={});var t=rs(null);return t.options=Ba({async:!0,ssr:!1},e),t}(),os=function(){},is=a.forwardRef(function(e,t){var r=a.useRef(null),n=a.useState({onScrollCapture:os,onWheelCapture:os,onTouchMoveCapture:os}),o=n[0],i=n[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,m=e.noIsolation,y=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,x=e.gapMode,w=Qa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,k=es([r,t]),j=Ba(Ba({},w),o);return a.createElement(a.Fragment,null,d&&a.createElement(_,{sideCar:ns,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:x}),s?a.cloneElement(a.Children.only(l),Ba(Ba({},j),{ref:k})):a.createElement(b,Ba({},j,{className:c,ref:k}),l))});is.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},is.classNames={fullWidth:Ga,zeroRight:Ha};var as,ss=function(e){var t=e.sideCar,r=Qa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return a.createElement(n,Ba({},r))};ss.isSideCarExport=!0;function ls(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=as||o.nc;return t&&e.setAttribute("nonce",t),e}var cs=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=ls())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},us=function(){var e,t=(e=cs(),function(t,r){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},ds={left:0,top:0,right:0,gap:0},fs=function(e){return parseInt(e||"",10)||0},ps=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ds;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[fs(r),fs(n),fs(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},hs=us(),ms="data-scroll-locked",ys=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(ms,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ha," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Ga," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Ha," .").concat(Ha," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Ga," .").concat(Ga," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ms,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},vs=function(){var e=parseInt(document.body.getAttribute(ms)||"0",10);return isFinite(e)?e:0},gs=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n;a.useEffect(function(){return document.body.setAttribute(ms,(vs()+1).toString()),function(){var e=vs()-1;e<=0?document.body.removeAttribute(ms):document.body.setAttribute(ms,e.toString())}},[]);var i=a.useMemo(function(){return ps(o)},[o]);return a.createElement(hs,{styles:ys(i,!t,o,r?"":"!important")})},bs=!1;if("undefined"!=typeof window)try{var xs=Object.defineProperty({},"passive",{get:function(){return bs=!0,!0}});window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch(e){bs=!1}var ws=!!bs&&{passive:!1},_s=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},ks=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),js(e,n)){var o=Os(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},js=function(e,t){return"v"===e?function(e){return _s(e,"overflowY")}(t):function(e){return _s(e,"overflowX")}(t)},Os=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Ss=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Es=function(e){return[e.deltaX,e.deltaY]},Cs=function(e){return e&&"current"in e?e.current:e},Ps=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ns=0,Rs=[];function As(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ts=(Ds=function(e){var t=a.useRef([]),r=a.useRef([0,0]),n=a.useRef(),o=a.useState(Ns++)[0],i=a.useState(us)[0],s=a.useRef(e);a.useEffect(function(){s.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Ka([e.lockRef.current],(e.shards||[]).map(Cs),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=Ss(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=ks(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=ks(d,u)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=o),!o)return!0;var p=n.current||o;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{if(!s)break;var p=Os(e,s),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&js(e,s)&&(d+=m,f+=h);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&a>d)||!u&&(o&&Math.abs(f)<1||!o&&-a>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)},[]),c=a.useCallback(function(e){var r=e;if(Rs.length&&Rs[Rs.length-1]===i){var n="deltaY"in r?Es(r):Ss(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var a=(s.current.shards||[]).map(Cs).filter(Boolean).filter(function(e){return e.contains(r.target)});(a.length>0?l(r,a[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),u=a.useCallback(function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:As(n)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=a.useCallback(function(e){r.current=Ss(e),n.current=void 0},[]),f=a.useCallback(function(t){u(t.type,Es(t),t.target,l(t,e.lockRef.current))},[]),p=a.useCallback(function(t){u(t.type,Ss(t),t.target,l(t,e.lockRef.current))},[]);a.useEffect(function(){return Rs.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,ws),document.addEventListener("touchmove",c,ws),document.addEventListener("touchstart",d,ws),function(){Rs=Rs.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,ws),document.removeEventListener("touchmove",c,ws),document.removeEventListener("touchstart",d,ws)}},[]);var h=e.removeScrollBar,m=e.inert;return a.createElement(a.Fragment,null,m?a.createElement(i,{styles:Ps(o)}):null,h?a.createElement(gs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},ns.useMedium(Ds),ss);var Ds,Fs=a.forwardRef(function(e,t){return a.createElement(is,Ba({},e,{ref:t,sideCar:Ts}))});Fs.classNames=is.classNames;const Is=Fs;var Ms=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ls=new WeakMap,$s=new WeakMap,Vs={},zs=0,qs=function(e){return e&&(e.host||qs(e.parentNode))},Us=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=qs(t);return r&&e.contains(r)?r:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Vs[r]||(Vs[r]=new WeakMap);var i=Vs[r],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(Ls.get(e)||0)+1,c=(i.get(e)||0)+1;Ls.set(e,l),i.set(e,c),a.push(e),1===l&&o&&$s.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(e){}})};return u(t),s.clear(),zs++,function(){a.forEach(function(e){var t=Ls.get(e)-1,o=i.get(e)-1;Ls.set(e,t),i.set(e,o),t||($s.has(e)||e.removeAttribute(n),$s.delete(e)),o||e.removeAttribute(r)}),--zs||(Ls=new WeakMap,Ls=new WeakMap,$s=new WeakMap,Vs={})}},Zs=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||Ms(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Us(n,o,r,"aria-hidden")):function(){return null}},Ws="Dialog",[Bs,Qs]=ua(Ws),[Ks,Hs]=Bs(Ws),Gs=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=a.useRef(null),c=a.useRef(null),[u,d]=va({prop:n,defaultProp:o??!1,onChange:i,caller:Ws});return(0,rn.jsx)(Ks,{scope:t,triggerRef:l,contentRef:c,contentId:ma(),titleId:ma(),descriptionId:ma(),open:u,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};Gs.displayName=Ws;var Ys="DialogTrigger",Js=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Hs(Ys,r),i=Ei(t,o.triggerRef);return(0,rn.jsx)(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gl(o.open),...n,ref:i,onClick:ca(e.onClick,o.onOpenToggle)})});Js.displayName=Ys;var Xs="DialogPortal",[el,tl]=Bs(Xs,{forceMount:void 0}),rl=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=Hs(Xs,t);return(0,rn.jsx)(el,{scope:t,forceMount:r,children:a.Children.map(n,e=>(0,rn.jsx)(za,{present:r||i.open,children:(0,rn.jsx)(Va,{asChild:!0,container:o,children:e})}))})};rl.displayName=Xs;var nl="DialogOverlay",ol=a.forwardRef((e,t)=>{const r=tl(nl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Hs(nl,e.__scopeDialog);return i.modal?(0,rn.jsx)(za,{present:n||i.open,children:(0,rn.jsx)(al,{...o,ref:t})}):null});ol.displayName=nl;var il=Ci("DialogOverlay.RemoveScroll"),al=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Hs(nl,r);return(0,rn.jsx)(Is,{as:il,allowPinchZoom:!0,shards:[o.contentRef],children:(0,rn.jsx)(ba.div,{"data-state":gl(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),sl="DialogContent",ll=a.forwardRef((e,t)=>{const r=tl(sl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Hs(sl,e.__scopeDialog);return(0,rn.jsx)(za,{present:n||i.open,children:i.modal?(0,rn.jsx)(cl,{...o,ref:t}):(0,rn.jsx)(ul,{...o,ref:t})})});ll.displayName=sl;var cl=a.forwardRef((e,t)=>{const r=Hs(sl,e.__scopeDialog),n=a.useRef(null),o=Ei(t,r.contentRef,n);return a.useEffect(()=>{const e=n.current;if(e)return Zs(e)},[]),(0,rn.jsx)(dl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:ca(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:ca(e.onFocusOutside,e=>e.preventDefault())})}),ul=a.forwardRef((e,t)=>{const r=Hs(sl,e.__scopeDialog),n=a.useRef(!1),o=a.useRef(!1);return(0,rn.jsx)(dl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=r.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),dl=a.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=Hs(sl,r),c=a.useRef(null),u=Ei(t,c);return Za(),(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(Ta,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,rn.jsx)(Sa,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":gl(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(_l,{titleId:l.titleId}),(0,rn.jsx)(kl,{contentRef:c,descriptionId:l.descriptionId})]})]})}),fl="DialogTitle",pl=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Hs(fl,r);return(0,rn.jsx)(ba.h2,{id:o.titleId,...n,ref:t})});pl.displayName=fl;var hl="DialogDescription",ml=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Hs(hl,r);return(0,rn.jsx)(ba.p,{id:o.descriptionId,...n,ref:t})});ml.displayName=hl;var yl="DialogClose",vl=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Hs(yl,r);return(0,rn.jsx)(ba.button,{type:"button",...n,ref:t,onClick:ca(e.onClick,()=>o.onOpenChange(!1))})});function gl(e){return e?"open":"closed"}vl.displayName=yl;var bl="DialogTitleWarning",[xl,wl]=function(e,t){const r=a.createContext(t),n=e=>{const{children:t,...n}=e,o=a.useMemo(()=>n,Object.values(n));return(0,rn.jsx)(r.Provider,{value:o,children:t})};return n.displayName=e+"Provider",[n,function(n){const o=a.useContext(r);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}]}(bl,{contentName:sl,titleName:fl,docsSlug:"dialog"}),_l=({titleId:e})=>{const t=wl(bl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{if(e){document.getElementById(e)}},[r,e]),null},kl=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wl("DialogDescriptionWarning").contentName}}.`;return a.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)}},[r,e,t]),null},jl=Gs,Ol=rl,Sl=ol,El=ll,Cl=pl,Pl=ml,Nl=vl,Rl='[cmdk-group=""]',Al='[cmdk-group-items=""]',Tl='[cmdk-item=""]',Dl=`${Tl}:not([aria-disabled="true"])`,Fl="cmdk-item-select",Il="data-value",Ml=(e,t,r)=>la(e,t,r),Ll=a.createContext(void 0),$l=()=>a.useContext(Ll),Vl=a.createContext(void 0),zl=()=>a.useContext(Vl),ql=a.createContext(void 0),Ul=a.forwardRef((e,t)=>{let r=nc(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=nc(()=>new Set),o=nc(()=>new Map),i=nc(()=>new Map),s=nc(()=>new Set),l=tc(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:h,loop:m,disablePointerSelection:y=!1,vimBindings:v=!0,...g}=e,b=ma(),x=ma(),w=ma(),_=a.useRef(null),k=ac();rc(()=>{if(void 0!==d){let e=d.trim();r.current.value=e,j.emit()}},[d]),rc(()=>{k(6,N)},[]);let j=a.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,i,a,s;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)P(),E(),k(1,C);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(b))||o.focus()}if(k(7,()=>{var e;r.current.selectedItemId=null==(e=R())?void 0:e.id,j.emit()}),n||k(5,N),void 0!==(null==(i=l.current)?void 0:i.value)){let e=null!=t?t:"";return void(null==(s=(a=l.current).onValueChange)||s.call(a,e))}}j.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),O=a.useMemo(()=>({value:(e,t,n)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,S(t,n)),k(2,()=>{E(),j.emit()}))},item:(e,t)=>(n.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),k(3,()=>{P(),E(),r.current.value||C(),j.emit()}),()=>{i.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=R();k(4,()=>{P(),(null==t?void 0:t.getAttribute("id"))===e&&C(),j.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{i.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:x,listInnerRef:_}),[]);function S(e,t){var n,o;let i=null!=(o=null==(n=l.current)?void 0:n.filter)?o:Ml;return e?i(e,r.current.search,t):0}function E(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=o.current.get(r),i=0;n.forEach(t=>{let r=e.get(t);i=Math.max(r,i)}),t.push([r,i])});let n=_.current;A().sort((t,r)=>{var n,o;let i=t.getAttribute("id"),a=r.getAttribute("id");return(null!=(n=e.get(a))?n:0)-(null!=(o=e.get(i))?o:0)}).forEach(e=>{let t=e.closest(Al);t?t.appendChild(e.parentElement===t?e:e.closest(`${Al} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${Al} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=_.current)?void 0:t.querySelector(`${Rl}[${Il}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function C(){let e=A().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(Il);j.setState("value",t||void 0)}function P(){var e,t,a,s;if(!r.current.search||!1===l.current.shouldFilter)return void(r.current.filtered.count=n.current.size);r.current.filtered.groups=new Set;let c=0;for(let o of n.current){let n=S(null!=(t=null==(e=i.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(a=i.current.get(o))?void 0:a.keywords)?s:[]);r.current.filtered.items.set(o,n),n>0&&c++}for(let[e,t]of o.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function N(){var e,t,r;let n=R();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Rl))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=_.current)?void 0:e.querySelector(`${Tl}[aria-selected="true"]`)}function A(){var e;return Array.from((null==(e=_.current)?void 0:e.querySelectorAll(Dl))||[])}function T(e){let t=A()[e];t&&j.setState("value",t.getAttribute(Il))}function D(e){var t;let r=R(),n=A(),o=n.findIndex(e=>e===r),i=n[o+e];null!=(t=l.current)&&t.loop&&(i=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),i&&j.setState("value",i.getAttribute(Il))}function F(e){let t,r=R(),n=null==r?void 0:r.closest(Rl);for(;n&&!t;)n=e>0?Xl(n,Rl):ec(n,Rl),t=null==n?void 0:n.querySelector(Dl);t?j.setState("value",t.getAttribute(Il)):D(e)}let I=()=>T(A().length-1),M=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):D(1)},L=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?F(-1):D(-1)};return a.createElement(ba.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=g.onKeyDown)||t.call(g,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!r)switch(e.key){case"n":case"j":v&&e.ctrlKey&&M(e);break;case"ArrowDown":M(e);break;case"p":case"k":v&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),I();break;case"Enter":{e.preventDefault();let t=R();if(t){let e=new Event(Fl);t.dispatchEvent(e)}}}}},a.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:lc},c),sc(e,e=>a.createElement(Vl.Provider,{value:j},a.createElement(Ll.Provider,{value:O},e))))}),Zl=a.forwardRef((e,t)=>{var r,n;let o=ma(),i=a.useRef(null),s=a.useContext(ql),l=$l(),c=tc(e),u=null!=(n=null==(r=c.current)?void 0:r.forceMount)?n:null==s?void 0:s.forceMount;rc(()=>{if(!u)return l.item(o,null==s?void 0:s.id)},[u]);let d=ic(o,i,[e.value,e.children,i],e.keywords),f=zl(),p=oc(e=>e.value&&e.value===d.current),h=oc(e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0));function m(){var e,t;y(),null==(t=(e=c.current).onSelect)||t.call(e,d.current)}function y(){f.setState("value",d.current,!0)}if(a.useEffect(()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(Fl,m),()=>t.removeEventListener(Fl,m)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:v,value:g,onSelect:b,forceMount:x,keywords:w,..._}=e;return a.createElement(ba.div,{ref:Si(i,t),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||l.getDisablePointerSelection()?void 0:y,onClick:v?void 0:m},e.children)}),Wl=a.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...i}=e,s=ma(),l=a.useRef(null),c=a.useRef(null),u=ma(),d=$l(),f=oc(e=>!(!o&&!1!==d.filter())||(!e.search||e.filtered.groups.has(s)));rc(()=>d.group(s),[]),ic(s,l,[e.value,e.heading,c]);let p=a.useMemo(()=>({id:s,forceMount:o}),[o]);return a.createElement(ba.div,{ref:Si(l,t),...i,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&a.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),sc(e,e=>a.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},a.createElement(ql.Provider,{value:p},e))))}),Bl=a.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=a.useRef(null),i=oc(e=>!e.search);return r||i?a.createElement(ba.div,{ref:Si(o,t),...n,"cmdk-separator":"",role:"separator"}):null}),Ql=a.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=null!=e.value,i=zl(),s=oc(e=>e.search),l=oc(e=>e.selectedItemId),c=$l();return a.useEffect(()=>{null!=e.value&&i.setState("search",e.value)},[e.value]),a.createElement(ba.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:s,onChange:e=>{o||i.setState("search",e.target.value),null==r||r(e.target.value)}})}),Kl=a.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,i=a.useRef(null),s=a.useRef(null),l=oc(e=>e.selectedItemId),c=$l();return a.useEffect(()=>{if(s.current&&i.current){let e,t=s.current,r=i.current,n=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}},[]),a.createElement(ba.div,{ref:Si(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:c.listId},sc(e,e=>a.createElement("div",{ref:Si(s,c.listInnerRef),"cmdk-list-sizer":""},e)))}),Hl=a.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:i,container:s,...l}=e;return a.createElement(jl,{open:r,onOpenChange:n},a.createElement(Ol,{container:s},a.createElement(Sl,{"cmdk-overlay":"",className:o}),a.createElement(El,{"aria-label":e.label,"cmdk-dialog":"",className:i},a.createElement(Ul,{ref:t,...l}))))}),Gl=a.forwardRef((e,t)=>oc(e=>0===e.filtered.count)?a.createElement(ba.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Yl=a.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...i}=e;return a.createElement(ba.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},sc(e,e=>a.createElement("div",{"aria-hidden":!0},e)))}),Jl=Object.assign(Ul,{List:Kl,Item:Zl,Input:Ql,Group:Wl,Separator:Bl,Dialog:Hl,Empty:Gl,Loading:Yl});function Xl(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function ec(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function tc(e){let t=a.useRef(e);return rc(()=>{t.current=e}),t}var rc="undefined"==typeof window?a.useEffect:a.useLayoutEffect;function nc(e){let t=a.useRef();return void 0===t.current&&(t.current=e()),t}function oc(e){let t=zl(),r=()=>e(t.snapshot());return a.useSyncExternalStore(t.subscribe,r,r)}function ic(e,t,r,n=[]){let o=a.useRef(),i=$l();return rc(()=>{var a;let s=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),l=n.map(e=>e.trim());i.value(e,s,l),null==(a=t.current)||a.setAttribute(Il,s),o.current=s}),o}var ac=()=>{let[e,t]=a.useState(),r=nc(()=>new Map);return rc(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function sc({asChild:e,children:t},r){return e&&a.isValidElement(t)?a.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},r(t.props.children)):r(t)}var lc={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const cc=Wi("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function uc(e){return uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uc(e)}var dc=["className"],fc=["className","children"],pc=["className"],hc=["className"];function mc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mc(Object(r),!0).forEach(function(t){vc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function vc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=uc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var bc=Ol,xc=a.forwardRef(function(e,t){var r=e.className,n=gc(e,dc);return(0,rn.jsx)(Sl,yc({ref:t,className:go("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",r)},n))});xc.displayName=Sl.displayName,a.forwardRef(function(e,t){var r=e.className,n=e.children,o=gc(e,fc);return(0,rn.jsxs)(bc,{children:[(0,rn.jsx)(xc,{}),(0,rn.jsxs)(El,yc(yc({ref:t,className:go("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",r)},o),{},{children:[n,(0,rn.jsxs)(Nl,{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:[(0,rn.jsx)(Bi,{className:"h-4 w-4"}),(0,rn.jsx)("span",{className:"sr-only",children:(0,sn.__)("Close","trigger")})]})]}))]})}).displayName=El.displayName;function wc(e){return wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wc(e)}a.forwardRef(function(e,t){var r=e.className,n=gc(e,pc);return(0,rn.jsx)(Cl,yc({ref:t,className:go("text-lg font-semibold leading-none tracking-tight",r)},n))}).displayName=Cl.displayName,a.forwardRef(function(e,t){var r=e.className,n=gc(e,hc);return(0,rn.jsx)(Pl,yc({ref:t,className:go("text-sm text-muted-foreground",r)},n))}).displayName=Pl.displayName;var _c=["className"],kc=["className"],jc=["className"],Oc=["className"],Sc=["className"],Ec=["className"];function Cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cc(Object(r),!0).forEach(function(t){Nc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Nc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=wc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=wc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rc(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ac=a.forwardRef(function(e,t){var r=e.className,n=Rc(e,_c);return(0,rn.jsx)(Jl,Pc({ref:t,className:go("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},n))});Ac.displayName=Jl.displayName;var Tc=a.forwardRef(function(e,t){var r=e.className,n=Rc(e,kc);return(0,rn.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,rn.jsx)(cc,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,rn.jsx)(Jl.Input,Pc({ref:t,className:go("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",r)},n))]})});Tc.displayName=Jl.Input.displayName;var Dc=a.forwardRef(function(e,t){var r=e.className,n=Rc(e,jc);return(0,rn.jsx)(Jl.List,Pc({ref:t,className:go("max-h-[300px] overflow-y-auto overflow-x-hidden",r)},n))});Dc.displayName=Jl.List.displayName;var Fc=a.forwardRef(function(e,t){return(0,rn.jsx)(Jl.Empty,Pc({ref:t,className:"py-6 text-center text-sm"},e))});Fc.displayName=Jl.Empty.displayName;var Ic=a.forwardRef(function(e,t){var r=e.className,n=Rc(e,Oc);return(0,rn.jsx)(Jl.Group,Pc({ref:t,className:go("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",r)},n))});Ic.displayName=Jl.Group.displayName,a.forwardRef(function(e,t){var r=e.className,n=Rc(e,Sc);return(0,rn.jsx)(Jl.Separator,Pc({ref:t,className:go("-mx-1 h-px bg-border",r)},n))}).displayName=Jl.Separator.displayName;var Mc=a.forwardRef(function(e,t){var r=e.className,n=Rc(e,Ec);return(0,rn.jsx)(Jl.Item,Pc({ref:t,className:go("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r)},n))});Mc.displayName=Jl.Item.displayName;const Lc=["top","right","bottom","left"],$c=Math.min,Vc=Math.max,zc=Math.round,qc=Math.floor,Uc=e=>({x:e,y:e}),Zc={left:"right",right:"left",bottom:"top",top:"bottom"},Wc={start:"end",end:"start"};function Bc(e,t,r){return Vc(e,$c(t,r))}function Qc(e,t){return"function"==typeof e?e(t):e}function Kc(e){return e.split("-")[0]}function Hc(e){return e.split("-")[1]}function Gc(e){return"x"===e?"y":"x"}function Yc(e){return"y"===e?"height":"width"}const Jc=new Set(["top","bottom"]);function Xc(e){return Jc.has(Kc(e))?"y":"x"}function eu(e){return Gc(Xc(e))}function tu(e){return e.replace(/start|end/g,e=>Wc[e])}const ru=["left","right"],nu=["right","left"],ou=["top","bottom"],iu=["bottom","top"];function au(e,t,r,n){const o=Hc(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?nu:ru:t?ru:nu;case"left":case"right":return t?ou:iu;default:return[]}}(Kc(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(tu)))),i}function su(e){return e.replace(/left|right|bottom|top/g,e=>Zc[e])}function lu(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function cu(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function uu(e,t,r){let{reference:n,floating:o}=e;const i=Xc(t),a=eu(t),s=Yc(a),l=Kc(t),c="y"===i,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Hc(t)){case"start":p[a]-=f*(r&&c?-1:1);break;case"end":p[a]+=f*(r&&c?-1:1)}return p}async function du(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qc(t,e),h=lu(p),m=s[f?"floating"===d?"reference":"floating":d],y=cu(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(m)))||r?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},x=cu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function fu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pu(e){return Lc.some(t=>e[t]>=0)}const hu=new Set(["left","top"]);function mu(){return"undefined"!=typeof window}function yu(e){return bu(e)?(e.nodeName||"").toLowerCase():"#document"}function vu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gu(e){var t;return null==(t=(bu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function bu(e){return!!mu()&&(e instanceof Node||e instanceof vu(e).Node)}function xu(e){return!!mu()&&(e instanceof Element||e instanceof vu(e).Element)}function wu(e){return!!mu()&&(e instanceof HTMLElement||e instanceof vu(e).HTMLElement)}function _u(e){return!(!mu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vu(e).ShadowRoot)}const ku=new Set(["inline","contents"]);function ju(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Iu(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ku.has(o)}const Ou=new Set(["table","td","th"]);function Su(e){return Ou.has(yu(e))}const Eu=[":popover-open",":modal"];function Cu(e){return Eu.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Pu=["transform","translate","scale","rotate","perspective"],Nu=["transform","translate","scale","rotate","perspective","filter"],Ru=["paint","layout","strict","content"];function Au(e){const t=Tu(),r=xu(e)?Iu(e):e;return Pu.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Nu.some(e=>(r.willChange||"").includes(e))||Ru.some(e=>(r.contain||"").includes(e))}function Tu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Du=new Set(["html","body","#document"]);function Fu(e){return Du.has(yu(e))}function Iu(e){return vu(e).getComputedStyle(e)}function Mu(e){return xu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Lu(e){if("html"===yu(e))return e;const t=e.assignedSlot||e.parentNode||_u(e)&&e.host||gu(e);return _u(t)?t.host:t}function $u(e){const t=Lu(e);return Fu(t)?e.ownerDocument?e.ownerDocument.body:e.body:wu(t)&&ju(t)?t:$u(t)}function Vu(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=$u(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=vu(o);if(i){const e=zu(a);return t.concat(a,a.visualViewport||[],ju(o)?o:[],e&&r?Vu(e):[])}return t.concat(o,Vu(o,[],r))}function zu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qu(e){const t=Iu(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=wu(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=zc(r)!==i||zc(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Uu(e){return xu(e)?e:e.contextElement}function Zu(e){const t=Uu(e);if(!wu(t))return Uc(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=qu(t);let a=(i?zc(r.width):r.width)/n,s=(i?zc(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Wu=Uc(0);function Bu(e){const t=vu(e);return Tu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Wu}function Qu(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Uu(e);let a=Uc(1);t&&(n?xu(n)&&(a=Zu(n)):a=Zu(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==vu(e))&&t}(i,r,n)?Bu(i):Uc(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=vu(i),t=n&&xu(n)?vu(n):n;let r=e,o=zu(r);for(;o&&n&&t!==r;){const e=Zu(o),t=o.getBoundingClientRect(),n=Iu(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,r=vu(o),o=zu(r)}}return cu({width:u,height:d,x:l,y:c})}function Ku(e,t){const r=Mu(e).scrollLeft;return t?t.left+r:Qu(gu(e)).left+r}function Hu(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Ku(e,n)),y:n.top+t.scrollTop}}const Gu=new Set(["absolute","fixed"]);function Yu(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=vu(e),n=gu(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Tu();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=gu(e),r=Mu(e),n=e.ownerDocument.body,o=Vc(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Vc(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ku(e);const s=-r.scrollTop;return"rtl"===Iu(n).direction&&(a+=Vc(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}(gu(e));else if(xu(t))n=function(e,t){const r=Qu(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=wu(e)?Zu(e):Uc(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Bu(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cu(n)}function Ju(e,t){const r=Lu(e);return!(r===t||!xu(r)||Fu(r))&&("fixed"===Iu(r).position||Ju(r,t))}function Xu(e,t,r){const n=wu(t),o=gu(t),i="fixed"===r,a=Qu(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Uc(0);function c(){l.x=Ku(o)}if(n||!n&&!i)if(("body"!==yu(t)||ju(o))&&(s=Mu(t)),n){const e=Qu(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=!o||n||i?Uc(0):Hu(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function ed(e){return"static"===Iu(e).position}function td(e,t){if(!wu(e)||"fixed"===Iu(e).position)return null;if(t)return t(e);let r=e.offsetParent;return gu(e)===r&&(r=r.ownerDocument.body),r}function rd(e,t){const r=vu(e);if(Cu(e))return r;if(!wu(e)){let t=Lu(e);for(;t&&!Fu(t);){if(xu(t)&&!ed(t))return t;t=Lu(t)}return r}let n=td(e,t);for(;n&&Su(n)&&ed(n);)n=td(n,t);return n&&Fu(n)&&ed(n)&&!Au(n)?r:n||function(e){let t=Lu(e);for(;wu(t)&&!Fu(t);){if(Au(t))return t;if(Cu(t))return null;t=Lu(t)}return null}(e)||r}const nd={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=gu(n),s=!!t&&Cu(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Uc(1);const u=Uc(0),d=wu(n);if((d||!d&&!i)&&(("body"!==yu(n)||ju(a))&&(l=Mu(n)),wu(n))){const e=Qu(n);c=Zu(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||d||i?Uc(0):Hu(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:gu,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?Cu(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Vu(e,[],!1).filter(e=>xu(e)&&"body"!==yu(e)),o=null;const i="fixed"===Iu(e).position;let a=i?Lu(e):e;for(;xu(a)&&!Fu(a);){const t=Iu(a),r=Au(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&Gu.has(o.position)||ju(a)&&!r&&Ju(e,a))?n=n.filter(e=>e!==a):o=t,a=Lu(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{const n=Yu(t,r,o);return e.top=Vc(n.top,e.top),e.right=$c(n.right,e.right),e.bottom=$c(n.bottom,e.bottom),e.left=Vc(n.left,e.left),e},Yu(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:rd,getElementRects:async function(e){const t=this.getOffsetParent||rd,r=this.getDimensions,n=await r(e.floating);return{reference:Xu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=qu(e);return{width:t,height:r}},getScale:Zu,isElement:xu,isRTL:function(e){return"rtl"===Iu(e).direction}};function od(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function id(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Uu(e),u=o||i?[...c?Vu(c):[],...Vu(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const d=c&&s?function(e,t){let r,n=null;const o=gu(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-qc(d)+"px "+-qc(o.clientWidth-(u+f))+"px "+-qc(o.clientHeight-(d+p))+"px "+-qc(u)+"px",threshold:Vc(0,$c(1,l))||1};let m=!0;function y(t){const n=t[0].intersectionRatio;if(n!==l){if(!m)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||od(c,e.getBoundingClientRect())||a(),m=!1}try{n=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,h)}n.observe(e)}(!0),i}(c,r):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let m=l?Qu(e):null;return l&&function t(){const n=Qu(e);m&&!od(m,n)&&r();m=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const ad=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=Kc(r),s=Hc(r),l="y"===Xc(r),c=hu.has(a)?-1:1,u=i&&l?-1:1,d=Qc(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},sd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=Qc(e,t),c={x:r,y:n},u=await du(t,l),d=Xc(Kc(o)),f=Gc(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=Bc(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=Bc(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:i,[d]:a}}}}}},ld=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=Qc(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=Kc(o),g=Xc(s),b=Kc(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[su(s)]:function(e){const t=su(e);return[tu(e),t,tu(t)]}(s)),_="none"!==h;!f&&_&&w.push(...au(s,m,h,x));const k=[s,...w],j=await du(t,y),O=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&O.push(j[v]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=Hc(e),o=eu(e),i=Yc(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=su(a)),[a,su(a)]}(o,a,x);O.push(j[e[0]],j[e[1]])}if(S=[...S,{placement:o,overflows:O}],!O.every(e=>e<=0)){var E,C;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=k[e];if(t){if(!("alignment"===d&&g!==Xc(t))||S.every(e=>e.overflows[0]>0&&Xc(e.placement)===g))return{data:{index:e,overflows:S},reset:{placement:t}}}let r=null==(C=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!r)switch(p){case"bestFit":{var P;const e=null==(P=S.filter(e=>{if(_){const t=Xc(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},cd=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Qc(e,t),u=await du(t,c),d=Kc(o),f=Hc(o),p="y"===Xc(o),{width:h,height:m}=i.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,y="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,x=$c(m-u[y],g),w=$c(h-u[v],b),_=!t.middlewareData.shift;let k=x,j=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(j=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=g),_&&!f){const e=Vc(u.left,0),t=Vc(u.right,0),r=Vc(u.top,0),n=Vc(u.bottom,0);p?j=h-2*(0!==e||0!==t?e+t:Vc(u.left,u.right)):k=m-2*(0!==r||0!==n?r+n:Vc(u.top,u.bottom))}await l({...t,availableWidth:j,availableHeight:k});const O=await a.getDimensions(s.floating);return h!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}},ud=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Qc(e,t);switch(n){case"referenceHidden":{const e=fu(await du(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:pu(e)}}}case"escaped":{const e=fu(await du(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:pu(e)}}}default:return{}}}}},dd=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Qc(e,t)||{};if(null==c)return{};const d=lu(u),f={x:r,y:n},p=eu(o),h=Yc(p),m=await a.getDimensions(c),y="y"===p,v=y?"top":"left",g=y?"bottom":"right",b=y?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let k=_?_[b]:0;k&&await(null==a.isElement?void 0:a.isElement(_))||(k=s.floating[b]||i.floating[h]);const j=x/2-w/2,O=k/2-m[h]/2-1,S=$c(d[v],O),E=$c(d[g],O),C=S,P=k-m[h]-E,N=k/2-m[h]/2+j,R=Bc(C,N,P),A=!l.arrow&&null!=Hc(o)&&N!==R&&i.reference[h]/2-(N<C?S:E)-m[h]/2<0,T=A?N<C?N-C:N-P:0;return{[p]:f[p]+T,data:{[p]:R,centerOffset:N-R-T,...A&&{alignmentOffset:T}},reset:A}}}),fd=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Qc(e,t),u={x:r,y:n},d=Xc(o),f=Gc(d);let p=u[f],h=u[d];const m=Qc(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+y.mainAxis,r=i.reference[f]+i.reference[e]-y.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,g;const e="y"===f?"width":"height",t=hu.has(Kc(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:y.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?y.crossAxis:0);h<r?h=r:h>n&&(h=n)}return{[f]:p,[d]:h}}}},pd=(e,t,r)=>{const n=new Map,o={platform:nd,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=uu(c,n,l),f=n,p={},h=0;for(let r=0;r<s.length;r++){const{name:i,fn:m}=s[r],{x:y,y:v,data:g,reset:b}=await m({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...g}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=uu(c,f,l))),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var hd="undefined"!=typeof document?a.useLayoutEffect:function(){};function md(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!md(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!md(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function yd(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vd(e,t){const r=yd(e);return Math.round(t*r)/r}function gd(e){const t=a.useRef(e);return hd(()=>{t.current=e}),t}const bd=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?dd({element:r.current,padding:n}).fn(t):{}:r?dd({element:r,padding:n}).fn(t):{};var o}}),xd=(e,t)=>({...ad(e),options:[e,t]}),wd=(e,t)=>({...sd(e),options:[e,t]}),_d=(e,t)=>({...fd(e),options:[e,t]}),kd=(e,t)=>({...ld(e),options:[e,t]}),jd=(e,t)=>({...cd(e),options:[e,t]}),Od=(e,t)=>({...ud(e),options:[e,t]}),Sd=(e,t)=>({...bd(e),options:[e,t]});var Ed=a.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return(0,rn.jsx)(ba.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,rn.jsx)("polygon",{points:"0,0 30,0 15,10"})})});Ed.displayName="Arrow";var Cd=Ed;function Pd(e){const[t,r]=a.useState(void 0);return fa(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var Nd="Popper",[Rd,Ad]=ua(Nd),[Td,Dd]=Rd(Nd),Fd=e=>{const{__scopePopper:t,children:r}=e,[n,o]=a.useState(null);return(0,rn.jsx)(Td,{scope:t,anchor:n,onAnchorChange:o,children:r})};Fd.displayName=Nd;var Id="PopperAnchor",Md=a.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Dd(Id,r),s=a.useRef(null),l=Ei(t,s);return a.useEffect(()=>{i.onAnchorChange(n?.current||s.current)}),n?null:(0,rn.jsx)(ba.div,{...o,ref:l})});Md.displayName=Id;var Ld="PopperContent",[$d,Vd]=Rd(Ld),zd=a.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...y}=e,v=Dd(Ld,r),[g,b]=a.useState(null),x=Ei(t,e=>b(e)),[w,_]=a.useState(null),k=Pd(w),j=k?.width??0,O=k?.height??0,S=n+("center"!==i?"-"+i:""),E="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},C=Array.isArray(u)?u:[u],P=C.length>0,N={padding:E,boundary:C.filter(Wd),altBoundary:P},{refs:R,floatingStyles:A,placement:T,isPositioned:D,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=a.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=a.useState(n);md(p,n)||h(n);const[m,y]=a.useState(null),[v,g]=a.useState(null),b=a.useCallback(e=>{e!==k.current&&(k.current=e,y(e))},[]),x=a.useCallback(e=>{e!==j.current&&(j.current=e,g(e))},[]),w=i||m,_=s||v,k=a.useRef(null),j=a.useRef(null),O=a.useRef(d),S=null!=c,E=gd(c),C=gd(o),P=gd(u),N=a.useCallback(()=>{if(!k.current||!j.current)return;const e={placement:t,strategy:r,middleware:p};C.current&&(e.platform=C.current),pd(k.current,j.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};R.current&&!md(O.current,t)&&(O.current=t,ga.flushSync(()=>{f(t)}))})},[p,t,r,C,P]);hd(()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const R=a.useRef(!1);hd(()=>(R.current=!0,()=>{R.current=!1}),[]),hd(()=>{if(w&&(k.current=w),_&&(j.current=_),w&&_){if(E.current)return E.current(w,_,N);N()}},[w,_,N,E,S]);const A=a.useMemo(()=>({reference:k,floating:j,setReference:b,setFloating:x}),[b,x]),T=a.useMemo(()=>({reference:w,floating:_}),[w,_]),D=a.useMemo(()=>{const e={position:r,left:0,top:0};if(!T.floating)return e;const t=vd(T.floating,d.x),n=vd(T.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...yd(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,T.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:N,refs:A,elements:T,floatingStyles:D}),[d,N,A,T,D])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>id(...e,{animationFrame:"always"===h}),elements:{reference:v.anchor},middleware:[xd({mainAxis:o+O,alignmentAxis:s}),c&&wd({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?_d():void 0,...N}),c&&kd({...N}),jd({...N,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),w&&Sd({element:w,padding:l}),Bd({arrowWidth:j,arrowHeight:O}),p&&Od({strategy:"referenceHidden",...N})]}),[I,M]=Qd(T),L=xa(m);fa(()=>{D&&L?.()},[D,L]);const $=F.arrow?.x,V=F.arrow?.y,z=0!==F.arrow?.centerOffset,[q,U]=a.useState();return fa(()=>{g&&U(window.getComputedStyle(g).zIndex)},[g]),(0,rn.jsx)("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:D?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,rn.jsx)($d,{scope:r,placedSide:I,onArrowChange:_,arrowX:$,arrowY:V,shouldHideArrow:z,children:(0,rn.jsx)(ba.div,{"data-side":I,"data-align":M,...y,ref:x,style:{...y.style,animation:D?void 0:"none"}})})})});zd.displayName=Ld;var qd="PopperArrow",Ud={top:"bottom",right:"left",bottom:"top",left:"right"},Zd=a.forwardRef(function(e,t){const{__scopePopper:r,...n}=e,o=Vd(qd,r),i=Ud[o.placedSide];return(0,rn.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]: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:(0,rn.jsx)(Cd,{...n,ref:t,style:{...n.style,display:"block"}})})});function Wd(e){return null!==e}Zd.displayName=qd;var Bd=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Qd(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=i?u:`${d}px`,h=-s+"px"):"top"===l?(p=i?u:`${d}px`,h=`${n.floating.height+s}px`):"right"===l?(p=-s+"px",h=i?u:`${f}px`):"left"===l&&(p=`${n.floating.width+s}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Qd(e){const[t,r="center"]=e.split("-");return[t,r]}var Kd=Fd,Hd=Md,Gd=zd,Yd=Zd,Jd="Popover",[Xd,ef]=ua(Jd,[Ad]),tf=Ad(),[rf,nf]=Xd(Jd),of=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,l=tf(t),c=a.useRef(null),[u,d]=a.useState(!1),[f,p]=va({prop:n,defaultProp:o??!1,onChange:i,caller:Jd});return(0,rn.jsx)(Kd,{...l,children:(0,rn.jsx)(rf,{scope:t,contentId:ma(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>d(!0),[]),onCustomAnchorRemove:a.useCallback(()=>d(!1),[]),modal:s,children:r})})};of.displayName=Jd;var af="PopoverAnchor",sf=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nf(af,r),i=tf(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return a.useEffect(()=>(s(),()=>l()),[s,l]),(0,rn.jsx)(Hd,{...i,...n,ref:t})});sf.displayName=af;var lf="PopoverTrigger",cf=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nf(lf,r),i=tf(r),a=Ei(t,o.triggerRef),s=(0,rn.jsx)(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kf(o.open),...n,ref:a,onClick:ca(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,rn.jsx)(Hd,{asChild:!0,...i,children:s})});cf.displayName=lf;var uf="PopoverPortal",[df,ff]=Xd(uf,{forceMount:void 0}),pf=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=nf(uf,t);return(0,rn.jsx)(df,{scope:t,forceMount:r,children:(0,rn.jsx)(za,{present:r||i.open,children:(0,rn.jsx)(Va,{asChild:!0,container:o,children:n})})})};pf.displayName=uf;var hf="PopoverContent",mf=a.forwardRef((e,t)=>{const r=ff(hf,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=nf(hf,e.__scopePopover);return(0,rn.jsx)(za,{present:n||i.open,children:i.modal?(0,rn.jsx)(vf,{...o,ref:t}):(0,rn.jsx)(gf,{...o,ref:t})})});mf.displayName=hf;var yf=Ci("PopoverContent.RemoveScroll"),vf=a.forwardRef((e,t)=>{const r=nf(hf,e.__scopePopover),n=a.useRef(null),o=Ei(t,n),i=a.useRef(!1);return a.useEffect(()=>{const e=n.current;if(e)return Zs(e)},[]),(0,rn.jsx)(Is,{as:yf,allowPinchZoom:!0,children:(0,rn.jsx)(bf,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(e.onCloseAutoFocus,e=>{e.preventDefault(),i.current||r.triggerRef.current?.focus()}),onPointerDownOutside:ca(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;i.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:ca(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),gf=a.forwardRef((e,t)=>{const r=nf(hf,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return(0,rn.jsx)(bf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=r.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),bf=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=nf(hf,r),p=tf(r);return Za(),(0,rn.jsx)(Ta,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,rn.jsx)(Sa,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,rn.jsx)(Gd,{"data-state":kf(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.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)"}})})})}),xf="PopoverClose",wf=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=nf(xf,r);return(0,rn.jsx)(ba.button,{type:"button",...n,ref:t,onClick:ca(e.onClick,()=>o.onOpenChange(!1))})});wf.displayName=xf;var _f=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=tf(r);return(0,rn.jsx)(Yd,{...o,...n,ref:t})});function kf(e){return e?"open":"closed"}_f.displayName="PopoverArrow";var jf=pf,Of=mf;function Sf(e){return Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sf(e)}var Ef=["className","align","sideOffset"];function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(t){Nf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Nf(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Sf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Rf=of,Af=cf,Tf=a.forwardRef(function(e,t){var r=e.className,n=e.align,o=void 0===n?"center":n,i=e.sideOffset,a=void 0===i?4:i,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Ef);return(0,rn.jsx)(jf,{children:(0,rn.jsx)(Of,Pf({ref:t,align:o,sideOffset:a,className:go("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 origin-[--radix-popover-content-transform-origin]",r)},s))})});function Df(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Ff(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ff(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ff(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Ff(d,"constructor",c),Ff(c,"constructor",l),l.displayName="GeneratorFunction",Ff(c,o,"GeneratorFunction"),Ff(d),Ff(d,o,"Generator"),Ff(d,n,function(){return this}),Ff(d,"toString",function(){return"[object Generator]"}),(Df=function(){return{w:i,m:f}})()}function Ff(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ff=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ff(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ff(e,t,r,n)}function If(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function Mf(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){If(i,n,o,a,s,"next",e)}function s(e){If(i,n,o,a,s,"throw",e)}a(void 0)})}}Tf.displayName=Of.displayName;function Lf(e){return function(e){if(Array.isArray(e))return zf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Vf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vf(e,t){if(e){if("string"==typeof e)return zf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zf(e,t):void 0}}function zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qf(e){var t,r=e.selectedPlugin,n=e.onChange,o=$f((0,a.useState)([]),2),i=o[0],s=o[1],l=$f((0,a.useState)(!1),2),c=l[0],u=l[1],d=Ho({queryKey:["getPluginList"],queryFn:(t=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_plugin_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),staleTime:5e3}),f=d.data;(0,a.useEffect)(function(){f&&s(f.data)},[f]);var p=i.filter(function(e){return r.includes(e.slug)}),h=i.filter(function(e){return!r.includes(e.slug)});return(0,rn.jsx)("div",{children:(0,rn.jsxs)(Rf,{open:c,onOpenChange:u,children:[(0,rn.jsx)(Af,{asChild:!0,children:(0,rn.jsxs)(zi,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between min-h-[2.5rem] h-auto p-2 bg-transparent",children:[(0,rn.jsxs)("div",{className:"flex flex-wrap gap-1 flex-1",children:[p.map(function(e){return(0,rn.jsxs)(ea,{variant:"default",className:"mr-1 mb-1",children:[e.label,(0,rn.jsx)(zi,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0 ml-1",onClick:function(t){var o;t.preventDefault(),t.stopPropagation(),o=e.slug,n(r.filter(function(e){return e!==o}))},children:(0,rn.jsx)(Bi,{className:"h-3 w-3"})})]},e.slug)}),0===p.length&&(0,rn.jsx)("span",{className:"text-muted-foreground",children:(0,sn.__)("Select plugins you like...","versatile-toolkit")})]}),(0,rn.jsx)(Qi,{className:"h-4 w-4 shrink-0 opacity-50"})]})}),(0,rn.jsx)(Tf,{className:"w-full p-0",align:"start",children:(0,rn.jsxs)(Ac,{children:[(0,rn.jsx)(Tc,{placeholder:"Search plugin..."}),(0,rn.jsxs)(Dc,{children:[(0,rn.jsx)(Fc,{children:"No plugin found."}),(0,rn.jsx)(Ic,{children:[].concat(Lf(h),Lf(p)).map(function(e){return(0,rn.jsxs)(Mc,{value:e.label,onSelect:function(){return t=e.slug,void(r.includes(t)?n(r.filter(function(e){return e!==t})):n([].concat(Lf(r),[t])));var t},children:[(0,rn.jsx)(Ki,{className:go("mr-2 h-4 w-4",r.includes(e.slug)?"opacity-100":"opacity-0")}),e.label]},e.slug)})})]})]})})]})})}function Uf(e){return Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(e)}var Zf=["className","type"];function Wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Bf(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Uf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Uf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Uf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Qf,Kf,Hf=a.forwardRef(function(e,t){var r=e.className,n=e.type,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Zf);return(0,rn.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wf(Object(r),!0).forEach(function(t){Bf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({type:n,className:go("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t},o))});Hf.displayName="Input",function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(Qf||(Qf={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Kf||(Kf={}));const Gf=Qf.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yf=e=>{switch(typeof e){case"undefined":return Gf.undefined;case"string":return Gf.string;case"number":return Number.isNaN(e)?Gf.nan:Gf.number;case"boolean":return Gf.boolean;case"function":return Gf.function;case"bigint":return Gf.bigint;case"symbol":return Gf.symbol;case"object":return Array.isArray(e)?Gf.array:null===e?Gf.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Gf.promise:"undefined"!=typeof Map&&e instanceof Map?Gf.map:"undefined"!=typeof Set&&e instanceof Set?Gf.set:"undefined"!=typeof Date&&e instanceof Date?Gf.date:Gf.object;default:return Gf.unknown}},Jf=Qf.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"]);class Xf extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)r._errors.push(t(o));else{let e=r,n=0;for(;n<o.path.length;){const r=o.path[n];n===o.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(o))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof Xf))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Qf.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}Xf.create=e=>new Xf(e);const ep=(e,t)=>{let r;switch(e.code){case Jf.invalid_type:r=e.received===Gf.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Jf.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Qf.jsonStringifyReplacer)}`;break;case Jf.unrecognized_keys:r=`Unrecognized key(s) in object: ${Qf.joinValues(e.keys,", ")}`;break;case Jf.invalid_union:r="Invalid input";break;case Jf.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Qf.joinValues(e.options)}`;break;case Jf.invalid_enum_value:r=`Invalid enum value. Expected ${Qf.joinValues(e.options)}, received '${e.received}'`;break;case Jf.invalid_arguments:r="Invalid function arguments";break;case Jf.invalid_return_type:r="Invalid function return type";break;case Jf.invalid_date:r="Invalid date";break;case Jf.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Qf.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Jf.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Jf.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Jf.custom:r="Invalid input";break;case Jf.invalid_intersection_types:r="Intersection results could not be merged";break;case Jf.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Jf.not_finite:r="Number must be finite";break;default:r=t.defaultError,Qf.assertNever(e)}return{message:r}};let tp=ep;function rp(){return tp}var np;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(np||(np={}));const op=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(void 0!==o.message)return{...o,path:i,message:o.message};let s="";const l=n.filter(e=>!!e).slice().reverse();for(const e of l)s=e(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ip(e,t){const r=rp(),n=op({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ep?void 0:ep].filter(e=>!!e)});e.common.issues.push(n)}class ap{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return sp;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const e of t){const t=await e.key,n=await e.value;r.push({key:t,value:n})}return ap.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:o}=n;if("aborted"===t.status)return sp;if("aborted"===o.status)return sp;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===t.value||void 0===o.value&&!n.alwaysSet||(r[t.value]=o.value)}return{status:e.value,value:r}}}const sp=Object.freeze({status:"aborted"}),lp=e=>({status:"dirty",value:e}),cp=e=>({status:"valid",value:e}),up=e=>"aborted"===e.status,dp=e=>"dirty"===e.status,fp=e=>"valid"===e.status,pp=e=>"undefined"!=typeof Promise&&e instanceof Promise;class hp{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const mp=(e,t)=>{if(fp(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 t=new Xf(e.common.issues);return this._error=t,this._error}}};function yp(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:o};return{errorMap:(t,o)=>{const{message:i}=e;return"invalid_enum_value"===t.code?{message:i??o.defaultError}:void 0===o.data?{message:i??n??o.defaultError}:"invalid_type"!==t.code?{message:o.defaultError}:{message:i??r??o.defaultError}},description:o}}class vp{get description(){return this._def.description}_getType(e){return Yf(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Yf(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ap,ctx:{common:e.parent.common,data:e.data,parsedType:Yf(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(pp(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yf(e)},n=this._parseSync({data:e,path:r.path,parent:r});return mp(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yf(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return fp(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>fp(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Yf(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(pp(n)?n:Promise.resolve(n));return mp(r,o)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{const o=e(t),i=()=>n.addIssue({code:Jf.custom,...r(t)});return"undefined"!=typeof Promise&&o instanceof Promise?o.then(e=>!!e||(i(),!1)):!!o||(i(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new yh({schema:this,typeName:Oh.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:e=>this["~validate"](e)}}optional(){return vh.create(this,this._def)}nullable(){return gh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return th.create(this)}promise(){return mh.create(this,this._def)}or(e){return oh.create([this,e],this._def)}and(e){return ah.create(this,e,this._def)}transform(e){return new yh({...yp(this._def),schema:this,typeName:Oh.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new bh({...yp(this._def),innerType:this,defaultValue:t,typeName:Oh.ZodDefault})}brand(){return new _h({typeName:Oh.ZodBranded,type:this,...yp(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new xh({...yp(this._def),innerType:this,catchValue:t,typeName:Oh.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return kh.create(this,e)}readonly(){return jh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gp=/^c[^\s-]{8,}$/i,bp=/^[0-9a-z]+$/,xp=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_p=/^[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,kp=/^[a-z0-9_-]{21}$/i,jp=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Op=/^[-+]?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)?)??$/,Sp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Ep;const Cp=/^(?:(?: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])$/,Pp=/^(?:(?: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])$/,Np=/^(([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]))$/,Rp=/^(([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])$/,Ap=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tp=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Dp="((\\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])))",Fp=new RegExp(`^${Dp}$`);function Ip(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Mp(e){return new RegExp(`^${Ip(e)}$`)}function Lp(e){let t=`${Dp}T${Ip(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function $p(e,t){return!("v4"!==t&&t||!Cp.test(e))||!("v6"!==t&&t||!Np.test(e))}function Vp(e,t){if(!jp.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return"object"==typeof o&&null!==o&&((!("typ"in o)||"JWT"===o?.typ)&&(!!o.alg&&(!t||o.alg===t)))}catch{return!1}}function zp(e,t){return!("v4"!==t&&t||!Pp.test(e))||!("v6"!==t&&t||!Rp.test(e))}class qp extends vp{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Gf.string){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.string,received:t.parsedType}),sp}const t=new ap;let r;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const o=e.data.length>n.value,i=e.data.length<n.value;(o||i)&&(r=this._getOrReturnCtx(e,r),o?ip(r,{code:Jf.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):i&&ip(r,{code:Jf.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)Sp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"email",code:Jf.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)Ep||(Ep=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ep.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"emoji",code:Jf.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)_p.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"uuid",code:Jf.invalid_string,message:n.message}),t.dirty());else if("nanoid"===n.kind)kp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"nanoid",code:Jf.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)gp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"cuid",code:Jf.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)bp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"cuid2",code:Jf.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)xp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"ulid",code:Jf.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),ip(r,{validation:"url",code:Jf.invalid_string,message:n.message}),t.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"regex",code:Jf.invalid_string,message:n.message}),t.dirty())}else if("trim"===n.kind)e.data=e.data.trim();else if("includes"===n.kind)e.data.includes(n.value,n.position)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty());else if("toLowerCase"===n.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===n.kind)e.data=e.data.toUpperCase();else if("startsWith"===n.kind)e.data.startsWith(n.value)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty());else if("endsWith"===n.kind)e.data.endsWith(n.value)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty());else if("datetime"===n.kind){Lp(n).test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:"datetime",message:n.message}),t.dirty())}else if("date"===n.kind){Fp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:"date",message:n.message}),t.dirty())}else if("time"===n.kind){Mp(n).test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.invalid_string,validation:"time",message:n.message}),t.dirty())}else"duration"===n.kind?Op.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"duration",code:Jf.invalid_string,message:n.message}),t.dirty()):"ip"===n.kind?$p(e.data,n.version)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"ip",code:Jf.invalid_string,message:n.message}),t.dirty()):"jwt"===n.kind?Vp(e.data,n.alg)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"jwt",code:Jf.invalid_string,message:n.message}),t.dirty()):"cidr"===n.kind?zp(e.data,n.version)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"cidr",code:Jf.invalid_string,message:n.message}),t.dirty()):"base64"===n.kind?Ap.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"base64",code:Jf.invalid_string,message:n.message}),t.dirty()):"base64url"===n.kind?Tp.test(e.data)||(r=this._getOrReturnCtx(e,r),ip(r,{validation:"base64url",code:Jf.invalid_string,message:n.message}),t.dirty()):Qf.assertNever(n);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:Jf.invalid_string,...np.errToObj(r)})}_addCheck(e){return new qp({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...np.errToObj(e)})}url(e){return this._addCheck({kind:"url",...np.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...np.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...np.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...np.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...np.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...np.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...np.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...np.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...np.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...np.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...np.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...np.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...np.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...np.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...np.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...np.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...np.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...np.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...np.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...np.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...np.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...np.errToObj(t)})}nonempty(e){return this.min(1,np.errToObj(e))}trim(){return new qp({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qp({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qp({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Up(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}qp.create=e=>new qp({checks:[],typeName:Oh.ZodString,coerce:e?.coerce??!1,...yp(e)});class Zp extends vp{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Gf.number){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.number,received:t.parsedType}),sp}let t;const r=new ap;for(const n of this._def.checks)if("int"===n.kind)Qf.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else"multipleOf"===n.kind?0!==Up(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.not_finite,message:n.message}),r.dirty()):Qf.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,np.toString(t))}gt(e,t){return this.setLimit("min",e,!1,np.toString(t))}lte(e,t){return this.setLimit("max",e,!0,np.toString(t))}lt(e,t){return this.setLimit("max",e,!1,np.toString(t))}setLimit(e,t,r,n){return new Zp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:np.toString(n)}]})}_addCheck(e){return new Zp({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:np.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:np.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:np.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:np.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:np.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:np.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:np.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:np.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:np.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&Qf.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Zp.create=e=>new Zp({checks:[],typeName:Oh.ZodNumber,coerce:e?.coerce||!1,...yp(e)});class Wp extends vp{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Gf.bigint)return this._getInvalidInput(e);let t;const r=new ap;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),ip(t,{code:Jf.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):Qf.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.bigint,received:t.parsedType}),sp}gte(e,t){return this.setLimit("min",e,!0,np.toString(t))}gt(e,t){return this.setLimit("min",e,!1,np.toString(t))}lte(e,t){return this.setLimit("max",e,!0,np.toString(t))}lt(e,t){return this.setLimit("max",e,!1,np.toString(t))}setLimit(e,t,r,n){return new Wp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:np.toString(n)}]})}_addCheck(e){return new Wp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:np.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:np.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:np.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:np.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:np.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Wp.create=e=>new Wp({checks:[],typeName:Oh.ZodBigInt,coerce:e?.coerce??!1,...yp(e)});class Bp extends vp{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Gf.boolean){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.boolean,received:t.parsedType}),sp}return cp(e.data)}}Bp.create=e=>new Bp({typeName:Oh.ZodBoolean,coerce:e?.coerce||!1,...yp(e)});class Qp extends vp{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Gf.date){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.date,received:t.parsedType}),sp}if(Number.isNaN(e.data.getTime())){return ip(this._getOrReturnCtx(e),{code:Jf.invalid_date}),sp}const t=new ap;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),ip(r,{code:Jf.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):Qf.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Qp({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:np.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:np.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Qp.create=e=>new Qp({checks:[],coerce:e?.coerce||!1,typeName:Oh.ZodDate,...yp(e)});class Kp extends vp{_parse(e){if(this._getType(e)!==Gf.symbol){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.symbol,received:t.parsedType}),sp}return cp(e.data)}}Kp.create=e=>new Kp({typeName:Oh.ZodSymbol,...yp(e)});class Hp extends vp{_parse(e){if(this._getType(e)!==Gf.undefined){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.undefined,received:t.parsedType}),sp}return cp(e.data)}}Hp.create=e=>new Hp({typeName:Oh.ZodUndefined,...yp(e)});class Gp extends vp{_parse(e){if(this._getType(e)!==Gf.null){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.null,received:t.parsedType}),sp}return cp(e.data)}}Gp.create=e=>new Gp({typeName:Oh.ZodNull,...yp(e)});class Yp extends vp{constructor(){super(...arguments),this._any=!0}_parse(e){return cp(e.data)}}Yp.create=e=>new Yp({typeName:Oh.ZodAny,...yp(e)});class Jp extends vp{constructor(){super(...arguments),this._unknown=!0}_parse(e){return cp(e.data)}}Jp.create=e=>new Jp({typeName:Oh.ZodUnknown,...yp(e)});class Xp extends vp{_parse(e){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.never,received:t.parsedType}),sp}}Xp.create=e=>new Xp({typeName:Oh.ZodNever,...yp(e)});class eh extends vp{_parse(e){if(this._getType(e)!==Gf.undefined){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.void,received:t.parsedType}),sp}return cp(e.data)}}eh.create=e=>new eh({typeName:Oh.ZodVoid,...yp(e)});class th extends vp{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==Gf.array)return ip(t,{code:Jf.invalid_type,expected:Gf.array,received:t.parsedType}),sp;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(e||o)&&(ip(t,{code:e?Jf.too_big:Jf.too_small,minimum:o?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(ip(t,{code:Jf.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(ip(t,{code:Jf.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new hp(t,e,t.path,r)))).then(e=>ap.mergeArray(r,e));const o=[...t.data].map((e,r)=>n.type._parseSync(new hp(t,e,t.path,r)));return ap.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new th({...this._def,minLength:{value:e,message:np.toString(t)}})}max(e,t){return new th({...this._def,maxLength:{value:e,message:np.toString(t)}})}length(e,t){return new th({...this._def,exactLength:{value:e,message:np.toString(t)}})}nonempty(e){return this.min(1,e)}}function rh(e){if(e instanceof nh){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=vh.create(rh(n))}return new nh({...e._def,shape:()=>t})}return e instanceof th?new th({...e._def,type:rh(e.element)}):e instanceof vh?vh.create(rh(e.unwrap())):e instanceof gh?gh.create(rh(e.unwrap())):e instanceof sh?sh.create(e.items.map(e=>rh(e))):e}th.create=(e,t)=>new th({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oh.ZodArray,...yp(t)});class nh extends vp{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=Qf.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Gf.object){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.object,received:t.parsedType}),sp}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof Xp&&"strip"===this._def.unknownKeys))for(const e in r.data)o.includes(e)||i.push(e);const a=[];for(const e of o){const t=n[e],o=r.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new hp(r,o,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof Xp){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)a.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)i.length>0&&(ip(r,{code:Jf.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new hp(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of a){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>ap.mergeObjectSync(t,e)):ap.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return np.errToObj,new nh({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{const n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:np.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new nh({...this._def,unknownKeys:"strip"})}passthrough(){return new nh({...this._def,unknownKeys:"passthrough"})}extend(e){return new nh({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nh({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Oh.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new nh({...this._def,catchall:e})}pick(e){const t={};for(const r of Qf.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new nh({...this._def,shape:()=>t})}omit(e){const t={};for(const r of Qf.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new nh({...this._def,shape:()=>t})}deepPartial(){return rh(this)}partial(e){const t={};for(const r of Qf.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new nh({...this._def,shape:()=>t})}required(e){const t={};for(const r of Qf.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof vh;)e=e._def.innerType;t[r]=e}return new nh({...this._def,shape:()=>t})}keyof(){return fh(Qf.objectKeys(this.shape))}}nh.create=(e,t)=>new nh({shape:()=>e,unknownKeys:"strip",catchall:Xp.create(),typeName:Oh.ZodObject,...yp(t)}),nh.strictCreate=(e,t)=>new nh({shape:()=>e,unknownKeys:"strict",catchall:Xp.create(),typeName:Oh.ZodObject,...yp(t)}),nh.lazycreate=(e,t)=>new nh({shape:e,unknownKeys:"strip",catchall:Xp.create(),typeName:Oh.ZodObject,...yp(t)});class oh extends vp{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map(e=>new Xf(e.ctx.common.issues));return ip(t,{code:Jf.invalid_union,unionErrors:r}),sp});{let e;const n=[];for(const o of r){const r={...t,common:{...t.common,issues:[]},parent:null},i=o._parseSync({data:t.data,path:t.path,parent:r});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const o=n.map(e=>new Xf(e));return ip(t,{code:Jf.invalid_union,unionErrors:o}),sp}}get options(){return this._def.options}}oh.create=(e,t)=>new oh({options:e,typeName:Oh.ZodUnion,...yp(t)});function ih(e,t){const r=Yf(e),n=Yf(t);if(e===t)return{valid:!0,data:e};if(r===Gf.object&&n===Gf.object){const r=Qf.objectKeys(t),n=Qf.objectKeys(e).filter(e=>-1!==r.indexOf(e)),o={...e,...t};for(const r of n){const n=ih(e[r],t[r]);if(!n.valid)return{valid:!1};o[r]=n.data}return{valid:!0,data:o}}if(r===Gf.array&&n===Gf.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n<e.length;n++){const o=ih(e[n],t[n]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}return r===Gf.date&&n===Gf.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class ah extends vp{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(up(e)||up(n))return sp;const o=ih(e.value,n.value);return o.valid?((dp(e)||dp(n))&&t.dirty(),{status:t.value,value:o.data}):(ip(r,{code:Jf.invalid_intersection_types}),sp)};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(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ah.create=(e,t,r)=>new ah({left:e,right:t,typeName:Oh.ZodIntersection,...yp(r)});class sh extends vp{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gf.array)return ip(r,{code:Jf.invalid_type,expected:Gf.array,received:r.parsedType}),sp;if(r.data.length<this._def.items.length)return ip(r,{code:Jf.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),sp;!this._def.rest&&r.data.length>this._def.items.length&&(ip(r,{code:Jf.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new hp(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>ap.mergeArray(t,e)):ap.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new sh({...this._def,rest:e})}}sh.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new sh({items:e,typeName:Oh.ZodTuple,rest:null,...yp(t)})};class lh extends vp{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gf.map)return ip(r,{code:Jf.invalid_type,expected:Gf.map,received:r.parsedType}),sp;const n=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([e,t],i)=>({key:n._parse(new hp(r,e,r.path,[i,"key"])),value:o._parse(new hp(r,t,r.path,[i,"value"]))}));if(r.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const r of i){const n=await r.key,o=await r.value;if("aborted"===n.status||"aborted"===o.status)return sp;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}})}{const e=new Map;for(const r of i){const n=r.key,o=r.value;if("aborted"===n.status||"aborted"===o.status)return sp;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}}}lh.create=(e,t,r)=>new lh({valueType:t,keyType:e,typeName:Oh.ZodMap,...yp(r)});class ch extends vp{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gf.set)return ip(r,{code:Jf.invalid_type,expected:Gf.set,received:r.parsedType}),sp;const n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(ip(r,{code:Jf.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(ip(r,{code:Jf.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function i(e){const r=new Set;for(const n of e){if("aborted"===n.status)return sp;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const a=[...r.data.values()].map((e,t)=>o._parse(new hp(r,e,r.path,t)));return r.common.async?Promise.all(a).then(e=>i(e)):i(a)}min(e,t){return new ch({...this._def,minSize:{value:e,message:np.toString(t)}})}max(e,t){return new ch({...this._def,maxSize:{value:e,message:np.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ch.create=(e,t)=>new ch({valueType:e,minSize:null,maxSize:null,typeName:Oh.ZodSet,...yp(t)});class uh extends vp{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}uh.create=(e,t)=>new uh({getter:e,typeName:Oh.ZodLazy,...yp(t)});class dh extends vp{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return ip(t,{received:t.data,code:Jf.invalid_literal,expected:this._def.value}),sp}return{status:"valid",value:e.data}}get value(){return this._def.value}}function fh(e,t){return new ph({values:e,typeName:Oh.ZodEnum,...yp(t)})}dh.create=(e,t)=>new dh({value:e,typeName:Oh.ZodLiteral,...yp(t)});class ph extends vp{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return ip(t,{expected:Qf.joinValues(r),received:t.parsedType,code:Jf.invalid_type}),sp}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return ip(t,{received:t.data,code:Jf.invalid_enum_value,options:r}),sp}return cp(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ph.create(e,{...this._def,...t})}exclude(e,t=this._def){return ph.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ph.create=fh;class hh extends vp{_parse(e){const t=Qf.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Gf.string&&r.parsedType!==Gf.number){const e=Qf.objectValues(t);return ip(r,{expected:Qf.joinValues(e),received:r.parsedType,code:Jf.invalid_type}),sp}if(this._cache||(this._cache=new Set(Qf.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=Qf.objectValues(t);return ip(r,{received:r.data,code:Jf.invalid_enum_value,options:e}),sp}return cp(e.data)}get enum(){return this._def.values}}hh.create=(e,t)=>new hh({values:e,typeName:Oh.ZodNativeEnum,...yp(t)});class mh extends vp{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Gf.promise&&!1===t.common.async)return ip(t,{code:Jf.invalid_type,expected:Gf.promise,received:t.parsedType}),sp;const r=t.parsedType===Gf.promise?t.data:Promise.resolve(t.data);return cp(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}mh.create=(e,t)=>new mh({type:e,typeName:Oh.ZodPromise,...yp(t)});class yh extends vp{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oh.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:e=>{ip(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===n.type){const e=n.transform(r.data,o);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return sp;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?sp:"dirty"===n.status||"dirty"===t.value?lp(n.value):n});{if("aborted"===t.value)return sp;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?sp:"dirty"===n.status||"dirty"===t.value?lp(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,o);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?sp:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?sp:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fp(e))return sp;const i=n.transform(e.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>fp(e)?Promise.resolve(n.transform(e.value,o)).then(e=>({status:t.value,value:e})):sp)}Qf.assertNever(n)}}yh.create=(e,t,r)=>new yh({schema:e,typeName:Oh.ZodEffects,effect:t,...yp(r)}),yh.createWithPreprocess=(e,t,r)=>new yh({schema:t,effect:{type:"preprocess",transform:e},typeName:Oh.ZodEffects,...yp(r)});class vh extends vp{_parse(e){return this._getType(e)===Gf.undefined?cp(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vh.create=(e,t)=>new vh({innerType:e,typeName:Oh.ZodOptional,...yp(t)});class gh extends vp{_parse(e){return this._getType(e)===Gf.null?cp(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gh.create=(e,t)=>new gh({innerType:e,typeName:Oh.ZodNullable,...yp(t)});class bh extends vp{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===Gf.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}bh.create=(e,t)=>new bh({innerType:e,typeName:Oh.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...yp(t)});class xh extends vp{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return pp(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Xf(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new Xf(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}xh.create=(e,t)=>new xh({innerType:e,typeName:Oh.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...yp(t)});class wh extends vp{_parse(e){if(this._getType(e)!==Gf.nan){const t=this._getOrReturnCtx(e);return ip(t,{code:Jf.invalid_type,expected:Gf.nan,received:t.parsedType}),sp}return{status:"valid",value:e.data}}}wh.create=e=>new wh({typeName:Oh.ZodNaN,...yp(e)});Symbol("zod_brand");class _h extends vp{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class kh extends vp{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sp:"dirty"===e.status?(t.dirty(),lp(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sp:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new kh({in:e,out:t,typeName:Oh.ZodPipeline})}}class jh extends vp{_parse(e){const t=this._def.innerType._parse(e),r=e=>(fp(e)&&(e.value=Object.freeze(e.value)),e);return pp(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}jh.create=(e,t)=>new jh({innerType:e,typeName:Oh.ZodReadonly,...yp(t)});nh.lazycreate;var Oh;!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"}(Oh||(Oh={}));const Sh=qp.create,Eh=(Zp.create,wh.create,Wp.create,Bp.create),Ch=(Qp.create,Kp.create,Hp.create,Gp.create,Yp.create,Jp.create,Xp.create,eh.create,th.create),Ph=nh.create,Nh=(nh.strictCreate,oh.create,ah.create,sh.create,lh.create,ch.create,uh.create,dh.create,ph.create,hh.create,mh.create,yh.create,vh.create,gh.create,yh.createWithPreprocess,kh.create,e=>Zp.create({...e,coerce:!0}));var Rh=/^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/,Ah=Ph({chosen_plugins:Ch(Sh()),ip_tags:Ch(Sh().refine(function(e){return Rh.test(e)},{message:"Invalid IP address"})).min(1,{message:"At least one IP address is required"})}),Th=Ph({enable_maintenance:Eh(),title:Sh().min(1,{message:"Title is required"}).min(3,{message:"Title must be at least 3 characters"}),description:Sh().min(1,{message:"Description is required"}).min(10,{message:"Description must be at least 10 characters"}),subtitle:Sh().min(1,{message:"Subtitle is required"}).min(3,{message:"Subtitle must be at least 3 characters"}),background_image:Sh().optional(),background_image_id:Nh().optional(),logo:Sh().optional(),logo_id:Nh().optional()}),Dh=Ph({enable_comingsoon:Eh(),title:Sh().min(1,{message:"Title is required"}).min(3,{message:"Title must be at least 3 characters"}),description:Sh().min(1,{message:"Description is required"}).min(10,{message:"Description must be at least 10 characters"}),subtitle:Sh().min(1,{message:"Subtitle is required"}).min(3,{message:"Subtitle must be at least 3 characters"}),background_image:Sh().optional(),background_image_id:Nh().optional(),logo:Sh().optional(),logo_id:Nh().optional()}),Fh=Ph({activeTheme:Sh().min(1,{message:"Please select a theme"})});function Ih(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Mh(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Mh(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Mh(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Mh(d,"constructor",c),Mh(c,"constructor",l),l.displayName="GeneratorFunction",Mh(c,o,"GeneratorFunction"),Mh(d),Mh(d,o,"Generator"),Mh(d,n,function(){return this}),Mh(d,"toString",function(){return"[object Generator]"}),(Ih=function(){return{w:i,m:f}})()}function Mh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Mh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Mh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Mh(e,t,r,n)}function Lh(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function $h(e){return function(e){if(Array.isArray(e))return qh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||zh(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zh(e,t){if(e){if("string"==typeof e)return qh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qh(e,t):void 0}}function qh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Uh(e){var t,r=e.tags,n=e.onChange,o=Vh((0,a.useState)(""),2),i=o[0],s=o[1],l=Vh((0,a.useState)(null),2),c=l[0],u=l[1],d=function(){var e=i.trim();e&&(Rh.test(e)?r.includes(e)||(n([].concat($h(r),[e])),s(""),u(null)):u("Invalid IP address"))},f=Yo({mutationFn:(t=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_add_my_ip",e.n=1,hi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),onSuccess:function(e){},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed to add IP","versatile-toolkit"))}}),p=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Lh(i,n,o,a,s,"next",e)}function s(e){Lh(i,n,o,a,s,"throw",e)}a(void 0)})}}(Ih().m(function e(){var t,o,i;return Ih().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,f.mutateAsync({});case 1:if(t=e.v,o=t.data,i=null==o?void 0:o.ip,!r.includes(i)){e.n=2;break}return fr.success((0,sn.__)("System Ip already added!","trigger")),e.a(2);case 2:!r.includes(i)&&i&&(n([].concat($h(r),[i])),fr.success((0,sn.__)("System Ip address added","trigger")));case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,rn.jsxs)("div",{children:[(0,rn.jsxs)("div",{className:"relative",children:[(0,rn.jsx)(Hf,{type:"text",placeholder:"Type a tag and press Enter or click outside...",value:i,onChange:function(e){s(e.target.value),c&&u(null)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d())},onBlur:function(e){d()}}),(0,rn.jsx)(zi,{type:"button",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 px-2 py-1 h-5",onClick:p,children:(0,sn.__)("Add My IP","versatile-toolkit")})]}),c&&(0,rn.jsx)("p",{className:"text-red-500 text-sm mt-1",children:c}),(0,rn.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:r.map(function(e){return(0,rn.jsxs)(ea,{variant:"default",className:"flex items-center gap-1",children:[e,(0,rn.jsx)(zi,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0",onClick:function(){return t=e,void n(r.filter(function(e){return e!==t}));var t},children:(0,rn.jsx)(Bi,{className:"h-3 w-3"})})]},e)})})]})}function Zh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wh(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Bh(e){var t,r=e.selectedTheme,n=e.onChange,o=Zh((0,a.useState)([]),2),i=o[0],s=o[1],l=Zh((0,a.useState)(!1),2),c=l[0],u=l[1],d=Ho({queryKey:["getThemeList"],queryFn:(t=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_theme_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),staleTime:5e3}),f=d.data;(0,a.useEffect)(function(){f&&s(f.data)},[f]);var p=i.find(function(e){return e.slug===r});return(0,rn.jsx)("div",{children:(0,rn.jsxs)(Rf,{open:c,onOpenChange:u,children:[(0,rn.jsx)(Af,{asChild:!0,children:(0,rn.jsxs)(zi,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between min-h-[2.5rem] h-auto p-3 bg-transparent",children:[(0,rn.jsx)("div",{className:"flex flex-wrap gap-1 flex-1 text-left",children:p?(0,rn.jsx)("span",{className:"font-medium",children:p.label}):(0,rn.jsx)("span",{className:"text-muted-foreground",children:(0,sn.__)("Select a theme...","versatile-toolkit")})}),(0,rn.jsx)(Qi,{className:"h-4 w-4 shrink-0 opacity-50"})]})}),(0,rn.jsx)(Tf,{className:"w-full p-0",align:"start",children:(0,rn.jsxs)(Ac,{children:[(0,rn.jsx)(Tc,{placeholder:"Search theme..."}),(0,rn.jsxs)(Dc,{children:[(0,rn.jsx)(Fc,{children:"No theme found."}),(0,rn.jsx)(Ic,{children:i.map(function(e){return(0,rn.jsxs)(Mc,{value:e.label,onSelect:function(){return t=e.slug,n(t),void u(!1);var t},children:[(0,rn.jsx)(Ki,{className:go("mr-2 h-4 w-4",r===e.slug?"opacity-100":"opacity-0")}),e.label]},e.slug)})})]})]})})]})})}var Qh=e=>"checkbox"===e.type,Kh=e=>e instanceof Date,Hh=e=>null==e;const Gh=e=>"object"==typeof e;var Yh=e=>!Hh(e)&&!Array.isArray(e)&&Gh(e)&&!Kh(e),Jh=e=>Yh(e)&&e.target?Qh(e.target)?e.target.checked:e.target.value:e,Xh=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),em="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function tm(e){let t;const r=Array.isArray(e),n="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(em&&(e instanceof Blob||n)||!r&&!Yh(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return Yh(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=tm(e[r]));else t=e}return t}var rm=e=>/^\w*$/.test(e),nm=e=>void 0===e,om=e=>Array.isArray(e)?e.filter(Boolean):[],im=e=>om(e.replace(/["|']|\]/g,"").split(/\.|\[/)),am=(e,t,r)=>{if(!t||!Yh(e))return r;const n=(rm(t)?[t]:im(t)).reduce((e,t)=>Hh(e)?e:e[t],e);return nm(n)||n===e?nm(e[t])?r:e[t]:n},sm=e=>"boolean"==typeof e,lm=(e,t,r)=>{let n=-1;const o=rm(t)?[t]:im(t),i=o.length,a=i-1;for(;++n<i;){const t=o[n];let i=r;if(n!==a){const r=e[t];i=Yh(r)||Array.isArray(r)?r:isNaN(+o[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const cm="blur",um="focusout",dm="change",fm="onBlur",pm="onChange",hm="onSubmit",mm="onTouched",ym="all",vm="max",gm="min",bm="maxLength",xm="minLength",wm="pattern",_m="required",km="validate",jm=a.createContext(null);jm.displayName="HookFormContext";const Om=()=>a.useContext(jm);var Sm=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==ym&&(t._proxyFormState[o]=!n||ym),r&&(r[o]=!0),e[o]}});return o};const Em="undefined"!=typeof window?a.useLayoutEffect:a.useEffect;var Cm=e=>"string"==typeof e,Pm=(e,t,r,n,o)=>Cm(e)?(n&&t.watch.add(e),am(r,e,o)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),am(r,e))):(n&&(t.watchAll=!0),r);function Nm(e){const t=Om(),{name:r,disabled:n,control:o=t.control,shouldUnregister:i}=e,s=Xh(o._names.array,r),l=function(e){const t=Om(),{control:r=t.control,name:n,defaultValue:o,disabled:i,exact:s}=e||{},l=a.useRef(o),[c,u]=a.useState(r._getWatch(n,l.current));return Em(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:e=>!i&&u(Pm(n,r._names,e.values||r._formValues,!1,l.current))}),[n,r,i,s]),a.useEffect(()=>r._removeUnmounted()),c}({control:o,name:r,defaultValue:am(o._formValues,r,am(o._defaultValues,r,e.defaultValue)),exact:!0}),c=function(e){const t=Om(),{control:r=t.control,disabled:n,name:o,exact:i}=e||{},[s,l]=a.useState(r._formState),c=a.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Em(()=>r._subscribe({name:o,formState:c.current,exact:i,callback:e=>{!n&&l({...r._formState,...e})}}),[o,n,i]),a.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),a.useMemo(()=>Sm(s,r,c.current,!1),[s,r])}({control:o,name:r,exact:!0}),u=a.useRef(e),d=a.useRef(o.register(r,{...e.rules,value:l,...sm(e.disabled)?{disabled:e.disabled}:{}})),f=a.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!am(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!am(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!am(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!am(c.validatingFields,r)},error:{enumerable:!0,get:()=>am(c.errors,r)}}),[c,r]),p=a.useCallback(e=>d.current.onChange({target:{value:Jh(e),name:r},type:dm}),[r]),h=a.useCallback(()=>d.current.onBlur({target:{value:am(o._formValues,r),name:r},type:cm}),[r,o._formValues]),m=a.useCallback(e=>{const t=am(o._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[o._fields,r]),y=a.useMemo(()=>({name:r,value:l,...sm(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:p,onBlur:h,ref:m}),[r,n,c.disabled,p,h,m,l]);return a.useEffect(()=>{const e=o._options.shouldUnregister||i;o.register(r,{...u.current.rules,...sm(u.current.disabled)?{disabled:u.current.disabled}:{}});const t=(e,t)=>{const r=am(o._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){const e=tm(am(o._options.defaultValues,r));lm(o._defaultValues,r,e),nm(am(o._formValues,r))&&lm(o._formValues,r,e)}return!s&&o.register(r),()=>{(s?e&&!o._state.action:e)?o.unregister(r):t(r,!1)}},[r,o,s,i]),a.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),a.useMemo(()=>({field:y,formState:c,fieldState:f}),[y,c,f])}const Rm=e=>e.render(Nm(e));var Am=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Tm=e=>Array.isArray(e)?e:[e],Dm=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},Fm=e=>Hh(e)||!Gh(e);function Im(e,t,r=new WeakSet){if(Fm(e)||Fm(t))return e===t;if(Kh(e)&&Kh(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const n=e[i];if(!o.includes(i))return!1;if("ref"!==i){const e=t[i];if(Kh(n)&&Kh(e)||Yh(n)&&Yh(e)||Array.isArray(n)&&Array.isArray(e)?!Im(n,e,r):n!==e)return!1}}return!0}var Mm=e=>Yh(e)&&!Object.keys(e).length,Lm=e=>"file"===e.type,$m=e=>"function"==typeof e,Vm=e=>{if(!em)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},zm=e=>"select-multiple"===e.type,qm=e=>"radio"===e.type,Um=e=>Vm(e)&&e.isConnected;function Zm(e,t){const r=Array.isArray(t)?t:rm(t)?[t]:im(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=nm(e)?n++:e[t[n++]];return e}(e,r),o=r.length-1,i=r[o];return n&&delete n[i],0!==o&&(Yh(n)&&Mm(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!nm(e[t]))return!1;return!0}(n))&&Zm(e,r.slice(0,-1)),e}var Wm=e=>{for(const t in e)if($m(e[t]))return!0;return!1};function Bm(e,t={}){const r=Array.isArray(e);if(Yh(e)||r)for(const r in e)Array.isArray(e[r])||Yh(e[r])&&!Wm(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Bm(e[r],t[r])):Hh(e[r])||(t[r]=!0);return t}function Qm(e,t,r){const n=Array.isArray(e);if(Yh(e)||n)for(const n in e)Array.isArray(e[n])||Yh(e[n])&&!Wm(e[n])?nm(t)||Fm(r[n])?r[n]=Array.isArray(e[n])?Bm(e[n],[]):{...Bm(e[n])}:Qm(e[n],Hh(t)?{}:t[n],r[n]):r[n]=!Im(e[n],t[n]);return r}var Km=(e,t)=>Qm(e,t,Bm(t));const Hm={value:!1,isValid:!1},Gm={value:!0,isValid:!0};var Ym=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!nm(e[0].attributes.value)?nm(e[0].value)||""===e[0].value?Gm:{value:e[0].value,isValid:!0}:Gm:Hm}return Hm},Jm=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>nm(e)?e:t?""===e?NaN:e?+e:e:r&&Cm(e)?new Date(e):n?n(e):e;const Xm={isValid:!1,value:null};var ey=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Xm):Xm;function ty(e){const t=e.ref;return Lm(t)?t.files:qm(t)?ey(e.refs).value:zm(t)?[...t.selectedOptions].map(({value:e})=>e):Qh(t)?Ym(e.refs).value:Jm(nm(t.value)?e.ref.value:t.value,e)}var ry=e=>e instanceof RegExp,ny=e=>nm(e)?e:ry(e)?e.source:Yh(e)?ry(e.value)?e.value.source:e.value:e,oy=e=>({isOnSubmit:!e||e===hm,isOnBlur:e===fm,isOnChange:e===pm,isOnAll:e===ym,isOnTouch:e===mm});const iy="AsyncFunction";var ay=e=>!!e&&!!e.validate&&!!($m(e.validate)&&e.validate.constructor.name===iy||Yh(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===iy)),sy=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const ly=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const r=am(e,o);if(r){const{_f:e,...i}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(ly(i,t))break}else if(Yh(i)&&ly(i,t))break}}};function cy(e,t,r){const n=am(e,r);if(n||rm(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const n=o.join("."),i=am(t,n),a=am(e,n);if(i&&!Array.isArray(i)&&r!==n)return{name:r};if(a&&a.type)return{name:n,error:a};if(a&&a.root&&a.root.type)return{name:`${n}.root`,error:a.root};o.pop()}return{name:r}}var uy=(e,t,r)=>{const n=Tm(am(e,r));return lm(n,"root",t[r]),lm(e,r,n),e},dy=e=>Cm(e);function fy(e,t,r="validate"){if(dy(e)||Array.isArray(e)&&e.every(dy)||sm(e)&&!e)return{type:r,message:dy(e)?e:"",ref:t}}var py=e=>Yh(e)&&!ry(e)?e:{value:e,message:""},hy=async(e,t,r,n,o,i)=>{const{ref:a,refs:s,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:p,validate:h,name:m,valueAsNumber:y,mount:v}=e._f,g=am(r,m);if(!v||t.has(m))return{};const b=s?s[0]:a,x=e=>{o&&b.reportValidity&&(b.setCustomValidity(sm(e)?"":e||""),b.reportValidity())},w={},_=qm(a),k=Qh(a),j=_||k,O=(y||Lm(a))&&nm(a.value)&&nm(g)||Vm(a)&&""===a.value||""===g||Array.isArray(g)&&!g.length,S=Am.bind(null,m,n,w),E=(e,t,r,n=bm,o=xm)=>{const i=e?t:r;w[m]={type:e?n:o,message:i,ref:a,...S(e?n:o,i)}};if(i?!Array.isArray(g)||!g.length:l&&(!j&&(O||Hh(g))||sm(g)&&!g||k&&!Ym(s).isValid||_&&!ey(s).isValid)){const{value:e,message:t}=dy(l)?{value:!!l,message:l}:py(l);if(e&&(w[m]={type:_m,message:t,ref:b,...S(_m,t)},!n))return x(t),w}if(!(O||Hh(d)&&Hh(f))){let e,t;const r=py(f),o=py(d);if(Hh(g)||isNaN(g)){const n=a.valueAsDate||new Date(g),i=e=>new Date((new Date).toDateString()+" "+e),s="time"==a.type,l="week"==a.type;Cm(r.value)&&g&&(e=s?i(g)>i(r.value):l?g>r.value:n>new Date(r.value)),Cm(o.value)&&g&&(t=s?i(g)<i(o.value):l?g<o.value:n<new Date(o.value))}else{const n=a.valueAsNumber||(g?+g:g);Hh(r.value)||(e=n>r.value),Hh(o.value)||(t=n<o.value)}if((e||t)&&(E(!!e,r.message,o.message,vm,gm),!n))return x(w[m].message),w}if((c||u)&&!O&&(Cm(g)||i&&Array.isArray(g))){const e=py(c),t=py(u),r=!Hh(e.value)&&g.length>+e.value,o=!Hh(t.value)&&g.length<+t.value;if((r||o)&&(E(r,e.message,t.message),!n))return x(w[m].message),w}if(p&&!O&&Cm(g)){const{value:e,message:t}=py(p);if(ry(e)&&!g.match(e)&&(w[m]={type:wm,message:t,ref:a,...S(wm,t)},!n))return x(t),w}if(h)if($m(h)){const e=fy(await h(g,r),b);if(e&&(w[m]={...e,...S(km,e.message)},!n))return x(e.message),w}else if(Yh(h)){let e={};for(const t in h){if(!Mm(e)&&!n)break;const o=fy(await h[t](g,r),b,t);o&&(e={...o,...S(t,o.message)},x(o.message),n&&(w[m]=e))}if(!Mm(e)&&(w[m]={ref:b,...e},!n))return w}return x(!0),w};const my={mode:hm,reValidateMode:pm,shouldFocusError:!0};function yy(e={}){let t,r={...my,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:$m(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},i=(Yh(r.defaultValues)||Yh(r.values))&&tm(r.defaultValues||r.values)||{},a=r.shouldUnregister?{}:tm(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:Dm(),state:Dm()},p=r.criteriaMode===ym,h=async e=>{if(!r.disabled&&(u.isValid||d.isValid||e)){const e=r.resolver?Mm((await b()).errors):await x(o,!0);e!==n.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!r.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?lm(n.validatingFields,e,t):Zm(n.validatingFields,e))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Mm(n.validatingFields)}))},y=(e,t,r,n)=>{const l=am(o,e);if(l){const o=am(a,e,nm(r)?am(i,e):r);nm(o)||n&&n.defaultChecked||t?lm(a,e,t?o:ty(l._f)):k(e,o),s.mount&&h()}},v=(e,t,o,a,s)=>{let l=!1,c=!1;const p={name:e};if(!r.disabled){if(!o||a){(u.isDirty||d.isDirty)&&(c=n.isDirty,n.isDirty=p.isDirty=w(),l=c!==p.isDirty);const r=Im(am(i,e),t);c=!!am(n.dirtyFields,e),r?Zm(n.dirtyFields,e):lm(n.dirtyFields,e,!0),p.dirtyFields=n.dirtyFields,l=l||(u.dirtyFields||d.dirtyFields)&&c!==!r}if(o){const t=am(n.touchedFields,e);t||(lm(n.touchedFields,e,o),p.touchedFields=n.touchedFields,l=l||(u.touchedFields||d.touchedFields)&&t!==o)}l&&s&&f.state.next(p)}return l?p:{}},g=(e,o,i,a)=>{const s=am(n.errors,e),l=(u.isValid||d.isValid)&&sm(o)&&n.isValid!==o;var p;if(r.delayError&&i?(p=()=>((e,t)=>{lm(n.errors,e,t),f.state.next({errors:n.errors})})(e,i),t=e=>{clearTimeout(c),c=setTimeout(p,e)},t(r.delayError)):(clearTimeout(c),t=null,i?lm(n.errors,e,i):Zm(n.errors,e)),(i?!Im(s,i):s)||!Mm(a)||l){const t={...a,...l&&sm(o)?{isValid:o}:{},errors:n.errors,name:e};n={...n,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await r.resolver(a,r.context,((e,t,r,n)=>{const o={};for(const r of e){const e=am(t,r);e&&lm(o,r,e._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}})(e||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return m(e),t},x=async(e,t,o={valid:!0})=>{for(const i in e){const s=e[i];if(s){const{_f:e,...c}=s;if(e){const c=l.array.has(e.name),d=s._f&&ay(s._f);d&&u.validatingFields&&m([i],!0);const f=await hy(s,l.disabled,a,p,r.shouldUseNativeValidation&&!t,c);if(d&&u.validatingFields&&m([i]),f[e.name]&&(o.valid=!1,t))break;!t&&(am(f,e.name)?c?uy(n.errors,f,e.name):lm(n.errors,e.name,f[e.name]):Zm(n.errors,e.name))}!Mm(c)&&await x(c,t,o)}}return o.valid},w=(e,t)=>!r.disabled&&(e&&t&&lm(a,e,t),!Im(P(),i)),_=(e,t,r)=>Pm(e,l,{...s.mount?a:nm(t)?i:Cm(e)?{[e]:t}:t},r,t),k=(e,t,r={})=>{const n=am(o,e);let i=t;if(n){const r=n._f;r&&(!r.disabled&&lm(a,e,Jm(t,r)),i=Vm(r.ref)&&Hh(t)?"":t,zm(r.ref)?[...r.ref.options].forEach(e=>e.selected=i.includes(e.value)):r.refs?Qh(r.ref)?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):r.refs.forEach(e=>e.checked=e.value===i):Lm(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||f.state.next({name:e,values:tm(a)})))}(r.shouldDirty||r.shouldTouch)&&v(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&C(e)},j=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const i=t[n],a=e+"."+n,s=am(o,a);(l.array.has(e)||Yh(i)||s&&!s._f)&&!Kh(i)?j(a,i,r):k(a,i,r)}},O=(e,t,r={})=>{const c=am(o,e),p=l.array.has(e),h=tm(t);lm(a,e,h),p?(f.array.next({name:e,values:tm(a)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&r.shouldDirty&&f.state.next({name:e,dirtyFields:Km(i,a),isDirty:w(e,h)})):!c||c._f||Hh(h)?k(e,h,r):j(e,h,r),sy(e,l)&&f.state.next({...n}),f.state.next({name:s.mount?e:void 0,values:tm(a)})},S=async e=>{s.mount=!0;const i=e.target;let c=i.name,y=!0;const w=am(o,c),_=e=>{y=Number.isNaN(e)||Kh(e)&&isNaN(e.getTime())||Im(e,am(a,c,e))},k=oy(r.mode),j=oy(r.reValidateMode);if(w){let s,O;const S=i.type?ty(w._f):Jh(e),E=e.type===cm||e.type===um,P=!(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate))(w._f)&&!r.resolver&&!am(n.errors,c)&&!w._f.deps||((e,t,r,n,o)=>!o.isOnAll&&(!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:!(r?n.isOnChange:o.isOnChange)||e))(E,am(n.touchedFields,c),n.isSubmitted,j,k),N=sy(c,l,E);lm(a,c,S),E?(w._f.onBlur&&w._f.onBlur(e),t&&t(0)):w._f.onChange&&w._f.onChange(e);const R=v(c,S,E),A=!Mm(R)||N;if(!E&&f.state.next({name:c,type:e.type,values:tm(a)}),P)return(u.isValid||d.isValid)&&("onBlur"===r.mode?E&&h():E||h()),A&&f.state.next({name:c,...N?{}:R});if(!E&&N&&f.state.next({...n}),r.resolver){const{errors:e}=await b([c]);if(_(S),y){const t=cy(n.errors,o,c),r=cy(e,o,t.name||c);s=r.error,c=r.name,O=Mm(e)}}else m([c],!0),s=(await hy(w,l.disabled,a,p,r.shouldUseNativeValidation))[c],m([c]),_(S),y&&(s?O=!1:(u.isValid||d.isValid)&&(O=await x(o,!0)));y&&(w._f.deps&&C(w._f.deps),g(c,O,s,R))}},E=(e,t)=>{if(am(n.errors,t)&&e.focus)return e.focus(),1},C=async(e,t={})=>{let i,a;const s=Tm(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const r of e){const e=am(t,r);e?lm(n.errors,r,e):Zm(n.errors,r)}else n.errors=t;return t})(nm(e)?e:s);i=Mm(t),a=e?!s.some(e=>am(t,e)):i}else e?(a=(await Promise.all(s.map(async e=>{const t=am(o,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(a||n.isValid)&&h()):a=i=await x(o);return f.state.next({...!Cm(e)||(u.isValid||d.isValid)&&i!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:i}:{},errors:n.errors}),t.shouldFocus&&!a&&ly(o,E,e?s:l.mount),a},P=e=>{const t={...s.mount?a:i};return nm(e)?t:Cm(e)?am(t,e):e.map(e=>am(t,e))},N=(e,t)=>({invalid:!!am((t||n).errors,e),isDirty:!!am((t||n).dirtyFields,e),error:am((t||n).errors,e),isValidating:!!am(n.validatingFields,e),isTouched:!!am((t||n).touchedFields,e)}),R=(e,t,r)=>{const i=(am(o,e,{_f:{}})._f||{}).ref,a=am(n.errors,e)||{},{ref:s,message:l,type:c,...u}=a;lm(n.errors,e,{...u,...t,ref:i}),f.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&i&&i.focus&&i.focus()},A=e=>f.state.subscribe({next:t=>{var r,o,i;r=e.name,o=t.name,i=e.exact,r&&o&&r!==o&&!Tm(r).some(e=>e&&(i?e===o:e.startsWith(o)||o.startsWith(e)))||!((e,t,r,n)=>{r(e);const{name:o,...i}=e;return Mm(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!n||ym))})(t,e.formState||u,V,e.reRenderRoot)||e.callback({values:{...a},...n,...t})}}).unsubscribe,T=(e,t={})=>{for(const s of e?Tm(e):l.mount)l.mount.delete(s),l.array.delete(s),t.keepValue||(Zm(o,s),Zm(a,s)),!t.keepError&&Zm(n.errors,s),!t.keepDirty&&Zm(n.dirtyFields,s),!t.keepTouched&&Zm(n.touchedFields,s),!t.keepIsValidating&&Zm(n.validatingFields,s),!r.shouldUnregister&&!t.keepDefaultValue&&Zm(i,s);f.state.next({values:tm(a)}),f.state.next({...n,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&h()},D=({disabled:e,name:t})=>{(sm(e)&&s.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},F=(e,t={})=>{let n=am(o,e);const a=sm(t.disabled)||sm(r.disabled);return lm(o,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?D({disabled:sm(t.disabled)?t.disabled:r.disabled,name:e}):y(e,!0,t.value),{...a?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:ny(t.min),max:ny(t.max),minLength:ny(t.minLength),maxLength:ny(t.maxLength),pattern:ny(t.pattern)}:{},name:e,onChange:S,onBlur:S,ref:a=>{if(a){F(e,t),n=am(o,e);const r=nm(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>qm(e)||Qh(e))(r),l=n._f.refs||[];if(s?l.find(e=>e===r):r===n._f.ref)return;lm(o,e,{_f:{...n._f,...s?{refs:[...l.filter(Um),r,...Array.isArray(am(i,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=am(o,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Xh(l.array,e)||!s.action)&&l.unMount.add(e)}}},I=()=>r.shouldFocusError&&ly(o,E,l.mount),M=(e,t)=>async i=>{let s;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let c=tm(a);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();n.errors=e,c=tm(t)}else await x(o);if(l.disabled.size)for(const e of l.disabled)Zm(c,e);if(Zm(n.errors,"root"),Mm(n.errors)){f.state.next({errors:{}});try{await e(c,i)}catch(e){s=e}}else t&&await t({...n.errors},i),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Mm(n.errors)&&!s,submitCount:n.submitCount+1,errors:n.errors}),s)throw s},L=(e,t={})=>{const c=e?tm(e):i,d=tm(c),p=Mm(e),h=p?i:d;if(t.keepDefaultValues||(i=c),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(Km(i,a))]);for(const t of Array.from(e))am(n.dirtyFields,t)?lm(h,t,am(a,t)):O(t,am(h,t))}else{if(em&&nm(e))for(const e of l.mount){const t=am(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Vm(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)O(e,am(h,e));else o={}}a=r.shouldUnregister?t.keepDefaultValues?tm(i):{}:tm(h),f.array.next({values:{...h}}),f.state.next({values:{...h}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!t.keepIsValid||!!t.keepDirtyValues,s.watch=!!r.shouldUnregister,f.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!p&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||Im(e,i))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:p?{}:t.keepDirtyValues?t.keepDefaultValues&&a?Km(i,a):n.dirtyFields:t.keepDefaultValues&&e?Km(i,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1})},$=(e,t)=>L($m(e)?e(a):e,t),V=e=>{n={...n,...e}},z={control:{register:F,unregister:T,getFieldState:N,handleSubmit:M,setError:R,_subscribe:A,_runSchema:b,_focusError:I,_getWatch:_,_getDirty:w,_setValid:h,_setFieldArray:(e,t=[],l,c,p=!0,h=!0)=>{if(c&&l&&!r.disabled){if(s.action=!0,h&&Array.isArray(am(o,e))){const t=l(am(o,e),c.argA,c.argB);p&&lm(o,e,t)}if(h&&Array.isArray(am(n.errors,e))){const t=l(am(n.errors,e),c.argA,c.argB);p&&lm(n.errors,e,t),((e,t)=>{!om(am(e,t)).length&&Zm(e,t)})(n.errors,e)}if((u.touchedFields||d.touchedFields)&&h&&Array.isArray(am(n.touchedFields,e))){const t=l(am(n.touchedFields,e),c.argA,c.argB);p&&lm(n.touchedFields,e,t)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Km(i,a)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else lm(a,e,t)},_setDisabledField:D,_setErrors:e=>{n.errors=e,f.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>om(am(s.mount?a:i,e,r.shouldUnregister?am(i,e,[]):[])),_reset:L,_resetDefaultValues:()=>$m(r.defaultValues)&&r.defaultValues().then(e=>{$(e,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=am(o,e);t&&(t._f.refs?t._f.refs.every(e=>!Um(e)):!Um(t._f.ref))&&T(e)}l.unMount=new Set},_disableForm:e=>{sm(e)&&(f.state.next({disabled:e}),ly(o,(t,r)=>{const n=am(o,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:u,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(e){s=e},get _defaultValues(){return i},get _names(){return l},set _names(e){l=e},get _formState(){return n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(s.mount=!0,d={...d,...e.formState},A({...e,formState:d})),trigger:C,register:F,handleSubmit:M,watch:(e,t)=>$m(e)?f.state.subscribe({next:r=>e(_(void 0,t),r)}):_(e,t,!0),setValue:O,getValues:P,reset:$,resetField:(e,t={})=>{am(o,e)&&(nm(t.defaultValue)?O(e,tm(am(i,e))):(O(e,t.defaultValue),lm(i,e,tm(t.defaultValue))),t.keepTouched||Zm(n.touchedFields,e),t.keepDirty||(Zm(n.dirtyFields,e),n.isDirty=t.defaultValue?w(e,tm(am(i,e))):w()),t.keepError||(Zm(n.errors,e),u.isValid&&h()),f.state.next({...n}))},clearErrors:e=>{e&&Tm(e).forEach(e=>Zm(n.errors,e)),f.state.next({errors:e?n.errors:{}})},unregister:T,setError:R,setFocus:(e,t={})=>{const r=am(o,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&$m(e.select)&&e.select())}},getFieldState:N};return{...z,formControl:z}}function vy(e={}){const t=a.useRef(void 0),r=a.useRef(void 0),[n,o]=a.useState({isDirty:!1,isValidating:!1,isLoading:$m(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:$m(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!$m(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:r,...o}=yy(e);t.current={...o,formState:n}}const i=t.current.control;return i._options=e,Em(()=>{const e=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(e=>({...e,isReady:!0})),i._formState.isReady=!0,e},[i]),a.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),a.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),a.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),a.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),a.useEffect(()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==n.isDirty&&i._subjects.state.next({isDirty:e})}},[i,n.isDirty]),a.useEffect(()=>{e.values&&!Im(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=e.values,o(e=>({...e}))):i._resetDefaultValues()},[i,e.values]),a.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Sm(n,i),t.current}const gy=(e,t,r)=>{if(e&&"reportValidity"in e){const n=am(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},by=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?gy(n.ref,r,e):n.refs&&n.refs.forEach(t=>gy(t,r,e))}},xy=(e,t)=>{t.shouldUseNativeValidation&&by(e,t);const r={};for(const n in e){const o=am(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(wy(t.names||Object.keys(e),n)){const e=Object.assign({},am(r,n));lm(e,"root",i),lm(r,n,e)}else lm(r,n,i)}return r},wy=(e,t)=>e.some(e=>e.startsWith(t+"."));var _y=function(e,t){for(var r={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];r[a]={message:s.message,type:s.code}}else r[a]={message:i,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var l=r[a].types,c=l&&l[n.code];r[a]=Am(a,t,r,o,c?[].concat(c,n.message):n.message)}e.shift()}return r},ky=function(e,t,r){return void 0===r&&(r={}),function(n,o,i){try{return Promise.resolve(function(o,a){try{var s=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](n,t)).then(function(e){return i.shouldUseNativeValidation&&by({},i),{errors:{},values:r.raw?n:e}})}catch(e){return a(e)}return s&&s.then?s.then(void 0,a):s}(0,function(e){if(function(e){return Array.isArray(null==e?void 0:e.errors)}(e))return{values:{},errors:xy(_y(e.errors,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)};throw e}))}catch(e){return Promise.reject(e)}}};const jy=Wi("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var Oy={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-6 h-6"};const Sy=function(e){var t=e.isLoading,r=e.loadingText,n=e.children,o=e.size,i=void 0===o?"sm":o,a=e.className;if(!t)return(0,rn.jsx)(rn.Fragment,{children:n});var s=(0,sn.__)("Loading","versatile-toolkit"),l=r||"".concat(s,"...");return(0,rn.jsxs)("div",{className:go("flex items-center gap-2",a),children:[(0,rn.jsx)("div",{className:go(Oy[i],"animate-spin"),children:(0,rn.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,rn.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"31.416",className:"opacity-25"}),(0,rn.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"23.562",className:"opacity-75"})]})}),(0,rn.jsx)("span",{children:l})]})};var Ey={xs:"w-3 h-3 text-xs",sm:"w-4 h-4 text-sm",md:"w-5 h-5 text-base",lg:"w-6 h-6 text-lg",xl:"w-8 h-8 text-xl"},Cy={default:"text-foreground",primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"};const Py=function(e){var t=e.size,r=void 0===t?"sm":t,n=e.variant,o=void 0===n?"muted":n,i=e.className,a=e.text,s=e.showText,l=void 0===s||s,c=a||(0,sn.__)("Loading","versatile-toolkit");return(0,rn.jsxs)("div",{className:go("flex items-center gap-2 py-2",Cy[o],i),children:[(0,rn.jsx)("div",{className:go(Ey[r],"animate-spin"),children:(0,rn.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,rn.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"31.416",className:"opacity-25"}),(0,rn.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"23.562",className:"opacity-75"})]})}),l&&(0,rn.jsxs)("span",{className:Ey[r].split(" ")[2],children:[c,"..."]})]})};function Ny(e){return Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(e)}function Ry(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Ay(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ay(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ay(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Ay(d,"constructor",c),Ay(c,"constructor",l),l.displayName="GeneratorFunction",Ay(c,o,"GeneratorFunction"),Ay(d),Ay(d,o,"Generator"),Ay(d,n,function(){return this}),Ay(d,"toString",function(){return"[object Generator]"}),(Ry=function(){return{w:i,m:f}})()}function Ay(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ay=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ay(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ay(e,t,r,n)}function Ty(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ty(Object(r),!0).forEach(function(t){Fy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fy(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Ny(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ny(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ny(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Iy(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function My(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Iy(i,n,o,a,s,"next",e)}function s(e){Iy(i,n,o,a,s,"throw",e)}a(void 0)})}}const Ly=function(){var e,t,r,n,o,i=vy({resolver:ky(Ah),defaultValues:{chosen_plugins:[],ip_tags:[]}}),s=i.handleSubmit,l=i.control,c=i.formState.errors,u=Yo({mutationFn:(n=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_save_disable_plugin_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return n.apply(this,arguments)}),onSuccess:function(e){var t;fr.success(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Plugin disabled successfully!","versatile-toolkit"))},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed to disable plugin","versatile-toolkit"))}}),d=function(){var e=My(Ry().m(function e(t){return Ry().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,u.mutateAsync(Dy({},t));case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),f=Ho({queryKey:["getDisablePluginList"],queryFn:(o=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_disable_plugin_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return o.apply(this,arguments)}),staleTime:5e3}),p=f.data,h=f.isFetching,m=(f.isLoading,f.isError,null==p?void 0:p.data.chosen_plugins),y=null==p?void 0:p.data.ip_tags;(0,a.useEffect)(function(){(m||y)&&l._reset({chosen_plugins:m||[],ip_tags:y||[]})},[m,y,l]);var v,g,b=vy({resolver:ky(Fh),defaultValues:{activeTheme:""}}),x=b.handleSubmit,w=b.control,_=b.formState.errors,k=Yo({mutationFn:(v=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_save_active_theme",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return v.apply(this,arguments)}),onSuccess:function(e){var t;fr.success(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Theme activated successfully!","versatile-toolkit"))},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed to activate theme","versatile-toolkit"))}}),j=function(){var e=My(Ry().m(function e(t){return Ry().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,k.mutateAsync(Dy({},t));case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),O=Ho({queryKey:["getActiveTheme"],queryFn:(g=Mf(Df().m(function e(t){var r;return Df().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_active_theme",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return g.apply(this,arguments)}),staleTime:5e3}),S=O.data,E=O.isFetching,C=null==S?void 0:S.data.activeTheme;return(0,a.useEffect)(function(){C&&w._reset({activeTheme:C})},[C,w]),(0,rn.jsxs)("div",{className:"p-4 space-y-6 max-w-[800px]",children:[(0,rn.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,rn.jsx)(lt,{to:"/",children:(0,rn.jsx)(jy,{})}),(0,sn.__)("Troubleshoot Settings","versatile-toolkit")]}),(0,rn.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,rn.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,sn.__)("Disable Plugin by IP address","versatile-toolkit")}),(0,rn.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:(0,sn.__)("Select plugins to disable for specific IP addresses. This is useful for troubleshooting plugin conflicts.","versatile-toolkit")}),(0,rn.jsxs)("form",{onSubmit:s(d),children:[(0,rn.jsxs)("div",{className:"min-h-[42px]",children:[h?(0,rn.jsx)("span",{className:"text-xl",children:(0,sn.__)("Loading...","versatile-toolkit")}):(0,rn.jsx)(Rm,{name:"chosen_plugins",control:l,render:function(e){var t=e.field;return(0,rn.jsx)(qf,{selectedPlugin:t.value,onChange:t.onChange})}}),c.chosen_plugins&&(0,rn.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==c||null===(e=c.chosen_plugins)||void 0===e?void 0:e.message})]}),(0,rn.jsxs)("div",{className:"min-h-[64px] mt-2",children:[h?(0,rn.jsx)("span",{className:"text-xl",children:(0,sn.__)("Loading...","versatile-toolkit")}):(0,rn.jsx)(Rm,{name:"ip_tags",control:l,render:function(e){var t=e.field;return(0,rn.jsx)(Uh,{tags:t.value,onChange:t.onChange})}}),c.ip_tags&&(0,rn.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==c||null===(t=c.ip_tags)||void 0===t?void 0:t.message})]}),(0,rn.jsx)(zi,{type:"submit",className:"mt-6",disabled:u.isPending,children:u.isPending?(0,sn.__)("Saving...","versatile-toolkit"):(0,sn.__)("Save Plugin Settings","versatile-toolkit")})]})]}),(0,rn.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,rn.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,sn.__)("Switch Theme","versatile-toolkit")}),(0,rn.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:(0,sn.__)("Select and activate a theme.","versatile-toolkit")}),(0,rn.jsxs)("form",{onSubmit:x(j),children:[(0,rn.jsxs)("div",{className:"min-h-[42px]",children:[E?(0,rn.jsx)(Py,{size:"md",text:(0,sn.__)("Loading themes","versatile-toolkit")}):(0,rn.jsx)(Rm,{name:"activeTheme",control:w,render:function(e){var t=e.field;return(0,rn.jsx)(Bh,{selectedTheme:t.value,onChange:t.onChange})}}),_.activeTheme&&(0,rn.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==_||null===(r=_.activeTheme)||void 0===r?void 0:r.message})]}),(0,rn.jsx)(zi,{type:"submit",className:"mt-6",disabled:k.isPending,children:(0,rn.jsx)(Sy,{isLoading:k.isPending,loadingText:(0,sn.__)("Activating","versatile-toolkit"),children:(0,sn.__)("Activate Theme","versatile-toolkit")})})]})]})]})};var $y=a.forwardRef((e,t)=>(0,rn.jsx)(ba.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));$y.displayName="Label";var Vy=$y;function zy(e){return zy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zy(e)}var qy=["className"];function Uy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Zy(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=zy(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=zy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Wy=Fi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),By=a.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,qy);return(0,rn.jsx)(Vy,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uy(Object(r),!0).forEach(function(t){Zy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({ref:t,className:go(Wy(),r)},n))});function Qy(e){return Qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qy(e)}By.displayName=Vy.displayName;var Ky=["className"],Hy=["className"],Gy=["className"],Yy=["className","children"];function Jy(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ev(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xy(Object(r),!0).forEach(function(t){tv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Qy(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Qy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rv(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nv.apply(null,arguments)}var ov=e=>{const{children:t,...r}=e;return a.createElement(jm.Provider,{value:r},t)},iv=a.createContext({}),av=function(e){var t=nv({},(rv(e),e));return(0,rn.jsx)(iv.Provider,{value:{name:t.name},children:(0,rn.jsx)(Rm,ev({},t))})},sv=function(){var e=a.useContext(iv),t=a.useContext(lv),r=Om(),n=r.getFieldState,o=r.formState,i=n(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");var s=t.id;return ev({id:s,name:e.name,formItemId:"".concat(s,"-form-item"),formDescriptionId:"".concat(s,"-form-item-description"),formMessageId:"".concat(s,"-form-item-message")},i)},lv=a.createContext({}),cv=a.forwardRef(function(e,t){var r=e.className,n=Jy(e,Ky),o=a.useId();return(0,rn.jsx)(lv.Provider,{value:{id:o},children:(0,rn.jsx)("div",ev({ref:t,className:go("space-y-2",r)},n))})});cv.displayName="FormItem";var uv=a.forwardRef(function(e,t){var r=e.className,n=Jy(e,Hy),o=sv(),i=o.error,a=o.formItemId;return(0,rn.jsx)(By,ev({ref:t,className:go(i&&"text-destructive",r),htmlFor:a},n))});uv.displayName="FormLabel";var dv=a.forwardRef(function(e,t){var r=nv({},(rv(e),e)),n=sv(),o=n.error,i=n.formItemId,a=n.formDescriptionId,s=n.formMessageId;return(0,rn.jsx)(Pi,ev({ref:t,id:i,"aria-describedby":o?"".concat(a," ").concat(s):"".concat(a),"aria-invalid":!!o},r))});dv.displayName="FormControl";var fv=a.forwardRef(function(e,t){var r=e.className,n=Jy(e,Gy),o=sv().formDescriptionId;return(0,rn.jsx)("p",ev({ref:t,id:o,className:go("text-[0.8rem] text-muted-foreground",r)},n))});fv.displayName="FormDescription";var pv=a.forwardRef(function(e,t){var r,n=e.className,o=e.children,i=Jy(e,Yy),a=sv(),s=a.error,l=a.formMessageId,c=s?String(null!==(r=null==s?void 0:s.message)&&void 0!==r?r:""):o;return c?(0,rn.jsx)("p",ev(ev({ref:t,id:l,className:go("text-[0.8rem] font-medium text-destructive",n)},i),{},{children:c})):null});function hv(e){return hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hv(e)}pv.displayName="FormMessage";var mv=["className"];function yv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function vv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=hv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=hv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var gv=a.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,mv);return(0,rn.jsx)("textarea",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yv(Object(r),!0).forEach(function(t){vv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:go("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base 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 md:text-sm",r),ref:t},n))});gv.displayName="Textarea";var bv="Switch",[xv,wv]=ua(bv),[_v,kv]=xv(bv),jv=a.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:s,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[p,h]=a.useState(null),m=Ei(t,e=>h(e)),y=a.useRef(!1),v=!p||(d||!!p.closest("form")),[g,b]=va({prop:o,defaultProp:i??!1,onChange:u,caller:bv});return(0,rn.jsxs)(_v,{scope:r,checked:g,disabled:l,children:[(0,rn.jsx)(ba.button,{type:"button",role:"switch","aria-checked":g,"aria-required":s,"data-state":Cv(g),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:m,onClick:ca(e.onClick,e=>{b(e=>!e),v&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),v&&(0,rn.jsx)(Ev,{control:p,bubbles:!y.current,name:n,value:c,checked:g,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});jv.displayName=bv;var Ov="SwitchThumb",Sv=a.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=kv(Ov,r);return(0,rn.jsx)(ba.span,{"data-state":Cv(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Sv.displayName=Ov;var Ev=a.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const s=a.useRef(null),l=Ei(s,i),c=function(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r),u=Pd(t);return a.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&o){const t=new Event("click",{bubbles:n});o.call(e,r),e.dispatchEvent(t)}},[c,r,n]),(0,rn.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Cv(e){return e?"checked":"unchecked"}Ev.displayName="SwitchBubbleInput";var Pv=jv,Nv=Sv;function Rv(e){return Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rv(e)}var Av=["className"];function Tv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tv(Object(r),!0).forEach(function(t){Fv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Rv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Rv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Iv=a.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Av);return(0,rn.jsx)(Pv,Dv(Dv({className:go("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",r)},n),{},{ref:t,children:(0,rn.jsx)(Nv,{className:go("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")})}))});function Mv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Iv.displayName=Pv.displayName;const $v=function(e){var t=e.value,r=void 0===t?"":t,n=e.onChange,o=e.buttonText,i=void 0===o?(0,sn.__)("Upload Image","versatile-toolkit"):o,s=e.allowedTypes,l=void 0===s?["image"]:s,c=e.multiple,u=void 0!==c&&c,d=Mv((0,a.useState)(r),2),f=d[0],p=d[1],h=Mv((0,a.useState)(0),2),m=(h[0],h[1]);(0,a.useEffect)(function(){p(r)},[r]);return(0,rn.jsxs)("div",{className:"space-y-4",children:[(0,rn.jsxs)("div",{className:"flex gap-2",children:[(0,rn.jsx)(zi,{type:"button",variant:"outline",onClick:function(){if(void 0!==window.wp&&window.wp.media){var e=window.wp.media({title:(0,sn.__)("Select Image","versatile-toolkit"),button:{text:(0,sn.__)("Use this image","versatile-toolkit")},multiple:u,library:{type:l}});e.on("select",function(){var t=e.state().get("selection").first().toJSON();p(t.url),m(t.id),n(t.url,t.id)}),e.open()}},children:i}),f&&(0,rn.jsx)(zi,{type:"button",variant:"destructive",size:"sm",onClick:function(){p(""),m(0),n("",0)},children:(0,sn.__)("Remove","versatile-toolkit")})]}),f&&(0,rn.jsxs)("div",{className:"mt-4",children:[(0,rn.jsx)("div",{className:"border rounded-lg p-2 inline-block bg-gray-50",children:(0,rn.jsx)("img",{src:f,alt:(0,sn.__)("Preview","versatile-toolkit"),className:"max-w-xs max-h-32 object-cover rounded"})}),(0,rn.jsx)("p",{className:"text-sm text-gray-600 mt-2",children:(0,sn.__)("Image selected","versatile-toolkit")})]})]})},Vv=Wi("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"}]]);function zv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Uv=function(e){var t,r,n,o,i,s=e.type,l=e.disabled,c=void 0!==l&&l,u=zv((0,a.useState)(!1),2),d=u[0],f=u[1],p=zv((0,a.useState)(!1),2),h=p[0],m=p[1],y=function(){f(!1),m(!1)};return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsxs)(zi,{type:"button",variant:"outline",onClick:function(){f(!0),m(!0)},disabled:c,className:"flex items-center gap-2",children:[(0,rn.jsx)(Vv,{size:16}),"maintenance"===s?(0,sn.__)("Preview Maintenance Page","versatile-toolkit"):(0,sn.__)("Preview Coming Soon Page","versatile-toolkit")]}),d&&(0,rn.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:function(e){e.target===e.currentTarget&&y()},children:(0,rn.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-11/12 h-5/6 max-w-6xl flex flex-col",children:[(0,rn.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,rn.jsx)("h3",{className:"text-lg font-semibold",children:"maintenance"===s?(0,sn.__)("Maintenance Page Preview","versatile-toolkit"):(0,sn.__)("Coming Soon Page Preview","versatile-toolkit")}),(0,rn.jsx)(zi,{variant:"ghost",size:"sm",onClick:y,className:"h-8 w-8 p-0",children:(0,rn.jsx)(Bi,{size:16})})]}),(0,rn.jsx)("div",{className:"flex-1 p-4",children:(0,rn.jsxs)("div",{className:"w-full h-full border rounded-lg overflow-hidden bg-gray-50",children:[h&&(0,rn.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,rn.jsxs)("div",{className:"text-center",children:[(0,rn.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-2"}),(0,rn.jsx)("p",{className:"text-gray-600",children:(0,sn.__)("Loading preview...","versatile-toolkit")})]})}),(0,rn.jsx)("iframe",{src:(n=null===(t=window._versatileObject)||void 0===t?void 0:t.ajax_url,o=null===(r=window._versatileObject)||void 0===r?void 0:r.nonce_value,i="maintenance"===s?"versatile_preview_maintenance":"versatile_preview_comingsoon","".concat(n,"?action=").concat(i,"&versatile_nonce=").concat(o)),className:"w-full h-full border-0",title:"maintenance"===s?(0,sn.__)("Maintenance Preview","versatile-toolkit"):(0,sn.__)("Coming Soon Preview","versatile-toolkit"),onLoad:function(){return m(!1)},style:{display:h?"none":"block"}})]})}),(0,rn.jsx)("div",{className:"p-4 border-t bg-gray-50 rounded-b-lg",children:(0,rn.jsxs)("div",{className:"flex justify-between items-center",children:[(0,rn.jsx)("p",{className:"text-sm text-gray-600",children:(0,sn.__)("This is how your page will look to visitors.","versatile-toolkit")}),(0,rn.jsx)(zi,{onClick:y,variant:"outline",children:(0,sn.__)("Close Preview","versatile-toolkit")})]})})]})})]})};function Zv(e){return Zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zv(e)}function Wv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Bv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wv(Object(r),!0).forEach(function(t){Qv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Qv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Zv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Zv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kv(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Hv(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Hv(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Hv(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Hv(d,"constructor",c),Hv(c,"constructor",l),l.displayName="GeneratorFunction",Hv(c,o,"GeneratorFunction"),Hv(d),Hv(d,o,"Generator"),Hv(d,n,function(){return this}),Hv(d,"toString",function(){return"[object Generator]"}),(Kv=function(){return{w:i,m:f}})()}function Hv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Hv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Hv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Hv(e,t,r,n)}function Gv(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function Yv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Xv=function(){var e=Yv((0,a.useState)(!1),2),t=e[0],r=e[1],n=vy({resolver:ky(Th),defaultValues:{enable_maintenance:!0,title:"",description:"",subtitle:"",background_image:"",background_image_id:0,logo:"",logo_id:0}}),o=n.handleSubmit,i=function(){var e,t=on();return Yo({mutationFn:(e=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_maintenance_mood",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),onSuccess:function(e){var r;fr.success(null!==(r=e.message)&&void 0!==r?r:(0,sn.__)("Maintenance Mood info updated!","versatile-toolkit")),t.invalidateQueries({queryKey:["getMoodInfo"]})},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed while updating maintenance mood","versatile-toolkit"))}})}(),s=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Gv(i,n,o,a,s,"next",e)}function s(e){Gv(i,n,o,a,s,"throw",e)}a(void 0)})}}(Kv().m(function e(t){return Kv().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,i.mutateAsync(t);case 1:e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),l=xi(),c=l.data,u=l.isLoading,d=null==c?void 0:c.data.maintenance;return(0,a.useEffect)(function(){d&&(n.reset({enable_maintenance:null==c?void 0:c.data.enable_maintenance,title:d.title||"",description:d.description||"",subtitle:d.subtitle||"",background_image:d.background_image||"",background_image_id:d.background_image_id||0,logo:d.logo||"",logo_id:d.logo_id||0}),r(!0))},[d]),(0,rn.jsx)("div",{className:"p-4 space-y-6",children:u||!t?(0,rn.jsx)("span",{className:"text-2xl",children:"Loading..."}):(0,rn.jsx)(ov,Bv(Bv({},n),{},{children:(0,rn.jsxs)("form",{onSubmit:o(s,function(e){}),children:[(0,rn.jsxs)("div",{className:"flex gap-10",children:[(0,rn.jsxs)("div",{className:"w-1/2",children:[(0,rn.jsx)(av,{control:n.control,name:"enable_maintenance",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{children:[(0,rn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rn.jsx)(uv,{className:"text-foreground",htmlFor:"enable_maintenance",children:(0,sn.__)("Enable Maintenance Mood","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Iv,{id:"enable_maintenance",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"title",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Title","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Hf,Bv({placeholder:(0,sn.__)("Enter maintenance title","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"subtitle",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Subtitle","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Hf,Bv({placeholder:(0,sn.__)("Enter subtitle","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Optional subtitle under the title.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"description",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Description","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(gv,Bv({placeholder:(0,sn.__)("Describe what is happening...","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Provide more details about the maintenance.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}})]}),(0,rn.jsxs)("div",{className:"w-1/2",children:[(0,rn.jsx)(av,{control:n.control,name:"background_image",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Background Image","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)($v,{value:t.value||"",onChange:function(e,r){t.onChange(e),n.setValue("background_image_id",r)},buttonText:(0,sn.__)("Upload Background Image","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Upload a background image for the maintenance page.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"logo",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Logo","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)($v,{value:t.value||"",onChange:function(e,r){t.onChange(e),n.setValue("logo_id",r)},buttonText:(0,sn.__)("Upload Logo","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Upload a logo to display on the maintenance page.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}})]})]}),(0,rn.jsxs)("div",{className:"flex gap-4 mt-6",children:[(0,rn.jsx)(zi,{type:"submit",disabled:i.isPending,children:i.isPending?(0,sn.__)("Saving...","versatile-toolkit"):(0,sn.__)("Save Settings","versatile-toolkit")}),(0,rn.jsx)(Uv,{type:"maintenance",disabled:i.isPending})]})]})}))})};const eg=function(){return(0,rn.jsxs)("div",{className:"p-4 space-y-6",children:[(0,rn.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,rn.jsx)(lt,{to:"/",children:(0,rn.jsx)(jy,{})}),(0,sn.__)("Maintenance Mood","versatile-toolkit")]}),(0,rn.jsx)(Xv,{})]})};function tg(e){return tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tg(e)}function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ng(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(t){og(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function og(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=tg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ig(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return ag(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ag(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ag(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,ag(d,"constructor",c),ag(c,"constructor",l),l.displayName="GeneratorFunction",ag(c,o,"GeneratorFunction"),ag(d),ag(d,o,"Generator"),ag(d,n,function(){return this}),ag(d,"toString",function(){return"[object Generator]"}),(ig=function(){return{w:i,m:f}})()}function ag(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ag=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ag(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ag(e,t,r,n)}function sg(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function lg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const ug=function(){var e=lg((0,a.useState)(!1),2),t=e[0],r=e[1],n=vy({resolver:ky(Dh),defaultValues:{enable_comingsoon:!0,title:"",description:"",subtitle:"",background_image:"",background_image_id:0,logo:"",logo_id:0}}),o=n.handleSubmit,i=(n.control,n.formState.errors,function(){var e,t=on();return Yo({mutationFn:(e=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_comingsoon_mood",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),onSuccess:function(e){var r;fr.success(null!==(r=e.message)&&void 0!==r?r:(0,sn.__)("Comingsoon Mood info updated!","versatile-toolkit")),t.invalidateQueries({queryKey:["getMoodInfo"]})},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed while updating Comingsoon mood","versatile-toolkit"))}})}()),s=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){sg(i,n,o,a,s,"next",e)}function s(e){sg(i,n,o,a,s,"throw",e)}a(void 0)})}}(ig().m(function e(t){return ig().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,i.mutateAsync(t);case 1:e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),l=xi(),c=l.data,u=l.isLoading,d=(l.isSuccess,null==c?void 0:c.data.comingsoon);return(0,a.useEffect)(function(){d&&(n.reset({enable_comingsoon:null==c?void 0:c.data.enable_comingsoon,title:d.title,description:d.description,subtitle:d.subtitle,background_image:d.background_image||"",background_image_id:d.background_image_id||0,logo:d.logo||"",logo_id:d.logo_id||0}),r(!0))},[d]),(0,rn.jsx)("div",{className:"p-4 space-y-6",children:u||!t?(0,rn.jsx)("span",{className:"text-2xl",children:"Loading..."}):(0,rn.jsx)(ov,ng(ng({},n),{},{children:(0,rn.jsxs)("form",{onSubmit:o(s),children:[(0,rn.jsxs)("div",{className:"flex gap-10",children:[(0,rn.jsxs)("div",{className:"w-1/2",children:[(0,rn.jsx)(av,{control:n.control,name:"enable_comingsoon",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{children:[(0,rn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rn.jsx)(uv,{className:"text-foreground",htmlFor:"enable_comingsoon",children:(0,sn.__)("Enable Comingsoon Mood","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Iv,{id:"enable_comingsoon",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"title",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Title","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Hf,ng({placeholder:(0,sn.__)("Enter comingsoon title","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"subtitle",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Subtitle","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(Hf,ng({placeholder:(0,sn.__)("Enter subtitle","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Optional subtitle under the title.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"description",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Description","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)(gv,ng({placeholder:(0,sn.__)("Describe what is happening...","versatile-toolkit")},t))}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Provide more details about the comingsoon.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}})]}),(0,rn.jsxs)("div",{className:"w-1/2",children:[(0,rn.jsx)(av,{control:n.control,name:"background_image",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Background Image","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)($v,{value:t.value||"",onChange:function(e,r){t.onChange(e),n.setValue("background_image_id",r)},buttonText:(0,sn.__)("Upload Background Image","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Upload a background image for the coming soon page.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}}),(0,rn.jsx)(av,{control:n.control,name:"logo",render:function(e){var t=e.field,r=e.fieldState;return(0,rn.jsxs)(cv,{className:"mt-6",children:[(0,rn.jsx)(uv,{className:"text-foreground",children:(0,sn.__)("Logo","versatile-toolkit")}),(0,rn.jsx)(dv,{children:(0,rn.jsx)($v,{value:t.value||"",onChange:function(e,r){t.onChange(e),n.setValue("logo_id",r)},buttonText:(0,sn.__)("Upload Logo","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,rn.jsx)(fv,{children:(0,sn.__)("Upload a logo to display on the coming soon page.","versatile-toolkit")}),(0,rn.jsx)(pv,{})]})}})]})]}),(0,rn.jsxs)("div",{className:"flex gap-4 mt-6",children:[(0,rn.jsx)(zi,{type:"submit",disabled:i.isPending,children:i.isPending?(0,sn.__)("Saving...","versatile-toolkit"):(0,sn.__)("Save Settings","versatile-toolkit")}),(0,rn.jsx)(Uv,{type:"comingsoon",disabled:i.isPending})]})]})}))})};const dg=function(){return(0,rn.jsxs)("div",{className:"p-4 space-y-6",children:[(0,rn.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,rn.jsx)(lt,{to:"/",children:(0,rn.jsx)(jy,{})}),(0,sn.__)("Comingsoon Mood","versatile-toolkit")]}),(0,rn.jsx)(ug,{})]})};function fg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return pg(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(pg(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,pg(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,pg(d,"constructor",c),pg(c,"constructor",l),l.displayName="GeneratorFunction",pg(c,o,"GeneratorFunction"),pg(d),pg(d,o,"Generator"),pg(d,n,function(){return this}),pg(d,"toString",function(){return"[object Generator]"}),(fg=function(){return{w:i,m:f}})()}function pg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}pg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){pg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},pg(e,t,r,n)}function hg(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function mg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const vg=function(){var e,t,r=mg((0,a.useState)(!1),2),n=r[0],o=r[1],i=on(),s=Ho({queryKey:["getServiceList"],queryFn:(e=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_service_list",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3}),l=s.data,c=null==l?void 0:l.data,u=Yo({mutationFn:(t=bi(yi().m(function e(t){var r;return yi().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_service_status",e.n=1,fi(Lo.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),onSuccess:function(e){var t;fr.success(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Service status updated!","versatile-toolkit"))},onError:function(e){var t;fr.error(null!==(t=e.message)&&void 0!==t?t:(0,sn.__)("Failed to update service status","versatile-toolkit"))}}),d=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){hg(i,n,o,a,s,"next",e)}function s(e){hg(i,n,o,a,s,"throw",e)}a(void 0)})}}(fg().m(function e(t,r){return fg().w(function(e){for(;;)switch(e.n){case 0:u.mutateAsync({service_key:t,enable:!r.enable},{onSuccess:function(){i.invalidateQueries({queryKey:["getServiceList"]}),i.invalidateQueries({queryKey:["getEnableServiceList"]})}});case 1:return e.a(2)}},e)}));return function(t,r){return e.apply(this,arguments)}}(),f=function(){o(!n)};return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsxs)("header",{className:"bg-white border-b border-gray-200 px-1 py-4 flex items-center justify-between relative",children:[(0,rn.jsx)("div",{className:"flex items-center",children:(0,rn.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:(0,sn.__)("Versatile","versatile-toolkit")})}),(0,rn.jsx)("button",{onClick:f,className:"p-2 rounded-md hover:bg-gray-100 transition-colors duration-200","aria-label":"Toggle menu",children:(0,rn.jsx)("svg",{className:"w-6 h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,rn.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]}),n&&(0,rn.jsx)("div",{className:"fixed z-[99999] inset-0 bg-black bg-opacity-50 z-40",onClick:f}),n&&(0,rn.jsx)("div",{className:"fixed w-[500px] top-0 z-[99999] rounded-none right-0 h-screen bg-white shadow-lg border border-gray-200",children:(0,rn.jsxs)("div",{className:"p-4",children:[(0,rn.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,rn.jsx)("h3",{className:"text-lg font-medium text-gray-800",children:(0,sn.__)("Services","versatile-toolkit")}),(0,rn.jsx)("button",{onClick:f,className:"p-1 rounded-md hover:bg-gray-100 transition-colors duration-200","aria-label":"Close menu",children:(0,rn.jsx)("svg",{className:"w-5 h-5 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,rn.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,rn.jsx)("div",{className:"space-y-3",children:Object.entries(c||{}).map(function(e){var t=mg(e,2),r=t[0],n=t[1];return(0,rn.jsxs)("div",{onClick:function(){return d(r,n)},className:"flex items-center justify-between p-3 rounded-md border border-gray-200 bg-gray-50 hover:bg-blue-100 hover:border-blue-300 hover:shadow-md transition-all duration-300 cursor-pointer",children:[(0,rn.jsx)("span",{className:"text-blue-500 font-medium hover:text-blue-800 transition-colors duration-300",children:n.label}),(0,rn.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,rn.jsx)("input",{type:"checkbox",checked:n.enable,onChange:function(){},className:"sr-only peer"}),(0,rn.jsx)("div",{className:"relative w-11 h-6 bg-[#c7c6c6] peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]},n.label)})})]})})]})};var gg=function(e){var t=e.children,r=wi(),n=r.data,o=r.isLoading,i=null==n?void 0:n.data,a=ne().pathname.replace("/","");if(o)return(0,rn.jsx)("div",{className:"text-xl",children:(0,sn.__)("Loading...","versatile-toolkit")});if(!i)return(0,rn.jsx)(rn.Fragment,{children:t});var s=Object.values(i).find(function(e){return e.path===a});return s&&s.enable?(0,rn.jsx)(rn.Fragment,{children:t}):(0,rn.jsx)(ke,{to:"/",replace:!0})},bg=i.createRoot(document.getElementById("versatile-root")),xg=new class{#W;#m;#u;#B;#Q;#K;#H;#G;constructor(e={}){this.#W=e.queryCache||new Hr,this.#m=e.mutationCache||new Yr,this.#u=e.defaultOptions||{},this.#B=new Map,this.#Q=new Map,this.#K=0}mount(){this.#K++,1===this.#K&&(this.#H=Lr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#G=$r.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#K--,0===this.#K&&(this.#H?.(),this.#H=void 0,this.#G?.(),this.#G=void 0)}isFetching(e){return this.#W.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#W.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(vr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#W.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=this.#W.get(n.queryHash),i=o?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==a)return this.#W.build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return Ir.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;Ir.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#W;return Ir.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ir.batch(()=>this.#W.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(e,t={}){return Ir.batch(()=>(this.#W.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ir.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(hr)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(n).then(hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#W.build(this,t);return r.isStaleByTime(vr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hr).catch(hr)}fetchInfiniteQuery(e){return e.behavior=Xr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hr).catch(hr)}ensureInfiniteQueryData(e){return e.behavior=Xr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $r.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#m}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#B.set(_r(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#B.values()],r={};return t.forEach(t=>{kr(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#Q.set(_r(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Q.values()],r={};return t.forEach(t=>{kr(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ar&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#W.clear(),this.#m.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});bg.render((0,rn.jsx)(an,{client:xg,children:(0,rn.jsxs)(at,{children:[(0,rn.jsx)(vg,{}),(0,rn.jsxs)(Se,{children:[(0,rn.jsx)(je,{path:"/",element:(0,rn.jsx)(ji,{})}),(0,rn.jsx)(je,{path:"/troubleshoot",element:(0,rn.jsx)(gg,{children:(0,rn.jsx)(Ly,{})})}),(0,rn.jsx)(je,{path:"/maintenance",element:(0,rn.jsx)(gg,{children:(0,rn.jsx)(eg,{})})}),(0,rn.jsx)(je,{path:"/comingsoon",element:(0,rn.jsx)(gg,{children:(0,rn.jsx)(dg,{})})})]}),(0,rn.jsx)(dr,{position:"bottom-right",containerClassName:"!z-[9999999]",toastOptions:{duration:5e3,style:{background:"#fff",color:"#333",border:"1px solid #e5e7eb",padding:"16px",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},success:{style:{background:"#f0fdf4",borderColor:"#86efac"}},error:{style:{background:"#fef2f2",borderColor:"#fecaca"}}}})]})}))})();171 `,hr=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:a,containerStyle:o,containerClassName:s})=>{let{toasts:l,handlers:c}=Zt(r);return i.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...o},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(r=>{let o=r.position||t,s=((e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Dt()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...a}})(o,c.calculateOffset(r,{reverseOrder:e,gutter:n,defaultPosition:t}));return i.createElement(dr,{id:r.id,key:r.id,onHeightUpdate:c.updateHeight,className:r.visible?fr:"",style:s},"custom"===r.type?At(r.message,r):a?a(r):i.createElement(ur,{toast:r,position:o}))}))},pr=zt,mr="undefined"==typeof window||"Deno"in globalThis;function yr(){}function vr(e){return"number"==typeof e&&e>=0&&e!==1/0}function gr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function br(e,t){return"function"==typeof e?e(t):e}function xr(e,t){return"function"==typeof e?e(t):e}function wr(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:i,stale:s}=e;if(i)if(n){if(t.queryHash!==_r(i,t.options))return!1}else if(!Or(t.queryKey,i))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!a||a===t.state.fetchStatus)&&!(o&&!o(t)))}function jr(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(kr(t.options.mutationKey)!==kr(o))return!1}else if(!Or(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&!(a&&!a(t))}function _r(e,t){return(t?.queryKeyHashFn||kr)(e)}function kr(e){return JSON.stringify(e,(e,t)=>Pr(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function Or(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>Or(e[r],t[r])))}function Sr(e,t){if(e===t)return e;const r=Er(e)&&Er(t);if(r||Pr(e)&&Pr(t)){const n=r?e:Object.keys(e),a=n.length,o=r?t:Object.keys(t),i=o.length,s=r?[]:{},l=new Set(n);let c=0;for(let n=0;n<i;n++){const a=r?n:o[n];(!r&&l.has(a)||r)&&void 0===e[a]&&void 0===t[a]?(s[a]=void 0,c++):(s[a]=Sr(e[a],t[a]),s[a]===e[a]&&void 0!==e[a]&&c++)}return a===i&&c===a?e:s}return t}function Nr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Er(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pr(e){if(!Cr(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Cr(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Cr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Rr(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?Sr(e,t):t}function Ar(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Tr(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Dr=Symbol();function Fr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Dr?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Ir(e,t){return"function"==typeof e?e(...t):!!e}var Mr=e=>setTimeout(e,0);var Lr=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},a=Mr;const o=n=>{t?e.push(n):a(()=>{r(n)})};return{batch:o=>{let i;t++;try{i=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&a(()=>{n(()=>{t.forEach(e=>{r(e)})})})})()}return i},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{a=e}}}(),$r=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(){}},Vr=new class extends $r{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!mr&&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(e=>{"boolean"==typeof e?this.setFocused(e):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"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},zr=new class extends $r{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!mr&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}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.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function Ur(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function qr(e){return Math.min(1e3*2**e,3e4)}function Wr(e){return"online"!==(e??"online")||zr.isOnline()}var Zr=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Br(e){return e instanceof Zr}function Hr(e){let t,r=!1,n=0,a=!1;const o=Ur(),i=()=>Vr.isFocused()&&("always"===e.networkMode||zr.isOnline())&&e.canRun(),s=()=>Wr(e.networkMode)&&e.canRun(),l=r=>{a||(a=!0,e.onSuccess?.(r),t?.(),o.resolve(r))},c=r=>{a||(a=!0,e.onError?.(r),t?.(),o.reject(r))},u=()=>new Promise(r=>{t=e=>{(a||i())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,a||e.onContinue?.()}),d=()=>{if(a)return;let t;const o=0===n?e.initialPromise:void 0;try{t=o??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(a)return;const o=e.retry??(mr?0:3),s=e.retryDelay??qr,l="function"==typeof s?s(n,t):s,f=!0===o||"number"==typeof o&&n<o||"function"==typeof o&&o(n,t);var h;!r&&f?(n++,e.onFail?.(n,t),(h=l,new Promise(e=>{setTimeout(e,h)})).then(()=>i()?void 0:u()).then(()=>{r?c(t):d()})):c(t)})};return{promise:o,cancel:t=>{a||(c(new Zr(t)),e.abort?.())},continue:()=>(t?.(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var Kr=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vr(this.gcTime)&&(this.#a=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mr?1/0:3e5))}clearGcTimeout(){this.#a&&(clearTimeout(this.#a),this.#a=void 0)}},Qr=class extends Kr{#o;#i;#s;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#s=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,t){const r=Rr(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>!1!==xr(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===br(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!gr(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.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.#c&&(this.#d?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,r.signal)})},a=()=>{const e=Fr(this.options,t),r=(()=>{const e={client:this.#l,queryKey:this.queryKey,meta:this.meta};return n(e),e})();return this.#d=!1,this.options.persister?this.options.persister(e,r,this):e(r)},o=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:a};return n(e),e})();this.options.behavior?.onFetch(o,this),this.#i=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#f({type:"fetch",meta:o.fetchOptions?.meta});const i=e=>{Br(e)&&e.silent||this.#f({type:"error",error:e}),Br(e)||(this.#s.config.onError?.(e,this),this.#s.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=Hr({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0!==e){try{this.setData(e)}catch(e){return void i(e)}this.#s.config.onSuccess?.(e,this),this.#s.config.onSettled?.(e,this.state.error,this),this.scheduleGc()}else i(new Error(`${this.queryHash} data is undefined`))},onError:i,onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#c.start()}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Gr(t.data,this.options),fetchMeta:e.meta??null};case"success":return this.#i=void 0,{...t,data:e.data,dataUpdateCount:t.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 Br(r)&&r.revert&&this.#i?{...this.#i,fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Lr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Gr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wr(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var Jr=class extends $r{constructor(e={}){super(),this.config=e,this.#h=new Map}#h;build(e,t,r){const n=t.queryKey,a=t.queryHash??_r(n,t);let o=this.get(a);return o||(o=new Qr({client:e,queryKey:n,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){this.#h.has(e.queryHash)||(this.#h.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#h.get(e.queryHash);t&&(e.destroy(),t===e&&this.#h.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Lr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#h.get(e)}getAll(){return[...this.#h.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>wr(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>wr(e,t)):t}notify(e){Lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Lr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Lr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yr=class extends Kr{#p;#m;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#p=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},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.#p.includes(e)||(this.#p.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#p=this.#p.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#p.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#f({type:"continue"})};this.#c=Hr({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});const r="pending"===this.state.status,n=!this.#c.canStart();try{if(r)t();else{this.#f({type:"pending",variables:e,isPaused:n}),await(this.#m.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#f({type:"pending",context:t,variables:e,isPaused:n})}const a=await this.#c.start();return await(this.#m.config.onSuccess?.(a,e,this.state.context,this)),await(this.options.onSuccess?.(a,e,this.state.context)),await(this.#m.config.onSettled?.(a,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(a,null,e,this.state.context)),this.#f({type:"success",data:a}),a}catch(t){try{throw await(this.#m.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#f({type:"error",error:t})}}finally{this.#m.runNext(this)}}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Lr.batch(()=>{this.#p.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}};var Xr=class extends $r{constructor(e={}){super(),this.config=e,this.#y=new Set,this.#v=new Map,this.#g=0}#y;#v;#g;build(e,t,r){const n=new Yr({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#y.add(e);const t=en(e);if("string"==typeof t){const r=this.#v.get(t);r?r.push(e):this.#v.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#y.delete(e)){const t=en(e);if("string"==typeof t){const r=this.#v.get(t);if(r)if(r.length>1){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#v.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=en(e);if("string"==typeof t){const r=this.#v.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){const t=en(e);if("string"==typeof t){const r=this.#v.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}return Promise.resolve()}clear(){Lr.batch(()=>{this.#y.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#y.clear(),this.#v.clear()})}getAll(){return Array.from(this.#y)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>jr(t,e))}findAll(e={}){return this.getAll().filter(t=>jr(e,t))}notify(e){Lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return Lr.batch(()=>Promise.all(e.map(e=>e.continue().catch(yr))))}};function en(e){return e.options.scope?.id}function tn(e){return{onFetch:(t,r)=>{const n=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let r=!1;const c=Fr(t.options,t.fetchOptions),u=async(e,n,a)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);const o=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:n,direction:a?"backward":"forward",meta:t.options.meta};var o;return o=e,Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),e})(),i=await c(o),{maxPages:s}=t.options,l=a?Tr:Ar;return{pages:l(e.pages,i,s),pageParams:l(e.pageParams,n,s)}};if(a&&o.length){const e="backward"===a,t={pages:o,pageParams:i},r=(e?nn:rn)(n,t);s=await u(t,r,e)}else{const t=e??o.length;do{const e=0===l?i[0]??n.initialPageParam:rn(n,s);if(l>0&&null==e)break;s=await u(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function rn(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function nn(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var an=a(848),on=i.createContext(void 0),sn=e=>{const t=i.useContext(on);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ln=({client:e,children:t})=>(i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,an.jsx)(on.Provider,{value:e,children:t}));function cn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=cn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function un(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=cn(e))&&(n&&(n+=" "),n+=t);return n}const dn=e=>{const t=mn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),fn(r,t)||pn(e)},getConflictingClassGroupIds:(e,t)=>{const a=r[e]||[];return t&&n[e]?[...a,...n[e]]:a}}},fn=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?fn(e.slice(1),n):void 0;if(a)return a;if(0===t.validators.length)return;const o=e.join("-");return t.validators.find(({validator:e})=>e(o))?.classGroupId},hn=/^\[(.+)\]$/,pn=e=>{if(hn.test(e)){const t=hn.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},mn=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const e in r)yn(r[e],n,e,t);return n},yn=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:vn(t,e)).classGroupId=r)}if("function"==typeof e)return gn(e)?void yn(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,a])=>{yn(a,vn(t,e),r,n)})})},vn=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},gn=e=>e.isThemeGetter,bn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(a(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):a(e,t)}}},xn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,a=0,o=0;for(let i=0;i<e.length;i++){let s=e[i];if(0===n&&0===a){if(":"===s){t.push(e.slice(o,i)),o=i+1;continue}if("/"===s){r=i;continue}}"["===s?n++:"]"===s?n--:"("===s?a++:")"===s&&a--}const i=0===t.length?e:e.substring(o),s=wn(i);return{modifiers:t,hasImportantModifier:s!==i,baseClassName:s,maybePostfixModifierPosition:r&&r>o?r-o:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},wn=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,jn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},_n=/\s+/;function kn(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=On(e))&&(n&&(n+=" "),n+=t);return n}const On=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=On(e[n]))&&(r&&(r+=" "),r+=t);return r};function Sn(e,...t){let r,n,a,o=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:bn(e.cacheSize),parseClassName:xn(e),sortModifiers:jn(e),...dn(e)}))(l),n=r.cache.get,a=r.cache.set,o=i,i(s)};function i(e){const t=n(e);if(t)return t;const o=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(_n);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!h,m=n(p?f.substring(0,h):f);if(!m){if(!p){l=t+(l.length>0?" "+l:l);continue}if(m=n(f),!m){l=t+(l.length>0?" "+l:l);continue}p=!1}const y=o(u).join(":"),v=d?y+"!":y,g=v+m;if(i.includes(g))continue;i.push(g);const b=a(m,p);for(let e=0;e<b.length;++e){const t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o}return function(){return o(kn.apply(null,arguments))}}const Nn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},En=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cn=/^\d+\/\d+$/,Rn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,An=/\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$/,Tn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>Cn.test(e),Mn=e=>!!e&&!Number.isNaN(Number(e)),Ln=e=>!!e&&Number.isInteger(Number(e)),$n=e=>e.endsWith("%")&&Mn(e.slice(0,-1)),Vn=e=>Rn.test(e),zn=()=>!0,Un=e=>An.test(e)&&!Tn.test(e),qn=()=>!1,Wn=e=>Dn.test(e),Zn=e=>Fn.test(e),Bn=e=>!Kn(e)&&!ea(e),Hn=e=>sa(e,da,qn),Kn=e=>En.test(e),Qn=e=>sa(e,fa,Un),Gn=e=>sa(e,ha,Mn),Jn=e=>sa(e,ca,qn),Yn=e=>sa(e,ua,Zn),Xn=e=>sa(e,ma,Wn),ea=e=>Pn.test(e),ta=e=>la(e,fa),ra=e=>la(e,pa),na=e=>la(e,ca),aa=e=>la(e,da),oa=e=>la(e,ua),ia=e=>la(e,ma,!0),sa=(e,t,r)=>{const n=En.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},la=(e,t,r=!1)=>{const n=Pn.exec(e);return!!n&&(n[1]?t(n[1]):r)},ca=e=>"position"===e||"percentage"===e,ua=e=>"image"===e||"url"===e,da=e=>"length"===e||"size"===e||"bg-size"===e,fa=e=>"length"===e,ha=e=>"number"===e,pa=e=>"family-name"===e,ma=e=>"shadow"===e,ya=(Symbol.toStringTag,()=>{const e=Nn("color"),t=Nn("font"),r=Nn("text"),n=Nn("font-weight"),a=Nn("tracking"),o=Nn("leading"),i=Nn("breakpoint"),s=Nn("container"),l=Nn("spacing"),c=Nn("radius"),u=Nn("shadow"),d=Nn("inset-shadow"),f=Nn("text-shadow"),h=Nn("drop-shadow"),p=Nn("blur"),m=Nn("perspective"),y=Nn("aspect"),v=Nn("ease"),g=Nn("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ea,Kn],x=()=>[ea,Kn,l],w=()=>[In,"full","auto",...x()],j=()=>[Ln,"none","subgrid",ea,Kn],_=()=>["auto",{span:["full",Ln,ea,Kn]},Ln,ea,Kn],k=()=>[Ln,"auto",ea,Kn],O=()=>["auto","min","max","fr",ea,Kn],S=()=>["auto",...x()],N=()=>[In,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],E=()=>[e,ea,Kn],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",na,Jn,{position:[ea,Kn]}],C=()=>["auto","cover","contain",aa,Hn,{size:[ea,Kn]}],R=()=>[$n,ta,Qn],A=()=>["","none","full",c,ea,Kn],T=()=>["",Mn,ta,Qn],D=()=>[Mn,$n,na,Jn],F=()=>["","none",p,ea,Kn],I=()=>["none",Mn,ea,Kn],M=()=>["none",Mn,ea,Kn],L=()=>[Mn,ea,Kn],$=()=>[In,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vn],breakpoint:[Vn],color:[zn],container:[Vn],"drop-shadow":[Vn],ease:["in","out","in-out"],font:[Bn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vn],shadow:[Vn],spacing:["px",Mn],text:[Vn],"text-shadow":[Vn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",In,Kn,ea,y]}],container:["container"],columns:[{columns:[Mn,Kn,ea,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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"],sr:["sr-only","not-sr-only"],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:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Ln,"auto",ea,Kn]}],basis:[{basis:[In,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Mn,In,"auto","initial","none",Kn]}],grow:[{grow:["",Mn,ea,Kn]}],shrink:[{shrink:["",Mn,ea,Kn]}],order:[{order:[Ln,"first","last","none",ea,Kn]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],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:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,ta,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ea,Gn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$n,Kn]}],"font-family":[{font:[ra,Kn,t]}],"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:[a,ea,Kn]}],"line-clamp":[{"line-clamp":[Mn,"none",ea,Gn]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",ea,Kn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ea,Kn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Mn,"from-font","auto",ea,Qn]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Mn,"auto",ea,Kn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ea,Kn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ea,Kn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ln,ea,Kn],radial:["",ea,Kn],conic:[Ln,ea,Kn]},oa,Yn]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:T()}],"border-w-x":[{"border-x":T()}],"border-w-y":[{"border-y":T()}],"border-w-s":[{"border-s":T()}],"border-w-e":[{"border-e":T()}],"border-w-t":[{"border-t":T()}],"border-w-r":[{"border-r":T()}],"border-w-b":[{"border-b":T()}],"border-w-l":[{"border-l":T()}],"divide-x":[{"divide-x":T()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":T()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Mn,ea,Kn]}],"outline-w":[{outline:["",Mn,ta,Qn]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,ia,Xn]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",d,ia,Xn]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Mn,Qn]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":T()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",f,ia,Xn]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Mn,ea,Kn]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Mn]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[ea,Kn]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Mn]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ea,Kn]}],filter:[{filter:["","none",ea,Kn]}],blur:[{blur:F()}],brightness:[{brightness:[Mn,ea,Kn]}],contrast:[{contrast:[Mn,ea,Kn]}],"drop-shadow":[{"drop-shadow":["","none",h,ia,Xn]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Mn,ea,Kn]}],"hue-rotate":[{"hue-rotate":[Mn,ea,Kn]}],invert:[{invert:["",Mn,ea,Kn]}],saturate:[{saturate:[Mn,ea,Kn]}],sepia:[{sepia:["",Mn,ea,Kn]}],"backdrop-filter":[{"backdrop-filter":["","none",ea,Kn]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[Mn,ea,Kn]}],"backdrop-contrast":[{"backdrop-contrast":[Mn,ea,Kn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Mn,ea,Kn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mn,ea,Kn]}],"backdrop-invert":[{"backdrop-invert":["",Mn,ea,Kn]}],"backdrop-opacity":[{"backdrop-opacity":[Mn,ea,Kn]}],"backdrop-saturate":[{"backdrop-saturate":[Mn,ea,Kn]}],"backdrop-sepia":[{"backdrop-sepia":["",Mn,ea,Kn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ea,Kn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Mn,"initial",ea,Kn]}],ease:[{ease:["linear","initial",v,ea,Kn]}],delay:[{delay:[Mn,ea,Kn]}],animate:[{animate:["none",g,ea,Kn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ea,Kn]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:I()}],"rotate-x":[{"rotate-x":I()}],"rotate-y":[{"rotate-y":I()}],"rotate-z":[{"rotate-z":I()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[ea,Kn,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ea,Kn]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",ea,Kn]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[Mn,ta,Qn,Gn]}],stroke:[{stroke:["none",...E()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),va=Sn(ya);function ga(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return va(un(t))}function ba(e){return ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ba(e)}var xa=["className"],wa=["className"],ja=["className"],_a=["className"],ka=["className"],Oa=["className"];function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Na(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(t){Ea(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ea(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=ba(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ba(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pa(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var Ca=i.forwardRef(function(e,t){var r=e.className,n=Pa(e,xa);return(0,an.jsx)("div",Na({ref:t,className:ga("rounded-xl border bg-card text-card-foreground shadow",r)},n))});Ca.displayName="Card";var Ra=i.forwardRef(function(e,t){var r=e.className,n=Pa(e,wa);return(0,an.jsx)("div",Na({ref:t,className:ga("flex flex-col space-y-1.5 p-6",r)},n))});Ra.displayName="CardHeader";var Aa=i.forwardRef(function(e,t){var r=e.className,n=Pa(e,ja);return(0,an.jsx)("div",Na({ref:t,className:ga("font-semibold leading-none tracking-tight",r)},n))});Aa.displayName="CardTitle",i.forwardRef(function(e,t){var r=e.className,n=Pa(e,_a);return(0,an.jsx)("div",Na({ref:t,className:ga("text-sm text-muted-foreground",r)},n))}).displayName="CardDescription";var Ta=i.forwardRef(function(e,t){var r=e.className,n=Pa(e,ka);return(0,an.jsx)("div",Na({ref:t,className:ga("p-6 pt-0",r)},n))});function Da(e){return Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(e)}function Fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ia(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Da(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Da(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Ta.displayName="CardContent",i.forwardRef(function(e,t){var r=e.className,n=Pa(e,Oa);return(0,an.jsx)("div",Na({ref:t,className:ga("flex items-center p-6 pt-0",r)},n))}).displayName="CardFooter";var Ma=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fa(Object(r),!0).forEach(function(t){Ia(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},window._versatileObject);const La=Ma;var $a=class extends $r{constructor(e,t){super(),this.options=t,this.#l=e,this.#b=null,this.#x=Ur(),this.options.experimental_prefetchInRender||this.#x.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#l;#w=void 0;#j=void 0;#_=void 0;#k;#O;#x;#b;#S;#N;#E;#P;#C;#R;#A=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#w.addObserver(this),Va(this.#w,this.options)?this.#T():this.updateResult(),this.#D())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return za(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return za(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#F(),this.#I(),this.#w.removeObserver(this)}setOptions(e){const t=this.options,r=this.#w;if(this.options=this.#l.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof xr(this.options.enabled,this.#w))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#M(),this.#w.setOptions(this.options),t._defaulted&&!Nr(this.options,t)&&this.#l.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this});const n=this.hasListeners();n&&Ua(this.#w,r,this.options,t)&&this.#T(),this.updateResult(),!n||this.#w===r&&xr(this.options.enabled,this.#w)===xr(t.enabled,this.#w)&&br(this.options.staleTime,this.#w)===br(t.staleTime,this.#w)||this.#L();const a=this.#$();!n||this.#w===r&&xr(this.options.enabled,this.#w)===xr(t.enabled,this.#w)&&a===this.#R||this.#V(a)}getOptimisticResult(e){const t=this.#l.getQueryCache().build(this.#l,e),r=this.createResult(t,e);return function(e,t){if(!Nr(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(this.#_=r,this.#O=this.options,this.#k=this.#w.state),r}getCurrentResult(){return this.#_}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),Reflect.get(e,r))})}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#l.defaultQueryOptions(e),r=this.#l.getQueryCache().build(this.#l,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#T({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#_))}#T(e){this.#M();let t=this.#w.fetch(this.options,e);return e?.throwOnError||(t=t.catch(yr)),t}#L(){this.#F();const e=br(this.options.staleTime,this.#w);if(mr||this.#_.isStale||!vr(e))return;const t=gr(this.#_.dataUpdatedAt,e)+1;this.#P=setTimeout(()=>{this.#_.isStale||this.updateResult()},t)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#w):this.options.refetchInterval)??!1}#V(e){this.#I(),this.#R=e,!mr&&!1!==xr(this.options.enabled,this.#w)&&vr(this.#R)&&0!==this.#R&&(this.#C=setInterval(()=>{(this.options.refetchIntervalInBackground||Vr.isFocused())&&this.#T()},this.#R))}#D(){this.#L(),this.#V(this.#$())}#F(){this.#P&&(clearTimeout(this.#P),this.#P=void 0)}#I(){this.#C&&(clearInterval(this.#C),this.#C=void 0)}createResult(e,t){const r=this.#w,n=this.options,a=this.#_,o=this.#k,i=this.#O,s=e!==r?e.state:this.#j,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const a=this.hasListeners(),o=!a&&Va(e,t),i=a&&Ua(e,r,t,n);(o||i)&&(u={...u,...Gr(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===p){let e;a?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=a.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(p="success",c=Rr(a?.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(a&&c===o?.data&&t.select===this.#S)c=this.#N;else try{this.#S=t.select,c=t.select(c),c=Rr(a?.data,c,t),this.#N=c,this.#b=null}catch(e){this.#b=e}this.#b&&(f=this.#b,c=this.#N,h=Date.now(),p="error");const y="fetching"===u.fetchStatus,v="pending"===p,g="error"===p,b=v&&y,x=void 0!==c,w={status:p,fetchStatus:u.fetchStatus,isPending:v,isSuccess:"success"===p,isError:g,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:g&&!x,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:g&&x,isStale:qa(e,t),refetch:this.refetch,promise:this.#x,isEnabled:!1!==xr(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===w.status?e.reject(w.error):void 0!==w.data&&e.resolve(w.data)},n=()=>{const e=this.#x=w.promise=Ur();t(e)},a=this.#x;switch(a.status){case"pending":e.queryHash===r.queryHash&&t(a);break;case"fulfilled":"error"!==w.status&&w.data===a.value||n();break;case"rejected":"error"===w.status&&w.error===a.reason||n()}}return w}updateResult(){const e=this.#_,t=this.createResult(this.#w,this.options);if(this.#k=this.#w.state,this.#O=this.options,void 0!==this.#k.data&&(this.#E=this.#w),Nr(t,e))return;this.#_=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#A.size)return!0;const n=new Set(r??this.#A);return this.options.throwOnError&&n.add("error"),Object.keys(this.#_).some(t=>{const r=t;return this.#_[r]!==e[r]&&n.has(r)})})()})}#M(){const e=this.#l.getQueryCache().build(this.#l,this.options);if(e===this.#w)return;const t=this.#w;this.#w=e,this.#j=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#D()}#z(e){Lr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#_)}),this.#l.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function Va(e,t){return function(e,t){return!1!==xr(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&za(e,t,t.refetchOnMount)}function za(e,t,r){if(!1!==xr(t.enabled,e)&&"static"!==br(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&qa(e,t)}return!1}function Ua(e,t,r,n){return(e!==t||!1===xr(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&qa(e,r)}function qa(e,t){return!1!==xr(t.enabled,e)&&e.isStaleByTime(br(t.staleTime,e))}function Wa(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Za=i.createContext(Wa()),Ba=i.createContext(!1),Ha=(Ba.Provider,(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}));function Ka(e,t,r){const n=i.useContext(Ba),a=i.useContext(Za),o=sn(r),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=n?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}})(s),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(s,a),(e=>{i.useEffect(()=>{e.clearReset()},[e])})(a);const l=!o.getQueryCache().get(s.queryHash),[c]=i.useState(()=>new t(o,s)),u=c.getOptimisticResult(s),d=!n&&!1!==e.subscribed;if(i.useSyncExternalStore(i.useCallback(e=>{const t=d?c.subscribe(Lr.batchCalls(e)):yr;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),i.useEffect(()=>{c.setOptions(s)},[s,c]),((e,t)=>e?.suspense&&t.isPending)(s,u))throw Ha(s,c,a);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&void 0===e.data||Ir(r,[e.error,n])))({result:u,errorResetBoundary:a,throwOnError:s.throwOnError,query:o.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw u.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.experimental_prefetchInRender&&!mr&&((e,t)=>e.isLoading&&e.isFetching&&!t)(u,n)){const e=l?Ha(s,c,a):o.getQueryCache().get(s.queryHash)?.promise;e?.catch(yr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function Qa(e,t){return Ka(e,$a,t)}var Ga=class extends $r{#l;#_=void 0;#U;#q;constructor(e,t){super(),this.#l=e,this.setOptions(t),this.bindMethods(),this.#W()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#l.defaultMutationOptions(e),Nr(this.options,t)||this.#l.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#U,observer:this}),t?.mutationKey&&this.options.mutationKey&&kr(t.mutationKey)!==kr(this.options.mutationKey)?this.reset():"pending"===this.#U?.state.status&&this.#U.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#U?.removeObserver(this)}onMutationUpdate(e){this.#W(),this.#z(e)}getCurrentResult(){return this.#_}reset(){this.#U?.removeObserver(this),this.#U=void 0,this.#W(),this.#z()}mutate(e,t){return this.#q=t,this.#U?.removeObserver(this),this.#U=this.#l.getMutationCache().build(this.#l,this.options),this.#U.addObserver(this),this.#U.execute(e)}#W(){const e=this.#U?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#_={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){Lr.batch(()=>{if(this.#q&&this.hasListeners()){const t=this.#_.variables,r=this.#_.context;"success"===e?.type?(this.#q.onSuccess?.(e.data,t,r),this.#q.onSettled?.(e.data,null,t,r)):"error"===e?.type&&(this.#q.onError?.(e.error,t,r),this.#q.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#_)})})}};function Ja(e,t){const r=sn(t),[n]=i.useState(()=>new Ga(r,e));i.useEffect(()=>{n.setOptions(e)},[n,e]);const a=i.useSyncExternalStore(i.useCallback(e=>n.subscribe(Lr.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=i.useCallback((e,t)=>{n.mutate(e,t).catch(yr)},[n]);if(a.error&&Ir(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}function Ya(e){return Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ya(e)}var Xa=function(e){return e instanceof File||e instanceof Blob},eo=function(e){return"string"==typeof e},to=function(e){return"boolean"==typeof e},ro=function(e){return"number"==typeof e},no=function(e){for(var t=new FormData,r=function(){var r=a[n],o=e[r];Array.isArray(o)?o.forEach(function(e,n){Xa(e)||eo(e)?t.append("".concat(r,"[").concat(n,"]"),e):to(e)||ro(e)?t.append("".concat(r,"[").concat(n,"]"),e.toString()):"object"===Ya(e)&&null!==e?t.append("".concat(r,"[").concat(n,"]"),JSON.stringify(e)):t.append("".concat(r,"[").concat(n,"]"),e)}):Xa(o)||eo(o)?t.append(r,o):to(o)?t.append(r,o.toString()):ro(o)?t.append(r,"".concat(o)):"object"===Ya(o)&&null!==o?t.append(r,JSON.stringify(o)):t.append(r,o)},n=0,a=Object.keys(e);n<a.length;n++)r();return t};function ao(e){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ao(e)}function oo(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return io(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(io(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,io(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,io(d,"constructor",c),io(c,"constructor",l),l.displayName="GeneratorFunction",io(c,a,"GeneratorFunction"),io(d),io(d,a,"Generator"),io(d,n,function(){return this}),io(d,"toString",function(){return"[object Generator]"}),(oo=function(){return{w:o,m:f}})()}function io(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}io=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){io(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},io(e,t,r,n)}function so(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?so(Object(r),!0).forEach(function(t){co(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function co(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=ao(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ao(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uo(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function fo(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){uo(o,n,a,i,s,"next",e)}function s(e){uo(o,n,a,i,s,"throw",e)}i(void 0)})}}function ho(e,t){return po.apply(this,arguments)}function po(){return po=fo(oo().m(function e(t,r){var n,a,o,i,s,l,c,u,d,f,h,p,m;return oo().w(function(e){for(;;)switch(e.p=e.n){case 0:return a=La.wp_rest_nonce,o=La.nonce_key,i=La.nonce_value,s="".concat(t),l=(null===(n=r.method)||void 0===n?void 0:n.toUpperCase())||"POST",c=lo({"X-WP-Nonce":a},r.headers||{}),u={method:l,headers:c},["GET","DELETE"].includes(l)?((d=new URLSearchParams(null==r?void 0:r.body)).append(o,i),s+="?".concat(d.toString())):r.body&&((f=no(r.body)).append(o,i),u.body=f),e.p=1,e.n=2,fetch(s,u);case 2:return h=e.v,e.n=3,h.json();case 3:if(200!==(p=e.v).status_code){e.n=4;break}return e.a(2,p);case 4:throw new Error(p.message);case 5:e.n=7;break;case 6:throw e.p=6,m=e.v,new Error((null==m?void 0:m.message)||"fetch request error!!");case 7:return e.a(2)}},e,null,[[1,6]])})),po.apply(this,arguments)}function mo(e,t){return yo.apply(this,arguments)}function yo(){return yo=fo(oo().m(function e(t,r){var n,a,o,i,s,l,c,u,d;return oo().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=La.wp_rest_nonce,a=La.nonce_key,o=La.nonce_value,i="".concat(t),s={method:r.method||"POST",headers:lo({"X-WP-Nonce":n},r.headers||{}),body:r.body},r.body&&((l=no(r.body)).append(a,o),s.body=l),e.p=1,e.n=2,fetch(i,s);case 2:return c=e.v,e.n=3,c.json();case 3:if(200!==(u=e.v).status_code){e.n=4;break}return e.a(2,u);case 4:throw new Error(u.message);case 5:e.n=7;break;case 6:throw e.p=6,d=e.v,new Error((null==d?void 0:d.message)||"fetch request error!!");case 7:return e.a(2)}},e,null,[[1,6]])})),yo.apply(this,arguments)}const vo=wp.i18n;function go(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return bo(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(bo(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bo(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,bo(d,"constructor",c),bo(c,"constructor",l),l.displayName="GeneratorFunction",bo(c,a,"GeneratorFunction"),bo(d),bo(d,a,"Generator"),bo(d,n,function(){return this}),bo(d,"toString",function(){return"[object Generator]"}),(go=function(){return{w:o,m:f}})()}function bo(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}bo=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){bo(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},bo(e,t,r,n)}function xo(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function wo(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){xo(o,n,a,i,s,"next",e)}function s(e){xo(o,n,a,i,s,"throw",e)}i(void 0)})}}var jo=function(){return Qa({queryKey:["getMoodInfo"],queryFn:(e=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_mood_info",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3});var e},_o=function(){return Qa({queryKey:["getEnableServiceList"],queryFn:(e=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_enable_service_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3});var e};const ko=function(e){var t=e.lines,r=void 0===t?1:t,n=e.rows,a=void 0===n?1:n,o=e.height,i=void 0===o?"h-4":o,s=e.width,l=void 0===s?"w-[100px]":s,c=e.className,u=e.animate,d=void 0===u||u;return(0,an.jsx)("div",{className:ga("flex flex-col gap-2",c),children:Array.from({length:a}).map(function(e,t){return(0,an.jsx)("div",{className:ga("flex gap-2",l),children:Array.from({length:r}).map(function(e,t){return(0,an.jsx)("div",{className:ga("bg-muted rounded",i,d&&"animate-pulse",t===r-1&&r>1?"w-3/4":"w-full")},t)})},t)})})};var Oo={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-6 h-6"};const So=function(e){var t=e.isLoading,r=e.loadingText,n=e.children,a=e.size,o=void 0===a?"sm":a,i=e.className;if(!t)return(0,an.jsx)(an.Fragment,{children:n});var s=(0,vo.__)("Loading","versatile-toolkit"),l=r||"".concat(s,"...");return(0,an.jsxs)("div",{className:ga("flex items-center gap-2",i),children:[(0,an.jsx)("div",{className:ga(Oo[o],"animate-spin"),children:(0,an.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,an.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"31.416",className:"opacity-25"}),(0,an.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"23.562",className:"opacity-75"})]})}),(0,an.jsx)("span",{children:l})]})};var No={xs:"w-3 h-3 text-xs",sm:"w-4 h-4 text-sm",md:"w-5 h-5 text-base",lg:"w-6 h-6 text-lg",xl:"w-8 h-8 text-xl"},Eo={default:"text-foreground",primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"};const Po=function(e){var t=e.size,r=void 0===t?"sm":t,n=e.variant,a=void 0===n?"muted":n,o=e.className,i=e.text,s=e.showText,l=void 0===s||s,c=i||(0,vo.__)("Loading","versatile-toolkit");return(0,an.jsxs)("div",{className:ga("flex items-center gap-2 py-2",Eo[a],o),children:[(0,an.jsx)("div",{className:ga(No[r],"animate-spin"),children:(0,an.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,an.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"31.416",className:"opacity-25"}),(0,an.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"31.416",strokeDashoffset:"23.562",className:"opacity-75"})]})}),l&&(0,an.jsxs)("span",{className:No[r].split(" ")[2],children:[c,"..."]})]})};const Co=function(e){var t=e.className,r=e.animate,n=void 0===r||r;return(0,an.jsxs)("div",{className:ga("space-y-6",t),children:[(0,an.jsxs)("div",{className:"flex justify-between items-center pb-5",children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(ko,{width:"w-6",height:"h-6",animate:n}),(0,an.jsx)(ko,{width:"w-48",height:"h-8",animate:n})]}),(0,an.jsxs)("div",{className:"flex gap-5",children:[(0,an.jsx)(ko,{width:"w-32",height:"h-10",animate:n}),(0,an.jsx)(ko,{width:"w-24",height:"h-10",animate:n})]})]}),(0,an.jsxs)("div",{className:"space-y-4",children:[(0,an.jsx)(ko,{width:"w-32",height:"h-5",animate:n}),(0,an.jsx)("div",{className:"grid grid-cols-6 gap-4",children:Array.from({length:6}).map(function(e,t){return(0,an.jsxs)("div",{className:"space-y-3",children:[(0,an.jsx)("div",{className:ga("aspect-[4/3] bg-muted rounded-lg border-2",n&&"animate-pulse")}),(0,an.jsx)(ko,{width:"w-16",height:"h-4",animate:n}),(0,an.jsx)(ko,{rows:2,lines:1,width:"w-full",height:"h-3",animate:n}),(0,an.jsxs)("div",{className:"flex gap-2",children:[(0,an.jsx)(ko,{width:"w-12",height:"h-6",animate:n}),(0,an.jsx)(ko,{width:"w-14",height:"h-6",animate:n})]})]},t)})}),(0,an.jsx)(ko,{width:"w-80",height:"h-4",animate:n})]}),(0,an.jsxs)("div",{className:"flex gap-10",children:[(0,an.jsxs)("div",{className:"w-1/2 space-y-6",children:[(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(ko,{width:"w-40",height:"h-5",animate:n}),(0,an.jsx)(ko,{width:"w-12",height:"h-6",animate:n})]}),(0,an.jsx)(ko,{width:"w-64",height:"h-4",animate:n})]}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(ko,{width:"w-12",height:"h-5",animate:n}),(0,an.jsx)(ko,{width:"w-full",height:"h-10",animate:n}),(0,an.jsx)(ko,{width:"w-72",height:"h-4",animate:n})]}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(ko,{width:"w-16",height:"h-5",animate:n}),(0,an.jsx)(ko,{width:"w-full",height:"h-10",animate:n}),(0,an.jsx)(ko,{width:"w-48",height:"h-4",animate:n})]}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(ko,{width:"w-20",height:"h-5",animate:n}),(0,an.jsx)(ko,{width:"w-full",height:"h-24",animate:n}),(0,an.jsx)(ko,{width:"w-64",height:"h-4",animate:n})]})]}),(0,an.jsxs)("div",{className:"w-1/2 space-y-6",children:[(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(ko,{width:"w-32",height:"h-5",animate:n}),(0,an.jsxs)("div",{className:"space-y-3",children:[(0,an.jsx)(ko,{width:"w-48",height:"h-10",animate:n}),(0,an.jsx)("div",{className:ga("w-40 h-32 bg-muted rounded-lg",n&&"animate-pulse")}),(0,an.jsx)(ko,{width:"w-24",height:"h-4",animate:n}),(0,an.jsx)(ko,{width:"w-80",height:"h-4",animate:n})]}),(0,an.jsx)(ko,{width:"w-72",height:"h-4",animate:n})]}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(ko,{width:"w-12",height:"h-5",animate:n}),(0,an.jsxs)("div",{className:"space-y-3",children:[(0,an.jsx)(ko,{width:"w-32",height:"h-10",animate:n}),(0,an.jsx)(ko,{width:"w-16",height:"h-4",animate:n})]}),(0,an.jsx)(ko,{width:"w-68",height:"h-4",animate:n})]})]})]})]})};const Ro=function(){return(0,an.jsx)("div",{className:"flex items-center justify-center h-full bg-gray-50 rounded-lg border border-gray-200 p-6",children:(0,an.jsxs)("div",{className:"bg-white rounded-2xl shadow-lg p-6 w-72 text-center",children:[(0,an.jsx)("div",{className:"w-16 h-16 bg-gray-200 rounded-full mx-auto mb-4 animate-pulse"}),(0,an.jsx)("div",{className:"h-5 bg-gray-300 rounded w-32 mx-auto mb-2 animate-pulse"}),(0,an.jsx)("div",{className:"h-4 bg-gray-200 rounded w-40 mx-auto mb-1 animate-pulse"}),(0,an.jsx)("div",{className:"h-4 bg-gray-100 rounded w-36 mx-auto animate-pulse"})]})})};function Ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return To(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?To(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Do=function(){var e=_o(),t=e.data,r=e.isLoading,n=null==t?void 0:t.data;return(0,an.jsx)(an.Fragment,{children:(0,an.jsx)("div",{className:"mt-10 flex flex-wrap gap-3",children:r?(0,an.jsx)(ko,{lines:3,height:"h-[100px]",width:"w-[900px]"}):Object.entries(n).filter(function(e){var t=Ao(e,2);t[0];return t[1].enable}).map(function(e){var t=Ao(e,2),r=t[0],n=t[1];return(0,an.jsx)(Ca,{className:"w-[300px] hover:bg-gray-100 rounded-sm",children:(0,an.jsxs)(ct,{to:"/".concat(n.path),className:"block p-3",children:[(0,an.jsx)(Ra,{className:"p-0",children:(0,an.jsx)(Aa,{className:"text-xl",children:n.label})}),(0,an.jsx)(Ta,{className:"p-0 pt-2",children:(0,an.jsx)("p",{children:n.description})})]})},r)})})})};function Fo(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Io(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Fo(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Fo(e[t],null)}}}}function Mo(...e){return i.useCallback(Io(...e),e)}function Lo(e){const t=Vo(e),r=i.forwardRef((e,r)=>{const{children:n,...a}=e,o=i.Children.toArray(n),s=o.find(Uo);if(s){const e=s.props.children,n=o.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,an.jsx)(t,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,n):null})}return(0,an.jsx)(t,{...a,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var $o=Lo("Slot");function Vo(e){const t=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==i.Fragment&&(a.ref=t?Io(t,e):e),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zo=Symbol("radix.slottable");function Uo(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===zo}const qo=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Wo=un,Zo=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Wo(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{const t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;const i=qo(t)||qo(n);return a[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...s}[t]):{...o,...s}[t]===r})?[...e,r,n]:e},[]);return Wo(e,i,l,null==r?void 0:r.class,null==r?void 0:r.className)};function Bo(e){return Bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bo(e)}var Ho=["className","variant","size","asChild"];function Ko(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Qo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Bo(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Bo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Go=Zo("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"}}),Jo=i.forwardRef(function(e,t){var r=e.className,n=e.variant,a=e.size,o=e.asChild,i=void 0!==o&&o,s=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,Ho),l=i?$o:"button";return(0,an.jsx)(l,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ko(Object(r),!0).forEach(function(t){Qo(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ko(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:ga(Go({variant:n,size:a,className:r})),ref:t},s))});Jo.displayName="Button";const Yo=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");var Xo={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"};const ei=(0,i.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:s,...l},c)=>(0,i.createElement)("svg",{ref:c,...Xo,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:Yo("lucide",a),...l},[...s.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(o)?o:[o]])),ti=(e,t)=>{const r=(0,i.forwardRef)(({className:r,...n},a)=>{return(0,i.createElement)(ei,{ref:a,iconNode:t,className:Yo(`lucide-${o=e,o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var o});return r.displayName=`${e}`,r},ri=ti("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ni=ti("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ai=ti("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}var ii=["className","variant"];function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function li(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=oi(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ci=Zo("inline-flex items-center rounded-full 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:"bg-primary text-primary-foreground hover:bg-primary/80",success:"bg-green-100 text-green-800 hover:bg-green-200/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input bg-background hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ui(e){var t=e.className,r=e.variant,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,ii);return(0,an.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?si(Object(r),!0).forEach(function(t){li(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:ga(ci({variant:r}),t)},n))}var di=.999,fi=/[\\\/_+.#"@\[\(\{&]/,hi=/[\\\/_+.#"@\[\(\{&]/g,pi=/[\s-]/,mi=/[\s-]/g;function yi(e,t,r,n,a,o,i){if(o===t.length)return a===e.length?1:.99;var s=`${a},${o}`;if(void 0!==i[s])return i[s];for(var l,c,u,d,f=n.charAt(o),h=r.indexOf(f,a),p=0;h>=0;)(l=yi(e,t,r,n,h+1,o+1,i))>p&&(h===a?l*=1:fi.test(e.charAt(h-1))?(l*=.8,(u=e.slice(a,h-1).match(hi))&&a>0&&(l*=Math.pow(di,u.length))):pi.test(e.charAt(h-1))?(l*=.9,(d=e.slice(a,h-1).match(mi))&&a>0&&(l*=Math.pow(di,d.length))):(l*=.17,a>0&&(l*=Math.pow(di,h-a))),e.charAt(h)!==t.charAt(o)&&(l*=.9999)),(l<.1&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(.1*(c=yi(e,t,r,n,h+1,o+2,i))>l&&(l=.1*c)),l>p&&(p=l),h=r.indexOf(f,h+1);return i[s]=p,p}function vi(e){return e.toLowerCase().replace(mi," ")}function gi(e,t,r){return yi(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,vi(e),vi(t),0,0,{})}function bi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function xi(e,t=[]){let r=[];const n=()=>{const t=r.map(e=>i.createContext(e));return function(r){const n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){const a=i.createContext(n),o=r.length;r=[...r,n];const s=t=>{const{scope:r,children:n,...s}=t,l=r?.[e]?.[o]||a,c=i.useMemo(()=>s,Object.values(s));return(0,an.jsx)(l.Provider,{value:c,children:n})};return s.displayName=t+"Provider",[s,function(r,s){const l=s?.[e]?.[o]||a,c=i.useContext(l);if(c)return c;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},wi(n,...t)]}function wi(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}var ji=globalThis?.document?i.useLayoutEffect:()=>{},_i=s[" useId ".trim().toString()]||(()=>{}),ki=0;function Oi(e){const[t,r]=i.useState(_i());return ji(()=>{e||r(e=>e??String(ki++))},[e]),e||(t?`radix-${t}`:"")}var Si=s[" useInsertionEffect ".trim().toString()]||ji;function Ni({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,s]=function({defaultProp:e,onChange:t}){const[r,n]=i.useState(e),a=i.useRef(r),o=i.useRef(t);return Si(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,n,o]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:a;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==l){}t.current=l},[l,n])}const u=i.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else o(t)},[l,e,o,s]);return[c,u]}Symbol("RADIX:SYNC_STATE");var Ei=a(206),Pi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Lo(`Primitive.${t}`),n=i.forwardRef((e,n)=>{const{asChild:a,...o}=e,i=a?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,an.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ci(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var Ri,Ai="dismissableLayer.update",Ti="dismissableLayer.pointerDownOutside",Di="dismissableLayer.focusOutside",Fi=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ii=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...c}=e,u=i.useContext(Fi),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=i.useState({}),m=Mo(t,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(v),b=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=g,j=function(e,t=globalThis?.document){const r=Ci(e),n=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){$i(Ti,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));w&&!r&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},h),_=function(e,t=globalThis?.document){const r=Ci(e),n=i.useRef(!1);return i.useEffect(()=>{const e=e=>{if(e.target&&!n.current){$i(Di,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},h);return function(e,t=globalThis?.document){const r=Ci(e);i.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{b===u.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),i.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Ri=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Li(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Ri)}},[d,h,r,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Li())},[d,u]),i.useEffect(()=>{const e=()=>p({});return document.addEventListener(Ai,e),()=>document.removeEventListener(Ai,e)},[]),(0,an.jsx)(Pi.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:bi(e.onFocusCapture,_.onFocusCapture),onBlurCapture:bi(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:bi(e.onPointerDownCapture,j.onPointerDownCapture)})});Ii.displayName="DismissableLayer";var Mi=i.forwardRef((e,t)=>{const r=i.useContext(Fi),n=i.useRef(null),a=Mo(t,n);return i.useEffect(()=>{const e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,an.jsx)(Pi.div,{...e,ref:a})});function Li(){const e=new CustomEvent(Ai);document.dispatchEvent(e)}function $i(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?function(e,t){e&&Ei.flushSync(()=>e.dispatchEvent(t))}(a,o):a.dispatchEvent(o)}Mi.displayName="DismissableLayerBranch";var Vi="focusScope.autoFocusOnMount",zi="focusScope.autoFocusOnUnmount",Ui={bubbles:!1,cancelable:!0},qi=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[l,c]=i.useState(null),u=Ci(a),d=Ci(o),f=i.useRef(null),h=Mo(t,e=>c(e)),p=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Hi(f.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Hi(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Hi(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,l,p.paused]),i.useEffect(()=>{if(l){Ki.add(p);const t=document.activeElement;if(!l.contains(t)){const r=new CustomEvent(Vi,Ui);l.addEventListener(Vi,u),l.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Hi(n,{select:t}),document.activeElement!==r)return}((e=Wi(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Hi(l))}return()=>{l.removeEventListener(Vi,u),setTimeout(()=>{const e=new CustomEvent(zi,Ui);l.addEventListener(zi,d),l.dispatchEvent(e),e.defaultPrevented||Hi(t??document.body,{select:!0}),l.removeEventListener(zi,d),Ki.remove(p)},0)}}var e},[l,u,d,p]);const m=i.useCallback(e=>{if(!r&&!n)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[n,o]=function(e){const t=Wi(e),r=Zi(t,e),n=Zi(t.reverse(),e);return[r,n]}(t);n&&o?e.shiftKey||a!==o?e.shiftKey&&a===n&&(e.preventDefault(),r&&Hi(o,{select:!0})):(e.preventDefault(),r&&Hi(n,{select:!0})):a===t&&e.preventDefault()}},[r,n,p.paused]);return(0,an.jsx)(Pi.div,{tabIndex:-1,...s,ref:h,onKeyDown:m})});function Wi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Zi(e,t){for(const r of e)if(!Bi(r,{upTo:t}))return r}function Bi(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Hi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}qi.displayName="FocusScope";var Ki=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Qi(e,t),e.unshift(t)},remove(t){e=Qi(e,t),e[0]?.resume()}}}();function Qi(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Gi=i.forwardRef((e,t)=>{const{container:r,...n}=e,[a,o]=i.useState(!1);ji(()=>o(!0),[]);const s=r||a&&globalThis?.document?.body;return s?Ei.createPortal((0,an.jsx)(Pi.div,{...n,ref:t}),s):null});Gi.displayName="Portal";var Ji=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=i.useState(),n=i.useRef(null),a=i.useRef(e),o=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const e=Yi(n.current);o.current="mounted"===l?e:"none"},[l]),ji(()=>{const t=n.current,r=a.current;if(r!==e){const n=o.current,i=Yi(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}},[e,c]),ji(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,i=o=>{const i=Yi(n.current).includes(o.animationName);if(o.target===t&&i&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(o.current=Yi(n.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),a="function"==typeof r?r({present:n.isPresent}):i.Children.only(r),o=Mo(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?i.cloneElement(a,{ref:o}):null};function Yi(e){return e?.animationName||"none"}Ji.displayName="Presence";var Xi=0;function es(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ts()),document.body.insertAdjacentElement("beforeend",e[1]??ts()),Xi++,()=>{1===Xi&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Xi--}},[])}function ts(){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 rs=function(){return rs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},rs.apply(this,arguments)};function ns(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}Object.create;function as(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var os="right-scroll-bar-position",is="width-before-scroll-bar";function ss(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ls="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,cs=new WeakMap;function us(e,t){var r,n,a,o=(r=t||null,n=function(t){return e.forEach(function(e){return ss(e,t)})},(a=(0,i.useState)(function(){return{value:r,callback:n,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=n,a.facade);return ls(function(){var t=cs.get(o);if(t){var r=new Set(t),n=new Set(e),a=o.current;r.forEach(function(e){n.has(e)||ss(e,null)}),n.forEach(function(e){r.has(e)||ss(e,a)})}cs.set(o,e)},[e]),o}function ds(e){return e}function fs(e,t){void 0===t&&(t=ds);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter(function(e){return e!==a})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}};return a}var hs=function(e){void 0===e&&(e={});var t=fs(null);return t.options=rs({async:!0,ssr:!1},e),t}(),ps=function(){},ms=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:ps,onWheelCapture:ps,onTouchMoveCapture:ps}),a=n[0],o=n[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,m=e.noIsolation,y=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,x=e.gapMode,w=ns(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,_=us([r,t]),k=rs(rs({},w),a);return i.createElement(i.Fragment,null,d&&i.createElement(j,{sideCar:hs,removeScrollBar:u,shards:f,noRelative:p,noIsolation:m,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:r,gapMode:x}),s?i.cloneElement(i.Children.only(l),rs(rs({},k),{ref:_})):i.createElement(b,rs({},k,{className:c,ref:_}),l))});ms.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ms.classNames={fullWidth:is,zeroRight:os};var ys,vs=function(e){var t=e.sideCar,r=ns(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,rs({},r))};vs.isSideCarExport=!0;function gs(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ys||a.nc;return t&&e.setAttribute("nonce",t),e}var bs=function(){var e=0,t=null;return{add:function(r){var n,a;0==e&&(t=gs())&&(a=r,(n=t).styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xs=function(){var e,t=(e=bs(),function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},ws={left:0,top:0,right:0,gap:0},js=function(e){return parseInt(e||"",10)||0},_s=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ws;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[js(r),js(n),js(a)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ks=xs(),Os="data-scroll-locked",Ss=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(Os,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(os," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(is," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(os," .").concat(os," {\n right: 0 ").concat(n,";\n }\n \n .").concat(is," .").concat(is," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Os,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ns=function(){var e=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(e)?e:0},Es=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;i.useEffect(function(){return document.body.setAttribute(Os,(Ns()+1).toString()),function(){var e=Ns()-1;e<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,e.toString())}},[]);var o=i.useMemo(function(){return _s(a)},[a]);return i.createElement(ks,{styles:Ss(o,!t,a,r?"":"!important")})},Ps=!1;if("undefined"!=typeof window)try{var Cs=Object.defineProperty({},"passive",{get:function(){return Ps=!0,!0}});window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch(e){Ps=!1}var Rs=!!Ps&&{passive:!1},As=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},Ts=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Ds(e,n)){var a=Fs(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Ds=function(e,t){return"v"===e?function(e){return As(e,"overflowY")}(t):function(e){return As(e,"overflowX")}(t)},Fs=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Is=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ms=function(e){return[e.deltaX,e.deltaY]},Ls=function(e){return e&&"current"in e?e.current:e},$s=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Vs=0,zs=[];function Us(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qs=(Ws=function(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),a=i.useState(Vs++)[0],o=i.useState(xs)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=as([e.lockRef.current],(e.shards||[]).map(Ls),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var a,o=Is(e),i=r.current,l="deltaX"in e?e.deltaX:i[0]-o[0],c="deltaY"in e?e.deltaY:i[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Ts(d,u);if(!f)return!0;if(f?a=d:(a="v"===d?"h":"v",f=Ts(d,u)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=a),!a)return!0;var h=n.current||a;return function(e,t,r,n,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*n,s=r.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var h=Fs(e,s),p=h[0],m=h[1]-h[2]-o*p;(p||m)&&Ds(e,s)&&(d+=m,f+=p);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(a&&Math.abs(d)<1||!a&&i>d)||!u&&(a&&Math.abs(f)<1||!a&&-i>f))&&(c=!0),c}(h,t,e,"h"===h?l:c,!0)},[]),c=i.useCallback(function(e){var r=e;if(zs.length&&zs[zs.length-1]===o){var n="deltaY"in r?Ms(r):Is(r),a=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(a&&a.should)r.cancelable&&r.preventDefault();else if(!a){var i=(s.current.shards||[]).map(Ls).filter(Boolean).filter(function(e){return e.contains(r.target)});(i.length>0?l(r,i[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),u=i.useCallback(function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:Us(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=i.useCallback(function(e){r.current=Is(e),n.current=void 0},[]),f=i.useCallback(function(t){u(t.type,Ms(t),t.target,l(t,e.lockRef.current))},[]),h=i.useCallback(function(t){u(t.type,Is(t),t.target,l(t,e.lockRef.current))},[]);i.useEffect(function(){return zs.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Rs),document.addEventListener("touchmove",c,Rs),document.addEventListener("touchstart",d,Rs),function(){zs=zs.filter(function(e){return e!==o}),document.removeEventListener("wheel",c,Rs),document.removeEventListener("touchmove",c,Rs),document.removeEventListener("touchstart",d,Rs)}},[]);var p=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(o,{styles:$s(a)}):null,p?i.createElement(Es,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},hs.useMedium(Ws),vs);var Ws,Zs=i.forwardRef(function(e,t){return i.createElement(ms,rs({},e,{ref:t,sideCar:qs}))});Zs.classNames=ms.classNames;const Bs=Zs;var Hs=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ks=new WeakMap,Qs=new WeakMap,Gs={},Js=0,Ys=function(e){return e&&(e.host||Ys(e.parentNode))},Xs=function(e,t,r,n){var a=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Ys(t);return r&&e.contains(r)?r:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Gs[r]||(Gs[r]=new WeakMap);var o=Gs[r],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,l=(Ks.get(e)||0)+1,c=(o.get(e)||0)+1;Ks.set(e,l),o.set(e,c),i.push(e),1===l&&a&&Qs.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(e){}})};return u(t),s.clear(),Js++,function(){i.forEach(function(e){var t=Ks.get(e)-1,a=o.get(e)-1;Ks.set(e,t),o.set(e,a),t||(Qs.has(e)||e.removeAttribute(n),Qs.delete(e)),a||e.removeAttribute(r)}),--Js||(Ks=new WeakMap,Ks=new WeakMap,Qs=new WeakMap,Gs={})}},el=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||Hs(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),Xs(n,a,r,"aria-hidden")):function(){return null}},tl="Dialog",[rl,nl]=xi(tl),[al,ol]=rl(tl),il=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=i.useRef(null),c=i.useRef(null),[u,d]=Ni({prop:n,defaultProp:a??!1,onChange:o,caller:tl});return(0,an.jsx)(al,{scope:t,triggerRef:l,contentRef:c,contentId:Oi(),titleId:Oi(),descriptionId:Oi(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};il.displayName=tl;var sl="DialogTrigger",ll=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ol(sl,r),o=Mo(t,a.triggerRef);return(0,an.jsx)(Pi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":El(a.open),...n,ref:o,onClick:bi(e.onClick,a.onOpenToggle)})});ll.displayName=sl;var cl="DialogPortal",[ul,dl]=rl(cl,{forceMount:void 0}),fl=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=ol(cl,t);return(0,an.jsx)(ul,{scope:t,forceMount:r,children:i.Children.map(n,e=>(0,an.jsx)(Ji,{present:r||o.open,children:(0,an.jsx)(Gi,{asChild:!0,container:a,children:e})}))})};fl.displayName=cl;var hl="DialogOverlay",pl=i.forwardRef((e,t)=>{const r=dl(hl,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=ol(hl,e.__scopeDialog);return o.modal?(0,an.jsx)(Ji,{present:n||o.open,children:(0,an.jsx)(yl,{...a,ref:t})}):null});pl.displayName=hl;var ml=Lo("DialogOverlay.RemoveScroll"),yl=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ol(hl,r);return(0,an.jsx)(Bs,{as:ml,allowPinchZoom:!0,shards:[a.contentRef],children:(0,an.jsx)(Pi.div,{"data-state":El(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),vl="DialogContent",gl=i.forwardRef((e,t)=>{const r=dl(vl,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=ol(vl,e.__scopeDialog);return(0,an.jsx)(Ji,{present:n||o.open,children:o.modal?(0,an.jsx)(bl,{...a,ref:t}):(0,an.jsx)(xl,{...a,ref:t})})});gl.displayName=vl;var bl=i.forwardRef((e,t)=>{const r=ol(vl,e.__scopeDialog),n=i.useRef(null),a=Mo(t,r.contentRef,n);return i.useEffect(()=>{const e=n.current;if(e)return el(e)},[]),(0,an.jsx)(wl,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:bi(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:bi(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:bi(e.onFocusOutside,e=>e.preventDefault())})}),xl=i.forwardRef((e,t)=>{const r=ol(vl,e.__scopeDialog),n=i.useRef(!1),a=i.useRef(!1);return(0,an.jsx)(wl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const o=t.target,i=r.triggerRef.current?.contains(o);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),wl=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,l=ol(vl,r),c=i.useRef(null),u=Mo(t,c);return es(),(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(qi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,an.jsx)(Ii,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":El(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(Al,{titleId:l.titleId}),(0,an.jsx)(Tl,{contentRef:c,descriptionId:l.descriptionId})]})]})}),jl="DialogTitle",_l=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ol(jl,r);return(0,an.jsx)(Pi.h2,{id:a.titleId,...n,ref:t})});_l.displayName=jl;var kl="DialogDescription",Ol=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ol(kl,r);return(0,an.jsx)(Pi.p,{id:a.descriptionId,...n,ref:t})});Ol.displayName=kl;var Sl="DialogClose",Nl=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ol(Sl,r);return(0,an.jsx)(Pi.button,{type:"button",...n,ref:t,onClick:bi(e.onClick,()=>a.onOpenChange(!1))})});function El(e){return e?"open":"closed"}Nl.displayName=Sl;var Pl="DialogTitleWarning",[Cl,Rl]=function(e,t){const r=i.createContext(t),n=e=>{const{children:t,...n}=e,a=i.useMemo(()=>n,Object.values(n));return(0,an.jsx)(r.Provider,{value:a,children:t})};return n.displayName=e+"Provider",[n,function(n){const a=i.useContext(r);if(a)return a;if(void 0!==t)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}]}(Pl,{contentName:vl,titleName:jl,docsSlug:"dialog"}),Al=({titleId:e})=>{const t=Rl(Pl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{if(e){document.getElementById(e)}},[r,e]),null},Tl=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Rl("DialogDescriptionWarning").contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)}},[r,e,t]),null},Dl=il,Fl=ll,Il=fl,Ml=pl,Ll=gl,$l=_l,Vl=Ol,zl=Nl,Ul='[cmdk-group=""]',ql='[cmdk-group-items=""]',Wl='[cmdk-item=""]',Zl=`${Wl}:not([aria-disabled="true"])`,Bl="cmdk-item-select",Hl="data-value",Kl=(e,t,r)=>gi(e,t,r),Ql=i.createContext(void 0),Gl=()=>i.useContext(Ql),Jl=i.createContext(void 0),Yl=()=>i.useContext(Jl),Xl=i.createContext(void 0),ec=i.forwardRef((e,t)=>{let r=pc(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=pc(()=>new Set),a=pc(()=>new Map),o=pc(()=>new Map),s=pc(()=>new Set),l=fc(e),{label:c,children:u,value:d,onValueChange:f,filter:h,shouldFilter:p,loop:m,disablePointerSelection:y=!1,vimBindings:v=!0,...g}=e,b=Oi(),x=Oi(),w=Oi(),j=i.useRef(null),_=vc();hc(()=>{if(void 0!==d){let e=d.trim();r.current.value=e,k.emit()}},[d]),hc(()=>{_(6,C)},[]);let k=i.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var a,o,i,s;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)P(),N(),_(1,E);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(a=document.getElementById(b))||a.focus()}if(_(7,()=>{var e;r.current.selectedItemId=null==(e=R())?void 0:e.id,k.emit()}),n||_(5,C),void 0!==(null==(o=l.current)?void 0:o.value)){let e=null!=t?t:"";return void(null==(s=(i=l.current).onValueChange)||s.call(i,e))}}k.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),O=i.useMemo(()=>({value:(e,t,n)=>{var a;t!==(null==(a=o.current.get(e))?void 0:a.value)&&(o.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,S(t,n)),_(2,()=>{N(),k.emit()}))},item:(e,t)=>(n.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),_(3,()=>{P(),N(),r.current.value||E(),k.emit()}),()=>{o.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=R();_(4,()=>{P(),(null==t?void 0:t.getAttribute("id"))===e&&E(),k.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:x,listInnerRef:j}),[]);function S(e,t){var n,a;let o=null!=(a=null==(n=l.current)?void 0:n.filter)?a:Kl;return e?o(e,r.current.search,t):0}function N(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=a.current.get(r),o=0;n.forEach(t=>{let r=e.get(t);o=Math.max(r,o)}),t.push([r,o])});let n=j.current;A().sort((t,r)=>{var n,a;let o=t.getAttribute("id"),i=r.getAttribute("id");return(null!=(n=e.get(i))?n:0)-(null!=(a=e.get(o))?a:0)}).forEach(e=>{let t=e.closest(ql);t?t.appendChild(e.parentElement===t?e:e.closest(`${ql} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${ql} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=j.current)?void 0:t.querySelector(`${Ul}[${Hl}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function E(){let e=A().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(Hl);k.setState("value",t||void 0)}function P(){var e,t,i,s;if(!r.current.search||!1===l.current.shouldFilter)return void(r.current.filtered.count=n.current.size);r.current.filtered.groups=new Set;let c=0;for(let a of n.current){let n=S(null!=(t=null==(e=o.current.get(a))?void 0:e.value)?t:"",null!=(s=null==(i=o.current.get(a))?void 0:i.keywords)?s:[]);r.current.filtered.items.set(a,n),n>0&&c++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function C(){var e,t,r;let n=R();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Ul))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=j.current)?void 0:e.querySelector(`${Wl}[aria-selected="true"]`)}function A(){var e;return Array.from((null==(e=j.current)?void 0:e.querySelectorAll(Zl))||[])}function T(e){let t=A()[e];t&&k.setState("value",t.getAttribute(Hl))}function D(e){var t;let r=R(),n=A(),a=n.findIndex(e=>e===r),o=n[a+e];null!=(t=l.current)&&t.loop&&(o=a+e<0?n[n.length-1]:a+e===n.length?n[0]:n[a+e]),o&&k.setState("value",o.getAttribute(Hl))}function F(e){let t,r=R(),n=null==r?void 0:r.closest(Ul);for(;n&&!t;)n=e>0?uc(n,Ul):dc(n,Ul),t=null==n?void 0:n.querySelector(Zl);t?k.setState("value",t.getAttribute(Hl)):D(e)}let I=()=>T(A().length-1),M=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):D(1)},L=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?F(-1):D(-1)};return i.createElement(Pi.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=g.onKeyDown)||t.call(g,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!r)switch(e.key){case"n":case"j":v&&e.ctrlKey&&M(e);break;case"ArrowDown":M(e);break;case"p":case"k":v&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),I();break;case"Enter":{e.preventDefault();let t=R();if(t){let e=new Event(Bl);t.dispatchEvent(e)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:bc},c),gc(e,e=>i.createElement(Jl.Provider,{value:k},i.createElement(Ql.Provider,{value:O},e))))}),tc=i.forwardRef((e,t)=>{var r,n;let a=Oi(),o=i.useRef(null),s=i.useContext(Xl),l=Gl(),c=fc(e),u=null!=(n=null==(r=c.current)?void 0:r.forceMount)?n:null==s?void 0:s.forceMount;hc(()=>{if(!u)return l.item(a,null==s?void 0:s.id)},[u]);let d=yc(a,o,[e.value,e.children,o],e.keywords),f=Yl(),h=mc(e=>e.value&&e.value===d.current),p=mc(e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(a)>0));function m(){var e,t;y(),null==(t=(e=c.current).onSelect)||t.call(e,d.current)}function y(){f.setState("value",d.current,!0)}if(i.useEffect(()=>{let t=o.current;if(t&&!e.disabled)return t.addEventListener(Bl,m),()=>t.removeEventListener(Bl,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:b,forceMount:x,keywords:w,...j}=e;return i.createElement(Pi.div,{ref:Io(o,t),...j,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||l.getDisablePointerSelection()?void 0:y,onClick:v?void 0:m},e.children)}),rc=i.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,s=Oi(),l=i.useRef(null),c=i.useRef(null),u=Oi(),d=Gl(),f=mc(e=>!(!a&&!1!==d.filter())||(!e.search||e.filtered.groups.has(s)));hc(()=>d.group(s),[]),yc(s,l,[e.value,e.heading,c]);let h=i.useMemo(()=>({id:s,forceMount:a}),[a]);return i.createElement(Pi.div,{ref:Io(l,t),...o,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&i.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),gc(e,e=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},i.createElement(Xl.Provider,{value:h},e))))}),nc=i.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=i.useRef(null),o=mc(e=>!e.search);return r||o?i.createElement(Pi.div,{ref:Io(a,t),...n,"cmdk-separator":"",role:"separator"}):null}),ac=i.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=null!=e.value,o=Yl(),s=mc(e=>e.search),l=mc(e=>e.selectedItemId),c=Gl();return i.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),i.createElement(Pi.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?e.value:s,onChange:e=>{a||o.setState("search",e.target.value),null==r||r(e.target.value)}})}),oc=i.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=i.useRef(null),s=i.useRef(null),l=mc(e=>e.selectedItemId),c=Gl();return i.useEffect(()=>{if(s.current&&o.current){let e,t=s.current,r=o.current,n=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}},[]),i.createElement(Pi.div,{ref:Io(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:c.listId},gc(e,e=>i.createElement("div",{ref:Io(s,c.listInnerRef),"cmdk-list-sizer":""},e)))}),ic=i.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:s,...l}=e;return i.createElement(Dl,{open:r,onOpenChange:n},i.createElement(Il,{container:s},i.createElement(Ml,{"cmdk-overlay":"",className:a}),i.createElement(Ll,{"aria-label":e.label,"cmdk-dialog":"",className:o},i.createElement(ec,{ref:t,...l}))))}),sc=i.forwardRef((e,t)=>mc(e=>0===e.filtered.count)?i.createElement(Pi.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),lc=i.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return i.createElement(Pi.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},gc(e,e=>i.createElement("div",{"aria-hidden":!0},e)))}),cc=Object.assign(ec,{List:oc,Item:tc,Input:ac,Group:rc,Separator:nc,Dialog:ic,Empty:sc,Loading:lc});function uc(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function dc(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function fc(e){let t=i.useRef(e);return hc(()=>{t.current=e}),t}var hc="undefined"==typeof window?i.useEffect:i.useLayoutEffect;function pc(e){let t=i.useRef();return void 0===t.current&&(t.current=e()),t}function mc(e){let t=Yl(),r=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,r,r)}function yc(e,t,r,n=[]){let a=i.useRef(),o=Gl();return hc(()=>{var i;let s=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=n.map(e=>e.trim());o.value(e,s,l),null==(i=t.current)||i.setAttribute(Hl,s),a.current=s}),a}var vc=()=>{let[e,t]=i.useState(),r=pc(()=>new Map);return hc(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function gc({asChild:e,children:t},r){return e&&i.isValidElement(t)?i.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},r(t.props.children)):r(t)}var bc={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const xc=ti("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function wc(e){return wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wc(e)}var jc=["className"],_c=["className","children"],kc=["className"],Oc=["className"],Sc=["className"],Nc=["className"];function Ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ec(Object(r),!0).forEach(function(t){Cc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ec(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Cc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=wc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=wc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rc(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var Ac=Dl,Tc=Fl,Dc=Il,Fc=zl,Ic=i.forwardRef(function(e,t){var r=e.className,n=Rc(e,jc);return(0,an.jsx)(Ml,Pc({ref:t,className:ga("fixed inset-0 z-[99999] 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",r)},n))});Ic.displayName=Ml.displayName;var Mc=i.forwardRef(function(e,t){var r=e.className,n=e.children,a=Rc(e,_c);return(0,an.jsxs)(Dc,{children:[(0,an.jsx)(Ic,{}),(0,an.jsxs)(Ll,Pc(Pc({ref:t,className:ga("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","max-w-4xl z-[99999]",r)},a),{},{children:[n,(0,an.jsxs)(zl,{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:[(0,an.jsx)(ri,{className:"h-4 w-4"}),(0,an.jsx)("span",{className:"sr-only",children:(0,vo.__)("Close","trigger")})]})]}))]})});Mc.displayName=Ll.displayName;var Lc=function(e){var t=e.className,r=Rc(e,kc);return(0,an.jsx)("div",Pc({className:ga("flex flex-col space-y-1.5 text-center sm:text-left",t)},r))};Lc.displayName="DialogHeader";var $c=function(e){var t=e.className,r=Rc(e,Oc);return(0,an.jsx)("div",Pc({className:ga("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},r))};$c.displayName="DialogFooter";var Vc=i.forwardRef(function(e,t){var r=e.className,n=Rc(e,Sc);return(0,an.jsx)($l,Pc({ref:t,className:ga("text-lg font-semibold leading-none tracking-tight",r)},n))});Vc.displayName=$l.displayName;var zc=i.forwardRef(function(e,t){var r=e.className,n=Rc(e,Nc);return(0,an.jsx)(Vl,Pc({ref:t,className:ga("text-sm text-muted-foreground",r)},n))});function Uc(e){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uc(e)}zc.displayName=Vl.displayName;var qc=["className"],Wc=["className"],Zc=["className"],Bc=["className"],Hc=["className"],Kc=["className"];function Qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Gc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qc(Object(r),!0).forEach(function(t){Jc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Uc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Uc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yc(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var Xc=i.forwardRef(function(e,t){var r=e.className,n=Yc(e,qc);return(0,an.jsx)(cc,Gc({ref:t,className:ga("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},n))});Xc.displayName=cc.displayName;var eu=i.forwardRef(function(e,t){var r=e.className,n=Yc(e,Wc);return(0,an.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,an.jsx)(xc,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,an.jsx)(cc.Input,Gc({ref:t,className:ga("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",r)},n))]})});eu.displayName=cc.Input.displayName;var tu=i.forwardRef(function(e,t){var r=e.className,n=Yc(e,Zc);return(0,an.jsx)(cc.List,Gc({ref:t,className:ga("max-h-[300px] overflow-y-auto overflow-x-hidden",r)},n))});tu.displayName=cc.List.displayName;var ru=i.forwardRef(function(e,t){return(0,an.jsx)(cc.Empty,Gc({ref:t,className:"py-6 text-center text-sm"},e))});ru.displayName=cc.Empty.displayName;var nu=i.forwardRef(function(e,t){var r=e.className,n=Yc(e,Bc);return(0,an.jsx)(cc.Group,Gc({ref:t,className:ga("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",r)},n))});nu.displayName=cc.Group.displayName,i.forwardRef(function(e,t){var r=e.className,n=Yc(e,Hc);return(0,an.jsx)(cc.Separator,Gc({ref:t,className:ga("-mx-1 h-px bg-border",r)},n))}).displayName=cc.Separator.displayName;var au=i.forwardRef(function(e,t){var r=e.className,n=Yc(e,Kc);return(0,an.jsx)(cc.Item,Gc({ref:t,className:ga("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r)},n))});au.displayName=cc.Item.displayName;const ou=["top","right","bottom","left"],iu=Math.min,su=Math.max,lu=Math.round,cu=Math.floor,uu=e=>({x:e,y:e}),du={left:"right",right:"left",bottom:"top",top:"bottom"},fu={start:"end",end:"start"};function hu(e,t,r){return su(e,iu(t,r))}function pu(e,t){return"function"==typeof e?e(t):e}function mu(e){return e.split("-")[0]}function yu(e){return e.split("-")[1]}function vu(e){return"x"===e?"y":"x"}function gu(e){return"y"===e?"height":"width"}const bu=new Set(["top","bottom"]);function xu(e){return bu.has(mu(e))?"y":"x"}function wu(e){return vu(xu(e))}function ju(e){return e.replace(/start|end/g,e=>fu[e])}const _u=["left","right"],ku=["right","left"],Ou=["top","bottom"],Su=["bottom","top"];function Nu(e,t,r,n){const a=yu(e);let o=function(e,t,r){switch(e){case"top":case"bottom":return r?t?ku:_u:t?_u:ku;case"left":case"right":return t?Ou:Su;default:return[]}}(mu(e),"start"===r,n);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(ju)))),o}function Eu(e){return e.replace(/left|right|bottom|top/g,e=>du[e])}function Pu(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Ru(e,t,r){let{reference:n,floating:a}=e;const o=xu(t),i=wu(t),s=gu(i),l=mu(t),c="y"===o,u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,f=n[s]/2-a[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-a.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-a.width,y:d};break;default:h={x:n.x,y:n.y}}switch(yu(t)){case"start":h[i]-=f*(r&&c?-1:1);break;case"end":h[i]+=f*(r&&c?-1:1)}return h}async function Au(e,t){var r;void 0===t&&(t={});const{x:n,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=pu(t,e),p=Pu(h),m=s[f?"floating"===d?"reference":"floating":d],y=Cu(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},x=Cu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-x.top+p.top)/b.y,bottom:(x.bottom-y.bottom+p.bottom)/b.y,left:(y.left-x.left+p.left)/b.x,right:(x.right-y.right+p.right)/b.x}}function Tu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Du(e){return ou.some(t=>e[t]>=0)}const Fu=new Set(["left","top"]);function Iu(){return"undefined"!=typeof window}function Mu(e){return Vu(e)?(e.nodeName||"").toLowerCase():"#document"}function Lu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $u(e){var t;return null==(t=(Vu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Vu(e){return!!Iu()&&(e instanceof Node||e instanceof Lu(e).Node)}function zu(e){return!!Iu()&&(e instanceof Element||e instanceof Lu(e).Element)}function Uu(e){return!!Iu()&&(e instanceof HTMLElement||e instanceof Lu(e).HTMLElement)}function qu(e){return!(!Iu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Lu(e).ShadowRoot)}const Wu=new Set(["inline","contents"]);function Zu(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=nd(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Wu.has(a)}const Bu=new Set(["table","td","th"]);function Hu(e){return Bu.has(Mu(e))}const Ku=[":popover-open",":modal"];function Qu(e){return Ku.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Gu=["transform","translate","scale","rotate","perspective"],Ju=["transform","translate","scale","rotate","perspective","filter"],Yu=["paint","layout","strict","content"];function Xu(e){const t=ed(),r=zu(e)?nd(e):e;return Gu.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Ju.some(e=>(r.willChange||"").includes(e))||Yu.some(e=>(r.contain||"").includes(e))}function ed(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const td=new Set(["html","body","#document"]);function rd(e){return td.has(Mu(e))}function nd(e){return Lu(e).getComputedStyle(e)}function ad(e){return zu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function od(e){if("html"===Mu(e))return e;const t=e.assignedSlot||e.parentNode||qu(e)&&e.host||$u(e);return qu(t)?t.host:t}function id(e){const t=od(e);return rd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Uu(t)&&Zu(t)?t:id(t)}function sd(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const a=id(e),o=a===(null==(n=e.ownerDocument)?void 0:n.body),i=Lu(a);if(o){const e=ld(i);return t.concat(i,i.visualViewport||[],Zu(a)?a:[],e&&r?sd(e):[])}return t.concat(a,sd(a,[],r))}function ld(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cd(e){const t=nd(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Uu(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=lu(r)!==o||lu(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function ud(e){return zu(e)?e:e.contextElement}function dd(e){const t=ud(e);if(!Uu(t))return uu(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=cd(t);let i=(o?lu(r.width):r.width)/n,s=(o?lu(r.height):r.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const fd=uu(0);function hd(e){const t=Lu(e);return ed()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fd}function pd(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect(),o=ud(e);let i=uu(1);t&&(n?zu(n)&&(i=dd(n)):i=dd(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Lu(e))&&t}(o,r,n)?hd(o):uu(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=Lu(o),t=n&&zu(n)?Lu(n):n;let r=e,a=ld(r);for(;a&&n&&t!==r;){const e=dd(a),t=a.getBoundingClientRect(),n=nd(a),o=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,r=Lu(a),a=ld(r)}}return Cu({width:u,height:d,x:l,y:c})}function md(e,t){const r=ad(e).scrollLeft;return t?t.left+r:pd($u(e)).left+r}function yd(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:md(e,n)),y:n.top+t.scrollTop}}const vd=new Set(["absolute","fixed"]);function gd(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Lu(e),n=$u(e),a=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=ed();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=$u(e),r=ad(e),n=e.ownerDocument.body,a=su(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=su(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+md(e);const s=-r.scrollTop;return"rtl"===nd(n).direction&&(i+=su(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:i,y:s}}($u(e));else if(zu(t))n=function(e,t){const r=pd(e,!0,"fixed"===t),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Uu(e)?dd(e):uu(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:n*o.y}}(t,r);else{const r=hd(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Cu(n)}function bd(e,t){const r=od(e);return!(r===t||!zu(r)||rd(r))&&("fixed"===nd(r).position||bd(r,t))}function xd(e,t,r){const n=Uu(t),a=$u(t),o="fixed"===r,i=pd(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=uu(0);function c(){l.x=md(a)}if(n||!n&&!o)if(("body"!==Mu(t)||Zu(a))&&(s=ad(t)),n){const e=pd(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!n&&a&&c();const u=!a||n||o?uu(0):yd(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function wd(e){return"static"===nd(e).position}function jd(e,t){if(!Uu(e)||"fixed"===nd(e).position)return null;if(t)return t(e);let r=e.offsetParent;return $u(e)===r&&(r=r.ownerDocument.body),r}function _d(e,t){const r=Lu(e);if(Qu(e))return r;if(!Uu(e)){let t=od(e);for(;t&&!rd(t);){if(zu(t)&&!wd(t))return t;t=od(t)}return r}let n=jd(e,t);for(;n&&Hu(n)&&wd(n);)n=jd(n,t);return n&&rd(n)&&wd(n)&&!Xu(n)?r:n||function(e){let t=od(e);for(;Uu(t)&&!rd(t);){if(Xu(t))return t;if(Qu(t))return null;t=od(t)}return null}(e)||r}const kd={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o="fixed"===a,i=$u(n),s=!!t&&Qu(t.floating);if(n===i||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=uu(1);const u=uu(0),d=Uu(n);if((d||!d&&!o)&&(("body"!==Mu(n)||Zu(i))&&(l=ad(n)),Uu(n))){const e=pd(n);c=dd(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!i||d||o?uu(0):yd(i,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:$u,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[..."clippingAncestors"===r?Qu(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=sd(e,[],!1).filter(e=>zu(e)&&"body"!==Mu(e)),a=null;const o="fixed"===nd(e).position;let i=o?od(e):e;for(;zu(i)&&!rd(i);){const t=nd(i),r=Xu(i);r||"fixed"!==t.position||(a=null),(o?!r&&!a:!r&&"static"===t.position&&a&&vd.has(a.position)||Zu(i)&&!r&&bd(e,i))?n=n.filter(e=>e!==i):a=t,i=od(i)}return t.set(e,n),n}(t,this._c):[].concat(r),n],i=o[0],s=o.reduce((e,r)=>{const n=gd(t,r,a);return e.top=su(n.top,e.top),e.right=iu(n.right,e.right),e.bottom=iu(n.bottom,e.bottom),e.left=su(n.left,e.left),e},gd(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:_d,getElementRects:async function(e){const t=this.getOffsetParent||_d,r=this.getDimensions,n=await r(e.floating);return{reference:xd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=cd(e);return{width:t,height:r}},getScale:dd,isElement:zu,isRTL:function(e){return"rtl"===nd(e).direction}};function Od(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sd(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=ud(e),u=a||o?[...c?sd(c):[],...sd(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});const d=c&&s?function(e,t){let r,n=null;const a=$u(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const p={rootMargin:-cu(d)+"px "+-cu(a.clientWidth-(u+f))+"px "+-cu(a.clientHeight-(d+h))+"px "+-cu(u)+"px",threshold:su(0,iu(1,l))||1};let m=!0;function y(t){const n=t[0].intersectionRatio;if(n!==l){if(!m)return i();n?i(!1,n):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||Od(c,e.getBoundingClientRect())||i(),m=!1}try{n=new IntersectionObserver(y,{...p,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(y,p)}n.observe(e)}(!0),o}(c,r):null;let f,h=-1,p=null;i&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m=l?pd(e):null;return l&&function t(){const n=pd(e);m&&!Od(m,n)&&r();m=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const Nd=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:a}=e,o=await(null==n.isRTL?void 0:n.isRTL(a.floating)),i=mu(r),s=yu(r),l="y"===xu(r),c=Fu.has(i)?-1:1,u=o&&l?-1:1,d=pu(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(t,e);return i===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},Ed=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=pu(e,t),c={x:r,y:n},u=await Au(t,l),d=xu(mu(a)),f=vu(d);let h=c[f],p=c[d];if(o){const e="y"===f?"bottom":"right";h=hu(h+u["y"===f?"top":"left"],h,h-u[e])}if(i){const e="y"===d?"bottom":"right";p=hu(p+u["y"===d?"top":"left"],p,p-u[e])}const m=s.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:o,[d]:i}}}}}},Pd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=pu(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const v=mu(a),g=xu(s),b=mu(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Eu(s)]:function(e){const t=Eu(e);return[ju(e),t,ju(t)]}(s)),j="none"!==p;!f&&j&&w.push(...Nu(s,m,p,x));const _=[s,...w],k=await Au(t,y),O=[];let S=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&O.push(k[v]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=yu(e),a=wu(e),o=gu(a);let i="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Eu(i)),[i,Eu(i)]}(a,i,x);O.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:a,overflows:O}],!O.every(e=>e<=0)){var N,E;const e=((null==(N=o.flip)?void 0:N.index)||0)+1,t=_[e];if(t){if(!("alignment"===d&&g!==xu(t))||S.every(e=>e.overflows[0]>0&&xu(e.placement)===g))return{data:{index:e,overflows:S},reset:{placement:t}}}let r=null==(E=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!r)switch(h){case"bestFit":{var P;const e=null==(P=S.filter(e=>{if(j){const t=xu(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(a!==r)return{reset:{placement:r}}}return{}}}},Cd=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=pu(e,t),u=await Au(t,c),d=mu(a),f=yu(a),h="y"===xu(a),{width:p,height:m}=o.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,y="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=p-u.left-u.right,x=iu(m-u[y],g),w=iu(p-u[v],b),j=!t.middlewareData.shift;let _=x,k=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(_=g),j&&!f){const e=su(u.left,0),t=su(u.right,0),r=su(u.top,0),n=su(u.bottom,0);h?k=p-2*(0!==e||0!==t?e+t:su(u.left,u.right)):_=m-2*(0!==r||0!==n?r+n:su(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:_});const O=await i.getDimensions(s.floating);return p!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}},Rd=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=pu(e,t);switch(n){case"referenceHidden":{const e=Tu(await Au(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Du(e)}}}case"escaped":{const e=Tu(await Au(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Du(e)}}}default:return{}}}}},Ad=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=pu(e,t)||{};if(null==c)return{};const d=Pu(u),f={x:r,y:n},h=wu(a),p=gu(h),m=await i.getDimensions(c),y="y"===h,v=y?"top":"left",g=y?"bottom":"right",b=y?"clientHeight":"clientWidth",x=o.reference[p]+o.reference[h]-f[h]-o.floating[p],w=f[h]-o.reference[h],j=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let _=j?j[b]:0;_&&await(null==i.isElement?void 0:i.isElement(j))||(_=s.floating[b]||o.floating[p]);const k=x/2-w/2,O=_/2-m[p]/2-1,S=iu(d[v],O),N=iu(d[g],O),E=S,P=_-m[p]-N,C=_/2-m[p]/2+k,R=hu(E,C,P),A=!l.arrow&&null!=yu(a)&&C!==R&&o.reference[p]/2-(C<E?S:N)-m[p]/2<0,T=A?C<E?C-E:C-P:0;return{[h]:f[h]+T,data:{[h]:R,centerOffset:C-R-T,...A&&{alignmentOffset:T}},reset:A}}}),Td=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=pu(e,t),u={x:r,y:n},d=xu(a),f=vu(d);let h=u[f],p=u[d];const m=pu(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+y.mainAxis,r=o.reference[f]+o.reference[e]-y.mainAxis;h<t?h=t:h>r&&(h=r)}if(c){var v,g;const e="y"===f?"width":"height",t=Fu.has(mu(a)),r=o.reference[d]-o.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:y.crossAxis),n=o.reference[d]+o.reference[e]+(t?0:(null==(g=i.offset)?void 0:g[d])||0)-(t?y.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[f]:h,[d]:p}}}},Dd=(e,t,r)=>{const n=new Map,a={platform:kd,...r},o={...a.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Ru(c,n,l),f=n,h={},p=0;for(let r=0;r<s.length;r++){const{name:o,fn:m}=s[r],{x:y,y:v,data:g,reset:b}=await m({x:u,y:d,initialPlacement:n,placement:f,strategy:a,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=v?v:d,h={...h,[o]:{...h[o],...g}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:u,y:d}=Ru(c,f,l))),r=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var Fd="undefined"!=typeof document?i.useLayoutEffect:function(){};function Id(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!Id(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!==n--;){const r=a[n];if(("_owner"!==r||!e.$$typeof)&&!Id(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Md(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ld(e,t){const r=Md(e);return Math.round(t*r)/r}function $d(e){const t=i.useRef(e);return Fd(()=>{t.current=e}),t}const Vd=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(a=r,{}.hasOwnProperty.call(a,"current"))?null!=r.current?Ad({element:r.current,padding:n}).fn(t):{}:r?Ad({element:r,padding:n}).fn(t):{};var a}}),zd=(e,t)=>({...Nd(e),options:[e,t]}),Ud=(e,t)=>({...Ed(e),options:[e,t]}),qd=(e,t)=>({...Td(e),options:[e,t]}),Wd=(e,t)=>({...Pd(e),options:[e,t]}),Zd=(e,t)=>({...Cd(e),options:[e,t]}),Bd=(e,t)=>({...Rd(e),options:[e,t]}),Hd=(e,t)=>({...Vd(e),options:[e,t]});var Kd=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...o}=e;return(0,an.jsx)(Pi.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,an.jsx)("polygon",{points:"0,0 30,0 15,10"})})});Kd.displayName="Arrow";var Qd=Kd;function Gd(e){const[t,r]=i.useState(void 0);return ji(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let a,o;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;r({width:a,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var Jd="Popper",[Yd,Xd]=xi(Jd),[ef,tf]=Yd(Jd),rf=e=>{const{__scopePopper:t,children:r}=e,[n,a]=i.useState(null);return(0,an.jsx)(ef,{scope:t,anchor:n,onAnchorChange:a,children:r})};rf.displayName=Jd;var nf="PopperAnchor",af=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,o=tf(nf,r),s=i.useRef(null),l=Mo(t,s);return i.useEffect(()=>{o.onAnchorChange(n?.current||s.current)}),n?null:(0,an.jsx)(Pi.div,{...a,ref:l})});af.displayName=nf;var of="PopperContent",[sf,lf]=Yd(of),cf=i.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:o="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...y}=e,v=tf(of,r),[g,b]=i.useState(null),x=Mo(t,e=>b(e)),[w,j]=i.useState(null),_=Gd(w),k=_?.width??0,O=_?.height??0,S=n+("center"!==o?"-"+o:""),N="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},E=Array.isArray(u)?u:[u],P=E.length>0,C={padding:N,boundary:E.filter(hf),altBoundary:P},{refs:R,floatingStyles:A,placement:T,isPositioned:D,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=i.useState(n);Id(h,n)||p(n);const[m,y]=i.useState(null),[v,g]=i.useState(null),b=i.useCallback(e=>{e!==_.current&&(_.current=e,y(e))},[]),x=i.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),w=o||m,j=s||v,_=i.useRef(null),k=i.useRef(null),O=i.useRef(d),S=null!=c,N=$d(c),E=$d(a),P=$d(u),C=i.useCallback(()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:r,middleware:h};E.current&&(e.platform=E.current),Dd(_.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};R.current&&!Id(O.current,t)&&(O.current=t,Ei.flushSync(()=>{f(t)}))})},[h,t,r,E,P]);Fd(()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const R=i.useRef(!1);Fd(()=>(R.current=!0,()=>{R.current=!1}),[]),Fd(()=>{if(w&&(_.current=w),j&&(k.current=j),w&&j){if(N.current)return N.current(w,j,C);C()}},[w,j,C,N,S]);const A=i.useMemo(()=>({reference:_,floating:k,setReference:b,setFloating:x}),[b,x]),T=i.useMemo(()=>({reference:w,floating:j}),[w,j]),D=i.useMemo(()=>{const e={position:r,left:0,top:0};if(!T.floating)return e;const t=Ld(T.floating,d.x),n=Ld(T.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Md(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,T.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:C,refs:A,elements:T,floatingStyles:D}),[d,C,A,T,D])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>Sd(...e,{animationFrame:"always"===p}),elements:{reference:v.anchor},middleware:[zd({mainAxis:a+O,alignmentAxis:s}),c&&Ud({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?qd():void 0,...C}),c&&Wd({...C}),Zd({...C,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${r}px`),i.setProperty("--radix-popper-available-height",`${n}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),w&&Hd({element:w,padding:l}),pf({arrowWidth:k,arrowHeight:O}),h&&Bd({strategy:"referenceHidden",...C})]}),[I,M]=mf(T),L=Ci(m);ji(()=>{D&&L?.()},[D,L]);const $=F.arrow?.x,V=F.arrow?.y,z=0!==F.arrow?.centerOffset,[U,q]=i.useState();return ji(()=>{g&&q(window.getComputedStyle(g).zIndex)},[g]),(0,an.jsx)("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:D?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,an.jsx)(sf,{scope:r,placedSide:I,onArrowChange:j,arrowX:$,arrowY:V,shouldHideArrow:z,children:(0,an.jsx)(Pi.div,{"data-side":I,"data-align":M,...y,ref:x,style:{...y.style,animation:D?void 0:"none"}})})})});cf.displayName=of;var uf="PopperArrow",df={top:"bottom",right:"left",bottom:"top",left:"right"},ff=i.forwardRef(function(e,t){const{__scopePopper:r,...n}=e,a=lf(uf,r),o=df[a.placedSide];return(0,an.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,an.jsx)(Qd,{...n,ref:t,style:{...n.style,display:"block"}})})});function hf(e){return null!==e}ff.displayName=uf;var pf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,i=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,c]=mf(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+i/2,f=(a.arrow?.y??0)+s/2;let h="",p="";return"bottom"===l?(h=o?u:`${d}px`,p=-s+"px"):"top"===l?(h=o?u:`${d}px`,p=`${n.floating.height+s}px`):"right"===l?(h=-s+"px",p=o?u:`${f}px`):"left"===l&&(h=`${n.floating.width+s}px`,p=o?u:`${f}px`),{data:{x:h,y:p}}}});function mf(e){const[t,r="center"]=e.split("-");return[t,r]}var yf=rf,vf=af,gf=cf,bf=ff,xf="Popover",[wf,jf]=xi(xf,[Xd]),_f=Xd(),[kf,Of]=wf(xf),Sf=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,l=_f(t),c=i.useRef(null),[u,d]=i.useState(!1),[f,h]=Ni({prop:n,defaultProp:a??!1,onChange:o,caller:xf});return(0,an.jsx)(yf,{...l,children:(0,an.jsx)(kf,{scope:t,contentId:Oi(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:s,children:r})})};Sf.displayName=xf;var Nf="PopoverAnchor",Ef=i.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Of(Nf,r),o=_f(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=a;return i.useEffect(()=>(s(),()=>l()),[s,l]),(0,an.jsx)(vf,{...o,...n,ref:t})});Ef.displayName=Nf;var Pf="PopoverTrigger",Cf=i.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Of(Pf,r),o=_f(r),i=Mo(t,a.triggerRef),s=(0,an.jsx)(Pi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Wf(a.open),...n,ref:i,onClick:bi(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:(0,an.jsx)(vf,{asChild:!0,...o,children:s})});Cf.displayName=Pf;var Rf="PopoverPortal",[Af,Tf]=wf(Rf,{forceMount:void 0}),Df=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,o=Of(Rf,t);return(0,an.jsx)(Af,{scope:t,forceMount:r,children:(0,an.jsx)(Ji,{present:r||o.open,children:(0,an.jsx)(Gi,{asChild:!0,container:a,children:n})})})};Df.displayName=Rf;var Ff="PopoverContent",If=i.forwardRef((e,t)=>{const r=Tf(Ff,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,o=Of(Ff,e.__scopePopover);return(0,an.jsx)(Ji,{present:n||o.open,children:o.modal?(0,an.jsx)(Lf,{...a,ref:t}):(0,an.jsx)($f,{...a,ref:t})})});If.displayName=Ff;var Mf=Lo("PopoverContent.RemoveScroll"),Lf=i.forwardRef((e,t)=>{const r=Of(Ff,e.__scopePopover),n=i.useRef(null),a=Mo(t,n),o=i.useRef(!1);return i.useEffect(()=>{const e=n.current;if(e)return el(e)},[]),(0,an.jsx)(Bs,{as:Mf,allowPinchZoom:!0,children:(0,an.jsx)(Vf,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:bi(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||r.triggerRef.current?.focus()}),onPointerDownOutside:bi(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;o.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:bi(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),$f=i.forwardRef((e,t)=>{const r=Of(Ff,e.__scopePopover),n=i.useRef(!1),a=i.useRef(!1);return(0,an.jsx)(Vf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const o=t.target,i=r.triggerRef.current?.contains(o);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),Vf=i.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=Of(Ff,r),h=_f(r);return es(),(0,an.jsx)(qi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,an.jsx)(Ii,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,an.jsx)(gf,{"data-state":Wf(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.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)"}})})})}),zf="PopoverClose",Uf=i.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Of(zf,r);return(0,an.jsx)(Pi.button,{type:"button",...n,ref:t,onClick:bi(e.onClick,()=>a.onOpenChange(!1))})});Uf.displayName=zf;var qf=i.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=_f(r);return(0,an.jsx)(bf,{...a,...n,ref:t})});function Wf(e){return e?"open":"closed"}qf.displayName="PopoverArrow";var Zf=Df,Bf=If;function Hf(e){return Hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hf(e)}var Kf=["className","align","sideOffset"];function Qf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Gf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qf(Object(r),!0).forEach(function(t){Jf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jf(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Hf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Yf=Sf,Xf=Cf,eh=i.forwardRef(function(e,t){var r=e.className,n=e.align,a=void 0===n?"center":n,o=e.sideOffset,i=void 0===o?4:o,s=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,Kf);return(0,an.jsx)(Zf,{children:(0,an.jsx)(Bf,Gf({ref:t,align:a,sideOffset:i,className:ga("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 origin-[--radix-popover-content-transform-origin]",r)},s))})});function th(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return rh(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(rh(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,rh(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,rh(d,"constructor",c),rh(c,"constructor",l),l.displayName="GeneratorFunction",rh(c,a,"GeneratorFunction"),rh(d),rh(d,a,"Generator"),rh(d,n,function(){return this}),rh(d,"toString",function(){return"[object Generator]"}),(th=function(){return{w:o,m:f}})()}function rh(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}rh=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){rh(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},rh(e,t,r,n)}function nh(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function ah(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){nh(o,n,a,i,s,"next",e)}function s(e){nh(o,n,a,i,s,"throw",e)}i(void 0)})}}eh.displayName=Bf.displayName;function oh(e){return function(e){if(Array.isArray(e))return lh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ih(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||sh(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sh(e,t){if(e){if("string"==typeof e)return lh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lh(e,t):void 0}}function lh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ch(e){var t,r=e.selectedPlugin,n=e.onChange,a=ih((0,i.useState)([]),2),o=a[0],s=a[1],l=ih((0,i.useState)(!1),2),c=l[0],u=l[1],d=Qa({queryKey:["getPluginList"],queryFn:(t=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_plugin_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),staleTime:5e3}),f=d.data;(0,i.useEffect)(function(){f&&s(f.data)},[f]);var h=o.filter(function(e){return r.includes(e.slug)}),p=o.filter(function(e){return!r.includes(e.slug)});return(0,an.jsx)("div",{children:(0,an.jsxs)(Yf,{open:c,onOpenChange:u,children:[(0,an.jsx)(Xf,{asChild:!0,children:(0,an.jsxs)(Jo,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between min-h-[2.5rem] h-auto p-2 bg-transparent",children:[(0,an.jsxs)("div",{className:"flex flex-wrap gap-1 flex-1",children:[h.map(function(e){return(0,an.jsxs)(ui,{variant:"default",className:"mr-1 mb-1",children:[e.label,(0,an.jsx)(Jo,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0 ml-1",onClick:function(t){var a;t.preventDefault(),t.stopPropagation(),a=e.slug,n(r.filter(function(e){return e!==a}))},children:(0,an.jsx)(ri,{className:"h-3 w-3"})})]},e.slug)}),0===h.length&&(0,an.jsx)("span",{className:"text-muted-foreground",children:(0,vo.__)("Select plugins you like...","versatile-toolkit")})]}),(0,an.jsx)(ni,{className:"h-4 w-4 shrink-0 opacity-50"})]})}),(0,an.jsx)(eh,{className:"w-full p-0",align:"start",children:(0,an.jsxs)(Xc,{children:[(0,an.jsx)(eu,{placeholder:"Search plugin..."}),(0,an.jsxs)(tu,{children:[(0,an.jsx)(ru,{children:"No plugin found."}),(0,an.jsx)(nu,{children:[].concat(oh(p),oh(h)).map(function(e){return(0,an.jsxs)(au,{value:e.label,onSelect:function(){return t=e.slug,void(r.includes(t)?n(r.filter(function(e){return e!==t})):n([].concat(oh(r),[t])));var t},children:[(0,an.jsx)(ai,{className:ga("mr-2 h-4 w-4",r.includes(e.slug)?"opacity-100":"opacity-0")}),e.label]},e.slug)})})]})]})})]})})}function uh(e){return uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uh(e)}var dh=["className","type"];function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hh(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=uh(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ph,mh,yh=i.forwardRef(function(e,t){var r=e.className,n=e.type,a=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,dh);return(0,an.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(t){hh(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({type:n,className:ga("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t},a))});yh.displayName="Input",function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(ph||(ph={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(mh||(mh={}));const vh=ph.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gh=e=>{switch(typeof e){case"undefined":return vh.undefined;case"string":return vh.string;case"number":return Number.isNaN(e)?vh.nan:vh.number;case"boolean":return vh.boolean;case"function":return vh.function;case"bigint":return vh.bigint;case"symbol":return vh.symbol;case"object":return Array.isArray(e)?vh.array:null===e?vh.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?vh.promise:"undefined"!=typeof Map&&e instanceof Map?vh.map:"undefined"!=typeof Set&&e instanceof Set?vh.set:"undefined"!=typeof Date&&e instanceof Date?vh.date:vh.object;default:return vh.unknown}},bh=ph.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"]);class xh extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(n);else if("invalid_return_type"===a.code)n(a.returnTypeError);else if("invalid_arguments"===a.code)n(a.argumentsError);else if(0===a.path.length)r._errors.push(t(a));else{let e=r,n=0;for(;n<a.path.length;){const r=a.path[n];n===a.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(a))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof xh))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ph.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}xh.create=e=>new xh(e);const wh=(e,t)=>{let r;switch(e.code){case bh.invalid_type:r=e.received===vh.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case bh.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ph.jsonStringifyReplacer)}`;break;case bh.unrecognized_keys:r=`Unrecognized key(s) in object: ${ph.joinValues(e.keys,", ")}`;break;case bh.invalid_union:r="Invalid input";break;case bh.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ph.joinValues(e.options)}`;break;case bh.invalid_enum_value:r=`Invalid enum value. Expected ${ph.joinValues(e.options)}, received '${e.received}'`;break;case bh.invalid_arguments:r="Invalid function arguments";break;case bh.invalid_return_type:r="Invalid function return type";break;case bh.invalid_date:r="Invalid date";break;case bh.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ph.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case bh.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case bh.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case bh.custom:r="Invalid input";break;case bh.invalid_intersection_types:r="Intersection results could not be merged";break;case bh.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case bh.not_finite:r="Number must be finite";break;default:r=t.defaultError,ph.assertNever(e)}return{message:r}};let jh=wh;function _h(){return jh}var kh;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(kh||(kh={}));const Oh=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,o=[...r,...a.path||[]],i={...a,path:o};if(void 0!==a.message)return{...a,path:o,message:a.message};let s="";const l=n.filter(e=>!!e).slice().reverse();for(const e of l)s=e(i,{data:t,defaultError:s}).message;return{...a,path:o,message:s}};function Sh(e,t){const r=_h(),n=Oh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wh?void 0:wh].filter(e=>!!e)});e.common.issues.push(n)}class Nh{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return Eh;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const e of t){const t=await e.key,n=await e.value;r.push({key:t,value:n})}return Nh.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:a}=n;if("aborted"===t.status)return Eh;if("aborted"===a.status)return Eh;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!n.alwaysSet||(r[t.value]=a.value)}return{status:e.value,value:r}}}const Eh=Object.freeze({status:"aborted"}),Ph=e=>({status:"dirty",value:e}),Ch=e=>({status:"valid",value:e}),Rh=e=>"aborted"===e.status,Ah=e=>"dirty"===e.status,Th=e=>"valid"===e.status,Dh=e=>"undefined"!=typeof Promise&&e instanceof Promise;class Fh{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ih=(e,t)=>{if(Th(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 t=new xh(e.common.issues);return this._error=t,this._error}}};function Mh(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{const{message:o}=e;return"invalid_enum_value"===t.code?{message:o??a.defaultError}:void 0===a.data?{message:o??n??a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:o??r??a.defaultError}},description:a}}class Lh{get description(){return this._def.description}_getType(e){return gh(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:gh(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nh,ctx:{common:e.parent.common,data:e.data,parsedType:gh(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Dh(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gh(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Ih(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gh(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return Th(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Th(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gh(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Dh(n)?n:Promise.resolve(n));return Ih(r,a)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{const a=e(t),o=()=>n.addIssue({code:bh.custom,...r(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(o(),!1)):!!a||(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new Mp({schema:this,typeName:Bp.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:e=>this["~validate"](e)}}optional(){return Lp.create(this,this._def)}nullable(){return $p.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jp.create(this)}promise(){return Ip.create(this,this._def)}or(e){return Op.create([this,e],this._def)}and(e){return Np.create(this,e,this._def)}transform(e){return new Mp({...Mh(this._def),schema:this,typeName:Bp.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Vp({...Mh(this._def),innerType:this,defaultValue:t,typeName:Bp.ZodDefault})}brand(){return new qp({typeName:Bp.ZodBranded,type:this,...Mh(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new zp({...Mh(this._def),innerType:this,catchValue:t,typeName:Bp.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Wp.create(this,e)}readonly(){return Zp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $h=/^c[^\s-]{8,}$/i,Vh=/^[0-9a-z]+$/,zh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Uh=/^[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,qh=/^[a-z0-9_-]{21}$/i,Wh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zh=/^[-+]?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)?)??$/,Bh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Hh;const Kh=/^(?:(?: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])$/,Qh=/^(?:(?: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])$/,Gh=/^(([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]))$/,Jh=/^(([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])$/,Yh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ep="((\\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])))",tp=new RegExp(`^${ep}$`);function rp(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function np(e){return new RegExp(`^${rp(e)}$`)}function ap(e){let t=`${ep}T${rp(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function op(e,t){return!("v4"!==t&&t||!Kh.test(e))||!("v6"!==t&&t||!Gh.test(e))}function ip(e,t){if(!Wh.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return"object"==typeof a&&null!==a&&((!("typ"in a)||"JWT"===a?.typ)&&(!!a.alg&&(!t||a.alg===t)))}catch{return!1}}function sp(e,t){return!("v4"!==t&&t||!Qh.test(e))||!("v6"!==t&&t||!Jh.test(e))}class lp extends Lh{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==vh.string){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.string,received:t.parsedType}),Eh}const t=new Nh;let r;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const a=e.data.length>n.value,o=e.data.length<n.value;(a||o)&&(r=this._getOrReturnCtx(e,r),a?Sh(r,{code:bh.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&Sh(r,{code:bh.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)Bh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"email",code:bh.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)Hh||(Hh=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"emoji",code:bh.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)Uh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"uuid",code:bh.invalid_string,message:n.message}),t.dirty());else if("nanoid"===n.kind)qh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"nanoid",code:bh.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)$h.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"cuid",code:bh.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)Vh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"cuid2",code:bh.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)zh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"ulid",code:bh.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Sh(r,{validation:"url",code:bh.invalid_string,message:n.message}),t.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"regex",code:bh.invalid_string,message:n.message}),t.dirty())}else if("trim"===n.kind)e.data=e.data.trim();else if("includes"===n.kind)e.data.includes(n.value,n.position)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty());else if("toLowerCase"===n.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===n.kind)e.data=e.data.toUpperCase();else if("startsWith"===n.kind)e.data.startsWith(n.value)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty());else if("endsWith"===n.kind)e.data.endsWith(n.value)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty());else if("datetime"===n.kind){ap(n).test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:"datetime",message:n.message}),t.dirty())}else if("date"===n.kind){tp.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:"date",message:n.message}),t.dirty())}else if("time"===n.kind){np(n).test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.invalid_string,validation:"time",message:n.message}),t.dirty())}else"duration"===n.kind?Zh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"duration",code:bh.invalid_string,message:n.message}),t.dirty()):"ip"===n.kind?op(e.data,n.version)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"ip",code:bh.invalid_string,message:n.message}),t.dirty()):"jwt"===n.kind?ip(e.data,n.alg)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"jwt",code:bh.invalid_string,message:n.message}),t.dirty()):"cidr"===n.kind?sp(e.data,n.version)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"cidr",code:bh.invalid_string,message:n.message}),t.dirty()):"base64"===n.kind?Yh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"base64",code:bh.invalid_string,message:n.message}),t.dirty()):"base64url"===n.kind?Xh.test(e.data)||(r=this._getOrReturnCtx(e,r),Sh(r,{validation:"base64url",code:bh.invalid_string,message:n.message}),t.dirty()):ph.assertNever(n);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:bh.invalid_string,...kh.errToObj(r)})}_addCheck(e){return new lp({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...kh.errToObj(e)})}url(e){return this._addCheck({kind:"url",...kh.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...kh.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...kh.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...kh.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...kh.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...kh.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...kh.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...kh.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...kh.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...kh.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...kh.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...kh.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...kh.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...kh.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...kh.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...kh.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...kh.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...kh.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...kh.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...kh.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...kh.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...kh.errToObj(t)})}nonempty(e){return this.min(1,kh.errToObj(e))}trim(){return new lp({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new lp({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new lp({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function cp(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}lp.create=e=>new lp({checks:[],typeName:Bp.ZodString,coerce:e?.coerce??!1,...Mh(e)});class up extends Lh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==vh.number){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.number,received:t.parsedType}),Eh}let t;const r=new Nh;for(const n of this._def.checks)if("int"===n.kind)ph.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else"multipleOf"===n.kind?0!==cp(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.not_finite,message:n.message}),r.dirty()):ph.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,kh.toString(t))}gt(e,t){return this.setLimit("min",e,!1,kh.toString(t))}lte(e,t){return this.setLimit("max",e,!0,kh.toString(t))}lt(e,t){return this.setLimit("max",e,!1,kh.toString(t))}setLimit(e,t,r,n){return new up({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:kh.toString(n)}]})}_addCheck(e){return new up({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:kh.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:kh.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:kh.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:kh.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:kh.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:kh.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:kh.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:kh.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:kh.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&ph.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}up.create=e=>new up({checks:[],typeName:Bp.ZodNumber,coerce:e?.coerce||!1,...Mh(e)});class dp extends Lh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==vh.bigint)return this._getInvalidInput(e);let t;const r=new Nh;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Sh(t,{code:bh.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):ph.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.bigint,received:t.parsedType}),Eh}gte(e,t){return this.setLimit("min",e,!0,kh.toString(t))}gt(e,t){return this.setLimit("min",e,!1,kh.toString(t))}lte(e,t){return this.setLimit("max",e,!0,kh.toString(t))}lt(e,t){return this.setLimit("max",e,!1,kh.toString(t))}setLimit(e,t,r,n){return new dp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:kh.toString(n)}]})}_addCheck(e){return new dp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:kh.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:kh.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:kh.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:kh.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:kh.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}dp.create=e=>new dp({checks:[],typeName:Bp.ZodBigInt,coerce:e?.coerce??!1,...Mh(e)});class fp extends Lh{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==vh.boolean){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.boolean,received:t.parsedType}),Eh}return Ch(e.data)}}fp.create=e=>new fp({typeName:Bp.ZodBoolean,coerce:e?.coerce||!1,...Mh(e)});class hp extends Lh{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==vh.date){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.date,received:t.parsedType}),Eh}if(Number.isNaN(e.data.getTime())){return Sh(this._getOrReturnCtx(e),{code:bh.invalid_date}),Eh}const t=new Nh;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),Sh(r,{code:bh.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):ph.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new hp({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:kh.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:kh.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}hp.create=e=>new hp({checks:[],coerce:e?.coerce||!1,typeName:Bp.ZodDate,...Mh(e)});class pp extends Lh{_parse(e){if(this._getType(e)!==vh.symbol){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.symbol,received:t.parsedType}),Eh}return Ch(e.data)}}pp.create=e=>new pp({typeName:Bp.ZodSymbol,...Mh(e)});class mp extends Lh{_parse(e){if(this._getType(e)!==vh.undefined){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.undefined,received:t.parsedType}),Eh}return Ch(e.data)}}mp.create=e=>new mp({typeName:Bp.ZodUndefined,...Mh(e)});class yp extends Lh{_parse(e){if(this._getType(e)!==vh.null){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.null,received:t.parsedType}),Eh}return Ch(e.data)}}yp.create=e=>new yp({typeName:Bp.ZodNull,...Mh(e)});class vp extends Lh{constructor(){super(...arguments),this._any=!0}_parse(e){return Ch(e.data)}}vp.create=e=>new vp({typeName:Bp.ZodAny,...Mh(e)});class gp extends Lh{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ch(e.data)}}gp.create=e=>new gp({typeName:Bp.ZodUnknown,...Mh(e)});class bp extends Lh{_parse(e){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.never,received:t.parsedType}),Eh}}bp.create=e=>new bp({typeName:Bp.ZodNever,...Mh(e)});class xp extends Lh{_parse(e){if(this._getType(e)!==vh.undefined){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.void,received:t.parsedType}),Eh}return Ch(e.data)}}xp.create=e=>new xp({typeName:Bp.ZodVoid,...Mh(e)});class jp extends Lh{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==vh.array)return Sh(t,{code:bh.invalid_type,expected:vh.array,received:t.parsedType}),Eh;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,a=t.data.length<n.exactLength.value;(e||a)&&(Sh(t,{code:e?bh.too_big:bh.too_small,minimum:a?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(Sh(t,{code:bh.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(Sh(t,{code:bh.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new Fh(t,e,t.path,r)))).then(e=>Nh.mergeArray(r,e));const a=[...t.data].map((e,r)=>n.type._parseSync(new Fh(t,e,t.path,r)));return Nh.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new jp({...this._def,minLength:{value:e,message:kh.toString(t)}})}max(e,t){return new jp({...this._def,maxLength:{value:e,message:kh.toString(t)}})}length(e,t){return new jp({...this._def,exactLength:{value:e,message:kh.toString(t)}})}nonempty(e){return this.min(1,e)}}function _p(e){if(e instanceof kp){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Lp.create(_p(n))}return new kp({...e._def,shape:()=>t})}return e instanceof jp?new jp({...e._def,type:_p(e.element)}):e instanceof Lp?Lp.create(_p(e.unwrap())):e instanceof $p?$p.create(_p(e.unwrap())):e instanceof Ep?Ep.create(e.items.map(e=>_p(e))):e}jp.create=(e,t)=>new jp({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Bp.ZodArray,...Mh(t)});class kp extends Lh{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=ph.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==vh.object){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.object,received:t.parsedType}),Eh}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof bp&&"strip"===this._def.unknownKeys))for(const e in r.data)a.includes(e)||o.push(e);const i=[];for(const e of a){const t=n[e],a=r.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new Fh(r,a,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof bp){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)i.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(Sh(r,{code:bh.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const n=r.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new Fh(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of i){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>Nh.mergeObjectSync(t,e)):Nh.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return kh.errToObj,new kp({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{const n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:kh.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new kp({...this._def,unknownKeys:"strip"})}passthrough(){return new kp({...this._def,unknownKeys:"passthrough"})}extend(e){return new kp({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new kp({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Bp.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new kp({...this._def,catchall:e})}pick(e){const t={};for(const r of ph.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new kp({...this._def,shape:()=>t})}omit(e){const t={};for(const r of ph.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new kp({...this._def,shape:()=>t})}deepPartial(){return _p(this)}partial(e){const t={};for(const r of ph.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new kp({...this._def,shape:()=>t})}required(e){const t={};for(const r of ph.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof Lp;)e=e._def.innerType;t[r]=e}return new kp({...this._def,shape:()=>t})}keyof(){return Tp(ph.objectKeys(this.shape))}}kp.create=(e,t)=>new kp({shape:()=>e,unknownKeys:"strip",catchall:bp.create(),typeName:Bp.ZodObject,...Mh(t)}),kp.strictCreate=(e,t)=>new kp({shape:()=>e,unknownKeys:"strict",catchall:bp.create(),typeName:Bp.ZodObject,...Mh(t)}),kp.lazycreate=(e,t)=>new kp({shape:e,unknownKeys:"strip",catchall:bp.create(),typeName:Bp.ZodObject,...Mh(t)});class Op extends Lh{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map(e=>new xh(e.ctx.common.issues));return Sh(t,{code:bh.invalid_union,unionErrors:r}),Eh});{let e;const n=[];for(const a of r){const r={...t,common:{...t.common,issues:[]},parent:null},o=a._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=n.map(e=>new xh(e));return Sh(t,{code:bh.invalid_union,unionErrors:a}),Eh}}get options(){return this._def.options}}Op.create=(e,t)=>new Op({options:e,typeName:Bp.ZodUnion,...Mh(t)});function Sp(e,t){const r=gh(e),n=gh(t);if(e===t)return{valid:!0,data:e};if(r===vh.object&&n===vh.object){const r=ph.objectKeys(t),n=ph.objectKeys(e).filter(e=>-1!==r.indexOf(e)),a={...e,...t};for(const r of n){const n=Sp(e[r],t[r]);if(!n.valid)return{valid:!1};a[r]=n.data}return{valid:!0,data:a}}if(r===vh.array&&n===vh.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n<e.length;n++){const a=Sp(e[n],t[n]);if(!a.valid)return{valid:!1};r.push(a.data)}return{valid:!0,data:r}}return r===vh.date&&n===vh.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Np extends Lh{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(Rh(e)||Rh(n))return Eh;const a=Sp(e.value,n.value);return a.valid?((Ah(e)||Ah(n))&&t.dirty(),{status:t.value,value:a.data}):(Sh(r,{code:bh.invalid_intersection_types}),Eh)};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(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Np.create=(e,t,r)=>new Np({left:e,right:t,typeName:Bp.ZodIntersection,...Mh(r)});class Ep extends Lh{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==vh.array)return Sh(r,{code:bh.invalid_type,expected:vh.array,received:r.parsedType}),Eh;if(r.data.length<this._def.items.length)return Sh(r,{code:bh.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Eh;!this._def.rest&&r.data.length>this._def.items.length&&(Sh(r,{code:bh.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new Fh(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>Nh.mergeArray(t,e)):Nh.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Ep({...this._def,rest:e})}}Ep.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ep({items:e,typeName:Bp.ZodTuple,rest:null,...Mh(t)})};class Pp extends Lh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==vh.map)return Sh(r,{code:bh.invalid_type,expected:vh.map,received:r.parsedType}),Eh;const n=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([e,t],o)=>({key:n._parse(new Fh(r,e,r.path,[o,"key"])),value:a._parse(new Fh(r,t,r.path,[o,"value"]))}));if(r.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const r of o){const n=await r.key,a=await r.value;if("aborted"===n.status||"aborted"===a.status)return Eh;"dirty"!==n.status&&"dirty"!==a.status||t.dirty(),e.set(n.value,a.value)}return{status:t.value,value:e}})}{const e=new Map;for(const r of o){const n=r.key,a=r.value;if("aborted"===n.status||"aborted"===a.status)return Eh;"dirty"!==n.status&&"dirty"!==a.status||t.dirty(),e.set(n.value,a.value)}return{status:t.value,value:e}}}}Pp.create=(e,t,r)=>new Pp({valueType:t,keyType:e,typeName:Bp.ZodMap,...Mh(r)});class Cp extends Lh{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==vh.set)return Sh(r,{code:bh.invalid_type,expected:vh.set,received:r.parsedType}),Eh;const n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(Sh(r,{code:bh.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(Sh(r,{code:bh.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function o(e){const r=new Set;for(const n of e){if("aborted"===n.status)return Eh;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const i=[...r.data.values()].map((e,t)=>a._parse(new Fh(r,e,r.path,t)));return r.common.async?Promise.all(i).then(e=>o(e)):o(i)}min(e,t){return new Cp({...this._def,minSize:{value:e,message:kh.toString(t)}})}max(e,t){return new Cp({...this._def,maxSize:{value:e,message:kh.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Cp.create=(e,t)=>new Cp({valueType:e,minSize:null,maxSize:null,typeName:Bp.ZodSet,...Mh(t)});class Rp extends Lh{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Rp.create=(e,t)=>new Rp({getter:e,typeName:Bp.ZodLazy,...Mh(t)});class Ap extends Lh{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Sh(t,{received:t.data,code:bh.invalid_literal,expected:this._def.value}),Eh}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Tp(e,t){return new Dp({values:e,typeName:Bp.ZodEnum,...Mh(t)})}Ap.create=(e,t)=>new Ap({value:e,typeName:Bp.ZodLiteral,...Mh(t)});class Dp extends Lh{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return Sh(t,{expected:ph.joinValues(r),received:t.parsedType,code:bh.invalid_type}),Eh}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return Sh(t,{received:t.data,code:bh.invalid_enum_value,options:r}),Eh}return Ch(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Dp.create(e,{...this._def,...t})}exclude(e,t=this._def){return Dp.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}Dp.create=Tp;class Fp extends Lh{_parse(e){const t=ph.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==vh.string&&r.parsedType!==vh.number){const e=ph.objectValues(t);return Sh(r,{expected:ph.joinValues(e),received:r.parsedType,code:bh.invalid_type}),Eh}if(this._cache||(this._cache=new Set(ph.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=ph.objectValues(t);return Sh(r,{received:r.data,code:bh.invalid_enum_value,options:e}),Eh}return Ch(e.data)}get enum(){return this._def.values}}Fp.create=(e,t)=>new Fp({values:e,typeName:Bp.ZodNativeEnum,...Mh(t)});class Ip extends Lh{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==vh.promise&&!1===t.common.async)return Sh(t,{code:bh.invalid_type,expected:vh.promise,received:t.parsedType}),Eh;const r=t.parsedType===vh.promise?t.data:Promise.resolve(t.data);return Ch(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ip.create=(e,t)=>new Ip({type:e,typeName:Bp.ZodPromise,...Mh(t)});class Mp extends Lh{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Bp.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:e=>{Sh(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===n.type){const e=n.transform(r.data,a);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return Eh;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?Eh:"dirty"===n.status||"dirty"===t.value?Ph(n.value):n});{if("aborted"===t.value)return Eh;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?Eh:"dirty"===n.status||"dirty"===t.value?Ph(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,a);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?Eh:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?Eh:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Th(e))return Eh;const o=n.transform(e.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>Th(e)?Promise.resolve(n.transform(e.value,a)).then(e=>({status:t.value,value:e})):Eh)}ph.assertNever(n)}}Mp.create=(e,t,r)=>new Mp({schema:e,typeName:Bp.ZodEffects,effect:t,...Mh(r)}),Mp.createWithPreprocess=(e,t,r)=>new Mp({schema:t,effect:{type:"preprocess",transform:e},typeName:Bp.ZodEffects,...Mh(r)});class Lp extends Lh{_parse(e){return this._getType(e)===vh.undefined?Ch(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Lp.create=(e,t)=>new Lp({innerType:e,typeName:Bp.ZodOptional,...Mh(t)});class $p extends Lh{_parse(e){return this._getType(e)===vh.null?Ch(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$p.create=(e,t)=>new $p({innerType:e,typeName:Bp.ZodNullable,...Mh(t)});class Vp extends Lh{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===vh.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Vp.create=(e,t)=>new Vp({innerType:e,typeName:Bp.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Mh(t)});class zp extends Lh{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Dh(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new xh(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new xh(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}zp.create=(e,t)=>new zp({innerType:e,typeName:Bp.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Mh(t)});class Up extends Lh{_parse(e){if(this._getType(e)!==vh.nan){const t=this._getOrReturnCtx(e);return Sh(t,{code:bh.invalid_type,expected:vh.nan,received:t.parsedType}),Eh}return{status:"valid",value:e.data}}}Up.create=e=>new Up({typeName:Bp.ZodNaN,...Mh(e)});Symbol("zod_brand");class qp extends Lh{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Wp extends Lh{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?Eh:"dirty"===e.status?(t.dirty(),Ph(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?Eh:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new Wp({in:e,out:t,typeName:Bp.ZodPipeline})}}class Zp extends Lh{_parse(e){const t=this._def.innerType._parse(e),r=e=>(Th(e)&&(e.value=Object.freeze(e.value)),e);return Dh(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}Zp.create=(e,t)=>new Zp({innerType:e,typeName:Bp.ZodReadonly,...Mh(t)});kp.lazycreate;var Bp;!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"}(Bp||(Bp={}));const Hp=lp.create,Kp=(up.create,Up.create,dp.create,fp.create),Qp=(hp.create,pp.create,mp.create,yp.create,vp.create,gp.create,bp.create,xp.create,jp.create),Gp=kp.create,Jp=(kp.strictCreate,Op.create,Np.create,Ep.create,Pp.create,Cp.create,Rp.create,Ap.create,Dp.create,Fp.create,Ip.create,Mp.create,Lp.create,$p.create,Mp.createWithPreprocess,Wp.create,e=>up.create({...e,coerce:!0}));var Yp=/^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/,Xp=Gp({chosen_plugins:Qp(Hp()),ip_tags:Qp(Hp().refine(function(e){return Yp.test(e)},{message:"Invalid IP address"})).min(1,{message:"At least one IP address is required"})}),em=Gp({enable_maintenance:Kp(),show_subscribers_only:Kp(),title:Hp().min(1,{message:"Title is required"}).min(3,{message:"Title must be at least 3 characters"}),description:Hp().min(1,{message:"Description is required"}).min(10,{message:"Description must be at least 10 characters"}),subtitle:Hp().min(1,{message:"Subtitle is required"}).min(3,{message:"Subtitle must be at least 3 characters"}),background_image:Hp().optional(),background_image_id:Jp().optional(),logo:Hp().optional(),logo_id:Jp().optional(),template:Hp().optional()}),tm=Gp({enable_comingsoon:Kp(),show_subscribers_only:Kp(),title:Hp().min(1,{message:"Title is required"}).min(3,{message:"Title must be at least 3 characters"}),description:Hp().min(1,{message:"Description is required"}).min(10,{message:"Description must be at least 10 characters"}),subtitle:Hp().min(1,{message:"Subtitle is required"}).min(3,{message:"Subtitle must be at least 3 characters"}),background_image:Hp().optional(),background_image_id:Jp().optional(),logo:Hp().optional(),logo_id:Jp().optional(),template:Hp().optional()}),rm=Gp({activeTheme:Hp().min(1,{message:"Please select a theme"})});function nm(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return am(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(am(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,am(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,am(d,"constructor",c),am(c,"constructor",l),l.displayName="GeneratorFunction",am(c,a,"GeneratorFunction"),am(d),am(d,a,"Generator"),am(d,n,function(){return this}),am(d,"toString",function(){return"[object Generator]"}),(nm=function(){return{w:o,m:f}})()}function am(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}am=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){am(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},am(e,t,r,n)}function om(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function im(e){return function(e){if(Array.isArray(e))return cm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||lm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lm(e,t){if(e){if("string"==typeof e)return cm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cm(e,t):void 0}}function cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function um(e){var t,r=e.tags,n=e.onChange,a=sm((0,i.useState)(""),2),o=a[0],s=a[1],l=sm((0,i.useState)(null),2),c=l[0],u=l[1],d=function(){var e=o.trim();e&&(Yp.test(e)?r.includes(e)||(n([].concat(im(r),[e])),s(""),u(null)):u("Invalid IP address"))},f=Ja({mutationFn:(t=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_add_my_ip",e.n=1,mo(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),onSuccess:function(e){},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed to add IP","versatile-toolkit"))}}),h=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){om(o,n,a,i,s,"next",e)}function s(e){om(o,n,a,i,s,"throw",e)}i(void 0)})}}(nm().m(function e(){var t,a,o;return nm().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,f.mutateAsync({});case 1:if(t=e.v,a=t.data,o=null==a?void 0:a.ip,!r.includes(o)){e.n=2;break}return pr.success((0,vo.__)("System Ip already added!","trigger")),e.a(2);case 2:!r.includes(o)&&o&&(n([].concat(im(r),[o])),pr.success((0,vo.__)("System Ip address added","trigger")));case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,an.jsxs)("div",{children:[(0,an.jsxs)("div",{className:"relative",children:[(0,an.jsx)(yh,{type:"text",placeholder:"Type a tag and press Enter or click outside...",value:o,onChange:function(e){s(e.target.value),c&&u(null)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d())},onBlur:function(e){d()}}),(0,an.jsx)(Jo,{type:"button",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 px-2 py-1 h-5",onClick:h,children:(0,vo.__)("Add My IP","versatile-toolkit")})]}),c&&(0,an.jsx)("p",{className:"text-red-500 text-sm mt-1",children:c}),(0,an.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:r.map(function(e){return(0,an.jsxs)(ui,{variant:"default",className:"flex items-center gap-1",children:[e,(0,an.jsx)(Jo,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0",onClick:function(){return t=e,void n(r.filter(function(e){return e!==t}));var t},children:(0,an.jsx)(ri,{className:"h-3 w-3"})})]},e)})})]})}function dm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function hm(e){var t,r=e.selectedTheme,n=e.onChange,a=dm((0,i.useState)([]),2),o=a[0],s=a[1],l=dm((0,i.useState)(!1),2),c=l[0],u=l[1],d=Qa({queryKey:["getThemeList"],queryFn:(t=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_theme_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),staleTime:5e3}),f=d.data;(0,i.useEffect)(function(){f&&s(f.data)},[f]);var h=o.find(function(e){return e.slug===r});return(0,an.jsx)("div",{children:(0,an.jsxs)(Yf,{open:c,onOpenChange:u,children:[(0,an.jsx)(Xf,{asChild:!0,children:(0,an.jsxs)(Jo,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between min-h-[2.5rem] h-auto p-3 bg-transparent",children:[(0,an.jsx)("div",{className:"flex flex-wrap gap-1 flex-1 text-left",children:h?(0,an.jsx)("span",{className:"font-medium",children:h.label}):(0,an.jsx)("span",{className:"text-muted-foreground",children:(0,vo.__)("Select a theme...","versatile-toolkit")})}),(0,an.jsx)(ni,{className:"h-4 w-4 shrink-0 opacity-50"})]})}),(0,an.jsx)(eh,{className:"w-full p-0",align:"start",children:(0,an.jsxs)(Xc,{children:[(0,an.jsx)(eu,{placeholder:"Search theme..."}),(0,an.jsxs)(tu,{children:[(0,an.jsx)(ru,{children:"No theme found."}),(0,an.jsx)(nu,{children:o.map(function(e){return(0,an.jsxs)(au,{value:e.label,onSelect:function(){return t=e.slug,n(t),void u(!1);var t},children:[(0,an.jsx)(ai,{className:ga("mr-2 h-4 w-4",r===e.slug?"opacity-100":"opacity-0")}),e.label]},e.slug)})})]})]})})]})})}var pm=e=>"checkbox"===e.type,mm=e=>e instanceof Date,ym=e=>null==e;const vm=e=>"object"==typeof e;var gm=e=>!ym(e)&&!Array.isArray(e)&&vm(e)&&!mm(e),bm=e=>gm(e)&&e.target?pm(e.target)?e.target.checked:e.target.value:e,xm=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),wm="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function jm(e){let t;const r=Array.isArray(e),n="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(wm&&(e instanceof Blob||n)||!r&&!gm(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return gm(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=jm(e[r]));else t=e}return t}var _m=e=>/^\w*$/.test(e),km=e=>void 0===e,Om=e=>Array.isArray(e)?e.filter(Boolean):[],Sm=e=>Om(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Nm=(e,t,r)=>{if(!t||!gm(e))return r;const n=(_m(t)?[t]:Sm(t)).reduce((e,t)=>ym(e)?e:e[t],e);return km(n)||n===e?km(e[t])?r:e[t]:n},Em=e=>"boolean"==typeof e,Pm=(e,t,r)=>{let n=-1;const a=_m(t)?[t]:Sm(t),o=a.length,i=o-1;for(;++n<o;){const t=a[n];let o=r;if(n!==i){const r=e[t];o=gm(r)||Array.isArray(r)?r:isNaN(+a[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=o,e=e[t]}};const Cm="blur",Rm="focusout",Am="change",Tm="onBlur",Dm="onChange",Fm="onSubmit",Im="onTouched",Mm="all",Lm="max",$m="min",Vm="maxLength",zm="minLength",Um="pattern",qm="required",Wm="validate",Zm=i.createContext(null);Zm.displayName="HookFormContext";const Bm=()=>i.useContext(Zm);var Hm=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Mm&&(t._proxyFormState[a]=!n||Mm),r&&(r[a]=!0),e[a]}});return a};const Km="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;var Qm=e=>"string"==typeof e,Gm=(e,t,r,n,a)=>Qm(e)?(n&&t.watch.add(e),Nm(r,e,a)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),Nm(r,e))):(n&&(t.watchAll=!0),r);function Jm(e){const t=Bm(),{name:r,disabled:n,control:a=t.control,shouldUnregister:o}=e,s=xm(a._names.array,r),l=function(e){const t=Bm(),{control:r=t.control,name:n,defaultValue:a,disabled:o,exact:s}=e||{},l=i.useRef(a),[c,u]=i.useState(r._getWatch(n,l.current));return Km(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:e=>!o&&u(Gm(n,r._names,e.values||r._formValues,!1,l.current))}),[n,r,o,s]),i.useEffect(()=>r._removeUnmounted()),c}({control:a,name:r,defaultValue:Nm(a._formValues,r,Nm(a._defaultValues,r,e.defaultValue)),exact:!0}),c=function(e){const t=Bm(),{control:r=t.control,disabled:n,name:a,exact:o}=e||{},[s,l]=i.useState(r._formState),c=i.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Km(()=>r._subscribe({name:a,formState:c.current,exact:o,callback:e=>{!n&&l({...r._formState,...e})}}),[a,n,o]),i.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),i.useMemo(()=>Hm(s,r,c.current,!1),[s,r])}({control:a,name:r,exact:!0}),u=i.useRef(e),d=i.useRef(a.register(r,{...e.rules,value:l,...Em(e.disabled)?{disabled:e.disabled}:{}})),f=i.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Nm(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!Nm(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Nm(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Nm(c.validatingFields,r)},error:{enumerable:!0,get:()=>Nm(c.errors,r)}}),[c,r]),h=i.useCallback(e=>d.current.onChange({target:{value:bm(e),name:r},type:Am}),[r]),p=i.useCallback(()=>d.current.onBlur({target:{value:Nm(a._formValues,r),name:r},type:Cm}),[r,a._formValues]),m=i.useCallback(e=>{const t=Nm(a._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[a._fields,r]),y=i.useMemo(()=>({name:r,value:l,...Em(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:h,onBlur:p,ref:m}),[r,n,c.disabled,h,p,m,l]);return i.useEffect(()=>{const e=a._options.shouldUnregister||o;a.register(r,{...u.current.rules,...Em(u.current.disabled)?{disabled:u.current.disabled}:{}});const t=(e,t)=>{const r=Nm(a._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){const e=jm(Nm(a._options.defaultValues,r));Pm(a._defaultValues,r,e),km(Nm(a._formValues,r))&&Pm(a._formValues,r,e)}return!s&&a.register(r),()=>{(s?e&&!a._state.action:e)?a.unregister(r):t(r,!1)}},[r,a,s,o]),i.useEffect(()=>{a._setDisabledField({disabled:n,name:r})},[n,r,a]),i.useMemo(()=>({field:y,formState:c,fieldState:f}),[y,c,f])}const Ym=e=>e.render(Jm(e));var Xm=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},ey=e=>Array.isArray(e)?e:[e],ty=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},ry=e=>ym(e)||!vm(e);function ny(e,t,r=new WeakSet){if(ry(e)||ry(t))return e===t;if(mm(e)&&mm(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const o of n){const n=e[o];if(!a.includes(o))return!1;if("ref"!==o){const e=t[o];if(mm(n)&&mm(e)||gm(n)&&gm(e)||Array.isArray(n)&&Array.isArray(e)?!ny(n,e,r):n!==e)return!1}}return!0}var ay=e=>gm(e)&&!Object.keys(e).length,oy=e=>"file"===e.type,iy=e=>"function"==typeof e,sy=e=>{if(!wm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ly=e=>"select-multiple"===e.type,cy=e=>"radio"===e.type,uy=e=>sy(e)&&e.isConnected;function dy(e,t){const r=Array.isArray(t)?t:_m(t)?[t]:Sm(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=km(e)?n++:e[t[n++]];return e}(e,r),a=r.length-1,o=r[a];return n&&delete n[o],0!==a&&(gm(n)&&ay(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!km(e[t]))return!1;return!0}(n))&&dy(e,r.slice(0,-1)),e}var fy=e=>{for(const t in e)if(iy(e[t]))return!0;return!1};function hy(e,t={}){const r=Array.isArray(e);if(gm(e)||r)for(const r in e)Array.isArray(e[r])||gm(e[r])&&!fy(e[r])?(t[r]=Array.isArray(e[r])?[]:{},hy(e[r],t[r])):ym(e[r])||(t[r]=!0);return t}function py(e,t,r){const n=Array.isArray(e);if(gm(e)||n)for(const n in e)Array.isArray(e[n])||gm(e[n])&&!fy(e[n])?km(t)||ry(r[n])?r[n]=Array.isArray(e[n])?hy(e[n],[]):{...hy(e[n])}:py(e[n],ym(t)?{}:t[n],r[n]):r[n]=!ny(e[n],t[n]);return r}var my=(e,t)=>py(e,t,hy(t));const yy={value:!1,isValid:!1},vy={value:!0,isValid:!0};var gy=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!km(e[0].attributes.value)?km(e[0].value)||""===e[0].value?vy:{value:e[0].value,isValid:!0}:vy:yy}return yy},by=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>km(e)?e:t?""===e?NaN:e?+e:e:r&&Qm(e)?new Date(e):n?n(e):e;const xy={isValid:!1,value:null};var wy=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,xy):xy;function jy(e){const t=e.ref;return oy(t)?t.files:cy(t)?wy(e.refs).value:ly(t)?[...t.selectedOptions].map(({value:e})=>e):pm(t)?gy(e.refs).value:by(km(t.value)?e.ref.value:t.value,e)}var _y=e=>e instanceof RegExp,ky=e=>km(e)?e:_y(e)?e.source:gm(e)?_y(e.value)?e.value.source:e.value:e,Oy=e=>({isOnSubmit:!e||e===Fm,isOnBlur:e===Tm,isOnChange:e===Dm,isOnAll:e===Mm,isOnTouch:e===Im});const Sy="AsyncFunction";var Ny=e=>!!e&&!!e.validate&&!!(iy(e.validate)&&e.validate.constructor.name===Sy||gm(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Sy)),Ey=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Py=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const r=Nm(e,a);if(r){const{_f:e,...o}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],a)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(Py(o,t))break}else if(gm(o)&&Py(o,t))break}}};function Cy(e,t,r){const n=Nm(e,r);if(n||_m(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const n=a.join("."),o=Nm(t,n),i=Nm(e,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(i&&i.type)return{name:n,error:i};if(i&&i.root&&i.root.type)return{name:`${n}.root`,error:i.root};a.pop()}return{name:r}}var Ry=(e,t,r)=>{const n=ey(Nm(e,r));return Pm(n,"root",t[r]),Pm(e,r,n),e},Ay=e=>Qm(e);function Ty(e,t,r="validate"){if(Ay(e)||Array.isArray(e)&&e.every(Ay)||Em(e)&&!e)return{type:r,message:Ay(e)?e:"",ref:t}}var Dy=e=>gm(e)&&!_y(e)?e:{value:e,message:""},Fy=async(e,t,r,n,a,o)=>{const{ref:i,refs:s,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:p,name:m,valueAsNumber:y,mount:v}=e._f,g=Nm(r,m);if(!v||t.has(m))return{};const b=s?s[0]:i,x=e=>{a&&b.reportValidity&&(b.setCustomValidity(Em(e)?"":e||""),b.reportValidity())},w={},j=cy(i),_=pm(i),k=j||_,O=(y||oy(i))&&km(i.value)&&km(g)||sy(i)&&""===i.value||""===g||Array.isArray(g)&&!g.length,S=Xm.bind(null,m,n,w),N=(e,t,r,n=Vm,a=zm)=>{const o=e?t:r;w[m]={type:e?n:a,message:o,ref:i,...S(e?n:a,o)}};if(o?!Array.isArray(g)||!g.length:l&&(!k&&(O||ym(g))||Em(g)&&!g||_&&!gy(s).isValid||j&&!wy(s).isValid)){const{value:e,message:t}=Ay(l)?{value:!!l,message:l}:Dy(l);if(e&&(w[m]={type:qm,message:t,ref:b,...S(qm,t)},!n))return x(t),w}if(!(O||ym(d)&&ym(f))){let e,t;const r=Dy(f),a=Dy(d);if(ym(g)||isNaN(g)){const n=i.valueAsDate||new Date(g),o=e=>new Date((new Date).toDateString()+" "+e),s="time"==i.type,l="week"==i.type;Qm(r.value)&&g&&(e=s?o(g)>o(r.value):l?g>r.value:n>new Date(r.value)),Qm(a.value)&&g&&(t=s?o(g)<o(a.value):l?g<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(g?+g:g);ym(r.value)||(e=n>r.value),ym(a.value)||(t=n<a.value)}if((e||t)&&(N(!!e,r.message,a.message,Lm,$m),!n))return x(w[m].message),w}if((c||u)&&!O&&(Qm(g)||o&&Array.isArray(g))){const e=Dy(c),t=Dy(u),r=!ym(e.value)&&g.length>+e.value,a=!ym(t.value)&&g.length<+t.value;if((r||a)&&(N(r,e.message,t.message),!n))return x(w[m].message),w}if(h&&!O&&Qm(g)){const{value:e,message:t}=Dy(h);if(_y(e)&&!g.match(e)&&(w[m]={type:Um,message:t,ref:i,...S(Um,t)},!n))return x(t),w}if(p)if(iy(p)){const e=Ty(await p(g,r),b);if(e&&(w[m]={...e,...S(Wm,e.message)},!n))return x(e.message),w}else if(gm(p)){let e={};for(const t in p){if(!ay(e)&&!n)break;const a=Ty(await p[t](g,r),b,t);a&&(e={...a,...S(t,a.message)},x(a.message),n&&(w[m]=e))}if(!ay(e)&&(w[m]={ref:b,...e},!n))return w}return x(!0),w};const Iy={mode:Fm,reValidateMode:Dm,shouldFocusError:!0};function My(e={}){let t,r={...Iy,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:iy(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},a={},o=(gm(r.defaultValues)||gm(r.values))&&jm(r.defaultValues||r.values)||{},i=r.shouldUnregister?{}:jm(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:ty(),state:ty()},h=r.criteriaMode===Mm,p=async e=>{if(!r.disabled&&(u.isValid||d.isValid||e)){const e=r.resolver?ay((await b()).errors):await x(a,!0);e!==n.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!r.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Pm(n.validatingFields,e,t):dy(n.validatingFields,e))}),f.state.next({validatingFields:n.validatingFields,isValidating:!ay(n.validatingFields)}))},y=(e,t,r,n)=>{const l=Nm(a,e);if(l){const a=Nm(i,e,km(r)?Nm(o,e):r);km(a)||n&&n.defaultChecked||t?Pm(i,e,t?a:jy(l._f)):_(e,a),s.mount&&p()}},v=(e,t,a,i,s)=>{let l=!1,c=!1;const h={name:e};if(!r.disabled){if(!a||i){(u.isDirty||d.isDirty)&&(c=n.isDirty,n.isDirty=h.isDirty=w(),l=c!==h.isDirty);const r=ny(Nm(o,e),t);c=!!Nm(n.dirtyFields,e),r?dy(n.dirtyFields,e):Pm(n.dirtyFields,e,!0),h.dirtyFields=n.dirtyFields,l=l||(u.dirtyFields||d.dirtyFields)&&c!==!r}if(a){const t=Nm(n.touchedFields,e);t||(Pm(n.touchedFields,e,a),h.touchedFields=n.touchedFields,l=l||(u.touchedFields||d.touchedFields)&&t!==a)}l&&s&&f.state.next(h)}return l?h:{}},g=(e,a,o,i)=>{const s=Nm(n.errors,e),l=(u.isValid||d.isValid)&&Em(a)&&n.isValid!==a;var h;if(r.delayError&&o?(h=()=>((e,t)=>{Pm(n.errors,e,t),f.state.next({errors:n.errors})})(e,o),t=e=>{clearTimeout(c),c=setTimeout(h,e)},t(r.delayError)):(clearTimeout(c),t=null,o?Pm(n.errors,e,o):dy(n.errors,e)),(o?!ny(s,o):s)||!ay(i)||l){const t={...i,...l&&Em(a)?{isValid:a}:{},errors:n.errors,name:e};n={...n,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await r.resolver(i,r.context,((e,t,r,n)=>{const a={};for(const r of e){const e=Nm(t,r);e&&Pm(a,r,e._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}})(e||l.mount,a,r.criteriaMode,r.shouldUseNativeValidation));return m(e),t},x=async(e,t,a={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...c}=s;if(e){const c=l.array.has(e.name),d=s._f&&Ny(s._f);d&&u.validatingFields&&m([o],!0);const f=await Fy(s,l.disabled,i,h,r.shouldUseNativeValidation&&!t,c);if(d&&u.validatingFields&&m([o]),f[e.name]&&(a.valid=!1,t))break;!t&&(Nm(f,e.name)?c?Ry(n.errors,f,e.name):Pm(n.errors,e.name,f[e.name]):dy(n.errors,e.name))}!ay(c)&&await x(c,t,a)}}return a.valid},w=(e,t)=>!r.disabled&&(e&&t&&Pm(i,e,t),!ny(P(),o)),j=(e,t,r)=>Gm(e,l,{...s.mount?i:km(t)?o:Qm(e)?{[e]:t}:t},r,t),_=(e,t,r={})=>{const n=Nm(a,e);let o=t;if(n){const r=n._f;r&&(!r.disabled&&Pm(i,e,by(t,r)),o=sy(r.ref)&&ym(t)?"":t,ly(r.ref)?[...r.ref.options].forEach(e=>e.selected=o.includes(e.value)):r.refs?pm(r.ref)?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(o)?e.checked=!!o.find(t=>t===e.value):e.checked=o===e.value||!!o)}):r.refs.forEach(e=>e.checked=e.value===o):oy(r.ref)?r.ref.value="":(r.ref.value=o,r.ref.type||f.state.next({name:e,values:jm(i)})))}(r.shouldDirty||r.shouldTouch)&&v(e,o,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&E(e)},k=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const o=t[n],i=e+"."+n,s=Nm(a,i);(l.array.has(e)||gm(o)||s&&!s._f)&&!mm(o)?k(i,o,r):_(i,o,r)}},O=(e,t,r={})=>{const c=Nm(a,e),h=l.array.has(e),p=jm(t);Pm(i,e,p),h?(f.array.next({name:e,values:jm(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&r.shouldDirty&&f.state.next({name:e,dirtyFields:my(o,i),isDirty:w(e,p)})):!c||c._f||ym(p)?_(e,p,r):k(e,p,r),Ey(e,l)&&f.state.next({...n}),f.state.next({name:s.mount?e:void 0,values:jm(i)})},S=async e=>{s.mount=!0;const o=e.target;let c=o.name,y=!0;const w=Nm(a,c),j=e=>{y=Number.isNaN(e)||mm(e)&&isNaN(e.getTime())||ny(e,Nm(i,c,e))},_=Oy(r.mode),k=Oy(r.reValidateMode);if(w){let s,O;const S=o.type?jy(w._f):bm(e),N=e.type===Cm||e.type===Rm,P=!(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate))(w._f)&&!r.resolver&&!Nm(n.errors,c)&&!w._f.deps||((e,t,r,n,a)=>!a.isOnAll&&(!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:!(r?n.isOnChange:a.isOnChange)||e))(N,Nm(n.touchedFields,c),n.isSubmitted,k,_),C=Ey(c,l,N);Pm(i,c,S),N?(w._f.onBlur&&w._f.onBlur(e),t&&t(0)):w._f.onChange&&w._f.onChange(e);const R=v(c,S,N),A=!ay(R)||C;if(!N&&f.state.next({name:c,type:e.type,values:jm(i)}),P)return(u.isValid||d.isValid)&&("onBlur"===r.mode?N&&p():N||p()),A&&f.state.next({name:c,...C?{}:R});if(!N&&C&&f.state.next({...n}),r.resolver){const{errors:e}=await b([c]);if(j(S),y){const t=Cy(n.errors,a,c),r=Cy(e,a,t.name||c);s=r.error,c=r.name,O=ay(e)}}else m([c],!0),s=(await Fy(w,l.disabled,i,h,r.shouldUseNativeValidation))[c],m([c]),j(S),y&&(s?O=!1:(u.isValid||d.isValid)&&(O=await x(a,!0)));y&&(w._f.deps&&E(w._f.deps),g(c,O,s,R))}},N=(e,t)=>{if(Nm(n.errors,t)&&e.focus)return e.focus(),1},E=async(e,t={})=>{let o,i;const s=ey(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const r of e){const e=Nm(t,r);e?Pm(n.errors,r,e):dy(n.errors,r)}else n.errors=t;return t})(km(e)?e:s);o=ay(t),i=e?!s.some(e=>Nm(t,e)):o}else e?(i=(await Promise.all(s.map(async e=>{const t=Nm(a,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||n.isValid)&&p()):i=o=await x(a);return f.state.next({...!Qm(e)||(u.isValid||d.isValid)&&o!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:o}:{},errors:n.errors}),t.shouldFocus&&!i&&Py(a,N,e?s:l.mount),i},P=e=>{const t={...s.mount?i:o};return km(e)?t:Qm(e)?Nm(t,e):e.map(e=>Nm(t,e))},C=(e,t)=>({invalid:!!Nm((t||n).errors,e),isDirty:!!Nm((t||n).dirtyFields,e),error:Nm((t||n).errors,e),isValidating:!!Nm(n.validatingFields,e),isTouched:!!Nm((t||n).touchedFields,e)}),R=(e,t,r)=>{const o=(Nm(a,e,{_f:{}})._f||{}).ref,i=Nm(n.errors,e)||{},{ref:s,message:l,type:c,...u}=i;Pm(n.errors,e,{...u,...t,ref:o}),f.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&o&&o.focus&&o.focus()},A=e=>f.state.subscribe({next:t=>{var r,a,o;r=e.name,a=t.name,o=e.exact,r&&a&&r!==a&&!ey(r).some(e=>e&&(o?e===a:e.startsWith(a)||a.startsWith(e)))||!((e,t,r,n)=>{r(e);const{name:a,...o}=e;return ay(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!n||Mm))})(t,e.formState||u,V,e.reRenderRoot)||e.callback({values:{...i},...n,...t})}}).unsubscribe,T=(e,t={})=>{for(const s of e?ey(e):l.mount)l.mount.delete(s),l.array.delete(s),t.keepValue||(dy(a,s),dy(i,s)),!t.keepError&&dy(n.errors,s),!t.keepDirty&&dy(n.dirtyFields,s),!t.keepTouched&&dy(n.touchedFields,s),!t.keepIsValidating&&dy(n.validatingFields,s),!r.shouldUnregister&&!t.keepDefaultValue&&dy(o,s);f.state.next({values:jm(i)}),f.state.next({...n,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&p()},D=({disabled:e,name:t})=>{(Em(e)&&s.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},F=(e,t={})=>{let n=Nm(a,e);const i=Em(t.disabled)||Em(r.disabled);return Pm(a,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?D({disabled:Em(t.disabled)?t.disabled:r.disabled,name:e}):y(e,!0,t.value),{...i?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:ky(t.min),max:ky(t.max),minLength:ky(t.minLength),maxLength:ky(t.maxLength),pattern:ky(t.pattern)}:{},name:e,onChange:S,onBlur:S,ref:i=>{if(i){F(e,t),n=Nm(a,e);const r=km(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s=(e=>cy(e)||pm(e))(r),l=n._f.refs||[];if(s?l.find(e=>e===r):r===n._f.ref)return;Pm(a,e,{_f:{...n._f,...s?{refs:[...l.filter(uy),r,...Array.isArray(Nm(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=Nm(a,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!xm(l.array,e)||!s.action)&&l.unMount.add(e)}}},I=()=>r.shouldFocusError&&Py(a,N,l.mount),M=(e,t)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let c=jm(i);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();n.errors=e,c=jm(t)}else await x(a);if(l.disabled.size)for(const e of l.disabled)dy(c,e);if(dy(n.errors,"root"),ay(n.errors)){f.state.next({errors:{}});try{await e(c,o)}catch(e){s=e}}else t&&await t({...n.errors},o),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ay(n.errors)&&!s,submitCount:n.submitCount+1,errors:n.errors}),s)throw s},L=(e,t={})=>{const c=e?jm(e):o,d=jm(c),h=ay(e),p=h?o:d;if(t.keepDefaultValues||(o=c),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(my(o,i))]);for(const t of Array.from(e))Nm(n.dirtyFields,t)?Pm(p,t,Nm(i,t)):O(t,Nm(p,t))}else{if(wm&&km(e))for(const e of l.mount){const t=Nm(a,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(sy(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)O(e,Nm(p,e));else a={}}i=r.shouldUnregister?t.keepDefaultValues?jm(o):{}:jm(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!t.keepIsValid||!!t.keepDirtyValues,s.watch=!!r.shouldUnregister,f.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!h&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||ny(e,o))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:h?{}:t.keepDirtyValues?t.keepDefaultValues&&i?my(o,i):n.dirtyFields:t.keepDefaultValues&&e?my(o,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1})},$=(e,t)=>L(iy(e)?e(i):e,t),V=e=>{n={...n,...e}},z={control:{register:F,unregister:T,getFieldState:C,handleSubmit:M,setError:R,_subscribe:A,_runSchema:b,_focusError:I,_getWatch:j,_getDirty:w,_setValid:p,_setFieldArray:(e,t=[],l,c,h=!0,p=!0)=>{if(c&&l&&!r.disabled){if(s.action=!0,p&&Array.isArray(Nm(a,e))){const t=l(Nm(a,e),c.argA,c.argB);h&&Pm(a,e,t)}if(p&&Array.isArray(Nm(n.errors,e))){const t=l(Nm(n.errors,e),c.argA,c.argB);h&&Pm(n.errors,e,t),((e,t)=>{!Om(Nm(e,t)).length&&dy(e,t)})(n.errors,e)}if((u.touchedFields||d.touchedFields)&&p&&Array.isArray(Nm(n.touchedFields,e))){const t=l(Nm(n.touchedFields,e),c.argA,c.argB);h&&Pm(n.touchedFields,e,t)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=my(o,i)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Pm(i,e,t)},_setDisabledField:D,_setErrors:e=>{n.errors=e,f.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>Om(Nm(s.mount?i:o,e,r.shouldUnregister?Nm(o,e,[]):[])),_reset:L,_resetDefaultValues:()=>iy(r.defaultValues)&&r.defaultValues().then(e=>{$(e,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=Nm(a,e);t&&(t._f.refs?t._f.refs.every(e=>!uy(e)):!uy(t._f.ref))&&T(e)}l.unMount=new Set},_disableForm:e=>{Em(e)&&(f.state.next({disabled:e}),Py(a,(t,r)=>{const n=Nm(a,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:u,get _fields(){return a},get _formValues(){return i},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(s.mount=!0,d={...d,...e.formState},A({...e,formState:d})),trigger:E,register:F,handleSubmit:M,watch:(e,t)=>iy(e)?f.state.subscribe({next:r=>e(j(void 0,t),r)}):j(e,t,!0),setValue:O,getValues:P,reset:$,resetField:(e,t={})=>{Nm(a,e)&&(km(t.defaultValue)?O(e,jm(Nm(o,e))):(O(e,t.defaultValue),Pm(o,e,jm(t.defaultValue))),t.keepTouched||dy(n.touchedFields,e),t.keepDirty||(dy(n.dirtyFields,e),n.isDirty=t.defaultValue?w(e,jm(Nm(o,e))):w()),t.keepError||(dy(n.errors,e),u.isValid&&p()),f.state.next({...n}))},clearErrors:e=>{e&&ey(e).forEach(e=>dy(n.errors,e)),f.state.next({errors:e?n.errors:{}})},unregister:T,setError:R,setFocus:(e,t={})=>{const r=Nm(a,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&iy(e.select)&&e.select())}},getFieldState:C};return{...z,formControl:z}}function Ly(e={}){const t=i.useRef(void 0),r=i.useRef(void 0),[n,a]=i.useState({isDirty:!1,isValidating:!1,isLoading:iy(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:iy(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!iy(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:r,...a}=My(e);t.current={...a,formState:n}}const o=t.current.control;return o._options=e,Km(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),i.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),i.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),i.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),i.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),i.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==n.isDirty&&o._subjects.state.next({isDirty:e})}},[o,n.isDirty]),i.useEffect(()=>{e.values&&!ny(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),r.current=e.values,a(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),i.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Hm(n,o),t.current}const $y=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Nm(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Vy=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?$y(n.ref,r,e):n.refs&&n.refs.forEach(t=>$y(t,r,e))}},zy=(e,t)=>{t.shouldUseNativeValidation&&Vy(e,t);const r={};for(const n in e){const a=Nm(t.fields,n),o=Object.assign(e[n]||{},{ref:a&&a.ref});if(Uy(t.names||Object.keys(e),n)){const e=Object.assign({},Nm(r,n));Pm(e,"root",o),Pm(r,n,e)}else Pm(r,n,o)}return r},Uy=(e,t)=>e.some(e=>e.startsWith(t+"."));var qy=function(e,t){for(var r={};e.length;){var n=e[0],a=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];r[i]={message:s.message,type:s.code}}else r[i]={message:o,type:a};if("unionErrors"in n&&n.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var l=r[i].types,c=l&&l[n.code];r[i]=Xm(i,t,r,a,c?[].concat(c,n.message):n.message)}e.shift()}return r},Wy=function(e,t,r){return void 0===r&&(r={}),function(n,a,o){try{return Promise.resolve(function(a,i){try{var s=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](n,t)).then(function(e){return o.shouldUseNativeValidation&&Vy({},o),{errors:{},values:r.raw?n:e}})}catch(e){return i(e)}return s&&s.then?s.then(void 0,i):s}(0,function(e){if(function(e){return Array.isArray(null==e?void 0:e.errors)}(e))return{values:{},errors:zy(qy(e.errors,!o.shouldUseNativeValidation&&"all"===o.criteriaMode),o)};throw e}))}catch(e){return Promise.reject(e)}}};const Zy=ti("MoveLeft",[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);const By=function(e){var t=e.link,r=void 0===t?"/":t;return(0,an.jsx)(an.Fragment,{children:(0,an.jsx)(ct,{to:r,className:"flex items-center justify-center text-slate-700 bg-slate-200 hover:bg-slate-300 px-2 rounded-sm transition-colors",children:(0,an.jsx)(Zy,{className:"w-4"})})})};function Hy(e){return Hy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hy(e)}function Ky(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Qy(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Qy(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Qy(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Qy(d,"constructor",c),Qy(c,"constructor",l),l.displayName="GeneratorFunction",Qy(c,a,"GeneratorFunction"),Qy(d),Qy(d,a,"Generator"),Qy(d,n,function(){return this}),Qy(d,"toString",function(){return"[object Generator]"}),(Ky=function(){return{w:o,m:f}})()}function Qy(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}Qy=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){Qy(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},Qy(e,t,r,n)}function Gy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gy(Object(r),!0).forEach(function(t){Yy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Yy(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Hy(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xy(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function ev(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){Xy(o,n,a,i,s,"next",e)}function s(e){Xy(o,n,a,i,s,"throw",e)}i(void 0)})}}const tv=function(){var e,t,r,n,a,o=Ly({resolver:Wy(Xp),defaultValues:{chosen_plugins:[],ip_tags:[]}}),s=o.handleSubmit,l=o.control,c=o.formState.errors,u=Ja({mutationFn:(n=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_save_disable_plugin_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return n.apply(this,arguments)}),onSuccess:function(e){var t;pr.success(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Plugin disabled successfully!","versatile-toolkit"))},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed to disable plugin","versatile-toolkit"))}}),d=function(){var e=ev(Ky().m(function e(t){return Ky().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,u.mutateAsync(Jy({},t));case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),f=Qa({queryKey:["getDisablePluginList"],queryFn:(a=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_disable_plugin_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return a.apply(this,arguments)}),staleTime:5e3}),h=f.data,p=f.isFetching,m=(f.isLoading,f.isError,null==h?void 0:h.data.chosen_plugins),y=null==h?void 0:h.data.ip_tags;(0,i.useEffect)(function(){(m||y)&&l._reset({chosen_plugins:m||[],ip_tags:y||[]})},[m,y,l]);var v,g,b=Ly({resolver:Wy(rm),defaultValues:{activeTheme:""}}),x=b.handleSubmit,w=b.control,j=b.formState.errors,_=Ja({mutationFn:(v=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_save_active_theme",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return v.apply(this,arguments)}),onSuccess:function(e){var t;pr.success(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Theme activated successfully!","versatile-toolkit"))},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed to activate theme","versatile-toolkit"))}}),k=function(){var e=ev(Ky().m(function e(t){return Ky().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,_.mutateAsync(Jy({},t));case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),O=Qa({queryKey:["getActiveTheme"],queryFn:(g=ah(th().m(function e(t){var r;return th().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_active_theme",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return g.apply(this,arguments)}),staleTime:5e3}),S=O.data,N=O.isFetching,E=null==S?void 0:S.data.activeTheme;return(0,i.useEffect)(function(){E&&w._reset({activeTheme:E})},[E,w]),(0,an.jsxs)("div",{className:"p-4 space-y-6 max-w-[800px]",children:[(0,an.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,an.jsx)(By,{link:"/"}),(0,vo.__)("Deactivate Plugins Settings","versatile-toolkit")]}),(0,an.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,an.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,vo.__)("Disable Plugin by IP address","versatile-toolkit")}),(0,an.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:(0,vo.__)("Select plugins to disable for specific IP addresses. This is useful for troubleshooting plugin conflicts.","versatile-toolkit")}),(0,an.jsxs)("form",{onSubmit:s(d),children:[(0,an.jsxs)("div",{className:"min-h-[42px]",children:[p?(0,an.jsx)(Po,{size:"md",text:(0,vo.__)("Loading plugins","versatile-toolkit")}):(0,an.jsx)(Ym,{name:"chosen_plugins",control:l,render:function(e){var t=e.field;return(0,an.jsx)(ch,{selectedPlugin:t.value,onChange:t.onChange})}}),c.chosen_plugins&&(0,an.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==c||null===(e=c.chosen_plugins)||void 0===e?void 0:e.message})]}),(0,an.jsxs)("div",{className:"min-h-[64px] mt-2",children:[p?(0,an.jsx)(Po,{size:"md",text:(0,vo.__)("Loading settings","versatile-toolkit")}):(0,an.jsx)(Ym,{name:"ip_tags",control:l,render:function(e){var t=e.field;return(0,an.jsx)(um,{tags:t.value,onChange:t.onChange})}}),c.ip_tags&&(0,an.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==c||null===(t=c.ip_tags)||void 0===t?void 0:t.message})]}),(0,an.jsx)(Jo,{type:"submit",className:"mt-6",disabled:u.isPending,children:u.isPending?(0,vo.__)("Saving...","versatile-toolkit"):(0,vo.__)("Save List","versatile-toolkit")})]})]}),(0,an.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,an.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,vo.__)("Switch Theme","versatile-toolkit")}),(0,an.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:(0,vo.__)("Select and activate a theme.","versatile-toolkit")}),(0,an.jsxs)("form",{onSubmit:x(k),children:[(0,an.jsxs)("div",{className:"min-h-[42px]",children:[N?(0,an.jsx)(Po,{size:"md",text:(0,vo.__)("Loading themes","versatile-toolkit")}):(0,an.jsx)(Ym,{name:"activeTheme",control:w,render:function(e){var t=e.field;return(0,an.jsx)(hm,{selectedTheme:t.value,onChange:t.onChange})}}),j.activeTheme&&(0,an.jsx)("p",{className:"text-red-500 text-sm mt-1",children:null==j||null===(r=j.activeTheme)||void 0===r?void 0:r.message})]}),(0,an.jsx)(Jo,{type:"submit",className:"mt-6",disabled:_.isPending,children:(0,an.jsx)(So,{isLoading:_.isPending,loadingText:(0,vo.__)("Activating","versatile-toolkit"),children:(0,vo.__)("Activate Theme","versatile-toolkit")})})]})]})]})};var rv=i.forwardRef((e,t)=>(0,an.jsx)(Pi.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));rv.displayName="Label";var nv=rv;function av(e){return av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},av(e)}var ov=["className"];function iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function sv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=av(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=av(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==av(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lv=Zo("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),cv=i.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,ov);return(0,an.jsx)(nv,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(t){sv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({ref:t,className:ga(lv(),r)},n))});function uv(e){return uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uv(e)}cv.displayName=nv.displayName;var dv=["className"],fv=["className"],hv=["className"],pv=["className","children"];function mv(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function yv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function vv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yv(Object(r),!0).forEach(function(t){gv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function gv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=uv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bv(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function xv(){return xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xv.apply(null,arguments)}var wv=e=>{const{children:t,...r}=e;return i.createElement(Zm.Provider,{value:r},t)},jv=i.createContext({}),_v=function(e){var t=xv({},(bv(e),e));return(0,an.jsx)(jv.Provider,{value:{name:t.name},children:(0,an.jsx)(Ym,vv({},t))})},kv=function(){var e=i.useContext(jv),t=i.useContext(Ov),r=Bm(),n=r.getFieldState,a=r.formState,o=n(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");var s=t.id;return vv({id:s,name:e.name,formItemId:"".concat(s,"-form-item"),formDescriptionId:"".concat(s,"-form-item-description"),formMessageId:"".concat(s,"-form-item-message")},o)},Ov=i.createContext({}),Sv=i.forwardRef(function(e,t){var r=e.className,n=mv(e,dv),a=i.useId();return(0,an.jsx)(Ov.Provider,{value:{id:a},children:(0,an.jsx)("div",vv({ref:t,className:ga("space-y-2",r)},n))})});Sv.displayName="FormItem";var Nv=i.forwardRef(function(e,t){var r=e.className,n=mv(e,fv),a=kv(),o=a.error,i=a.formItemId;return(0,an.jsx)(cv,vv({ref:t,className:ga(o&&"text-destructive",r),htmlFor:i},n))});Nv.displayName="FormLabel";var Ev=i.forwardRef(function(e,t){var r=xv({},(bv(e),e)),n=kv(),a=n.error,o=n.formItemId,i=n.formDescriptionId,s=n.formMessageId;return(0,an.jsx)($o,vv({ref:t,id:o,"aria-describedby":a?"".concat(i," ").concat(s):"".concat(i),"aria-invalid":!!a},r))});Ev.displayName="FormControl";var Pv=i.forwardRef(function(e,t){var r=e.className,n=mv(e,hv),a=kv().formDescriptionId;return(0,an.jsx)("p",vv({ref:t,id:a,className:ga("text-[0.8rem] text-muted-foreground",r)},n))});Pv.displayName="FormDescription";var Cv=i.forwardRef(function(e,t){var r,n=e.className,a=e.children,o=mv(e,pv),i=kv(),s=i.error,l=i.formMessageId,c=s?String(null!==(r=null==s?void 0:s.message)&&void 0!==r?r:""):a;return c?(0,an.jsx)("p",vv(vv({ref:t,id:l,className:ga("text-[0.8rem] font-medium text-destructive",n)},o),{},{children:c})):null});function Rv(e){return Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rv(e)}Cv.displayName="FormMessage";var Av=["className"];function Tv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Rv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Rv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Fv=i.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,Av);return(0,an.jsx)("textarea",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tv(Object(r),!0).forEach(function(t){Dv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:ga("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base 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 md:text-sm",r),ref:t},n))});Fv.displayName="Textarea";var Iv="Switch",[Mv,Lv]=xi(Iv),[$v,Vv]=Mv(Iv),zv=i.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:o,required:s,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=i.useState(null),m=Mo(t,e=>p(e)),y=i.useRef(!1),v=!h||(d||!!h.closest("form")),[g,b]=Ni({prop:a,defaultProp:o??!1,onChange:u,caller:Iv});return(0,an.jsxs)($v,{scope:r,checked:g,disabled:l,children:[(0,an.jsx)(Pi.button,{type:"button",role:"switch","aria-checked":g,"aria-required":s,"data-state":Zv(g),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:m,onClick:bi(e.onClick,e=>{b(e=>!e),v&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),v&&(0,an.jsx)(Wv,{control:h,bubbles:!y.current,name:n,value:c,checked:g,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});zv.displayName=Iv;var Uv="SwitchThumb",qv=i.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,a=Vv(Uv,r);return(0,an.jsx)(Pi.span,{"data-state":Zv(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});qv.displayName=Uv;var Wv=i.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...a},o)=>{const s=i.useRef(null),l=Mo(s,o),c=function(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r),u=Gd(t);return i.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&a){const t=new Event("click",{bubbles:n});a.call(e,r),e.dispatchEvent(t)}},[c,r,n]),(0,an.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Zv(e){return e?"checked":"unchecked"}Wv.displayName="SwitchBubbleInput";var Bv=zv,Hv=qv;function Kv(e){return Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kv(e)}var Qv=["className"];function Gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gv(Object(r),!0).forEach(function(t){Yv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Yv(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Kv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Kv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xv=i.forwardRef(function(e,t){var r=e.className,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,Qv);return(0,an.jsx)(Bv,Jv(Jv({className:ga("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",r)},n),{},{ref:t,children:(0,an.jsx)(Hv,{className:ga("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")})}))});function eg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Xv.displayName=Bv.displayName;const rg=function(e){var t=e.value,r=void 0===t?"":t,n=e.onChange,a=e.buttonText,o=void 0===a?(0,vo.__)("Upload Image","versatile-toolkit"):a,s=e.allowedTypes,l=void 0===s?["image"]:s,c=e.multiple,u=void 0!==c&&c,d=eg((0,i.useState)(r),2),f=d[0],h=d[1],p=eg((0,i.useState)(0),2),m=(p[0],p[1]);(0,i.useEffect)(function(){h(r)},[r]);return(0,an.jsxs)("div",{className:"space-y-4",children:[(0,an.jsxs)("div",{className:"flex gap-2",children:[(0,an.jsx)(Jo,{type:"button",variant:"outline",onClick:function(){if(void 0!==window.wp&&window.wp.media){var e=window.wp.media({title:(0,vo.__)("Select Image","versatile-toolkit"),button:{text:(0,vo.__)("Use this image","versatile-toolkit")},multiple:u,library:{type:l}});e.on("select",function(){var t=e.state().get("selection").first().toJSON();h(t.url),m(t.id),n(t.url,t.id)}),e.open()}},children:o}),f&&(0,an.jsx)(Jo,{type:"button",variant:"destructive",size:"sm",onClick:function(){h(""),m(0),n("",0)},children:(0,vo.__)("Remove","versatile-toolkit")})]}),f&&(0,an.jsxs)("div",{className:"mt-4",children:[(0,an.jsx)("div",{className:"border rounded-lg p-2 inline-block bg-gray-50",children:(0,an.jsx)("img",{src:f,alt:(0,vo.__)("Preview","versatile-toolkit"),className:"max-w-xs max-h-32 object-cover rounded"})}),(0,an.jsx)("p",{className:"text-sm text-gray-600 mt-2",children:(0,vo.__)("Image selected","versatile-toolkit")})]})]})},ng=ti("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var ag=function(e){var t=e.isOpen,r=e.onClose;(0,i.useEffect)(function(){var e=function(e){"Escape"===e.key&&t&&r()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[t,r]);return{handleBackdropClick:function(e){e.target===e.currentTarget&&r()}}};function og(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ig(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ig(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const sg=function(e){var t,r,n,a,o=e.type,s=e.disabled,l=void 0!==s&&s,c=e.getFormData,u=og((0,i.useState)(!1),2),d=u[0],f=u[1],h=og((0,i.useState)(!1),2),p=h[0],m=h[1],y=function(){f(!1),m(!1)},v=ag({isOpen:d,onClose:y}).handleBackdropClick;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Jo,{type:"button",variant:"outline",onClick:function(){f(!0),m(!0)},disabled:l,className:"flex items-center gap-2 border-gray-400",children:[(0,an.jsx)(ng,{size:16}),(0,vo.__)("Preview","versatile-toolkit")]}),d&&(0,an.jsx)("div",{className:"fixed inset-x-0 bottom-0 -top-[15px] z-[999999] flex items-center justify-center bg-black bg-opacity-85",onClick:v,children:(0,an.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-11/12 h-5/6 max-w-6xl flex flex-col",children:[(0,an.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,an.jsx)("h3",{className:"text-lg font-semibold",children:"maintenance"===o?(0,vo.__)("Maintenance Page Preview","versatile-toolkit"):(0,vo.__)("Coming Soon Page Preview","versatile-toolkit")}),(0,an.jsx)(Jo,{variant:"ghost",size:"sm",onClick:y,className:"h-8 w-8 p-0",children:(0,an.jsx)(ri,{size:16})})]}),(0,an.jsx)("div",{className:"flex-1 p-4",children:(0,an.jsxs)("div",{className:"w-full h-full border rounded-lg overflow-hidden bg-gray-50",children:[p&&(0,an.jsx)(Ro,{}),(0,an.jsx)("iframe",{src:(t=null==La?void 0:La.ajax_url,r=null==La?void 0:La.nonce_value,n="maintenance"===o?"versatile_preview_maintenance":"versatile_preview_comingsoon",a=JSON.stringify(c()),"".concat(t,"?action=").concat(n,"&versatile_nonce=").concat(r,"&type=").concat(o,"&preview_data=").concat(encodeURIComponent(a))),className:"w-full h-full border-0",title:"maintenance"===o?(0,vo.__)("Maintenance Preview","versatile-toolkit"):(0,vo.__)("Coming Soon Preview","versatile-toolkit"),onLoad:function(){return m(!1)},style:{display:p?"none":"block"}})]})}),(0,an.jsx)("div",{className:"p-4 border-t bg-gray-50 rounded-b-lg",children:(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("p",{className:"text-sm text-gray-600",children:(0,vo.__)("This is how your page will look to visitors.","versatile-toolkit")}),(0,an.jsx)(Jo,{onClick:y,variant:"outline",children:(0,vo.__)("Close Preview","versatile-toolkit")})]})})]})})]})};function lg(e){return lg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lg(e)}var cg=["className"];function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dg(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=lg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fg(e){var t=e.className,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,cg);return(0,an.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ug(Object(r),!0).forEach(function(t){dg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:ga("animate-pulse rounded-md bg-primary/10",t)},r))}function hg(){return(0,an.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,an.jsx)(fg,{className:"h-[45px] w-[200px] rounded-xl"}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)(fg,{className:"h-4 w-[200px]"}),(0,an.jsx)(fg,{className:"h-4 w-[200px]"})]})]})}const pg=ti("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),mg=ti("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"}]]),yg=ti("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function vg(e){return vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vg(e)}function gg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kg(n.key),n)}}function bg(e,t,r){return t=wg(t),function(e,t){if(t&&("object"==vg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xg()?Reflect.construct(t,r||[],wg(e).constructor):t.apply(e,r))}function xg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xg=function(){return!!e})()}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wg(e)}function jg(e,t){return jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jg(e,t)}function _g(e,t,r){return(t=kg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kg(e){var t=function(e,t){if("object"!=vg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=vg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vg(t)?t:t+""}var Og=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_g(r=bg(this,t,[e]),"handleRetry",function(){r.setState({hasError:!1,error:null,errorInfo:null,showErrorDetails:!1})}),_g(r,"toggleErrorDetails",function(){r.setState(function(e){return{showErrorDetails:!e.showErrorDetails}})}),r.state={hasError:!1,error:null,errorInfo:null,showErrorDetails:!1},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(t,e),function(e,t,r){return t&&gg(e.prototype,t),r&&gg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t}),this.props.onError&&this.props.onError(e,t),window.console&&window.console.error&&window.console.error("Versatile Plugin Error:",{error:e.message,stack:e.stack,componentStack:t.componentStack})}},{key:"render",value:function(){var e;return this.state.hasError?this.props.fallback?this.props.fallback:(0,an.jsxs)(Ca,{className:"max-w-2xl mx-auto mt-8 border-red-200 bg-red-50",children:[(0,an.jsxs)(Ra,{className:"text-center",children:[(0,an.jsx)("div",{className:"flex justify-center mb-4",children:(0,an.jsx)(pg,{className:"h-12 w-12 text-red-500"})}),(0,an.jsx)(Aa,{className:"text-red-700",children:(0,vo.__)("Something went wrong","versatile-toolkit")})]}),(0,an.jsxs)(Ta,{className:"space-y-4",children:[(0,an.jsx)("p",{className:"text-center text-gray-600",children:(0,vo.__)("We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists.","versatile-toolkit")}),(0,an.jsxs)("div",{className:"flex justify-center gap-3",children:[(0,an.jsxs)(Jo,{onClick:this.handleRetry,className:"flex items-center gap-2",children:[(0,an.jsx)(mg,{className:"h-4 w-4"}),(0,vo.__)("Try Again","versatile-toolkit")]}),!1!==this.props.showDetails&&(0,an.jsxs)(Jo,{variant:"outline",onClick:this.toggleErrorDetails,className:"flex items-center gap-2",children:[(0,an.jsx)(yg,{className:"h-4 w-4"}),this.state.showErrorDetails?(0,vo.__)("Hide Details","versatile-toolkit"):(0,vo.__)("Show Details","versatile-toolkit")]})]}),this.state.showErrorDetails&&this.state.error&&(0,an.jsxs)("div",{className:"mt-6 p-4 bg-gray-100 rounded-lg border",children:[(0,an.jsx)("h4",{className:"font-semibold text-sm mb-2 text-gray-700",children:(0,vo.__)("Error Details:","versatile-toolkit")}),(0,an.jsxs)("div",{className:"text-xs font-mono text-gray-600 space-y-2",children:[(0,an.jsxs)("div",{children:[(0,an.jsx)("strong",{children:(0,vo.__)("Message:","versatile-toolkit")}),(0,an.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-words",children:this.state.error.message})]}),this.state.error.stack&&(0,an.jsxs)("div",{children:[(0,an.jsx)("strong",{children:(0,vo.__)("Stack Trace:","versatile-toolkit")}),(0,an.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-words max-h-32 overflow-y-auto",children:this.state.error.stack})]}),(null===(e=this.state.errorInfo)||void 0===e?void 0:e.componentStack)&&(0,an.jsxs)("div",{children:[(0,an.jsx)("strong",{children:(0,vo.__)("Component Stack:","versatile-toolkit")}),(0,an.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-words max-h-32 overflow-y-auto",children:this.state.errorInfo.componentStack})]})]})]})]})]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}])}(i.Component);const Sg=Og;function Ng(e){return function(e){if(Array.isArray(e))return Cg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||Pg(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pg(e,t){if(e){if("string"==typeof e)return Cg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cg(e,t):void 0}}function Cg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Rg=[{id:"classic",name:(0,vo.__)("Classic","versatile-toolkit"),description:(0,vo.__)("Clean and professional design with centered content","versatile-toolkit")},{id:"modern",name:(0,vo.__)("Modern","versatile-toolkit"),description:(0,vo.__)("Sleek design with gradient backgrounds and modern typography","versatile-toolkit")},{id:"minimal",name:(0,vo.__)("Minimal","versatile-toolkit"),description:(0,vo.__)("Simple and elegant with focus on content","versatile-toolkit")},{id:"creative",name:(0,vo.__)("Creative","versatile-toolkit"),description:(0,vo.__)("Bold design with creative layouts and animations","versatile-toolkit")},{id:"corporate",name:(0,vo.__)("Corporate","versatile-toolkit"),description:(0,vo.__)("Professional business design with elegant typography","versatile-toolkit")},{id:"neon",name:(0,vo.__)("Neon","versatile-toolkit"),description:(0,vo.__)("Cyberpunk-inspired design with glowing neon effects","versatile-toolkit")}],Ag=function(e){return"maintenance"===e?"versatile_maintenance_template_preview":"versatile_comingsoon_template_preview"};const Tg=function(e){var t,r,n=e.selectedTemplate,a=e.onTemplateSelect,o=e.type,s=e.formData,l=e.getFormData,c=Eg((0,i.useState)(null),2),u=c[0],d=c[1],f=Eg((0,i.useState)(!1),2),h=f[0],p=f[1],m=(0,i.useState)(function(){var e=Rg.findIndex(function(e){return e.id===n});if(-1===e)return Rg;var t=Rg[e],r=Rg.filter(function(t,r){return r!==e});return[t].concat(Ng(r))}),y=Eg(m,1)[0],v=function(e){a(e)},g=function(){d(null),p(!1)},b=(0,i.useMemo)(function(){var e=l();return e?JSON.stringify(e):""},[s]);(0,i.useEffect)(function(){var e=setTimeout(function(){document.querySelectorAll(".iframe-loading").forEach(function(e){var t=e;"none"!==t.style.display&&(t.style.display="none")})},3e3);return function(){return clearTimeout(e)}},[b]);var x=ag({isOpen:!!u,onClose:g}).handleBackdropClick;return(0,an.jsxs)("div",{className:"space-y-4",children:[(0,an.jsx)("div",{className:"flex gap-4 overflow-x-auto p-2 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:y.map(function(e){return(0,an.jsx)(Sg,{fallback:(0,an.jsx)(Ca,{className:"cursor-pointer flex-shrink-0 w-64 border-red-200 bg-red-50",children:(0,an.jsxs)(Ta,{className:"p-4",children:[(0,an.jsx)("div",{className:"w-full h-32 rounded-md bg-red-100 flex items-center justify-center",children:(0,an.jsx)("p",{className:"text-red-600 text-sm",children:(0,vo.__)("Template Error","versatile-toolkit")})}),(0,an.jsx)("h3",{className:"font-medium mt-2 text-red-700",children:e.name}),(0,an.jsx)("p",{className:"text-sm text-red-600",children:(0,vo.__)("Failed to load template","versatile-toolkit")})]})}),children:(0,an.jsx)(Ca,{className:"cursor-pointer transition-all duration-200 hover:shadow-lg flex-shrink-0 w-64 ".concat(n===e.id?"ring-2 ring-blue-500 shadow-lg":"hover:ring-1 hover:ring-gray-300"),onClick:function(){return v(e.id)},children:(0,an.jsxs)(Ta,{className:"p-4",children:[(0,an.jsxs)("div",{className:"relative mb-3",children:[(0,an.jsxs)("div",{className:"w-full h-32 rounded-md bg-gray-100 overflow-hidden border relative",children:[(0,an.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100",children:(0,an.jsxs)("div",{className:"text-center p-4",children:[(0,an.jsxs)("div",{className:"text-2xl mb-2",children:["classic"===e.id&&"📄","modern"===e.id&&"🎨","minimal"===e.id&&"✨","creative"===e.id&&"🎭","corporate"===e.id&&"🏢","neon"===e.id&&"⚡"]}),(0,an.jsx)("p",{className:"text-xs font-medium text-gray-700",children:e.name}),(0,an.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:(null==s?void 0:s.title)||"Preview"}),(null==s?void 0:s.background_image)&&(0,an.jsx)("div",{className:"absolute inset-0 opacity-20",children:(0,an.jsx)("img",{src:s.background_image,alt:"",className:"w-full h-full object-cover"})})]})}),(0,an.jsx)(Sg,{fallback:null,onError:function(t){var r=document.querySelector(".template-".concat(e.id," .iframe-loading"));r&&(r.style.display="none")},children:(0,an.jsx)("iframe",{src:"".concat(La.ajax_url,"?action=").concat(Ag(o),"&versatile_nonce=").concat(La.nonce_value,"&template_id=").concat(e.id,"&type=").concat(o,"&preview_mode=thumbnail").concat(s?"&preview_data=".concat(encodeURIComponent(b)):""),className:"w-full h-full border-0 pointer-events-none absolute top-0 left-0 hidden",title:"".concat(e.name," Preview"),style:{transform:"scale(0.25)",transformOrigin:"top left",width:"400%",height:"400%"},onLoad:function(e){var t,r,n=e.currentTarget,a=null===(t=n.parentElement)||void 0===t?void 0:t.querySelector("div:not(.iframe-loading)");a&&n&&(a.style.display="none",n.classList.remove("hidden"));var o=null===(r=n.parentElement)||void 0===r?void 0:r.querySelector(".iframe-loading");o&&(o.style.display="none")},onError:function(e){var t,r=null===(t=e.currentTarget.parentElement)||void 0===t?void 0:t.querySelector(".iframe-loading");r&&(r.style.display="none")}},"".concat(e.id,"-").concat(b))})]}),n===e.id&&(0,an.jsx)("div",{className:"absolute top-2 right-2 bg-blue-500 text-white rounded-full p-1 z-10",children:(0,an.jsx)(ai,{size:16})}),(0,an.jsx)("div",{className:"absolute inset-0 bg-gray-100 flex items-center justify-center rounded-md iframe-loading",children:(0,an.jsx)(hg,{})})]}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsx)("h4",{className:"font-semibold text-sm",children:e.name}),(0,an.jsx)("p",{className:"text-xs text-gray-600 line-clamp-2",children:e.description}),(0,an.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,an.jsx)(Jo,{type:"button",size:"sm",variant:n===e.id?"default":"outline",onClick:function(t){t.stopPropagation(),v(e.id)},className:"flex-1 text-xs",children:n===e.id?(0,vo.__)("Selected","versatile-toolkit"):(0,vo.__)("Select","versatile-toolkit")}),(0,an.jsx)(Jo,{type:"button",size:"sm",variant:"ghost",onClick:function(t){var r;t.stopPropagation(),r=e.id,d(r),p(!0)},className:"text-xs",children:(0,vo.__)("Preview","versatile-toolkit")})]})]})]})})},e.id)})}),u&&(0,an.jsx)("div",{className:"template-preview-wrapper fixed inset-x-0 -top-[15px] bottom-0 z-[99999] flex items-center justify-center bg-black bg-opacity-85",onClick:x,children:(0,an.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-11/12 h-5/6 max-w-6xl flex flex-col",children:[(0,an.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,an.jsxs)("h3",{className:"text-lg font-semibold",children:[null===(t=Rg.find(function(e){return e.id===u}))||void 0===t?void 0:t.name," - ",(0,vo.__)(" Template Preview","versatile-toolkit")]}),(0,an.jsx)(Jo,{type:"button",variant:"ghost",size:"sm",onClick:g,children:(0,an.jsx)(ri,{size:16})})]}),(0,an.jsx)("div",{className:"flex-1 p-4",children:(0,an.jsxs)("div",{className:"w-full h-full border rounded-lg overflow-hidden bg-gray-50 relative",children:[h&&(0,an.jsx)(Ro,{}),(0,an.jsx)("iframe",{src:"".concat(La.ajax_url,"?action=").concat(Ag(o),"&versatile_nonce=").concat(La.nonce_value,"&template_id=").concat(u,"&type=").concat(o,"&preview_mode=thumbnail&preview_data=").concat(encodeURIComponent(JSON.stringify(l()))),className:"w-full h-full border-0",title:(0,vo.__)("Template Preview","versatile-toolkit"),onLoad:function(){return p(!1)},style:{display:h?"none":"block"}})]})}),(0,an.jsxs)("div",{className:"p-4 border-t bg-gray-50 flex justify-between items-center",children:[(0,an.jsx)("p",{className:"text-sm text-gray-600",children:null===(r=Rg.find(function(e){return e.id===u}))||void 0===r?void 0:r.description}),(0,an.jsxs)("div",{className:"flex gap-2",children:[(0,an.jsx)(Jo,{type:"button",onClick:function(){u&&(v(u),g())},children:(0,vo.__)("Use This Template","versatile-toolkit")}),(0,an.jsx)(Jo,{type:"button",variant:"outline",onClick:g,children:(0,vo.__)("Close","versatile-toolkit")})]})]})]})})]})};function Dg(e){return Dg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dg(e)}function Fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ig(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(r),!0).forEach(function(t){Mg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Mg(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Dg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Dg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return $g(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):($g(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,$g(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,$g(d,"constructor",c),$g(c,"constructor",l),l.displayName="GeneratorFunction",$g(c,a,"GeneratorFunction"),$g(d),$g(d,a,"Generator"),$g(d,n,function(){return this}),$g(d,"toString",function(){return"[object Generator]"}),(Lg=function(){return{w:o,m:f}})()}function $g(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}$g=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){$g(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},$g(e,t,r,n)}function Vg(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function zg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ug(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ug(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ug(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const qg=function(){var e=zg((0,i.useState)(!1),2),t=e[0],r=e[1],n=zg((0,i.useState)(void 0),2),a=n[0],o=n[1],s=function(){return l.getValues()},l=Ly({resolver:Wy(em),defaultValues:{enable_maintenance:!0,show_subscribers_only:!1,title:"",description:"",subtitle:"",template:"classic",background_image:"",background_image_id:0,logo:"",logo_id:0}}),c=l.handleSubmit,u=function(){var e,t=sn();return Ja({mutationFn:(e=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_maintenance_mood",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),onSuccess:function(e){var r;pr.success(null!==(r=e.message)&&void 0!==r?r:(0,vo.__)("Maintenance Mood info updated!","versatile-toolkit")),t.invalidateQueries({queryKey:["getMoodInfo"]})},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed while updating maintenance mood","versatile-toolkit"))}})}(),d=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){Vg(o,n,a,i,s,"next",e)}function s(e){Vg(o,n,a,i,s,"throw",e)}i(void 0)})}}(Lg().m(function e(t){return Lg().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,u.mutateAsync(t);case 1:e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),f=jo(),h=f.data,p=f.isLoading,m=null==h?void 0:h.data.maintenance;return(0,i.useEffect)(function(){m&&(l.reset({enable_maintenance:null==h?void 0:h.data.enable_maintenance,show_subscribers_only:m.show_subscribers_only||!1,title:m.title||"",description:m.description||"",subtitle:m.subtitle||"",template:m.template||"classic",background_image:m.background_image||"",background_image_id:m.background_image_id||0,logo:m.logo||"",logo_id:m.logo_id||0}),r(!0))},[m]),(0,an.jsx)("div",{className:"",children:p||!t?(0,an.jsx)(Co,{}):(0,an.jsx)(Sg,{onError:function(e,t){},fallback:(0,an.jsxs)("div",{className:"p-6 border border-red-200 bg-red-50 rounded-md",children:[(0,an.jsx)("h3",{className:"text-lg font-medium text-red-700 mb-2",children:(0,vo.__)("Form Error","versatile-toolkit")}),(0,an.jsx)("p",{className:"text-red-600",children:(0,vo.__)("There was a problem loading the maintenance settings form. Please try refreshing the page or contact support.","versatile-toolkit")}),(0,an.jsx)(Jo,{className:"mt-4",onClick:function(){return window.location.reload()},children:(0,vo.__)("Refresh Page","versatile-toolkit")})]}),children:(0,an.jsx)(wv,Ig(Ig({},l),{},{children:(0,an.jsxs)("form",{onSubmit:c(d,function(e){}),children:[(0,an.jsxs)("div",{className:"flex justify-between pb-5",children:[(0,an.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,an.jsx)(By,{}),(0,vo.__)("Maintenance Mood","versatile-toolkit")]}),(0,an.jsxs)("div",{className:"flex gap-5",children:[(0,an.jsx)(Jo,{type:"submit",disabled:u.isPending,children:u.isPending?(0,vo.__)("Saving...","versatile-toolkit"):(0,vo.__)("Save Settings","versatile-toolkit")}),(0,an.jsx)(Sg,{fallback:(0,an.jsx)(Jo,{variant:"outline",disabled:!0,children:(0,vo.__)("Preview Unavailable","versatile-toolkit")}),children:(0,an.jsx)(sg,{type:"maintenance",disabled:u.isPending,getFormData:s})})]})]}),(0,an.jsx)("div",{children:(0,an.jsx)(_v,{control:l.control,name:"template",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Choose Template","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Sg,{fallback:(0,an.jsx)("div",{className:"p-4 border border-red-200 bg-red-50 rounded-md",children:(0,an.jsx)("p",{className:"text-red-700 text-sm",children:(0,vo.__)("Template selector failed to load. Please try refreshing the page.","versatile-toolkit")})}),children:(0,an.jsx)(Tg,{selectedTemplate:t.value||"classic",onTemplateSelect:t.onChange,type:"maintenance",formData:a,getFormData:s})})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Select a design template for your maintenance page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})}),(0,an.jsxs)("div",{className:"flex gap-10 mt-5",children:[(0,an.jsxs)("div",{className:"w-1/2",children:[(0,an.jsx)(_v,{control:l.control,name:"enable_maintenance",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(Nv,{className:"text-foreground",htmlFor:"enable_maintenance",children:(0,vo.__)("Enable Maintenance Mood","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Xv,{id:"enable_maintenance",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Enable or disable maintenance mode for your site.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:l.control,name:"show_subscribers_only",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(Nv,{className:"text-foreground",htmlFor:"show_subscribers_only",children:(0,vo.__)("Show Only for Users","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Xv,{id:"show_subscribers_only",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("When enabled, maintenance mode will only be shown to subscribers. Other users will see the normal site.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:l.control,name:"title",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Title","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(yh,Ig({placeholder:(0,vo.__)("Enter maintenance title","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:l.control,name:"subtitle",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Subtitle","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(yh,Ig({placeholder:(0,vo.__)("Enter subtitle","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Optional subtitle under the title.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:l.control,name:"description",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Description","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Fv,Ig({placeholder:(0,vo.__)("Describe what is happening...","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Provide more details about the maintenance.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})]}),(0,an.jsxs)("div",{className:"w-1/2",children:[(0,an.jsx)(_v,{control:l.control,name:"background_image",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Background Image","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Sg,{fallback:(0,an.jsx)("div",{className:"p-4 border border-red-200 bg-red-50 rounded-md",children:(0,an.jsx)("p",{className:"text-red-700 text-sm",children:(0,vo.__)("Media uploader failed to load. Please try refreshing the page.","versatile-toolkit")})}),children:(0,an.jsx)(rg,{value:t.value||"",onChange:function(e,r){t.onChange(e),o(l.getValues())},buttonText:(0,vo.__)("Upload Background Image","versatile-toolkit"),allowedTypes:["image"]})})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Upload a background image for the maintenance page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:l.control,name:"logo",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Logo","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Sg,{fallback:(0,an.jsx)("div",{className:"p-4 border border-red-200 bg-red-50 rounded-md",children:(0,an.jsx)("p",{className:"text-red-700 text-sm",children:(0,vo.__)("Media uploader failed to load. Please try refreshing the page.","versatile-toolkit")})}),children:(0,an.jsx)(rg,{value:t.value||"",onChange:function(e,r){t.onChange(e),o(l.getValues())},buttonText:(0,vo.__)("Upload Logo","versatile-toolkit"),allowedTypes:["image"]})})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Upload a logo to display on the maintenance page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})]})]})]})}))})})};const Wg=function(){return(0,an.jsx)("div",{className:"p-4 space-y-6",children:(0,an.jsx)(qg,{})})};function Zg(e){return Zg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zg(e)}function Bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Hg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bg(Object(r),!0).forEach(function(t){Kg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Kg(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Zg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Zg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return Gg(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Gg(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gg(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Gg(d,"constructor",c),Gg(c,"constructor",l),l.displayName="GeneratorFunction",Gg(c,a,"GeneratorFunction"),Gg(d),Gg(d,a,"Generator"),Gg(d,n,function(){return this}),Gg(d,"toString",function(){return"[object Generator]"}),(Qg=function(){return{w:o,m:f}})()}function Gg(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}Gg=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){Gg(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},Gg(e,t,r,n)}function Jg(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function Yg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const eb=function(){var e=Yg((0,i.useState)(!1),2),t=e[0],r=e[1],n=Yg((0,i.useState)(void 0),2),a=n[0],o=n[1],s=Ly({resolver:Wy(tm),defaultValues:{enable_comingsoon:!0,show_subscribers_only:!1,title:"",description:"",subtitle:"",template:"classic",background_image:"",background_image_id:0,logo:"",logo_id:0}}),l=s.handleSubmit,c=function(){return s.getValues()},u=function(){var e,t=sn();return Ja({mutationFn:(e=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_comingsoon_mood",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),onSuccess:function(e){var r;pr.success(null!==(r=e.message)&&void 0!==r?r:(0,vo.__)("Comingsoon Mood info updated!","versatile-toolkit")),t.invalidateQueries({queryKey:["getMoodInfo"]})},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed while updating Comingsoon mood","versatile-toolkit"))}})}(),d=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){Jg(o,n,a,i,s,"next",e)}function s(e){Jg(o,n,a,i,s,"throw",e)}i(void 0)})}}(Qg().m(function e(t){return Qg().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,u.mutateAsync(t);case 1:e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),f=jo(),h=f.data,p=f.isLoading,m=null==h?void 0:h.data.comingsoon;return(0,i.useEffect)(function(){m&&(s.reset({enable_comingsoon:null==h?void 0:h.data.enable_comingsoon,show_subscribers_only:m.show_subscribers_only||!1,title:m.title||"",description:m.description||"",subtitle:m.subtitle||"",template:m.template||"classic",background_image:m.background_image||"",background_image_id:m.background_image_id||0,logo:m.logo||"",logo_id:m.logo_id||0}),r(!0))},[m]),(0,an.jsx)("div",{className:"",children:p||!t?(0,an.jsx)(Co,{}):(0,an.jsx)(wv,Hg(Hg({},s),{},{children:(0,an.jsxs)("form",{onSubmit:l(d,function(e){}),children:[(0,an.jsxs)("div",{className:"flex justify-between pb-5",children:[(0,an.jsxs)("h2",{className:"flex items-center gap-2 text-2xl",children:[(0,an.jsx)(By,{}),(0,vo.__)("Comingsoon Mood","versatile-toolkit")]}),(0,an.jsxs)("div",{className:"flex gap-5",children:[(0,an.jsx)(Jo,{type:"submit",disabled:u.isPending,children:(0,an.jsx)(So,{isLoading:u.isPending,loadingText:(0,vo.__)("Saving","versatile-toolkit"),children:(0,vo.__)("Save Settings","versatile-toolkit")})}),(0,an.jsx)(sg,{type:"comingsoon",disabled:u.isPending,getFormData:c})]})]}),(0,an.jsx)("div",{children:(0,an.jsx)(_v,{control:s.control,name:"template",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Choose Template","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Tg,{selectedTemplate:t.value||"classic",onTemplateSelect:t.onChange,type:"comingsoon",formData:a,getFormData:c})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Select a design template for your coming soon page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})}),(0,an.jsxs)("div",{className:"flex gap-10 mt-5",children:[(0,an.jsxs)("div",{className:"w-1/2",children:[(0,an.jsx)(_v,{control:s.control,name:"enable_comingsoon",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(Nv,{className:"text-foreground",htmlFor:"enable_comingsoon",children:(0,vo.__)("Enable Comingsoon Mood","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Xv,{id:"enable_comingsoon",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,an.jsxs)(Pv,{children:[(0,vo.__)("This will be displayed as the main heading.","versatile-toolkit"),(0,vo.__)("Enable the coming soon page for your website.","versatile-toolkit")]}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:s.control,name:"show_subscribers_only",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)(Nv,{className:"text-foreground",htmlFor:"show_subscribers_only",children:(0,vo.__)("Show Only for Users","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Xv,{id:"show_subscribers_only",checked:t.value,onCheckedChange:t.onChange})})]}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("When enabled, coming soon mode will only be shown to subscribers. Other users will see the normal site.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:s.control,name:"title",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Title","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(yh,Hg({placeholder:(0,vo.__)("Enter coming soon title","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("This will be displayed as the main heading.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:s.control,name:"subtitle",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Subtitle","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(yh,Hg({placeholder:(0,vo.__)("Enter subtitle","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Optional subtitle under the title.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:s.control,name:"description",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Description","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(Fv,Hg({placeholder:(0,vo.__)("Describe what is happening...","versatile-toolkit")},t))}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Provide more details about the coming soon.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})]}),(0,an.jsxs)("div",{className:"w-1/2",children:[(0,an.jsx)(_v,{control:s.control,name:"background_image",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Background Image","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(rg,{value:t.value||"",onChange:function(e,r){t.onChange(e),o(s.getValues())},buttonText:(0,vo.__)("Upload Background Image","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Upload a background image for the coming soon page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}}),(0,an.jsx)(_v,{control:s.control,name:"logo",render:function(e){var t=e.field,r=e.fieldState;return(0,an.jsxs)(Sv,{className:"mt-6",children:[(0,an.jsx)(Nv,{className:"text-foreground",children:(0,vo.__)("Logo","versatile-toolkit")}),(0,an.jsx)(Ev,{children:(0,an.jsx)(rg,{value:t.value||"",onChange:function(e,r){t.onChange(e),o(s.getValues())},buttonText:(0,vo.__)("Upload Logo","versatile-toolkit"),allowedTypes:["image"]})}),!r.error&&(0,an.jsx)(Pv,{children:(0,vo.__)("Upload a logo to display on the coming soon page.","versatile-toolkit")}),(0,an.jsx)(Cv,{})]})}})]})]})]})}))})};const tb=function(){return(0,an.jsx)("div",{className:"p-4 space-y-6",children:(0,an.jsx)(eb,{})})};function rb(e){return rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rb(e)}var nb=["className"],ab=["side","className","children"],ob=["className"],ib=["className"],sb=["className"];function lb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lb(Object(r),!0).forEach(function(t){ub(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ub(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=rb(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=rb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rb(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function db(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var fb=Dl,hb=Fl,pb=Il,mb=i.forwardRef(function(e,t){var r=e.className,n=db(e,nb);return(0,an.jsx)(Ml,cb(cb({className:ga("fixed inset-0 z-[99999] 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",r)},n),{},{ref:t}))});mb.displayName=Ml.displayName;var yb=Zo("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 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-sm",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-sm"}},defaultVariants:{side:"right"}}),vb=i.forwardRef(function(e,t){var r=e.side,n=void 0===r?"right":r,a=e.className,o=e.children,i=db(e,ab);return(0,an.jsxs)(pb,{children:[(0,an.jsx)(mb,{}),(0,an.jsxs)(Ll,cb(cb({ref:t,className:ga(yb({side:n}),"z-[99999] sm:max-w-[540px]",a)},i),{},{children:[(0,an.jsxs)(zl,{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:[(0,an.jsx)(ri,{className:"h-4 w-4"}),(0,an.jsx)("span",{className:"sr-only",children:"Close"})]}),o]}))]})});vb.displayName=Ll.displayName;var gb=function(e){var t=e.className,r=db(e,ob);return(0,an.jsx)("div",cb({className:ga("flex flex-col space-y-2 text-center sm:text-left",t)},r))};gb.displayName="SheetHeader";var bb=i.forwardRef(function(e,t){var r=e.className,n=db(e,ib);return(0,an.jsx)($l,cb({ref:t,className:ga("text-lg font-semibold text-foreground",r)},n))});function xb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return wb(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(wb(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wb(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,wb(d,"constructor",c),wb(c,"constructor",l),l.displayName="GeneratorFunction",wb(c,a,"GeneratorFunction"),wb(d),wb(d,a,"Generator"),wb(d,n,function(){return this}),wb(d,"toString",function(){return"[object Generator]"}),(xb=function(){return{w:o,m:f}})()}function wb(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}wb=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){wb(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},wb(e,t,r,n)}function jb(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kb(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}bb.displayName=$l.displayName,i.forwardRef(function(e,t){var r=e.className,n=db(e,sb);return(0,an.jsx)(Vl,cb({ref:t,className:ga("text-sm text-muted-foreground",r)},n))}).displayName=Vl.displayName;const Ob=function(){var e,t,r=_b((0,i.useState)(!1),2),n=r[0],a=r[1],o=sn(),s=ne(),l=Qa({queryKey:["getServiceList"],queryFn:(e=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_get_service_list",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(t){return e.apply(this,arguments)}),staleTime:5e3}),c=l.data,u=l.isLoading,d=null==c?void 0:c.data,f=function(){if(!d||"/"===s.pathname)return null;var e=s.pathname.split("/").filter(Boolean)[0],t=Object.entries(d).find(function(t){var r=_b(t,2);r[0];return r[1].path===e});return t?t[1]:null}(),h=Ja({mutationFn:(t=wo(go().m(function e(t){var r;return go().w(function(e){for(;;)switch(e.n){case 0:return t.action="versatile_update_service_status",e.n=1,ho(La.ajax_url,{body:t});case 1:return r=e.v,e.a(2,r)}},e)})),function(e){return t.apply(this,arguments)}),onSuccess:function(e){var t;pr.success(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Service status updated!","versatile-toolkit"))},onError:function(e){var t;pr.error(null!==(t=e.message)&&void 0!==t?t:(0,vo.__)("Failed to update service status","versatile-toolkit"))}}),p=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){jb(o,n,a,i,s,"next",e)}function s(e){jb(o,n,a,i,s,"throw",e)}i(void 0)})}}(xb().m(function e(t,r){return xb().w(function(e){for(;;)switch(e.n){case 0:h.mutateAsync({service_key:t,enable:!r.enable},{onSuccess:function(){o.invalidateQueries({queryKey:["getServiceList"]}),o.invalidateQueries({queryKey:["getEnableServiceList"]})}});case 1:return e.a(2)}},e)}));return function(t,r){return e.apply(this,arguments)}}();ag({isOpen:n,onClose:function(){a(!n)}}).handleBackdropClick;return(0,an.jsx)(an.Fragment,{children:(0,an.jsxs)("header",{className:"bg-white border-b border-gray-200 py-4 pr-4 flex items-center justify-between relative",children:[(0,an.jsx)(ct,{to:"/",className:"flex items-center text-blue-600 text-lg font-semibold",children:(0,vo.__)("Versatile Toolkit","versatile-toolkit")}),(0,an.jsxs)("div",{className:"flex items-center gap-3",children:[f&&(0,an.jsx)(an.Fragment,{children:Object.keys((null==f?void 0:f.menus)||{}).map(function(e){var t,r,n="/".concat(null==f?void 0:f.path,"/").concat(null==f||null===(t=f.menus)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.slug);return n.endsWith("/")&&(n=n.slice(0,-1)),(0,an.jsx)(ct,{to:n,onClick:function(){},className:"text-sm font-medium rounded-md px-3 py-1 transition-colors duration-200 ".concat(s.pathname===n?"bg-blue-600 text-white border border-blue-700 hover:text-white focus:!text-white":" bg-blue-50 border border-blue-200"),children:null==f||null===(r=f.menus)||void 0===r||null===(r=r[e])||void 0===r?void 0:r.label},e)})}),!u&&(null==d?void 0:d.troubleshoot.enable)&&!f&&(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(ct,{to:"/troubleshoot",className:"text-sm font-medium rounded-md px-3 py-1 text-blue-700 bg-blue-50 border border-blue-200",children:"Deactivate Plugins"}),(0,an.jsx)(ct,{to:"/troubleshoot/debug-log",className:"text-sm font-medium rounded-md px-3 py-1 text-blue-700 bg-blue-50 border border-blue-200",children:"Debug Log"})]}),(0,an.jsxs)(fb,{children:[(0,an.jsx)(hb,{asChild:!0,children:(0,an.jsx)("button",{className:"p-1 rounded-md bg-blue-100 hover:bg-blue-200 transition-colors duration-200","aria-label":"Toggle menu",children:(0,an.jsx)("svg",{className:"w-5 h-5 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})}),(0,an.jsxs)(vb,{children:[(0,an.jsx)(gb,{children:(0,an.jsx)(bb,{children:(0,vo.__)("Services","versatile-toolkit")})}),(0,an.jsx)("div",{className:"space-y-3 mt-6",children:Object.entries(d||{}).map(function(e){var t=_b(e,2),r=t[0],n=t[1];return(0,an.jsxs)("div",{onClick:function(){return p(r,n)},className:"flex items-center justify-between p-3 rounded-md border border-gray-200 bg-gray-50 hover:bg-blue-100 hover:border-blue-300 hover:shadow-md transition-all duration-300 cursor-pointer",children:[(0,an.jsx)("span",{className:"text-blue-500 font-medium hover:text-blue-800 transition-colors duration-300",children:n.label}),(0,an.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,an.jsx)("input",{type:"checkbox",checked:n.enable,onChange:function(){},className:"sr-only peer"}),(0,an.jsx)("div",{className:"relative w-11 h-6 bg-[#c7c6c6] peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]},n.label)})})]})]})]})]})})};var Sb=function(e){var t=e.children,r=_o(),n=r.data,a=(r.isLoading,null==n?void 0:n.data),o=ne().pathname.split("/").filter(Boolean)[0];if(!a)return(0,an.jsx)(an.Fragment,{children:t});var i=Object.values(a).find(function(e){return e.path===o});return i&&i.enable?(0,an.jsx)(an.Fragment,{children:t}):(0,an.jsx)(_e,{to:"/",replace:!0})};const Nb=ti("ArrowUpAZ",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]),Eb=ti("ArrowDownAZ",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]),Pb=ti("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Cb=ti("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function Rb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ab(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ab(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ab(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Tb=function(e,t,r,n,a){return{pathname:"/troubleshoot/debug-log",search:"?".concat(Db(e,t,r,n,a))}},Db=function(e,t,r,n,a){var o=new URLSearchParams;return o.append("paged",e.toString()),o.append("per_page",null==t?void 0:t.toString()),r&&o.append("search",r),n&&o.append("sort_key",n),a&&o.append("sort_dir",a),o.toString()};function Fb(e){var t=e.order;return(0,an.jsxs)("span",{"aria-hidden":!0,className:"inline-flex flex-col leading-none ml-1",children:[""===t&&(0,an.jsx)(Nb,{className:"h-3 w-3"}),"asc"===t&&(0,an.jsx)(Nb,{className:"h-3 w-3"}),"desc"===t&&(0,an.jsx)(Eb,{className:"h-3 w-3"})]})}var Ib=function(e){return{page:parseInt(e.get("paged")||"1"),perPage:parseInt(e.get("per_page")||"10"),search:e.get("search")||"",sortKey:e.get("sort_key")||"",order:e.get("order")||""}};function Mb(e){var t=e.columns,r=e.fetchData,n=e.searchParams,a=ie(),o=n,s=Ib(o),l=Rb((0,i.useState)(s.search),2),c=l[0],u=l[1],d=Rb((0,i.useState)(s.page),2),f=d[0],h=d[1],p=Rb((0,i.useState)(s.perPage||10),2),m=p[0],y=p[1],v=Rb((0,i.useState)({key:s.sortKey,order:s.order}),2),g=v[0],b=v[1],x=Rb((0,i.useState)(0),2),w=x[0],j=x[1];(0,i.useEffect)(function(){var e=Ib(o);h(e.page),y(e.perPage||10),u(e.search),b({key:e.sortKey,order:e.order})},[n]);var _=Rb((0,i.useState)([]),2),k=_[0],O=_[1],S=Rb((0,i.useState)(0),2),N=S[0],E=S[1],P=Rb((0,i.useState)(!1),2),C=P[0],R=P[1];return(0,i.useEffect)(function(){R(!0),r({page:f,perPage:m,search:c,sortKey:g.key,order:g.order}).then(function(e){O(e.data),E(e.total||0),j(e.totalPages||0)}).finally(function(){return R(!1)})},[f,m,c,g]),(0,an.jsxs)("div",{className:"w-full",children:[(0,an.jsxs)("div",{className:"mb-3 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,an.jsx)("div",{className:"relative max-w-md"}),(0,an.jsx)("div",{className:"flex items-center gap-2"})]}),(0,an.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[(0,an.jsx)("div",{className:"overflow-x-auto",children:(0,an.jsxs)("table",{className:"min-w-full text-left text-sm",children:[(0,an.jsx)("thead",{className:"sticky top-0 bg-slate-50",children:(0,an.jsx)("tr",{className:"text-slate-600",children:t.map(function(e){var t=g.key===e.key,r=t?"asc"===g.order?"ascending":"descending":"none",n="px-4 py-3 font-semibold";return e.sortable?(0,an.jsx)("th",{scope:"col","aria-sort":r,className:n,children:(0,an.jsxs)("button",{className:"group inline-flex items-center rounded-lg px-1 py-0.5 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-300",onClick:function(){return t=String(e.key),void b(function(e){return e.key!==t?{key:t,order:"asc"}:"asc"===e.order?{key:t,order:"desc"}:{key:t,order:"asc"}});var t},"aria-label":"Sort by ".concat(e.header),children:[(0,an.jsx)("span",{children:e.header}),(0,an.jsx)(Fb,{order:t?g.order:""})]})},String(e.key)):(0,an.jsx)("th",{scope:"col",className:n,children:e.header},String(e.key))})})}),(0,an.jsx)("tbody",{children:C?(0,an.jsx)("tr",{children:(0,an.jsx)("td",{colSpan:t.length,className:"px-4 py-10 text-center text-slate-500",children:(0,vo.__)("Loading...","versatile-toolkit")})}):0===k.length?(0,an.jsx)("tr",{children:(0,an.jsx)("td",{colSpan:t.length,className:"px-4 py-10 text-center text-slate-500",children:(0,vo.__)("No results found.","versatile-toolkit")})}):k.map(function(e,r){return(0,an.jsx)("tr",{className:"border-t border-slate-100 hover:bg-slate-50/60",children:t.map(function(t){var n;return(0,an.jsx)("td",{className:"px-4 py-3 text-slate-700",children:t.render?t.render(e,t.key):e[t.key]===e.id?r+1:String(null!==(n=e[t.key])&&void 0!==n?n:"")},String(t.key))})},e.id)})})]})}),(0,an.jsxs)("div",{className:"flex flex-col gap-3 border-t border-slate-200 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsxs)("div",{className:"text-xs text-slate-600",children:["Showing ",(0,an.jsx)("span",{className:"font-semibold",children:k.length?(f-1)*m+1:0}),"–",(0,an.jsx)("span",{className:"font-semibold",children:(f-1)*m+k.length})," of",(0,an.jsxs)("span",{className:"font-semibold",children:[" ",N]})]}),(0,an.jsxs)("div",{className:"flex items-center gap-2",children:[(0,an.jsx)("label",{className:"text-sm text-slate-600",children:(0,vo.__)("Per page","versatile-toolkit")}),(0,an.jsx)("select",{value:m,onChange:function(e){y(Number(e.target.value)),a(Tb(f,Number(e.target.value),c,g.key,g.order))},className:"rounded-xl border !border-slate-200 bg-white px-2 py-1.5 text-sm shadow-sm",children:[5,10,20,50,100].map(function(e){return(0,an.jsx)("option",{value:e,children:e},e)})})]})]}),(0,an.jsxs)("div",{className:"flex items-center gap-1",children:[(0,an.jsxs)("button",{className:"flex items-center gap-1 rounded-lg px-3 py-2 text-sm text-slate-600 hover:bg-slate-100 disabled:opacity-40 disabled:cursor-not-allowed",onClick:function(){var e=Math.max(1,f-1);h(e),a(Tb(e,m,c,g.key,g.order))},disabled:1===f,children:[(0,an.jsx)(Pb,{className:"h-4 w-4"}),"Previous"]}),(0,an.jsx)("div",{className:"flex items-center gap-1 mx-2",children:function(){var e=[],t=Math.max(1,f-Math.floor(1.5)),r=Math.min(w,t+3-1);r-t+1<3&&(t=Math.max(1,r-3+1)),t>1&&(e.push((0,an.jsx)("button",{className:"min-w-[40px] h-10 rounded-lg text-sm font-medium ".concat(1===f?"bg-blue-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),onClick:function(){h(1),a(Tb(1,m,c,g.key,g.order))},children:"1"},1)),t>2&&e.push((0,an.jsx)("span",{className:"px-2 text-slate-400",children:"..."},"ellipsis1")));for(var n=function(t){e.push((0,an.jsx)("button",{className:"min-w-[40px] h-10 rounded-lg text-sm font-medium ".concat(t===f?"bg-blue-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),onClick:function(){h(t),a(Tb(t,m,c,g.key,g.order))},children:t},t))},o=t;o<=r;o++)n(o);return r<w&&(r<w-1&&e.push((0,an.jsx)("span",{className:"px-2 text-slate-400",children:"..."},"ellipsis2")),e.push((0,an.jsx)("button",{className:"min-w-[40px] h-10 rounded-lg text-sm font-medium ".concat(w===f?"bg-blue-600 text-white shadow-sm":"text-slate-600 hover:bg-slate-100"),onClick:function(){h(w),a(Tb(w,m,c,g.key,g.order))},children:w},w))),e}()}),(0,an.jsxs)("button",{className:"flex items-center gap-1 rounded-lg px-3 py-2 text-sm text-slate-600 hover:bg-slate-100 disabled:opacity-40 disabled:cursor-not-allowed",onClick:function(){var e=Math.min(w,f+1);h(e),a(Tb(e,m,c,g.key,g.order))},disabled:f===w,children:["Next",(0,an.jsx)(Cb,{className:"h-4 w-4"})]})]})]})]})]})}var Lb=function(e){var t=e.row,r=(t.type,t.message,t.raw_line);t.severity,t.timestamp;return(0,an.jsx)("div",{className:"flex gap-1",children:(0,an.jsxs)(Ac,{children:[(0,an.jsx)(Tc,{asChild:!0,children:(0,an.jsx)(Jo,{size:"sm",variant:"ghost","aria-label":"View ".concat(t.type,"'s log"),className:"h-8 w-8 p-0 text-blue-600 hover:bg-blue-50",children:(0,an.jsx)(ng,{className:"h-4 w-4"})})}),(0,an.jsxs)(Mc,{children:[(0,an.jsxs)(Lc,{children:[(0,an.jsxs)(Vc,{children:["Warning Type: ",t.type]}),(0,an.jsx)(zc,{className:"mt-2 hidden",children:t.timestamp})]}),(0,an.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-[#e5e5e5] p-3 my-2",children:(0,an.jsx)("span",{children:r})}),(0,an.jsx)($c,{className:"sm:justify-end",children:(0,an.jsx)(Fc,{asChild:!0,children:(0,an.jsx)(Jo,{type:"button",variant:"secondary",children:(0,vo.__)("Close","versatile-toolkit")})})})]})]})})};const $b=function(e){var t=e.debugStatus,r=e.logFileInfo,n=e.isAutoRefresh,a=e.isLoading,o=e.statusLoading,i=e.onToggleDebugLog,s=e.onToggleAutoRefresh,l=e.onStopAutoRefresh;return(0,an.jsxs)("div",{className:"space-y-6",children:[(0,an.jsxs)("div",{className:"space-y-3 relative",children:[o?(0,an.jsxs)("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-lg border animate-pulse",children:[(0,an.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,an.jsx)("div",{className:"w-3 h-3 rounded-full bg-slate-300 animate-pulse"}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,an.jsx)("div",{className:"h-4 bg-slate-300 rounded w-32 animate-pulse"}),(0,an.jsx)("div",{className:"h-6 bg-slate-300 rounded-full w-16 animate-pulse"})]}),(0,an.jsx)("div",{className:"h-3 bg-slate-300 rounded w-48 animate-pulse"})]})]}),(0,an.jsx)("div",{className:"w-11 h-6 bg-slate-300 rounded-full animate-pulse"})]}):(0,an.jsxs)("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg border",children:[(0,an.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,an.jsx)("div",{className:"w-3 h-3 rounded-full ".concat(t?"bg-green-500":"bg-red-500")}),(0,an.jsxs)("div",{children:[(0,an.jsxs)("div",{className:"flex gap-2",children:[(0,an.jsx)("h3",{className:"font-medium text-slate-800",children:(0,vo.__)("Debug Logging Status","versatile-toolkit")}),(0,an.jsx)("span",{className:"px-3 py-1 rounded-full text-xs font-medium ".concat(t?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:t?(0,vo.__)("Enabled","versatile-toolkit"):(0,vo.__)("Disabled","versatile-toolkit")})]}),(0,an.jsx)("p",{className:"text-sm text-slate-600",children:t?(0,vo.__)("Debug logging is currently enabled","versatile-toolkit"):(0,vo.__)("Debug logging is currently disabled","versatile-toolkit")})]})]}),(0,an.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,an.jsx)("input",{type:"checkbox",checked:t,onClick:function(e){return i(e.target.checked)},className:"sr-only peer"}),(0,an.jsx)("div",{className:"w-11 h-6 bg-slate-300 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),a?(0,an.jsxs)("div",{className:"flex items-center justify-between p-3 bg-blue-50 rounded-lg border border-blue-200 animate-pulse",children:[(0,an.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,an.jsx)("div",{className:"w-4 h-4 bg-blue-300 rounded animate-pulse"}),(0,an.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,an.jsx)("div",{className:"h-4 bg-blue-300 rounded w-20 animate-pulse"}),(0,an.jsx)("div",{className:"h-3 bg-blue-300 rounded w-12 animate-pulse"})]})]}),(0,an.jsx)("div",{className:"w-11 h-6 bg-blue-300 rounded-full animate-pulse"})]}):(0,an.jsxs)("div",{className:"flex items-center justify-between p-3 bg-blue-50 rounded-lg border border-blue-200",children:[(0,an.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,an.jsx)("svg",{className:"w-4 h-4 text-blue-600 ".concat(n?"animate-spin":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),(0,an.jsxs)("span",{className:"text-sm font-medium text-blue-800",children:[(0,vo.__)("Auto Refresh","versatile-toolkit"),n&&(0,an.jsxs)("span",{className:"ml-1 text-xs",children:["(",(0,vo.__)("Active","versatile-toolkit"),")"]})]})]}),(0,an.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,an.jsx)("input",{type:"checkbox",checked:n,onChange:function(e){s(e.target.checked),e.target.checked||l()},className:"sr-only peer"}),(0,an.jsx)("div",{className:"w-11 h-6 bg-slate-300 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]})]}),(0,an.jsx)("div",{className:"space-y-3",children:a?(0,an.jsxs)("div",{className:"p-3 bg-slate-50 rounded-lg border",children:[(0,an.jsx)("div",{className:"h-9 bg-slate-200 rounded animate-pulse mb-3"}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-20"}),(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-16"})]}),(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-16"}),(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-12"})]}),(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-24"}),(0,an.jsx)("div",{className:"h-4 bg-slate-200 rounded animate-pulse w-32"})]})]})]}):(0,an.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg border",children:[(0,an.jsx)("h3",{className:"font-medium text-slate-800 mb-3",children:(0,vo.__)("Log File Information","versatile-toolkit")}),(0,an.jsxs)("div",{className:"space-y-2",children:[(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("span",{className:"text-sm text-slate-600",children:(0,vo.__)("File Status:","versatile-toolkit")}),(0,an.jsx)("span",{className:"text-sm font-medium ".concat(r.exists?"text-green-600":"text-red-600"),children:r.exists?(0,vo.__)("Exists","versatile-toolkit"):(0,vo.__)("Not Found","versatile-toolkit")})]}),(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("span",{className:"text-sm text-slate-600",children:(0,vo.__)("File Size:","versatile-toolkit")}),(0,an.jsx)("span",{className:"text-sm font-medium text-slate-800",children:r.size})]}),(0,an.jsxs)("div",{className:"flex justify-between items-center",children:[(0,an.jsx)("span",{className:"text-sm text-slate-600",children:(0,vo.__)("Last Modified:","versatile-toolkit")}),(0,an.jsx)("span",{className:"text-sm font-medium text-slate-800",children:r.lastModified})]})]})]})})]})};function Vb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function o(r,n,a,o){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return zb(c,"_invoke",function(r,n,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,i}};function h(r,n){for(s=r,l=n,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],h=f.p,p=o[2];r>3?(a=p===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((a=r<2&&h<o[1])?(s=0,f.v=n,f.n=o[1]):h<p&&(a=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,f.n=p,s=0))}if(a||r>1)return i;throw d=!0,n}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(zb(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,zb(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,zb(d,"constructor",c),zb(c,"constructor",l),l.displayName="GeneratorFunction",zb(c,a,"GeneratorFunction"),zb(d),zb(d,a,"Generator"),zb(d,n,function(){return this}),zb(d,"toString",function(){return"[object Generator]"}),(Vb=function(){return{w:o,m:f}})()}function zb(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}zb=function(e,t,r,n){if(t)a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){zb(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},zb(e,t,r,n)}function Ub(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function qb(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){Ub(o,n,a,i,s,"next",e)}function s(e){Ub(o,n,a,i,s,"throw",e)}i(void 0)})}}var Wb,Zb,Bb,Hb,Kb,Qb,Gb={getStatus:(Qb=qb(Vb().m(function e(){var t,r,n;return Vb().w(function(e){for(;;)switch(e.n){case 0:return t=new URLSearchParams({action:"versatile_get_debug_log_status",versatile_nonce:La.nonce_value}),e.n=1,fetch(La.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t});case 1:return r=e.v,e.n=2,r.json();case 2:if(200===(n=e.v).status_code){e.n=3;break}throw new Error(n.message||"Failed to get debug log status");case 3:return e.a(2,n.data)}},e)})),function(){return Qb.apply(this,arguments)}),toggleDebugLog:(Kb=qb(Vb().m(function e(t){var r,n,a;return Vb().w(function(e){for(;;)switch(e.n){case 0:return r=new URLSearchParams({action:"versatile_toggle_debug_log",versatile_nonce:La.nonce_value,enable:t.toString()}),e.n=1,fetch(La.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r});case 1:return n=e.v,e.n=2,n.json();case 2:if(200===(a=e.v).status_code){e.n=3;break}throw new Error(a.message||"Failed to toggle debug log");case 3:return e.a(2,a.data)}},e)})),function(e){return Kb.apply(this,arguments)}),clearLog:(Hb=qb(Vb().m(function e(){var t,r,n;return Vb().w(function(e){for(;;)switch(e.n){case 0:return t=new URLSearchParams({action:"versatile_clear_debug_log",versatile_nonce:La.nonce_value}),e.n=1,fetch(La.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t});case 1:return r=e.v,e.n=2,r.json();case 2:if(200===(n=e.v).status_code){e.n=3;break}throw new Error(n.message||"Failed to clear debug log");case 3:return e.a(2)}},e)})),function(){return Hb.apply(this,arguments)}),downloadLog:(Bb=qb(Vb().m(function e(){var t,r;return Vb().w(function(e){for(;;)if(0===e.n)return t=new URLSearchParams({action:"versatile_download_debug_log",versatile_nonce:La.nonce_value}),r="".concat(La.ajax_url,"?").concat(t),window.open(r,"_blank"),e.a(2,Promise.resolve())},e)})),function(){return Bb.apply(this,arguments)}),refreshStatus:(Zb=qb(Vb().m(function e(){var t,r,n;return Vb().w(function(e){for(;;)switch(e.n){case 0:return t=new URLSearchParams({action:"versatile_refresh_debug_log",versatile_nonce:La.nonce_value}),e.n=1,fetch(La.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t});case 1:return r=e.v,e.n=2,r.json();case 2:if(200===(n=e.v).status_code){e.n=3;break}throw new Error(n.message||"Failed to refresh debug log status");case 3:return e.a(2,n.data)}},e)})),function(){return Zb.apply(this,arguments)}),loadLogContent:(Wb=qb(Vb().m(function e(t){var r,n,a,o,i,s,l,c,u,d,f;return Vb().w(function(e){for(;;)switch(e.p=e.n){case 0:return r=t.page,n=t.perPage,a=t.search,o=t.sortKey,i=t.order,e.p=1,l=new URLSearchParams({action:"versatile_get_debug_log_content",versatile_nonce:La.nonce_value,page:String(r),per_page:String(n),search:String(a||"").trim(),sortKey:String(o||"").trim(),order:String((null==i||null===(s=i.trim())||void 0===s?void 0:s.toLowerCase())||"")}),e.n=2,fetch("".concat(La.ajax_url,"?").concat(l));case 2:return c=e.v,e.n=3,c.json();case 3:if(200!==(u=e.v).status_code){e.n=4;break}return d=u.data,e.a(2,{data:d.entries,total:null==d?void 0:d.total_entries,totalPages:null==d?void 0:d.total_pages});case 4:throw new Error(u.message||"Error fetching debug log content");case 5:e.n=7;break;case 6:throw e.p=6,f=e.v,new Error((null==f?void 0:f.message)||"Unknown error fetching debug log content");case 7:return e.a(2)}},e,null,[[1,6]])})),function(e){return Wb.apply(this,arguments)})};function Jb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Yb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Xb=function(){var e,t,r=Jb(ht(),1)[0],n=Jb((0,i.useState)(!1),2),a=n[0],o=n[1],s=Jb((0,i.useState)(0),2),l=s[0],c=s[1],u=Qa({queryKey:["debugLogStatus"],queryFn:Gb.getStatus,refetchInterval:3e4,staleTime:1e4}),d=u.data,f=u.isLoading,h=u.refetch,p=function(){var e=sn();return Ja({mutationFn:Gb.toggleDebugLog,onSuccess:function(t,r){e.invalidateQueries({queryKey:["debugLogStatus"]});var n=r?"enabled":"disabled";pr.success((0,vo.__)("Debug logging ".concat(n," successfully"),"versatile-toolkit"))},onError:function(e){pr.error(e.message||(0,vo.__)("Failed to toggle debug logging","versatile-toolkit"))}})}(),m=function(){var e=sn();return Ja({mutationFn:Gb.clearLog,onSuccess:function(){e.invalidateQueries({queryKey:["debugLogStatus"]}),pr.success((0,vo.__)("Debug log cleared successfully","versatile-toolkit"))},onError:function(e){pr.error(e.message||(0,vo.__)("Failed to clear debug log","versatile-toolkit"))}})}(),y=(null==d?void 0:d.enabled)||!1,v=d?(t=(e=d).file_exists&&e.last_modified>0?new Date(1e3*e.last_modified).toLocaleString():"Never",{exists:e.file_exists,size:e.file_size_formatted,lastModified:t}):{size:"0 KB",lastModified:"Never",exists:!1},g=f||p.isPending||m.isPending;(0,i.useEffect)(function(){var e;return a&&(e=setInterval(function(){c(function(e){return e+1})},5e3)),function(){e&&clearInterval(e)}},[a]);var b=[{key:"id",header:"No"},{key:"type",header:"Type",render:function(e,t){return function(e){switch(e){case"PHP Fatal error":case"PHP Error":case"PHP Parse error":return(0,an.jsx)("span",{className:"text-red-500",children:"Error"});case"PHP Warning":return(0,an.jsx)("span",{className:"text-yellow-500",children:"Warning"});case"PHP Notice":return(0,an.jsx)("span",{className:"text-blue-500",children:"Info"});case"debug":return(0,an.jsx)("span",{className:"text-gray-500",children:"Debug"});default:return(0,an.jsx)("span",{className:"text-gray-500",children:e})}}(e.type)}},{key:"message",header:"Description",render:function(e,t){return(0,an.jsxs)(an.Fragment,{children:[e.raw_line.substring(0,200),"..."]})}},{key:"timestamp",header:"Timestamp",render:function(e){var t=e.timestamp;if(!t)return"Invalid Date";try{var r=t.replace(" UTC","");return new Date(r+" UTC").toLocaleString()}catch(e){return"Invalid Date"}}},{key:"actions",header:"Actions",render:function(e,t){return(0,an.jsx)(Lb,{row:e},t)}}];return(0,an.jsxs)("div",{className:"mx-auto max-w-6xl p-6",children:[(0,an.jsx)("div",{className:"bg-white p-6 rounded-lg border border-slate-200 mt-3",children:(0,an.jsxs)("div",{className:"flex items-center justify-between",children:[(0,an.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,an.jsx)("div",{className:"w-3 h-3 rounded-full ".concat(y?"bg-green-500":"bg-red-500")}),(0,an.jsxs)("div",{children:[(0,an.jsx)("h3",{className:"font-medium text-slate-800",children:(0,vo.__)("Debug Logging","versatile-toolkit")}),(0,an.jsxs)("p",{className:"text-sm text-slate-600",children:[y?(0,vo.__)("Currently enabled","versatile-toolkit"):(0,vo.__)("Currently disabled","versatile-toolkit"),a&&(0,an.jsxs)("span",{className:"ml-2 text-blue-600",children:["• ",(0,vo.__)("Auto refresh active","versatile-toolkit")]})]})]})]}),(0,an.jsxs)(fb,{children:[(0,an.jsx)(hb,{asChild:!0,children:(0,an.jsxs)("button",{className:"flex items-center space-x-2 px-3 py-2 bg-slate-100 text-slate-700 rounded-lg hover:bg-slate-200 transition-colors",children:[(0,an.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,an.jsx)("span",{className:"text-sm",children:(0,vo.__)("Settings","versatile-toolkit")})]})}),(0,an.jsxs)(vb,{children:[(0,an.jsx)(gb,{children:(0,an.jsx)(bb,{children:(0,vo.__)("Debug Log Settings","versatile-toolkit")})}),(0,an.jsx)("div",{className:"mt-6",children:(0,an.jsx)($b,{debugStatus:y,logFileInfo:v,isAutoRefresh:a,isLoading:g,statusLoading:f,onToggleDebugLog:function(e){p.mutate(e)},onToggleAutoRefresh:function(e){o(e)},onStopAutoRefresh:function(){o(!1),pr.success((0,vo.__)("Auto refresh stopped","versatile-toolkit"))}})})]})]})]})}),(0,an.jsxs)("div",{className:"my-8",children:[(0,an.jsxs)("div",{className:" bg-white rounded-lg border p-2 flex items-center justify-between",children:[(0,an.jsx)("h3",{className:"font-medium text-slate-800 text-lg",children:(0,vo.__)("Debug Log","versatile-toolkit")}),(0,an.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,an.jsx)("button",{title:(0,vo.__)("Refresh Log","versatile-toolkit"),onClick:function(){h(),c(function(e){return e+1}),pr.success((0,vo.__)("Debug log status and content refreshed","versatile-toolkit"))},disabled:g,className:"flex items-center justify-center space-x-3 px-2 py-1 bg-blue-500 text-white rounded-lg hover:bg-blue-700 disabled:bg-slate-300 disabled:cursor-not-allowed transition-colors",children:(0,an.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,an.jsx)("button",{title:(0,vo.__)("Download Log","versatile-toolkit"),onClick:function(){v.exists?Gb.downloadLog():pr.error((0,vo.__)("No log file to download","versatile-toolkit"))},disabled:!v.exists||g,className:"flex items-center justify-center space-x-2 px-2 py-1 bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:bg-slate-300 disabled:cursor-not-allowed transition-colors",children:(0,an.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,an.jsx)("button",{title:(0,vo.__)("Clear Log","versatile-toolkit"),onClick:function(){v.exists?window.confirm((0,vo.__)("Are you sure you want to clear the debug log? This action cannot be undone.","versatile-toolkit"))&&m.mutate(void 0,{onSuccess:function(){h(),c(function(e){return e+1})}}):pr.error((0,vo.__)("No log file to clear","versatile-toolkit"))},disabled:!v.exists||g,className:"flex items-center justify-center space-x-2 px-2 py-1 bg-yellow-600 text-white rounded-lg hover:bg-yellow-700 disabled:bg-slate-300 disabled:cursor-not-allowed transition-colors",children:(0,an.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,an.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]}),(0,an.jsx)(Mb,{columns:b,fetchData:Gb.loadLogContent,searchParams:r},l)]})]})};var ex=o.createRoot(document.getElementById("versatile-root")),tx=new class{#Z;#m;#u;#B;#H;#K;#Q;#G;constructor(e={}){this.#Z=e.queryCache||new Jr,this.#m=e.mutationCache||new Xr,this.#u=e.defaultOptions||{},this.#B=new Map,this.#H=new Map,this.#K=0}mount(){this.#K++,1===this.#K&&(this.#Q=Vr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Z.onFocus())}),this.#G=zr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Z.onOnline())}))}unmount(){this.#K--,0===this.#K&&(this.#Q?.(),this.#Q=void 0,this.#G?.(),this.#G=void 0)}isFetching(e){return this.#Z.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Z.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#Z.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(br(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#Z.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=this.#Z.get(n.queryHash),o=a?.state.data,i=function(e,t){return"function"==typeof e?e(t):e}(t,o);if(void 0!==i)return this.#Z.build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Lr.batch(()=>this.#Z.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Z.get(t.queryHash)?.state}removeQueries(e){const t=this.#Z;Lr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#Z;return Lr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Lr.batch(()=>this.#Z.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(yr).catch(yr)}invalidateQueries(e,t={}){return Lr.batch(()=>(this.#Z.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Lr.batch(()=>this.#Z.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(yr)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(n).then(yr)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#Z.build(this,t);return r.isStaleByTime(br(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}fetchInfiniteQuery(e){return e.behavior=tn(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e.behavior=tn(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zr.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#Z}getMutationCache(){return this.#m}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#B.set(kr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#B.values()],r={};return t.forEach(t=>{Or(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#H.set(kr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#H.values()],r={};return t.forEach(t=>{Or(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_r(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Dr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#Z.clear(),this.#m.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});ex.render((0,an.jsx)(Sg,{onError:function(e,t){},children:(0,an.jsx)(ln,{client:tx,children:(0,an.jsx)(Sg,{onError:function(e,t){},children:(0,an.jsx)(st,{children:(0,an.jsxs)(Sg,{onError:function(e,t){},children:[(0,an.jsx)(Ob,{}),(0,an.jsxs)(Se,{children:[(0,an.jsx)(ke,{path:"/",element:(0,an.jsx)(Sg,{children:(0,an.jsx)(Do,{})})}),(0,an.jsx)(ke,{path:"/troubleshoot",element:(0,an.jsx)(Sb,{children:(0,an.jsx)(Sg,{children:(0,an.jsx)(tv,{})})})}),(0,an.jsx)(ke,{path:"/maintenance",element:(0,an.jsx)(Sb,{children:(0,an.jsx)(Sg,{children:(0,an.jsx)(Wg,{})})})}),(0,an.jsx)(ke,{path:"/comingsoon",element:(0,an.jsx)(Sb,{children:(0,an.jsx)(Sg,{children:(0,an.jsx)(tb,{})})})}),(0,an.jsx)(ke,{path:"/troubleshoot/debug-log",element:(0,an.jsx)(Sb,{children:(0,an.jsx)(Sg,{children:(0,an.jsx)(Xb,{})})})})]}),(0,an.jsx)(hr,{position:"bottom-right",containerClassName:"!z-[9999999]",toastOptions:{duration:5e3,style:{background:"#fff",color:"#333",border:"1px solid #e5e7eb",padding:"16px",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},success:{style:{background:"#f0fdf4",borderColor:"#86efac"}},error:{style:{background:"#fef2f2",borderColor:"#fecaca"}}}})]})})})})}))})(); -
versatile-toolkit/trunk/constants.php
r3342118 r3349303 39 39 'enable_comingsoon' => false, 40 40 'maintenance' => array( 41 'title' => '', 42 'subtitle' => '', 43 'description' => '', 44 'background_image' => '', 45 'background_image_id' => 0, 46 'logo' => '', 47 'logo_id' => 0, 48 'style' => array( 41 'title' => 'We’ll be back soon!', 42 'subtitle' => 'Our site is currently undergoing scheduled maintenance.', 43 'description' => 'Thank you for your patience. We’re working hard to bring everything back online better than ever.', 44 'template' => 'default', 45 'background_image' => '', 46 'background_image_id' => 0, 47 'logo' => '', 48 'logo_id' => 0, 49 'show_subscribers_only' => false, 50 'style' => array( 49 51 'bg_image' => '', 50 52 'bg_color' => '#ffffff', … … 53 55 ), 54 56 'comingsoon' => array( 55 'title' => '', 56 'subtitle' => '', 57 'description' => '', 58 'background_image' => '', 59 'background_image_id' => 0, 60 'logo' => '', 61 'logo_id' => 0, 62 'style' => array( 57 'title' => 'Coming Soon!', 58 'subtitle' => 'We’re working on something amazing.', 59 'description' => 'Stay tuned for our exciting launch. Something great is coming your way!', 60 'template' => 'default', 61 'background_image' => '', 62 'background_image_id' => 0, 63 'logo' => '', 64 'logo_id' => 0, 65 'show_subscribers_only' => false, 66 'style' => array( 63 67 'bg_image' => '', 64 68 'bg_color' => '#ffffff', … … 77 81 'enable' => true, 78 82 'path' => 'troubleshoot', 79 'description' => 'Diagnose and fix common WordPress issues, plugin conflicts, and performance problems.', 83 'description' => 'Disable plugin byIP specific, plugin conflicts, and view debug logs.', 84 'menus' => array( 85 'troubleshoot' => array( 86 'slug' => '', 87 'label' => 'Deactivate Plugins', 88 'parent' => 'troubleshoot', 89 'icon' => 'dashicons-admin-tools', 90 ), 91 'debug' => array( 92 'slug' => 'debug-log', 93 'label' => 'Debug Log', 94 'parent' => 'troubleshoot', 95 'icon' => 'dashicons-admin-tools', 96 ), 97 ), 98 'icon' => 'dashicons-admin-tools', 80 99 ), 81 100 'maintenance' => array( … … 84 103 'path' => 'maintenance', 85 104 'description' => 'Display a custom maintenance page to visitors while you update your site.', 105 'icon' => 'dashicons-admin-tools', 86 106 ), 87 107 'comingsoon' => array( … … 90 110 'path' => 'comingsoon', 91 111 'description' => 'Show a beautiful coming soon page to build anticipation before your site launch.', 112 'icon' => 'dashicons-admin-tools', 92 113 ), 93 114 ) 94 115 ); 116 117 define( 'VERSATILE_DEFAULT_COMINGSOON_TEMPLATE', 'classic' ); 118 define( 'VERSATILE_DEFAULT_MAINTENANCE_TEMPLATE', 'classic' ); -
versatile-toolkit/trunk/inc/Core/Enqueue.php
r3342118 r3349303 28 28 public function __construct() { 29 29 add_action( 'admin_enqueue_scripts', array( __CLASS__, 'load_admin_scripts' ) ); 30 add_action( 'wp_enqueue_scripts', array( __CLASS__, 'load_front_end_scripts' ) );30 // add_action( 'wp_enqueue_scripts', array( __CLASS__, 'load_front_end_scripts' ) ); 31 31 } 32 32 … … 41 41 */ 42 42 public static function load_admin_scripts( $page ): void { 43 $plugin_data = Versatile::plugin_data();43 $plugin_data = versatile_get_plugin_data(); 44 44 $versatile_style_bundle = $plugin_data['plugin_url'] . 'assets/dist/css/style.min.css'; 45 45 $versatile_js_bundle = $plugin_data['plugin_url'] . 'assets/dist/js/versatile-js.min.js'; … … 144 144 public static function script_text_domain() { 145 145 $plugin_data = Versatile::plugin_data(); 146 wp_set_script_translations( ' Versatile-backend', $plugin_data['plugin_url'] . 'assets/languages/' );146 wp_set_script_translations( 'versatile-js', $plugin_data['plugin_url'] . 'assets/languages/' ); 147 147 } 148 148 } -
versatile-toolkit/trunk/inc/Helpers/ValidationHelper.php
r3342118 r3349303 36 36 * @return object validation response 37 37 */ 38 public static function validate( array $validation_rules, array $data ): object{38 public static function validate( array $validation_rules, array $data ): array { 39 39 $validation_pass = true; 40 40 $validation_errors = array(); … … 174 174 ); 175 175 176 return (object)$response;176 return $response; 177 177 } 178 178 -
versatile-toolkit/trunk/inc/RestAPI/Routes.php
r3342118 r3349303 10 10 11 11 namespace Versatile\RestAPI; 12 13 use WP_REST_Server;14 12 15 13 if ( ! defined( 'ABSPATH' ) ) { … … 69 67 public static function endpoints() { 70 68 71 return array( 72 ); 69 return array(); 73 70 } 74 71 } -
versatile-toolkit/trunk/inc/Services/Comingsoon/ComingsoonMood.php
r3342118 r3349303 11 11 namespace Versatile\Services\Comingsoon; 12 12 13 use Versatile\Helpers\MoodHelper; 13 14 use Versatile\Traits\JsonResponse; 14 15 … … 36 37 add_action( 'wp_ajax_versatile_update_comingsoon_mood', array( $this, 'versatile_update_comingsoon_mood' ) ); 37 38 add_action( 'wp_ajax_versatile_preview_comingsoon', array( $this, 'preview_comingsoon_mode' ) ); 39 add_action( 'wp_ajax_versatile_comingsoon_template_preview', array( $this, 'comingsoon_template_preview' ) ); 38 40 } 39 41 … … 48 50 array( 49 51 array( 52 'name' => 'template', 53 'value' => isset($_POST['template']) ? $_POST['template'] : 'false', //phpcs:ignore 54 'sanitize' => 'sanitize_text_field', 55 'rules' => 'required|string', 56 ), 57 array( 58 'name' => 'show_subscribers_only', 59 'value' => isset($_POST['show_subscribers_only']) ? $_POST['show_subscribers_only'] : 'false', //phpcs:ignore 60 'sanitize' => 'sanitize_text_field', 61 'rules' => 'boolean', 62 ), 63 array( 50 64 'name' => 'enable_comingsoon', 51 65 'value' => isset($_POST['enable_comingsoon']) ? $_POST['enable_comingsoon'] : 'false', //phpcs:ignore … … 98 112 ); 99 113 100 if ( ! $sanitized_data->success ) { 101 $error_message = versatile_grab_error_message( $sanitized_data->errors ); 102 return $this->json_response( $error_message ?? 'Error: Required fields missing!', $sanitized_data->errors, 400 ); 103 } 104 105 $request_verify = versatile_verify_request( (array) $sanitized_data ); 106 107 if ( ! $request_verify->success ) { 108 return $this->json_response( $request_verify->message ?? 'Error: while updating comingsoon mood info', array(), $request_verify->code ); 109 } 110 111 $sanitized_data->enable_comingsoon = filter_var( $sanitized_data->enable_comingsoon, FILTER_VALIDATE_BOOLEAN ); 114 if ( ! $sanitized_data['success'] ) { 115 $error_message = versatile_grab_error_message( $sanitized_data['errors'] ); 116 return $this->json_response( $error_message ?? 'Error: Required fields missing!', $sanitized_data['errors'], 400 ); 117 } 118 119 $verify_request = versatile_verify_request( $sanitized_data ); 120 121 if ( ! $verify_request['success'] ) { 122 return $this->json_response( $verify_request['message'] ?? 'Error: while updating comingsoon mood info', array(), $verify_request['code'] ); 123 } 124 125 $verified_data = (object) $verify_request['data']; 126 127 $verified_data->enable_comingsoon = filter_var( $verified_data->enable_comingsoon, FILTER_VALIDATE_BOOLEAN ); 128 $verified_data->show_subscribers_only = filter_var( $verified_data->show_subscribers_only, FILTER_VALIDATE_BOOLEAN ); 112 129 $current_mood_info = get_option( VERSATILE_MOOD_LIST, VERSATILE_DEFAULT_MOOD_LIST ); 113 $current_mood_info['enable_comingsoon'] = $ sanitized_data->enable_comingsoon ?? false;130 $current_mood_info['enable_comingsoon'] = $verified_data->enable_comingsoon ?? false; 114 131 if ( $current_mood_info['enable_comingsoon'] ) { 115 132 $current_mood_info['enable_maintenance'] = false; 116 133 } 117 unset( $sanitized_data->enable_comingsoon ); 118 unset( $sanitized_data->action ); 119 unset( $sanitized_data->versatile_nonce ); 134 unset( $verified_data->enable_comingsoon ); 120 135 $current_mood_info['comingsoon'] = array_merge( 121 136 $current_mood_info['comingsoon'], 122 (array) $ sanitized_data137 (array) $verified_data 123 138 ); 124 139 update_option( VERSATILE_MOOD_LIST, $current_mood_info ); 125 140 126 return $this->json_response( 'Maintenance Mood info updated!', $current_mood_info, 200 );141 return $this->json_response( __( 'Comingsoon Mood info updated!', 'versatile-toolkit' ), $current_mood_info, 200 ); 127 142 } catch ( \Throwable $th ) { 128 return $this->json_response( 'Error: while updating maintenance mood info', array(), 400 );129 } 130 } 131 132 /** 133 * Preview coming soon mode via AJAX 143 return $this->json_response( __( 'Error: while updating comingsoon mood info', 'versatile-toolkit' ), array(), 400 ); 144 } 145 } 146 147 /** 148 * Preview coming soon mode via AJAX FULL PREVIEW 134 149 * 135 150 * @return void … … 137 152 public function preview_comingsoon_mode() { 138 153 try { 139 $sanitized_data = versatile_sanitization_validation(); 140 141 if ( ! $sanitized_data->success ) { 142 wp_die( esc_html( $sanitized_data->message ) ); 143 } 144 145 $request_verify = versatile_verify_request( (array) $sanitized_data ); 146 147 if ( ! $request_verify->success ) { 148 wp_die( esc_html( $request_verify->message ) ); 149 } 150 151 // Set headers for HTML response 152 header( 'Content-Type: text/html; charset=utf-8' ); 153 154 // Fix deprecated emoji styles function for WordPress 6.4+ 155 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 156 if ( function_exists( 'wp_enqueue_emoji_styles' ) ) { 157 add_action( 'wp_print_styles', 'wp_enqueue_emoji_styles' ); 158 } 159 160 // Load coming soon template for preview 161 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/Comingsoon/ComingsoonTemplate.php'; 154 $sanitized_data = versatile_sanitization_validation( 155 array( 156 array( 157 'name' => 'type', 158 'value' => isset($_GET['type']) ? $_GET['type'] : '', //phpcs:ignore 159 'sanitize' => 'sanitize_text_field', 160 'rules' => 'required|string', 161 ), 162 array( 163 'name' => 'preview_data', 164 'value' => isset($_GET['preview_data']) ? $_GET['preview_data'] : '', //phpcs:ignore 165 'sanitize' => 'sanitize_text_field', 166 'rules' => 'string', 167 ), 168 ) 169 ); 170 171 if ( ! $sanitized_data['success'] ) { 172 wp_die( esc_html( $sanitized_data['message'] ) ); 173 } 174 175 $verify_request = versatile_verify_request( $sanitized_data ); 176 177 if ( ! $verify_request['success'] ) { 178 wp_die( esc_html( $verify_request['message'] ) ); 179 } 180 181 $verified_data = (object) $verify_request['data']; 182 183 $type = $verified_data->type ?? 'comingsoon'; 184 185 // Handle preview data if provided (for live preview with user's current form data) 186 $preview_data = null; 187 if ( isset( $verified_data->preview_data ) ) { 188 $preview_data_raw = $verified_data->preview_data; 189 $preview_data = json_decode( $preview_data_raw, true ); 190 } 191 $template_id = $preview_data['template'] ?? VERSATILE_DEFAULT_COMINGSOON_TEMPLATE; 192 193 $mood_helper = new MoodHelper(); 194 $mood_helper->render_template( $template_id, $type, $preview_data ); 162 195 die(); 163 196 } catch ( \Throwable $th ) { … … 167 200 168 201 /** 202 * Preview specific coming soon template via AJAX single template &. 203 * 204 * @return void 205 */ 206 public function comingsoon_template_preview() { 207 try { 208 $sanitized_data = versatile_sanitization_validation( 209 array( 210 array( 211 'name' => 'template_id', 212 'value' => isset($_GET['template_id']) ? $_GET['template_id'] : '', //phpcs:ignore 213 'sanitize' => 'sanitize_text_field', 214 'rules' => 'required|string', 215 ), 216 array( 217 'name' => 'type', 218 'value' => isset($_GET['type']) ? $_GET['type'] : '', //phpcs:ignore 219 'sanitize' => 'sanitize_text_field', 220 'rules' => 'required|string', 221 ), 222 array( 223 'name' => 'preview_data', 224 'value' => isset($_GET['preview_data']) ? $_GET['preview_data'] : '', //phpcs:ignore 225 'sanitize' => 'sanitize_text_field', 226 'rules' => 'string', 227 ), 228 ) 229 ); 230 231 if ( ! $sanitized_data['success'] ) { 232 wp_die( esc_html( $sanitized_data['message'] ) ); 233 } 234 235 $verify_request = versatile_verify_request( $sanitized_data ); 236 237 if ( ! $verify_request['success'] ) { 238 wp_die( esc_html( $verify_request['message'] ) ); 239 } 240 241 $verified_data = (object) $verify_request['data']; 242 243 // Get template ID from request 244 $template_id = $verified_data->template_id; 245 $type = $verified_data->type ?? 'comingsoon'; 246 247 // Handle preview data if provided (for live preview with user's current form data) 248 $preview_data = null; 249 if ( isset( $verified_data->preview_data ) ) { 250 $preview_data_raw = $verified_data->preview_data; 251 $preview_data = json_decode( $preview_data_raw, true ); 252 } 253 254 if ( empty( $verified_data->template_id ) ) { 255 $template_id = $preview_data['template'] ?? VERSATILE_DEFAULT_COMINGSOON_TEMPLATE; 256 } 257 258 $mood_helper = new MoodHelper(); 259 $mood_helper->render_template( $template_id, $type, $preview_data ); 260 die(); 261 } catch ( \Throwable $th ) { 262 wp_die( esc_html__( 'Error loading template preview: ', 'versatile-toolkit' ) . esc_html( $th->getMessage() ) ); 263 } 264 } 265 266 /** 169 267 * Custom_comingsoon_mode description 170 268 * … … 172 270 */ 173 271 public function custom_comingsoon_mode() { 174 $current_user = wp_get_current_user(); 175 176 // Fix deprecated emoji styles function for WordPress 6.4+ 272 $current_user = wp_get_current_user(); 273 $versatile_mood_info = get_option( VERSATILE_MOOD_LIST, VERSATILE_DEFAULT_MOOD_LIST ); 274 $show_subscribers_only = $versatile_mood_info['comingsoon']['show_subscribers_only'] ?? false; 275 $template = $versatile_mood_info['comingsoon']['template'] ?? VERSATILE_DEFAULT_COMINGSOON_TEMPLATE; 276 277 $template_title = esc_html( $versatile_mood_info['comingsoon']['title'] ?? '' ); 278 $subtitle = esc_html( $versatile_mood_info['comingsoon']['subtitle'] ?? '' ); 279 $description = esc_html( $versatile_mood_info['comingsoon']['description'] ?? '' ); 280 $background_image = esc_url( $versatile_mood_info['comingsoon']['background_image'] ?? '' ); 281 $logo = esc_url( $versatile_mood_info['comingsoon']['logo'] ?? '' ); 282 177 283 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 178 284 if ( function_exists( 'wp_enqueue_emoji_styles' ) ) { … … 180 286 } 181 287 182 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/Comingsoon/ComingsoonTemplate.php'; 183 die(); 288 // If show_subscribers_only is enabled, only show coming soon mode to subscribers 289 if ( $show_subscribers_only ) { 290 if ( in_array( 'subscriber', (array) $current_user->roles, true ) ) { 291 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/Comingsoon/Templates/' . $template . '.php'; 292 die(); 293 } 294 } else { 295 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/Comingsoon/Templates/' . $template . '.php'; 296 die(); 297 } 184 298 } 185 299 } -
versatile-toolkit/trunk/inc/Services/MaintenanceMode/MaintenanceMode.php
r3342118 r3349303 12 12 13 13 use Versatile\Traits\JsonResponse; 14 use Versatile\Helpers\MoodHelper; 14 15 15 16 if ( ! defined( 'ABSPATH' ) ) { … … 36 37 add_action( 'wp_ajax_versatile_update_maintenance_mood', array( $this, 'versatile_update_maintenance_mood' ) ); 37 38 add_action( 'wp_ajax_versatile_preview_maintenance', array( $this, 'preview_maintenance_mode' ) ); 39 add_action( 'wp_ajax_versatile_maintenance_template_preview', array( $this, 'maintenance_template_preview' ) ); 38 40 } 39 41 … … 48 50 array( 49 51 array( 52 'name' => 'template', 53 'value' => isset($_POST['template']) ? $_POST['template'] : 'false', //phpcs:ignore 54 'sanitize' => 'sanitize_text_field', 55 'rules' => 'required|string', 56 ), 57 array( 58 'name' => 'show_subscribers_only', 59 'value' => isset($_POST['show_subscribers_only']) ? $_POST['show_subscribers_only'] : 'false', //phpcs:ignore 60 'sanitize' => 'sanitize_text_field', 61 'rules' => 'boolean', 62 ), 63 array( 50 64 'name' => 'enable_maintenance', 51 65 'value' => isset($_POST['enable_maintenance']) ? $_POST['enable_maintenance'] : 'false', //phpcs:ignore … … 98 112 ); 99 113 100 if ( ! $sanitized_data->success ) { 101 $error_message = versatile_grab_error_message( $sanitized_data->errors ); 102 return $this->json_response( $error_message ?? $sanitized_data->message, $sanitized_data->errors, 400 ); 103 } 104 105 $request_verify = versatile_verify_request( (array) $sanitized_data ); 106 107 if ( ! $request_verify->success ) { 108 return $this->json_response( $request_verify->message ?? 'Error: while updating maintenance mood info', array(), $request_verify->code ); 109 } 110 111 $sanitized_data->enable_maintenance = filter_var( $sanitized_data->enable_maintenance, FILTER_VALIDATE_BOOLEAN ); 114 if ( ! $sanitized_data['success'] ) { 115 $error_message = versatile_grab_error_message( $sanitized_data['errors'] ); 116 return $this->json_response( $error_message ?? $sanitized_data['message'], $sanitized_data['errors'], 400 ); 117 } 118 119 $verify_request = versatile_verify_request( $sanitized_data ); 120 121 if ( ! $verify_request['success'] ) { 122 return $this->json_response( $verify_request['message'] ?? 'Error: while updating maintenance mood info', array(), $verify_request['code'] ); 123 } 124 125 $verified_data = (object) $verify_request['data']; 126 127 $verified_data->enable_maintenance = filter_var( $verified_data->enable_maintenance, FILTER_VALIDATE_BOOLEAN ); 128 $verified_data->show_subscribers_only = filter_var( $verified_data->show_subscribers_only, FILTER_VALIDATE_BOOLEAN ); 112 129 $current_mood_info = get_option( VERSATILE_MOOD_LIST, VERSATILE_DEFAULT_MOOD_LIST ); 113 $current_mood_info['enable_maintenance'] = $sanitized_data->enable_maintenance ?? false; 130 $current_mood_info['enable_maintenance'] = $verified_data->enable_maintenance ?? false; 131 $current_mood_info['show_subscribers_only'] = $verified_data->show_subscribers_only ?? false; 114 132 if ( $current_mood_info['enable_maintenance'] ) { 115 133 $current_mood_info['enable_comingsoon'] = false; 116 134 } 117 unset( $sanitized_data->enable_maintenance ); 118 unset( $sanitized_data->action ); 119 unset( $sanitized_data->versatile_nonce ); 135 unset( $verified_data->enable_maintenance ); 120 136 $current_mood_info['maintenance'] = array_merge( 121 137 $current_mood_info['maintenance'], 122 (array) $ sanitized_data138 (array) $verified_data 123 139 ); 124 140 update_option( VERSATILE_MOOD_LIST, $current_mood_info ); … … 137 153 public function preview_maintenance_mode() { 138 154 try { 139 $sanitized_data = versatile_sanitization_validation(); 140 141 if ( ! $sanitized_data->success ) { 142 wp_die( esc_html( $sanitized_data->message ) ); 143 } 144 145 $request_verify = versatile_verify_request( (array) $sanitized_data ); 146 147 if ( ! $request_verify->success ) { 148 wp_die( esc_html( $request_verify->message ) ); 149 } 150 151 // Set headers for HTML response 152 header( 'Content-Type: text/html; charset=utf-8' ); 153 154 // Fix deprecated emoji styles function for WordPress 6.4+ 155 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 156 if ( function_exists( 'wp_enqueue_emoji_styles' ) ) { 157 add_action( 'wp_print_styles', 'wp_enqueue_emoji_styles' ); 158 } 159 160 // Load maintenance template for preview 161 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/MaintenanceMode/MaintenanceTemplate.php'; 155 $sanitized_data = versatile_sanitization_validation( 156 array( 157 array( 158 'name' => 'type', 159 'value' => isset($_GET['type']) ? $_GET['type'] : '', //phpcs:ignore 160 'sanitize' => 'sanitize_text_field', 161 'rules' => 'required|string', 162 ), 163 array( 164 'name' => 'preview_data', 165 'value' => isset($_GET['preview_data']) ? $_GET['preview_data'] : '', //phpcs:ignore 166 'sanitize' => 'sanitize_text_field', 167 'rules' => 'string', 168 ), 169 ) 170 ); 171 172 if ( ! $sanitized_data['success'] ) { 173 wp_die( esc_html( $sanitized_data['message'] ) ); 174 } 175 176 $verify_request = versatile_verify_request( $sanitized_data ); 177 178 if ( ! $verify_request['success'] ) { 179 wp_die( esc_html( $verify_request['message'] ) ); 180 } 181 182 $verified_data = (object) $verify_request['data']; 183 184 $type = $verified_data->type ?? 'maintenance'; 185 186 // Handle preview data if provided (for live preview with user's current form data) 187 $preview_data = null; 188 if ( isset( $verified_data->preview_data ) ) { 189 $preview_data_raw = $verified_data->preview_data; 190 $preview_data = json_decode( $preview_data_raw, true ); 191 } 192 193 $template_id = $preview_data['template'] ?? VERSATILE_DEFAULT_MAINTENANCE_TEMPLATE; 194 195 $mood_helper = new MoodHelper(); 196 $mood_helper->render_template( $template_id, $type, $preview_data ); 162 197 die(); 163 198 } catch ( \Throwable $th ) { … … 167 202 168 203 /** 204 * Preview specific template via AJAX 205 * 206 * @return void 207 */ 208 public function maintenance_template_preview() { 209 try { 210 $sanitized_data = versatile_sanitization_validation( 211 array( 212 array( 213 'name' => 'template_id', 214 'value' => isset($_GET['template_id']) ? $_GET['template_id'] : '', //phpcs:ignore 215 'sanitize' => 'sanitize_text_field', 216 'rules' => 'required|string', 217 ), 218 array( 219 'name' => 'type', 220 'value' => isset($_GET['type']) ? $_GET['type'] : '', //phpcs:ignore 221 'sanitize' => 'sanitize_text_field', 222 'rules' => 'required|string', 223 ), 224 array( 225 'name' => 'preview_data', 226 'value' => isset($_GET['preview_data']) ? $_GET['preview_data'] : '', //phpcs:ignore 227 'sanitize' => 'sanitize_text_field', 228 'rules' => 'string', 229 ), 230 ) 231 ); 232 233 if ( ! $sanitized_data['success'] ) { 234 wp_die( esc_html( $sanitized_data['message'] ) ); 235 } 236 237 $request_verify = versatile_verify_request( $sanitized_data ); 238 239 if ( ! $request_verify['success'] ) { 240 wp_die( esc_html( $request_verify['message'] ) ); 241 } 242 243 $verified_data = (object) $request_verify['data']; 244 245 // Get template ID from request 246 $template_id = $verified_data->template_id ?? VERSATILE_DEFAULT_MAINTENANCE_TEMPLATE; 247 $type = $verified_data->type ?? 'maintenance'; 248 249 // Handle preview data if provided (for live preview with user's current form data) 250 $preview_data = null; 251 if ( isset( $verified_data->preview_data ) ) { 252 $preview_data_raw = $verified_data->preview_data; 253 $preview_data = json_decode( $preview_data_raw, true ); 254 } 255 256 if ( empty( $verified_data->template_id ) ) { 257 $template_id = $preview_data['template'] ?? VERSATILE_DEFAULT_MAINTENANCE_TEMPLATE; 258 } 259 260 $mood_helper = new MoodHelper(); 261 $mood_helper->render_template( $template_id, $type, $preview_data ); 262 die(); 263 } catch ( \Throwable $th ) { 264 wp_die( esc_html__( 'Error loading template preview: ', 'versatile-toolkit' ) . esc_html( $th->getMessage() ) ); 265 } 266 } 267 268 /** 169 269 * Custom_maintenance_mode description 170 270 * … … 172 272 */ 173 273 public function custom_maintenance_mode() { 174 $current_user = wp_get_current_user(); 175 176 // Fix deprecated emoji styles function for WordPress 6.4+ 274 $current_user = wp_get_current_user(); 275 $versatile_mood_info = get_option( VERSATILE_MOOD_LIST, VERSATILE_DEFAULT_MOOD_LIST ); 276 $show_subscribers_only = $versatile_mood_info['maintenance']['show_subscribers_only'] ?? false; 277 $template = $versatile_mood_info['maintenance']['template'] ?? VERSATILE_DEFAULT_MAINTENANCE_TEMPLATE; 278 279 $template_title = esc_html( $versatile_mood_info['maintenance']['title'] ?? '' ); 280 $subtitle = esc_html( $versatile_mood_info['maintenance']['subtitle'] ?? '' ); 281 $description = esc_html( $versatile_mood_info['maintenance']['description'] ?? '' ); 282 $background_image = esc_url( $versatile_mood_info['maintenance']['background_image'] ?? '' ); 283 $logo = esc_url( $versatile_mood_info['maintenance']['logo'] ?? '' ); 284 177 285 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 178 286 if ( function_exists( 'wp_enqueue_emoji_styles' ) ) { … … 180 288 } 181 289 182 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/MaintenanceMode/MaintenanceTemplate.php'; 183 die(); 290 if ( empty( $current_user->roles ) ) { 291 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/MaintenanceMode/Templates/' . $template . '.php'; 292 die(); 293 } 294 295 // If show_subscribers_only is enabled, only show coming soon mode to subscribers 296 if ( $show_subscribers_only ) { 297 if ( in_array( 'subscriber', (array) $current_user->roles, true ) ) { 298 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/MaintenanceMode/Templates/' . $template . '.php'; 299 die(); 300 } 301 } else { 302 include_once VERSATILE_PLUGIN_DIR . 'inc/Services/MaintenanceMode/Templates/' . $template . '.php'; 303 die(); 304 } 184 305 } 185 306 } -
versatile-toolkit/trunk/inc/Services/ServiceInit.php
r3342118 r3349303 18 18 use Versatile\Services\Troubleshoot\TroubleshootInit; 19 19 use Versatile\Services\Comingsoon\ComingsoonMood; 20 use Versatile\Services\QuickPick\QuickPick; 20 21 use Versatile\Traits\JsonResponse; 21 22 … … 66 67 $sanitized_data = versatile_sanitization_validation(); 67 68 68 if ( ! $sanitized_data ->success) {69 return $this->json_response( $sanitized_data ->message, $sanitized_data->errors, 400 );70 } 71 72 $ request_verify = versatile_verify_request( (array)$sanitized_data );73 74 if ( ! $ request_verify->success) {75 return $this->json_response( $ request_verify->message, array(), $request_verify->code);69 if ( ! $sanitized_data['success'] ) { 70 return $this->json_response( $sanitized_data['message'], $sanitized_data['errors'], 400 ); 71 } 72 73 $verify_request = versatile_verify_request( $sanitized_data ); 74 75 if ( ! $verify_request['success'] ) { 76 return $this->json_response( $verify_request['message'], array(), $verify_request['code'] ); 76 77 } 77 78 … … 93 94 $sanitized_data = versatile_sanitization_validation(); 94 95 95 if ( ! $sanitized_data ->success) {96 return $this->json_response( $sanitized_data ->message, $sanitized_data->errors, 400 );97 } 98 99 $ request_verify = versatile_verify_request( (array)$sanitized_data );100 101 if ( ! $ request_verify->success) {102 return $this->json_response( $ request_verify->message, array(), $request_verify->code);96 if ( ! $sanitized_data['success'] ) { 97 return $this->json_response( $sanitized_data['message'], $sanitized_data['errors'], 400 ); 98 } 99 100 $verify_request = versatile_verify_request( $sanitized_data ); 101 102 if ( ! $verify_request['success'] ) { 103 return $this->json_response( $verify_request['message'], array(), $verify_request['code'] ); 103 104 } 104 105 … … 143 144 ); 144 145 145 if ( ! $sanitized_data->success ) { 146 return $this->json_response( $sanitized_data->message, $sanitized_data->errors, 400 ); 147 } 148 149 $request_verify = versatile_verify_request( (array) $sanitized_data ); 150 151 if ( ! $request_verify->success ) { 152 return $this->json_response( $request_verify->message, array(), $request_verify->code ); 153 } 154 155 $service_key = $sanitized_data->service_key; 156 $enable = $sanitized_data->enable; 146 if ( ! $sanitized_data['success'] ) { 147 return $this->json_response( $sanitized_data['message'], $sanitized_data['errors'], 400 ); 148 } 149 150 $verify_request = versatile_verify_request( $sanitized_data ); 151 152 if ( ! $verify_request['success'] ) { 153 return $this->json_response( $verify_request['message'], array(), $verify_request['code'] ); 154 } 155 156 $verified_data = (object) $verify_request['data']; 157 158 $service_key = $verified_data->service_key; 159 $enable = $verified_data->enable; 157 160 158 161 // Get current service list … … 161 164 // Check if service exists 162 165 if ( ! isset( $service_list[ $service_key ] ) ) { 163 return $this->json_response( 'Error: Service not found', array(), 404 );166 return $this->json_response( __( 'Error: Service not found', 'versatile-toolkit' ), array(), 404 ); 164 167 } 165 168 … … 197 200 $sanitized_data = versatile_sanitization_validation(); 198 201 199 if ( ! $sanitized_data ->success) {200 return $this->json_response( $sanitized_data ->message, $sanitized_data->errors, 400 );201 } 202 203 $ request_verify = versatile_verify_request( (array)$sanitized_data );204 205 if ( ! $ request_verify->success) {206 return $this->json_response( $ request_verify->message, array(), $request_verify->code);202 if ( ! $sanitized_data['success'] ) { 203 return $this->json_response( $sanitized_data['message'], $sanitized_data['errors'], 400 ); 204 } 205 206 $verify_request = versatile_verify_request( $sanitized_data ); 207 208 if ( ! $verify_request['success'] ) { 209 return $this->json_response( $verify_request['message'], array(), $verify_request['code'] ); 207 210 } 208 211 209 212 $current_mood_info = get_option( VERSATILE_MOOD_LIST, VERSATILE_DEFAULT_MOOD_LIST ); 210 return $this->json_response( 'Maintenance Mood info updated!', $current_mood_info, 200 );211 } catch ( \Throwable $th ) { 212 return $this->json_response( 'Error: while updating maintenance mood info', array(), 400 );213 return $this->json_response( __( 'Maintenance Mood info retrieved successfully!', 'versatile-toolkit' ), $current_mood_info, 200 ); 214 } catch ( \Throwable $th ) { 215 return $this->json_response( __( 'Error: while retrieving maintenance mood info', 'versatile-toolkit' ), array(), 400 ); 213 216 } 214 217 } -
versatile-toolkit/trunk/inc/Services/Troubleshoot/TroubleshootInit.php
r3342118 r3349303 11 11 namespace Versatile\Services\Troubleshoot; 12 12 13 use Versatile\ Helpers\VersatileInput;13 use Versatile\Services\Troubleshoot\DebugLog; 14 14 use Versatile\Traits\JsonResponse; 15 15 … … 19 19 20 20 /** 21 * DisablePlugininit21 * Troubleshoot init 22 22 */ 23 23 class TroubleshootInit { … … 26 26 27 27 /** 28 * DisablePluginconstructor.28 * Troubleshoot constructor. 29 29 */ 30 30 public function __construct() { 31 // Add the debug log file. 32 $debug_log = new DebugLog(); 33 31 34 add_action( 'wp_ajax_versatile_plugin_list', array( $this, 'get_plugin_list' ) ); 32 35 add_action( 'wp_ajax_versatile_get_disable_plugin_list', array( $this, 'get_disable_plugin_list' ) ); 33 36 add_action( 'wp_ajax_versatile_save_disable_plugin_list', array( $this, 'save_disable_plugin_list' ) ); 34 37 add_action( 'wp_ajax_versatile_add_my_ip', array( $this, 'add_my_ip' ) ); 35 add_action( 'wp_ajax_versatile_ theme_list', array( $this, 'get_theme_list' ) );38 add_action( 'wp_ajax_versatile_get_theme_list', array( $this, 'get_theme_list' ) ); 36 39 add_action( 'wp_ajax_versatile_get_active_theme', array( $this, 'get_active_theme' ) ); 37 40 add_action( 'wp_ajax_versatile_save_active_theme', array( $this, 'save_active_theme' ) ); … … 64 67 65 68 // Check if sanitization was successful 66 if ( ! $sanitized_data->success ) { 67 return $this->json_response( $sanitized_data->message, array(), $sanitized_data->code ); 68 } 69 70 $request_verify = versatile_verify_request( (array) $sanitized_data ); 71 72 if ( ! $request_verify->success ) { 73 return $this->json_response( $request_verify->message, array(), $request_verify->code ); 74 } 69 if ( ! $sanitized_data['success'] ) { 70 return $this->json_response( $sanitized_data['message'], array(), $sanitized_data['code'] ); 71 } 72 73 $request_verify = versatile_verify_request( $sanitized_data ); 74 75 if ( ! $request_verify['success'] ) { 76 return $this->json_response( $request_verify['message'], array(), $request_verify['code'] ); 77 } 78 79 $verified_data = (object) $request_verify['data']; 75 80 76 81 // Convert object to array for easier handling 77 82 $params = array( 78 'chosen_plugins' => $ sanitized_data->chosen_plugins,79 'ip_tags' => $ sanitized_data->ip_tags,83 'chosen_plugins' => $verified_data->chosen_plugins, 84 'ip_tags' => $verified_data->ip_tags, 80 85 ); 81 86 … … 105 110 public function get_disable_plugin_list() { 106 111 $disable_plugin_list = get_option( VERSATILE_DISABLE_PLUGIN_LIST ); 107 return $this->json_response( 'Disable plugin list saved', $disable_plugin_list, 200 );112 return $this->json_response( 'Disable plugin list retrieved', $disable_plugin_list, 200 ); 108 113 } 109 114 … … 238 243 ); 239 244 240 if ( ! $sanitized_data ->success) {241 $error_message = versatile_grab_error_message( $sanitized_data ->errors);245 if ( ! $sanitized_data['success'] ) { 246 $error_message = versatile_grab_error_message( $sanitized_data['errors'] ); 242 247 return $this->json_response( $error_message, array(), 400 ); 243 248 } 244 249 245 $request_verify = versatile_verify_request( (array) $sanitized_data ); 246 247 if ( ! $request_verify->success ) { 248 return $this->json_response( $request_verify->message ?? 'Error: while updating active theme', array(), $request_verify->code ); 249 } 250 $request_verify = versatile_verify_request( $sanitized_data ); 251 252 if ( ! $request_verify['success'] ) { 253 return $this->json_response( $request_verify['message'] ?? 'Error: while updating active theme', array(), $request_verify['code'] ); 254 } 255 256 $verified_data = (object) $request_verify['data']; 250 257 251 258 // Remove keys that should not be saved 252 unset( $ sanitized_data->action, $sanitized_data->versatile_nonce );253 254 if ( ! empty( $ sanitized_data->activeTheme ) ) { // phpcs:ignore259 unset( $verified_data->action, $verified_data->versatile_nonce ); 260 261 if ( ! empty( $verified_data->activeTheme ) ) { // phpcs:ignore 255 262 // Verify theme exists 256 $theme = wp_get_theme( $ sanitized_data->activeTheme ); // phpcs:ignore263 $theme = wp_get_theme( $verified_data->activeTheme ); // phpcs:ignore 257 264 if ( ! $theme->exists() ) { 258 265 return $this->json_response( 'Error: Theme does not exist', array(), 400 ); … … 260 267 261 268 // Switch theme 262 switch_theme( $ sanitized_data->activeTheme ); // phpcs:ignore269 switch_theme( $verified_data->activeTheme ); // phpcs:ignore 263 270 264 271 return $this->json_response( 'Theme activated successfully', array(), 200 ); -
versatile-toolkit/trunk/inc/Traits/JsonResponse.php
r3342118 r3349303 10 10 11 11 namespace Versatile\Traits; 12 13 use Versatile;14 use Versatile\Helpers\UtilityHelper;15 12 16 13 /** -
versatile-toolkit/trunk/inc/VersatileGlobals.php
r3342118 r3349303 46 46 // Check user permissions 47 47 if ( ! current_user_can( $permissions ) ) { 48 return (object)array(48 return array( 49 49 'success' => false, 50 50 'message' => __( 'You do not have permission to access this feature.', 'versatile-toolkit' ), … … 59 59 // Verify nonce 60 60 if ( ! wp_verify_nonce( $inputs[ $nonce_key ], $nonce_action ) ) { 61 return (object)array(61 return array( 62 62 'success' => false, 63 63 'message' => __( 'Invalid security token!', 'versatile-toolkit' ), … … 66 66 } 67 67 68 unset( $inputs[ $nonce_key ] ); 69 unset( $inputs['action'] ); 70 68 71 // Return success with sanitized POST data 69 return (object)array(72 return array( 70 73 'success' => true, 71 74 'message' => __( 'Verification successful.', 'versatile-toolkit' ), 72 75 'code' => 200, 76 'data' => $inputs, 73 77 ); 74 78 } … … 120 124 $validation = ValidationHelper::validate( $rules, $mapped_sanitized_data ); 121 125 122 if ( ! $validation ->success) {123 return (object)array(126 if ( ! $validation['success'] ) { 127 return array( 124 128 'success' => false, 125 129 'message' => __( 'Error: Required fields missing!', 'versatile-toolkit' ), 126 130 'code' => 400, 127 'errors' => $validation ->errors,131 'errors' => $validation['errors'], 128 132 ); 129 133 } … … 131 135 $mapped_sanitized_data['success'] = true; 132 136 133 return (object)$mapped_sanitized_data;137 return $mapped_sanitized_data; 134 138 } 135 139 /** -
versatile-toolkit/trunk/languages/versatile-toolkit.pot
r3342118 r3349303 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Versatile Toolkit 1.0. 0\n"5 "Project-Id-Version: Versatile Toolkit 1.0.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/versatile-toolkit\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-08- 09T20:39:36+00:00\n"12 "POT-Creation-Date: 2025-08-24T16:33:23+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 106 106 msgstr "" 107 107 108 #: inc/Services/ServiceInit.php:79 108 #: inc/Services/Comingsoon/ComingsoonMood.php:141 109 msgid "Comingsoon Mood info updated!" 110 msgstr "" 111 112 #: inc/Services/Comingsoon/ComingsoonMood.php:143 113 msgid "Error: while updating comingsoon mood info" 114 msgstr "" 115 116 #: inc/Services/Comingsoon/ComingsoonMood.php:262 117 #: inc/Services/MaintenanceMode/MaintenanceMode.php:264 118 msgid "Error loading template preview: " 119 msgstr "" 120 121 #: inc/Services/ServiceInit.php:80 109 122 msgid "Service list retrieved successfully!" 110 123 msgstr "" 111 124 112 #: inc/Services/ServiceInit.php:8 1125 #: inc/Services/ServiceInit.php:82 113 126 msgid "Error: while retrieving service list" 114 127 msgstr "" 115 128 116 #: inc/Services/ServiceInit.php:11 5129 #: inc/Services/ServiceInit.php:116 117 130 msgid "Enabled services retrieved successfully!" 118 131 msgstr "" 119 132 120 #: inc/Services/ServiceInit.php:11 7133 #: inc/Services/ServiceInit.php:118 121 134 msgid "Error: while retrieving enabled services" 122 135 msgstr "" 123 136 124 #: inc/Services/ServiceInit.php:182 137 #: inc/Services/ServiceInit.php:166 138 msgid "Error: Service not found" 139 msgstr "" 140 141 #: inc/Services/ServiceInit.php:185 125 142 msgid "Error: Failed to update service status" 143 msgstr "" 144 145 #: inc/Services/ServiceInit.php:213 146 msgid "Maintenance Mood info retrieved successfully!" 147 msgstr "" 148 149 #: inc/Services/ServiceInit.php:215 150 msgid "Error: while retrieving maintenance mood info" 151 msgstr "" 152 153 #: inc/Services/Troubleshoot/DebugLog.php:93 154 #: inc/Services/Troubleshoot/DebugLog.php:237 155 #: inc/Services/Troubleshoot/DebugLog.php:243 156 msgid "Invalid input data" 157 msgstr "" 158 159 #: inc/Services/Troubleshoot/DebugLog.php:103 160 msgid "Error toggling debug log" 161 msgstr "" 162 163 #: inc/Services/Troubleshoot/DebugLog.php:131 164 msgid "Error getting debug log status" 165 msgstr "" 166 167 #: inc/Services/Troubleshoot/DebugLog.php:256 168 #: inc/Services/Troubleshoot/DebugLog.php:456 169 msgid "Debug log file not found" 170 msgstr "" 171 172 #: inc/Services/Troubleshoot/DebugLog.php:285 173 msgid "Error getting debug log content" 174 msgstr "" 175 176 #: inc/Services/Troubleshoot/DebugLog.php:422 177 msgid "Debug log cleared successfully" 178 msgstr "" 179 180 #: inc/Services/Troubleshoot/DebugLog.php:424 181 msgid "Failed to clear debug log" 182 msgstr "" 183 184 #: inc/Services/Troubleshoot/DebugLog.php:427 185 msgid "Debug log file does not exist" 186 msgstr "" 187 188 #: inc/Services/Troubleshoot/DebugLog.php:430 189 msgid "Error clearing debug log" 190 msgstr "" 191 192 #: inc/Services/Troubleshoot/DebugLog.php:468 193 msgid "Error downloading debug log" 126 194 msgstr "" 127 195 … … 134 202 msgstr "" 135 203 136 #: inc/VersatileGlobals.php:7 1204 #: inc/VersatileGlobals.php:74 137 205 msgid "Verification successful." 138 206 msgstr "" 139 207 140 #: inc/VersatileGlobals.php:12 5208 #: inc/VersatileGlobals.php:129 141 209 msgid "Error: Required fields missing!" 142 210 msgstr "" -
versatile-toolkit/trunk/readme.txt
r3342118 r3349303 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 92 92 == Changelog == 93 93 94 = 1.0.1 = 95 = Debug log enable & disable, refresh log, view log, download log 96 * Maintenance page template selection 97 * Coming soon page template selection 98 94 99 = 1.0.0 = 95 100 * Initial release -
versatile-toolkit/trunk/tsconfig.json
r3342118 r3349303 20 20 "@lib/*": ["./src/lib/*"], 21 21 "@utils/*": ["./src/utils/*"], 22 "@hooks ": ["./src/hooks"],22 "@hooks/*": ["./src/hooks/*"], 23 23 "@pages/*": ["./src/pages/*"], 24 24 "@services/*": ["./src/services/*"], 25 "@entries/*": ["./src/entries/*"], 25 26 } 26 27 }, -
versatile-toolkit/trunk/versatile-toolkit.php
r3342118 r3349303 2 2 /** 3 3 * Plugin Name: Versatile Toolkit 4 * Version: 1.0. 04 * Version: 1.0.1 5 5 * Requires at least: 5.3 6 6 * Requires PHP: 7.4
Note: See TracChangeset
for help on using the changeset viewer.